-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fill Battle Tutorial
While it is always tempting to dive head first into Torque 2D and start working on your "dream" game, it is especially helpful for beginner users to get an idea of the T2D "workflow" by following tutorials that make or remake existing games.
The following tutorial is based on a version originally made for Torque Game Builder by William Lee Sims and published on the Torque Developer Network. It has been given a new coat of paint and made to work now with Torque 2D MIT.
This series is broken down into 2 parts which cover prototyping an existing game in TorqueScript, expanding that prototype into a board game with a trivial opponent, and then expanding that prototype to create a “smart” A.I. player in C++. One thing to note on the tutorial layout: each chapter starts with a step by step walkthrough summary of how to implement things in T2D. It purposely does not go into a ton of detail so more intermediate and advanced users can quickly follow along without reading walls of text explaining things they already might know. For beginner users, following the summary is a section that covers certain steps in much more detail so you can better understand why things are being done the way they are written. There are also links to other tutorials and guides that go even deeper into a particular T2D system.
If you've never scripted in TorqueScript or have never written C++ code, it is highly recommended that you type in the code samples. You'll see patterns that you won't get by simply copying and pasting.
In this section you will learn the following:
- Building a module from scratch
- Adding image assets
- Creating game objects (CompositeSprite, Sprite, and ScriptObject) directly in TAML XML
- Assigning those objects behaviors made in TorqueScript
At the end of this section you will have a playable board game for 1 person where you can change tile colors by clicking on Sprite "buttons" in the Scene.
Start the tutorial here: Fill Battle: Part 1
In this section you will learn the following:
- Creating a C++ class that can be used in TorqueScript
- Expand and optimize that class, which will represent the board game A.I.
Sorry, no tutorial link yet! This section is still under development.