Game Development Community

Use t2dSceneWindow for a radar/minimap?

by Joe Williams · in iTorque 2D · 08/18/2010 (10:44 pm) · 1 replies

I'd like to add a radar/minimap HUD element to my game. I've seen the post by someone else (in the TGB forums?) about using a screenshot of the level. However, I was wondering if it's possible to use a t2dSceneWindow, that is smaller and zoomed out, to act as a radar. This would preclude the need to take screenshots of every level and implement them in the game. I've tried adding something like this to the mainScreenGui:

new t2dSceneWindow(radarWindow) {
      canSaveDynamicFields = "0";
      isContainer = "0";
      Profile = "GuiDefaultProfile";
      HorizSizing = "width";
      VertSizing = "height";
      Position = "-120 -40";
      Extent = "60 40";
      MinExtent = "60 40";
      canSave = "1";
      Visible = "1";
      tooltipprofile = "GuiDefaultProfile";
      hovertime = "1000";
      lockMouse = "0";
      useWindowMouseEvents = "1";
      useObjectMouseEvents = "1";
   };

and having it load the same level as SceneWindow2D, but it just loads at the usual 480x320 resolution and it seems to be duplicating the level (i.e. there's a player object that isn't controlled by the input).

Is this even possible? Should I just go with the screenshot idea?

#1
08/19/2010 (3:08 am)
I believe you can. I have read a thread about it. But the search engine for the forums seems to be off. Did you check the search engine. If you find it, I am sure it will explain how.


Keep hope alive Jimmy. I mean Joe.