Game Development Community

2d sprites in tge

by Robin Degen · in Torque Game Engine · 03/01/2006 (4:09 pm) · 10 replies

I've been looking around how to make 2d sprites in tge, where the transparent bit of the png is invisible (to make things like 2d trees or fences). Now, i don't want them to be billboard (move with the camera/player), and they should be just addable through the mission editor. I cant make seperate models for each sprite i need (it would simply be to much)... Is there a good resource on this? How would i go and making this?

#1
03/01/2006 (4:12 pm)
Make a single model consisting of a simple plane. Retexture as needed with the image you want on it.
#2
03/01/2006 (4:17 pm)
But they all have different sizes.. and i might use over 100 of 'm.. I was looking for a more.. engine support to it. But thanks anyway.
#3
03/01/2006 (4:19 pm)
Well you can use a 512x512 texture on a pretty good size square plane, and changing a texture is really simple; not sure what type of "engine support" else there could be.
#4
03/01/2006 (4:26 pm)
Well, with engine support i just mean i want to see the png files added in the mission editor (just like the .dif shapes are) and that you can just add them to your mission.

I was thinking for a second about making 1 large plane, and just putting those different textures on that... but then the collision would be wrong (yes.. another thing i want hehe)
#5
03/01/2006 (5:40 pm)
That was my idea to it heh, but you want collision.. with the texture? Definitely an engine thing then.
#6
03/01/2006 (6:09 pm)
You could work TGB hooks into the TGE scenegraph...but that would be work.
#7
03/02/2006 (5:23 am)
I don't have a tgb lisence though, only tge and tse.. Hmm i really need to find this out.. Thanks anyway..
#8
03/02/2006 (6:51 am)
Dig around in the part of the engine dealing with loading shapes (.dts)
#9
03/02/2006 (7:16 am)
You could also look at the billboarding code and see if you can figure out a means of not orienting it to the camera. Of course, you'd end up with a Paper Mario-esque look as the camera moved...if that's what you're going for.
#10
03/02/2006 (11:30 am)
Yea i don't mind that flatness at all.. Thanks, i think i can do that. I've done it before on another engine where it was just coded it had to rotate with the camera. Great