Path of Enlightenment
|Top Previous Next|
Gordon Tackett is our guest start this month and he is giving us quite a bit of useful info.
Q: I'd say that The Path of Enlightenment is a good example of a casual game. How big is your team and how much time did it take you to create the game?
A: Well the development was done by just me. I used Paint Shop Pro X2 for the graphics with extensive use of the programming interface to create all the tile images. The game development time was only about four months.
Q: How did you implement the "golden path" system, the one that keeps track of the path between the starting position and the destination?
A: For the path system I used the multi dimensional arrays of lite-c. To really understand how this system works will take a bit of background. First the octagon tiles on the screen are layers of panels. The layers are the base tile, the path, the center medallion, the color overlay and finally the blocking object. So the tiles on the screen are really a 3 dimensional array of panels. A control array contains the current tile type, rotation, state and number of times the tile has been clicked. A tile type array holds the information that tells what locations on the tile have a path. There is a similar set of arrays for the square tiles. I then use a recursive function to follow the paths starting at the top of the tile and working clockwise around the tile to see if I have any connecting paths with other tiles. If I connect I start following that path till I find all paths that connect. The overlay color is changed as it goes.
Once I do this, if I hit the goal tile I work start working back through the call chain and turn off connection paths that are not part of the found path. I flag the panels that have been processed using the flare flag and turn off the flare flag on all panels at the end. If the goal tile is not reached I start with the goal tile and do the same thing but change the overlay color to a different color. This is probably the most complex part of the game. It is done between frames and the code had to be very compact. That is why I have so many arrays to have the data pre-calculated as much as possible.
Q: How do you keep track of the blocks that are destroyed, adding new blocks, making them slide down until they arrive at their proper positions, and so on?
A: For this I hide the "destroyed" blocks first just by using the VISIBLE. Then each block that is to slide starts a task to slide that block from point A to point B. This task first copies the block in A to the hidden block B and hides all the panels at A then moves the panels from B to A's location by changing the pos_y and starts sliding the block by slowly changing the pos_y value of the panel to make it move. Once it is back in position the task terminates. New blocks are added the same way. It is really just a matter of simple assignments and a while loop.
Q: How did you implement the 60 minute trial system?
A: That was one of the easiest parts of the game. All that was required for this was to have a task update a counter every so many seconds and store it in the system registry. OK it is a bit more complicated than that but only because I also encode the name of the purchaser and a validation code with it. I used several simple encryption techniques to make it safe for the audience I am targeting.
Q: What did you learn by creating TPoE?
A: The first thing I learned (for the casual game market anyway) is that if you have an idea you really need to move quickly on it. The idea for this game came over a year and a half before programming was started. If programming had started when the idea was formed it probably would have been picked up by one or more of the big 4 casual game distributors.
The second thing I learned was that you can do more with panels than you think. I also learned that the use of buttons on panels for a menu items is very limiting. I am addressing the menu issue by creating a full function menu system. I am also creating a library of panel effects. These libraries will be marketed on our website -http://www.westmarch.com - as separate products. I am going to offer a discount on this game AND include these libraries just for readers of this magazine. When you order the game use the promo code aum80reader for a 40% discount and get the libraries for free.
Q: How do you plan to promote your game?
A: At this point I am limited to self promoting the game. The mechanic of this game i.e. turning tiles to form a path (according to the publishers that have given feedback) is no longer viable. I am however seeing sales with self promotion but not the volume of sales I would have seen if it would have been release sooner. The lesson in all of this is that "cool marches on".
Q: Can you give us a few tips for the beginners out there?
A: For the casual game market once you get an idea for a game write a good story line and hit the coding. Use simple graphics of the target size to get started. Once the code is working revise the graphics to fit the story and finish the game. Also if you can't do the music and sound you can get stock music and sound for very little money (http://www.shockwave-sound.com). You can also find some sounds free on the internet but with this make sure that they are not copyrighted but public domain. You can also get some stock images this way as well. You can also use real objects to get images. The frame on the options dialog is a photo of a $5 frame. For this market the coding and graphics quality is what will sell the game.
Q: Finally, can you tell us a few things about DocMaster? What is it and how will it help the GameStudio community?
A: As this game grew it was harder to keep track of what functions did what and what parameters they needed this week (TPoE is about 10k lines of code and 4k lines of docs in some 20 odd files). Having to have all the source code files open just so I could look at a function to see what it needed or to look for a function that did what was needed at the time was a big waste of time. I develop DocMaster to be able to take the documentation out of the source files and make it easy to find the function docs. Just having the documentation without the code in an easy to read format has increased my productivity.
Gordon Tackett <firstname.lastname@example.org>
Owner, Westmarch Studios
Thank you a lot, Gordon.