Game Development Community

dev|Pro Game Development Curriculum

A fresh new start!

by Simon Love · 04/23/2016 (3:40 am) · 4 comments

Howdy Torque 2D Veterans and Hopefuls!

Got 5 minutes to spare? Know how to read?

This blog post has been custom-tailored to fit your needs, then!


Prototype

Torque2D is a great engine for fast prototyping. Once developers leave the prototype phase to begin real production however, more often than not, a huge wall stands in their way.

For instance, it's easy to bind an ActionMap directly to player movement.

Once we start thinking about how player input is handled in the context of a more complex project however, this approach needs to be refactored and rethought.

What does this refactoring involve? Usually going back through spaghetti code, overly bloated methods and functions, trying to rebuild everything from the ground up. It often means changing what made the initial prototype so special.


Momentum

At that point, momentum is gone. The "fun" part of game development is over and devs find themselves in a prison of their own making. No way out but through...

Unfortunately, aside from a sympathy for battle scars, not much of this process can be shared with the community as the work is usually very specific to a project's idiosyncrasies and might not transpose easily to other projects.

War stories? We all have them. What other message can we send other than Hang in there!?

www.s01l.com/repository/DS_Momentum_1.png
If you're playing Desert Strike with no momentum, you're not playing Desert Strike!


Clean Slate

I want Torque2D to move forward. I want more developers to try it out and realize its true power.

There is no reason why anyone should have to strip the Sandbox demo down to its bare components before getting started with their own projects.

Over the years, I've developed and refined starter modules that I re-use every time I want to start a bare-bones T2D project. Hit the ground running and all that jazz...

In the coming weeks, I will publish in-depth articles on here and share with you all these foundational modules through Github.

I have planned to space it out over a few weeks in order to avoid one gigantic post trying to tackle all subjects at once.

Here's a brief overview :

  1. The Starter Project
  2. This is a bare-bones project which includes the Console and a few utilities for speeding up T2D development. Boring but we have to start somewhere.

  3. The InputMatrix Module
  4. This creates a layer between player input (regardless of input device) and actual game logic. It facilitates remapping and silky-smooth controls while allowing developers to focus on their game, not the input bindings.

  5. The ControlObject Module
  6. Borrowing a page from T3D, a control object allows players to direct input towards a specific object in the Scene. The way I've implemented it allows to switch control objects on the fly and even allows control of multiple objects at once, each one reacting according to its own rules! Trippy stuff, man.

  7. The UI_Base Module
  8. This module makes scene-based User interfaces easier to deal with, which is now 150% cooler thanks to Peter Robinson's new Text Sprite.

These modules have been built to work together; the control object system depends on the InputMatrix and while also being the driving force behind the UI_Base. Note that they are also based off of T2D's latest development branch (post 3.3), which fixes issues with the input code which have plagued T2D and TGB since 2007!!!

Stick around, true believers!

Next Issue : The Starter Project.

About the author

I am here to help. I've worked at every imaginable position in game development, having entered the field originally as an audio guy.


#1
04/23/2016 (9:45 am)
Great idea, Simon - thanks!
#2
04/23/2016 (11:13 am)
Can't wait to see your break down. I've invented all of my own solutions to these problems over the years as well. It's high time we started sharing our collective knowledge.
#3
04/23/2016 (11:45 am)
@Peter : Coming from someone with the word HIVE in their company name, I find that very frightening. You sure you ain't Skynet?
#4
04/24/2016 (5:51 am)
Never mind ;O)