Multiple games from 1 gui
by Mike Rowley · in Torque Game Engine · 04/19/2006 (4:47 pm) · 3 replies
I've been looking at the demo gui. It has 4 buttons where you can click to go to different types of games.
All the games are in the mission files and are loaded from the gui.
I don't want to place all the code for multiple games in 1 folder.
Here's an example:
main folder
exe, dlls, etc Plus
Folder1, folder2, folder3, etc....
folder1 is where everything starts. When a player clicks on the folder2 button, it starts the game in folder2. (these folders will have their own client/server/data folders)
Is this idea even possible?
I've tried:
To make sure I'm clear, folder2 has all the files needed for a game eccept the exe and main.
All the games are in the mission files and are loaded from the gui.
I don't want to place all the code for multiple games in 1 folder.
Here's an example:
main folder
exe, dlls, etc Plus
Folder1, folder2, folder3, etc....
folder1 is where everything starts. When a player clicks on the folder2 button, it starts the game in folder2. (these folders will have their own client/server/data folders)
Is this idea even possible?
I've tried:
new GuiBitmapButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "224 73";
extent = "285 85";
minExtent = "8 2";
visible = "1";
command = "./folder2"; //This doesn't work
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./button";
helpTag = "0";but it doesn't work. Am I doing this all wrong?To make sure I'm clear, folder2 has all the files needed for a game eccept the exe and main.
#2
I'm all out of ideas. Why is it that something that should be really simple is alluding me?
I don't know eather.
If anyone has any ideas, I'm all ears.
04/20/2006 (6:24 pm)
Well that didn't work eather. :(I'm all out of ideas. Why is it that something that should be really simple is alluding me?
I don't know eather.
If anyone has any ideas, I'm all ears.
#3
Edit to add:(folder1 is the torque demo folder)
I'm using the torque demo as a base to work from.
Here's what I have in "demo/client/ui/mainMenueDlg.cs":
folder2.cs is a renamed "main.cs" from the original game and is placed in the root folder with the exe. If I add the game files to the demo/mission folders, it works, but I get the orc for an avatar. Here's the loading:
My ultimat goal is to be able to add small games to this one interface by just changing a few lines of code in 1 cs file, and adding a new folder. This has to be possible. If I were a proficient coder, I would probably be shaking my head in shame at myself for not being able to figure this one out. But, I'm a beginner, and I am learning, so, I just go bald in the process.
Edit Please don't take my words as anger. Just frustration at my own lack of understanding.
04/23/2006 (8:29 am)
I can get my mission to load if I place it in the folder1 folder, but why not from it's own folder?Edit to add:(folder1 is the torque demo folder)
I'm using the torque demo as a base to work from.
Here's what I have in "demo/client/ui/mainMenueDlg.cs":
new GuiBitmapButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "224 255";
extent = "285 85";
minExtent = "8 2";
visible = "1";
command = "exec(./folder2.cs)";
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./button";
helpTag = "0";folder2.cs is a renamed "main.cs" from the original game and is placed in the root folder with the exe. If I add the game files to the demo/mission folders, it works, but I get the orc for an avatar. Here's the loading:
Quote:*** LOADING MISSION: demo/data/missions/game2.misI've been using the search function and reading/downloading everything about the gui and have found nothing. Has no one ever tried this?
My ultimat goal is to be able to add small games to this one interface by just changing a few lines of code in 1 cs file, and adding a new folder. This has to be possible. If I were a proficient coder, I would probably be shaking my head in shame at myself for not being able to figure this one out. But, I'm a beginner, and I am learning, so, I just go bald in the process.
Edit Please don't take my words as anger. Just frustration at my own lack of understanding.
Torque Owner Mike Rowley
Mike Rowley
Problem is, it's using the folder1 player and such. That won't work. One of the games is a race car game. :/
I'll attempt to place this in the common init, but don't know if that's where it should go.