Game Development Community

Programming platformer games in Torque Game Builder

by Glenn Prince · 09/07/2006 (5:03 pm) · 18 comments

The following is the plan for a set of tutorials I would like to develop to try and assist TGB users in not only getting a feel for the TGB tool set, but to also provide an easier learning curve in creating games (specifically platform games) in TGB. The main part of the tutorial set has been split into small, logical sections, with the idea that these should be followed sequentially as they specifically build on the previous section. Each tutorial section contains a narrated video, a "cheat sheet", and a code snapshot of the beginning and end of the tutorial. The following is the 10 part topic list for the main "stream" of the tutorials:

Core Tutorial 1 -- Setup and Ground Work

1) Grabbing TGB and starting up a new project
2) Moving your resources into the project folder
3) Loading up the art datablocks into the TGB managed datablocks section
4) Setting up the overall scene
5) Creating basic platform brushes and setting their values
6) Creating background and "feature" brushes to spruce up the level
7) Drawing out the level in the level builder
8) Running the game to display our level

Core Tutorial 2 -- Player Object

1) Loading the player datablocks and creating the animation sequences for them
2) Create the player within the scene as an animated sprite
3) Creating an ActionMap to capture the player's movement
4) Implementing the basic physic's and properties of the player and the level
5) Collisions testing and updating the player
6) Testing the movement within the game
7) Linking the players movement with the animations
8) Linking the players jumping with the animations
9) Testing the animations within the game

Core Tutorial 3 -- Camera System

1) Create the camera object that holds our camera functions
2) Create the "track player" method that keeps the player in the center of the screen
3) Create the update camera method that keeps track of the camera
4) Test the tacking of the player by moving around the level
5) Plan out the buffer tracking of the player
6) Create the buffer area method for the camera
7) Modify the update camera method to include buffer tracking
8) Test the buffer tracking within the game

Core Tutorial 4 -- Basic Enemies

1) Loading the enemy datablocks and creating the animation sequences
2) Create the first simple "dumb" enemy within the scene as an animated sprite
3) Adding the custom information about the enemy sprite
4) Creating the "AI" method that determines what the enemy is doing at any one time
5) Create the update enemy function that keeps track of the enemies
6) Test to see if the enemy performs as required within the level
7) Create a simple chase enemy within the scene as an animated sprite
8) Add the custom information about the enemy sprite
9) Modify the update enemy function to handle chase enemies
10) Test to see if the enemy performs in game

Core Tutorial 5 -- Scoring

1) Creating the variables for scoring system
2) Test for collisions between the player and enemies
3) Update the score fields if the player killed the enemy
4) Updating the lives field if the enemy killed the player
5) Killing the enemy and removing them
6) Killing the player
7) Ending the game when the player runs out of lives
8) Testing the scoring system within the game
9) Setting up checkpoints within the level
10) Changing the player to respawn at the check point
11) Testing the game

Core Tutorial 6 -- GUI's, In Game HUD

1) Creating a font for use with the in game HUD
2) Loading the font resource into the game
3) Creating the HUD window and mounting it to the camera
4) Creating the score and lives area's to keep track of the players variables
5) Displaying the players score and lives
6) Creating an update method to track when a variable changes
7) Animating the updates of the HUD
8) Testing the HUD within the game

Core Tutorial 7 -- Level Progression

To be planned

Core Tutorial 8 -- Sound and Music

To be planned

Core Tutorial 9 -- GUI's, Menu System and Configurations

To be planned

Core Tutorial 10 -- Saving, Pausing and Winning

To be planned


This core tutorial structure should then leave you with a fairly complete platformer game to build on. As you can see, the tutorial does follow fairly closely the structure of the original platformer tutorial, which I found fairly good. Hopefully with a narrated video I can explain the process well. In my mind, I am probably going to do this in a fairly informal, non-scripted way.

From a game design point of view, we are going for a standard, Mario-Esq style game where you basically run and jump on enemies with no real weapons / weapon firing. There will be no difference in speeds and other issues like that, however I my mention how you might add feature xyz as I go along. I will also, through the core tutorial, be using "placeholder" art in the form of the Sprite Library from Ari Feldman. It's a handy little art assets you can use for a lot of prototyping.

Finally there are a number of "Feature" mini tutorials I wouldn't mind doing at a later stage after the "core" ones are done. These tutorials would basically cover single features added to the core system, such as different camera modes, power ups, ladders etc. I would even encourage others to run these feature tutorials on their own, but this is getting way to far ahead !! The above will keep me busy for a little while. Comments and suggestions are more than welcome.

About the author

Recent Blogs

• Behavior Contest - Round 1

#1
09/07/2006 (5:31 pm)
Awesome, this is gonna be realy cool :)
#2
09/07/2006 (5:58 pm)
can't wait.
#3
09/07/2006 (6:08 pm)
very interested in this as well!
#4
09/07/2006 (7:20 pm)
good stuff
#5
09/07/2006 (8:43 pm)
Sounds great!
#6
09/07/2006 (11:20 pm)
I am really excited about the possibilities of using TGB for platformers. I have one suggestion - could you try making the player model be a dts based 3D character instead of sprite based? Or would that just kill performance? I think that the use of 3D models in a 2D game could be a real differentiator for TGB over other 2D game toolkits.
#7
09/08/2006 (12:37 am)
This is a lot more work then you think ;)
#8
09/08/2006 (1:00 am)
This ROCKS!!!
#9
09/08/2006 (1:48 am)
Yes, it is a TON of work. I am preparing the final touches on the first one now and trust me, the VTM only goes for 15 - 20 mins but there is a number of hours into this already. And this tutorial is the easy one !! However look on the forums soon for the first draft of the first VTM. If most people are happy I'll continue on :-)
#10
09/08/2006 (2:46 am)
Sounds great. I can't wait!
#11
09/08/2006 (1:14 pm)
great project, i like johnstons idea of including a 3d model sprite. it is definately what catches the eye of those not familiar with gg products. hope you stay motivated and finish them all. the reward for you personally will be more than you realize...
#12
09/09/2006 (2:25 am)
Watched the video, it looks great! I can't wait to see more.
#13
10/22/2006 (12:23 am)
Where can I watch the videos?....
#14
10/22/2006 (2:58 am)
Just found it on forums (beta version of the video)
http://www.garagegames.com/mg/forums/result.thread.php?qt=50150
http://hosted.filefront.com/crispiecritter/

EDIT: I can't see the videos because I don't have the audio codec,
and after more than 1 hour downloading ogg and ac3 filters and codecs,
using all sort of players, I realized that my computer will just not
run it. Please, next time, use another sound codec :(
#15
03/09/2007 (9:40 am)
whats the password???


http://hosted.filefront.com/crispiecritter/
#16
06/13/2007 (4:29 pm)
Yes, what is the password for the video?
#17
01/06/2008 (10:47 pm)
It would be extremely useful if you started these up. I look forward to this highly let me know if you need any assistance.
#18
05/18/2008 (1:03 am)
did u ever do this
#19
04/29/2009 (6:37 pm)
I'm going to take a safe guess and say that, if this actually was made at all, it was probably turned into the Platformer Kit. -_-;