Game Development Community

RTS MiniMap Ideas?

by Kenneth Rodgers · in Torque Game Builder · 05/05/2009 (8:53 am) · 2 replies

I have been trying to think up a good way to create a minimap for a real time strategy game using TGB. The best idea i've come up with is to just create another t2dSceneWindow on the GUI, make it small, and assign it to the same scenegraph as my main SceneWindow. I could then zoom out the camera on the small the minimap scenewindow. This should display a small zoomed out version of everything that is going on.

Does anyone have any other ideas or solutions they would like to share?

Thanks!

#1
05/06/2009 (3:10 pm)
I don't think you can do that.. I'm almost certain that each sceneWindow needs it's own scenegraph, you can't share them like that.. you could load the same level into the mini window though.
#2
05/06/2009 (11:03 pm)
I tested it out and it seems to work okay.

MiniMap.setSceneGraph(SceneWindow2D.getSceneGraph());

where "MiniMap" and "SceneWindow2D" are t2DSceneWindows.

I can then set the MiniMap to render only certain layers. This is the current solution that I am using unless someone can think of something better.