Game Development Community

Questions for David Grace regarding Cloudburst

by Christopher Gu · in Torque Game Builder · 10/25/2005 (7:25 pm) · 3 replies

Hey David!

First of all, let me say how awesome CloudBurst is! It's truely an inspiration for those of us who are just getting started with T2D.

I would've emailed you about this, but I'm sure other people will have been wondering the same things.

I'm pretty new to T2D, and game programming/design in general. I was wondering what kind of methods you used for scripting your level? How does your game schedule when enemies and boss appear on the screen?

Any info would be greatly appreciated!

#1
11/15/2005 (1:24 pm)
Thanks Christopher -- sorry for not replying earlier to this.

Level scheduling is done almost exactly how it is done for my other 2D shooter, Adagio. There is one "fake" tilemap layer which contains onTileScript events for the various enemies. (Use CTRL-click to edit a tile's properties and edit parameters sent to onTileScript.) So when I want to play, say, enemy #10 on a certain tile, I click on it and then edit the tile script parameter to be "s 10".

Then, in my onTileScript event, I take the parameter and act upon it... For example:

function fxTileMap2D::onTileScript (%this, %tilelayer, %tilepos, %tilescript)
{
	if ($paused || $tileEditorActive)
	  return ;
	%cmd = getword (%tilescript, 0) ;
	%val = getword (%tilescript, 1) ;
	
	if (%cmd $= "s")  // we are an enemy tile
	{
		%pos = "900" SPC (getword (%tilepos, 1) * 40 + 20) ;  // get the relative position of the tile
                %obj = spawnEnemy (%val, %pos) ;
        }
}
#2
11/15/2005 (3:15 pm)
Thank you for this info @Grace
this sure is a simple and easy way to do
something I was planning to do too :)
#3
11/22/2005 (11:55 am)
Hey David,

That's a very cool solution! Thanks for sharing!