Game Development Community

GUI Problems

by Freeman182 · in Technical Issues · 04/16/2008 (7:27 am) · 2 replies

First of all can I say I know these are noob problems and all comments and help are very much appreciated, im a second year university student studying computergames tech and im having some problems using torque.

Im trying to design the main menu and the in game hud but im having some problems.

* Im trying to introduce a splash screen before the main menu loads up. Iv created a new guiFadeinBitmapCtrl and I save it as filename.gui & filename.gui.dso and everything works fine untill I close torque and re open it and there is no history of me ever having created it. The files are still in the folder but the guiFadeinBitmapCtrl doesn't appear in the drop down menu nor does the splash screen appear when torque is first loaded. I have since tired layering the fade over my main menu however whilst torque does remember its there after the image fades out im left with a black screen and cant access my menu

* Im having trouble getting the main menu to load the game the rest of my team is working on, I cant figure out the command I need to assign to the button on my menu

* Also I have created a simple window that pops up when you click a button on the menu however I cant find a way to close it once it has popped up the x wont work and the OK button I created wont close it either

* Now this problems completely baffled me iv implemented a health bar and I was running round the level my team created and it stopped working and I cant understand why. In the begging it would flash when the character took damage and recharged once he died. Now nothing happens at all and all I have is a static red bar

Again I know these problems are probably just something simple iv missed but I appreciate any time that you take to help me or just point me in the right direction.

#1
04/16/2008 (10:28 am)
While I do agree with your approach of digging right into the code, and learning it from the ground up, why reinvent the wheel? The starter.fps kit already has a working splash screen, load mission buttons, health /energy bar, and moveable, resizable (and closable :P) windows. I'd spend some time browsing every single file in the kit and getting very familiar with its syntax.

Quote:Iv created a new guiFadeinBitmapCtrl and I save it as filename.gui & filename.gui.dso and everything works fine untill I close torque and re open it

Are you saving an actual .dso file? You just create the .gui or .cs files, and when you run the torque app it compiles it into the .dso file. So whenever you make changes the .cs file, you have to delete all of your .dso's to show the changes. And when you release your game to the public, you keep all of the .dso's and delete all of your .cs files so that the users cannot modify them. Make sense?
#2
04/19/2008 (9:47 am)
Quote: * Im trying to introduce a splash screen before the main menu loads up. Iv created a new guiFadeinBitmapCtrl and I save it as filename.gui & filename.gui.dso and everything works fine untill I close torque and re open it and there is no history of me ever having created it. The files are still in the folder but the guiFadeinBitmapCtrl doesn't appear in the drop down menu nor does the splash screen appear when torque is first loaded. I have since tired layering the fade over my main menu however whilst torque does remember its there after the image fades out im left with a black screen and cant access my menu

when you create a new "filename.gui" remember to open main.cs and add your new .gui to the function initClient() ie

function initClient()
{
   echo("\n--------- Initializing TTB: Client ---------");

   // The common module provides basic client functionality
   initBaseClient();

   // InitCanvas starts up the graphics system.
   // The canvas needs to be constructed before the gui scripts are
   // run because many of the controls assume the canvas exists at
   // load time.
   //*****************************PUT NAME OF PROGRAME HERE
   // this text will appear when the game is run in window mode
   initCanvas("Remote desktop");

   // Load client-side Audio Profiles/Descriptions
   exec("./client/audioProfiles.cs");

   // Load up the shell and game GUIs
   exec("./client/ui/PlayGui.gui");
   exec("./client/ui/mainMenuGui.gui"); 
   exec("./client/ui/filename.gui"); // YOUR gui goes here

Quote: * Also I have created a simple window that pops up when you click a button on the menu however I cant find a way to close it once it has popped up the x wont work and the OK button I created wont close it either

did you use mywindow.visible(true) or push/pop.dialoge


no idea about your health bar or your main menu loading issues