Game Development Community

Update() and Draw()

by ChrisGWilliams · in Torque X 2D · 11/09/2007 (2:32 pm) · 2 replies

Ok this might be a stupid newb question, and maybe it's been answered and I missed it...

What happened to the update() and draw() routines that XNA gives you?

If I do a WindowsGame with XNA, I get them. If I do a StarterGame with TorqueX, I don't. I'm at a bit of a loss on how to proceed.

Thanks,
C.

#1
11/09/2007 (4:18 pm)
Have you had a try at the tutorials in the Torque X User's Guide yet? They sorta cover these topics.

Drawing is handled internally by Torque. All you have to do is define a sceneobject (position, scale, rotation, etc...) and add it to the scene. TXB is great for adding things to the scene with out coding it all.

As for updating, that is handled by a component. When you create a component you can set a callback method that gets called every tick.

The User's Guide has a lot of good information in general.
#2
11/10/2007 (7:31 am)
Additionally, you can override Draw and Update to add functionality directly.