Destructable tiles?
by Ryan Ackley · in Torque Game Builder · 08/25/2005 (1:55 pm) · 10 replies
Does anyone have any idea how you would go about creating, for example, a level from super mario brothers. It sounded simple to me at first, setup a tilemap with the current map defined: Ground to walk on, pipes here and there, etc. What about the destructable bricks? Basically any "brick" was destructable in SMB. I could do it all with sprites. Lots and lots (and lots!) of sprites. Is there a way to create a tile layer of objects that could be told to disapear individually when a player comes in contact with them? (and thus, be much easier to manage)
About the author
#3
Assuming his hack was something that could be incorporated that is. ;)
08/25/2005 (2:37 pm)
I hope that Justin DuJardin's work with pixel perfect collisions and object (terain) deformations made it's way to Melv to review, it would be a pitty if any good work he's done was for naught now that he has a full-time job to tend to.Assuming his hack was something that could be incorporated that is. ;)
#4
08/25/2005 (2:42 pm)
Yeah, i came across that, and I might send him an email, because that looks HOT. Totally worms style. Is he using tilemaps to represent his terrain? If so, thats cool, im kinda stuck in the thinking of tiles as "squares." Is my line of thinking about the representation of tiles wrong? Im just trying to comprehend how he got a tile map to do that :)
#5
Tiles in T2D are very flexible. They are, in fact, fxSceneObjects, so you can do pretty much whatever you want with them. Now, rigging it up so that a tile knows that it is a brick (so that when it collides with the player it disappears) is the tricky part. Right now, T2D's tile map editor can't do a terribly good job in terms of setting up something like this, where you have tiles that need to have particular script behavior in them. Ultimately, what you want to do is bind a script to each of the brick tiles that will register an appropriate callback for collisions. If the player hits it in the right place, then the tile should break.
08/25/2005 (7:54 pm)
Scorched Earth terrain has precious little to do with Mario-style block breaking.Tiles in T2D are very flexible. They are, in fact, fxSceneObjects, so you can do pretty much whatever you want with them. Now, rigging it up so that a tile knows that it is a brick (so that when it collides with the player it disappears) is the tricky part. Right now, T2D's tile map editor can't do a terribly good job in terms of setting up something like this, where you have tiles that need to have particular script behavior in them. Ultimately, what you want to do is bind a script to each of the brick tiles that will register an appropriate callback for collisions. If the player hits it in the right place, then the tile should break.
#6
if we setup a brick with our image, then script brick objects to "die" (just delete them) when there is a collision between the player and a brick object, and then drop that several hundred times in the tile editor, id be all set? Sounds cool.
Sorry for the misleading thread title, but i couldnt think up anything better at the time (nor now)
08/25/2005 (8:11 pm)
So, basically:if we setup a brick with our image, then script brick objects to "die" (just delete them) when there is a collision between the player and a brick object, and then drop that several hundred times in the tile editor, id be all set? Sounds cool.
Sorry for the misleading thread title, but i couldnt think up anything better at the time (nor now)
#7
Justin now is an Employee at GarageGames btw
08/25/2005 (9:12 pm)
One of my first tutorials was based around a 3d render of a crate as a tile and I set it up so when I shot the crate a particle effect played and the crate got destroyed, effectively shooting/destroying the crates... Though with the modifications being made to the tilemap file structure I figured it would be best to wait till the new version came out :)Justin now is an Employee at GarageGames btw
#8
- Melv.
08/26/2005 (2:14 am)
There are, of course, active-tiles which can be configured to do practically anything. Active-tiles, although not supported in the editor yet, will do it,- Melv.
#9
08/26/2005 (5:34 am)
Thanks alot melv. I have been looking at interesting things in older games and trying to figure out how i could do them in T2D. It is good to hear that active tiles support is coming. Keep up the good work!
#10
08/26/2005 (11:35 am)
Actually, I gather from Melv's post that active tile support is here... Just not through the editor. :)
Torque 3D Owner Stephen Zepp