TGB/Tutorials/Stacker Clone
From TDN
This is a simple tutorial for TGB that aims to take someone from zero knowledge of TGB to a working game that is a simplified clone of the arcade hit “Stacker”. A little programming knowledge would be helpful but not necessary as I walk through every step of the process with code examples and screen shots.
When thinking about what I wanted to accomplish with this, I went through my development notebooks and looked for recurring sticking points from when I was just getting started with TGB. Many of these issues were ground floor problems that had a significant impact on my motivation for creating games with TGB as well as cutting into what little time I had to devote to learning how TGB works. Hopefully this tutorial will help someone work their way through these trouble spots in a way that hasn’t already been covered in other tutorials.
The tutorial is divided into three sections:
The Project Setup section is brief and covers how to properly setup a project within the TGB editor with screenshots for each step of the way. Short and sweet but I found TGB a little overwhelming at first and I found that this fundamental lesson is overlooked in many of the existing TGB tutorials. Since not everyone has Torsion (even though they should…) I decided not to include setting up a Torsion project in this section but if there is interest in that, I’d be happy to provide a supplement to this on that topic.
The next section, Importing Assets, shows how to add the images to the project we just created. I walk through the process step by step, showing screenshots along the way. Pretty straightforward stuff here…
The last section is the main course of the tutorial. It’s the longest and most demanding but also the most rewarding as that’s where we make the project and the images we setup in the previous steps actually behave like a game. In this section I cover, and briefly explain many concepts including Bringing assets to the stage, Naming assets for accessing them in script, Creating new script files, Global and local variables, Functions, Comments, Action maps (binding commands to the keyboard), tileLayers, Dynamic fields, Timers and General programming concepts.
The tutorial and supporting files can be downloaded here:
A finished example can be downloaded here.
Please let me know if you like it, hate it, found mistakes, or just want to drop me a line. Happy trails fellow TGB developers!
Patrick



