Hi guys and girls(?),

I have created a 2d turn based board game game like chess, in java but my problem is that I wanna add some kind of walk through or tutorial system to explain the controls and features of the game.

I was wondering if anyone had any good ideas on how to maybe implement this?

Cheers in advance guys.

The simplest thing would be to open up a new JFrame to display screens of help. How you organize the information will depend on how much there is, but let's suppose that you need to explain the rules, the controls, and the interface with the machine (saving a game, settings, and such). Let's suppose further that each of these three areas is subdivided: Rules might break down into Pieces, Moves, Turns, and Scoring, for example.

I would probably make a properties file for each of the major categories and a property for each subdivision. So rules.properties would have a property "Pieces" which would define the pieces, and another "Moves" which would define the moves. Give the property names as you want them displayed. Use the propertyNames() method to get a list of subtopics under Rules, and generate a button for each subtopic by looping on this enumeration. This way, you can change the subtopics and rewrite the help text without changing the code.
To be even more dynamic, you could have an overall "help.properties" file which would hold the major divisions. (so "help.properties" is just a list of names associated with properties files) That way your whole help system is pretty dynamic - you probably don't need that, though.

Get your information design down before you start setting up your code. In other words, figure out what you're going to need to say before you figure out how to say it. Write down each screen of text on a sheet of paper or an index card and try navigating them on your desk before you start coding.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.