Z-ordering sprites based on y position
by Graeme Sales · in Torque Game Builder · 01/04/2008 (8:44 am) · 5 replies
Hi all!
This is my first post on the forums so try to be gentle with me :D.
I'm in the middle of prototyping a game in TGB but have run up against a small problem when ordering sprites. The aim is to create a 2d scrolling beat-em-up style game similar to the likes of Golden Axe, Streets of Rage, Final Fight etc. Unfortunately this requires dynamically layering the sprites involved in the scene based on their y position, so that characters higher up are drawn behind other characters.
Does anyone know if there's an option to achive this automatically in TGB or will I have to write a sort algorithm to handle it myself?
Heres hoping someone's come up against this one before, it's been driving me crazy!
This is my first post on the forums so try to be gentle with me :D.
I'm in the middle of prototyping a game in TGB but have run up against a small problem when ordering sprites. The aim is to create a 2d scrolling beat-em-up style game similar to the likes of Golden Axe, Streets of Rage, Final Fight etc. Unfortunately this requires dynamically layering the sprites involved in the scene based on their y position, so that characters higher up are drawn behind other characters.
Does anyone know if there's an option to achive this automatically in TGB or will I have to write a sort algorithm to handle it myself?
Heres hoping someone's come up against this one before, it's been driving me crazy!
#2
01/04/2008 (11:34 am)
Golden Axe, awesome.
#3
Thanks so much for your help on this Dan, it has definitely sold me on using the engine for my prototype.
01/05/2008 (8:09 am)
Just tried it and it works perfectly! Who'd have thought the functionality would just be sitting there ready to use!Thanks so much for your help on this Dan, it has definitely sold me on using the engine for my prototype.
#4
01/05/2008 (10:01 am)
Prototyping but not actually using it to program the game in? why not?
#5
I figure I'd best learn to walk before I can run :)
01/06/2008 (9:15 am)
Assuming the prototype goes to plan I'll almost certainly use TGB to write the full game, but I'm a long way from that at the moment.I figure I'd best learn to walk before I can run :)
Torque Owner Dan Maruschak