Game Development Community

how to render a 3d map in a gui

by ANON · in Torque 3D Beginner · 12/09/2012 (12:39 pm) · 14 replies

Hey Is there anyone who knows how to render a map in a menu gui. Like what they did with half life 2 or halo 3 menus.

#1
12/09/2012 (9:04 pm)
garagegames.com/community/resources/view/10668

this is an old resource so files aren't gonna be in the same place I think, but spend a little time and you'll have it working.
#2
12/10/2012 (12:53 pm)
Uh that link doesn't work.Are there any more resources like that.
#3
12/10/2012 (4:47 pm)
www.garagegames.com/community/resources/view/4171

Btw the first link works fine for me, try it in another browser maybe. This is the original resource.
#4
12/10/2012 (7:07 pm)
I try chrome and internet explore every time I get

HTTP/1.1 404 Not Found

We couldn't find the page you were looking for, but here are some suggestions based on the address you typed in:

static pg resource 4171.missiongui.zip

Is there another way cause I need this
#5
12/10/2012 (10:39 pm)
Hmm I'm using Chrome and I get no problem.

Mission in main menu GUI 1.4
by Thanhda Tie · 07/03/2006 (11:18 am) · 16 comments
Download Code File

This is just a mod from the original Resource Mission in main menu GUI by Frank Bignone, but has been ported from Torque 1.3 to 1.4 users.

------------------------------------------

Original Resource:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4171

Here is a short code sample to display mission inside the main menu gui. This code is based on the torque example and will load the waterworld mission in the main menu gui.

I have not added any camera path in the waterworld mission, but you may add some dynamic camera path (see my previous resources) and have some nice view of your mission in your main menu gui (like in the Orbz game).

To install the code samples, just unzip the archive in your example directory (do not forget to make a backup before).

If you want to change it, look at the loadMenu function in the fps/client/init.cs file.

----------------------------------------------
DRL 2.0 Add on
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10232

If you want to get this to work with DRL 2.0, you are going to need to modify the following file
client\scripts\serverConnection.cs

//----------------------------------------------------------------------------  
// GameConnection client callbacks  
//----------------------------------------------------------------------------  
  
function callItUpLOL()  
{  
   Canvas.setContent(MainMenuGui);  
   resetDRL();  
}  
function fixTheDamnDRL()  
{  
   resetDRL();  
}  
function GameConnection::initialControlSet(%this)  
{  
   echo ("*** Initial Control Object");     
   // The first control object has been set by the server     
   // and we are now ready to go.        
   // first check if the editor is active     
  
   if (!Editor::checkActiveLoadDone())  
   {  
      if( $mainMenu )  
      {  
         Canvas.setContent(PlayGui);  
         PlayGui.noCursor = "0";  
         schedule(100,0,callItUpLOL);  
         schedule(200,0,fixTheDamnDRL);  
         resetDRL();  
      }  
      else if (Canvas.getContent() != PlayGui.getId())  
      {  
         Canvas.setContent(PlayGui);  
         resetDRL();  
      }  
   }  
}

In client/scripts/playGui.cs, add the following to the PlayGui::onWake method:

if($mainMenu == true)  
   {  
      PlayGui.noCursor = "0";  
   }  
   else  
   {  
      PlayGui.noCursor = "1";  
   }

This update thanks go to C2, for help with syntax code.


Note this is not mine and I haven't implemented it but here you go. This is the first one and will require a little work to get it working in T3D.
#6
12/11/2012 (7:02 pm)
No I can read the page I mean the download link to download the code.Is dead is there another link to download the codes.
#7
12/11/2012 (10:01 pm)
Oh shoot I didn't even catch that, let me check if I can find anything else!
#8
12/11/2012 (10:04 pm)
Ok well I can't find any additional resources, but by reading the things I saw on forum posts that are similar, it seems all you have to do is launch a mission on game start (that means more loading for the front end of your game) and have a camera on a set path move around the map, then just put a GUI over it or whatever you like. I'm not sure exactly how to do this, but I'm sure someone else on the forums have an idea.
#9
12/12/2012 (12:13 am)
The main idea is it loads a mission without loading an action map to control the mission. The mission is the backdrop for everything else. There is a GUI element that does 3 space which is normally what becomes the users control window on a mission load. You can have one in the background of the GUI. I don't know if you have to put a transparent GUI element in between or just make sure you have no action map loaded for the FPS control.

Edit:
@GG, this is an oft sought after feature for games. Is it possible with the scripting rework that is going on that some simple examples like this could be provided?
#10
12/12/2012 (8:08 pm)
Ok thanks for the information guys.
#11
12/13/2012 (11:31 am)
I have the code for that resource. If you provide me with an email, ANON, I will send it to you. I guess that is ok now with T3D being Mit? If anyone knows different, please let me know.
#12
12/13/2012 (4:50 pm)
Generally speaking, this isn't too difficult to do in TorqueScript. Mich and I did this for a demo in TGEA back in our simulation days. Basically all that you need to do is have a transparent GUI with your buttons and load up a mission earlier. If you look through the mission loading and start up functions you'll see which functions that need to be called.

Now, there are a lot of drawbacks to doing this. In doing this you now have to make your players wait for the mission to load every time they'll return to the menu. If you try to this with a large mission then it will take that much longer for players to reach the menu. An alternative that you may want to consider would be to record a video of the level you want to display in a GUICtrl instead.

@Steve
Was that one pure TorqueScript or was there source code involved? As that resource was for TGE it couldn't really be shared with the MIT license, if it's just TorqueScript it would be fine.

#13
12/14/2012 (6:19 am)
Just TorqueScript.
#14
12/14/2012 (1:21 pm)
Oh thanks steve my email is revolutiongamingteam@myself.com