Minimum app
by Andreas Jung · in Torque Game Engine · 08/26/2001 (11:31 am) · 6 replies
Hi,
I'm still working on my app. Until now, I created the directory-tree and put in the exe there. I also copied the /base-dir of the example, because it looks very important, with its editors etc. (correct?). Then I designed some GUI in the test-app and created a main.cs for my app. After running the exe the dos-console appeared - but no window.
How can I display a device-window and display my GUI there. I didnt found something like that in the test-app.
Can u help me?
Thx Andy
I'm still working on my app. Until now, I created the directory-tree and put in the exe there. I also copied the /base-dir of the example, because it looks very important, with its editors etc. (correct?). Then I designed some GUI in the test-app and created a main.cs for my app. After running the exe the dos-console appeared - but no window.
How can I display a device-window and display my GUI there. I didnt found something like that in the test-app.
Can u help me?
Thx Andy
About the author
#2
Then, I started going through and changing everything "V12" to "Myrmidon". I will have to remove some stuff that I wont be using from the scripts - but that seems easier than trying to rebuild the project directory from scratch.
I think it is important to have all the tool and library projects along with everything else because your game may require changes to the tools to support some new feature you have implemented - for say level design or character animations.
I know this isn't a direct answer to your question - but I thought it might be easier to start by copying the V12 test app. You will always have a running copy of the application this way. As you add (or remove) code, you can always retest that the application to ensure it still works as expected. Finally, if your project directory and file structure matches that of the V12 SDK, it will be easier to integrate changes to the SDK into you application over time.
08/28/2001 (8:59 am)
We took a slightly different approach to creating a new project based on V12 - that might give you some ideas. We basically copied the entire "v12" directory (and everything under it) to a new directory called "Myrmidon" (which is the name of our new game). This way, I get all the engine source, tools, libraries, and scripts that come with the V12 Test App. Then, I started going through and changing everything "V12" to "Myrmidon". I will have to remove some stuff that I wont be using from the scripts - but that seems easier than trying to rebuild the project directory from scratch.
I think it is important to have all the tool and library projects along with everything else because your game may require changes to the tools to support some new feature you have implemented - for say level design or character animations.
I know this isn't a direct answer to your question - but I thought it might be easier to start by copying the V12 test app. You will always have a running copy of the application this way. As you add (or remove) code, you can always retest that the application to ensure it still works as expected. Finally, if your project directory and file structure matches that of the V12 SDK, it will be easier to integrate changes to the SDK into you application over time.
#3
08/28/2001 (9:55 am)
If you want a stand alone game exe, you need almost everything under the example dir. So you could copy (include sub-dirs) example/* into another "release" dir and be fine. There are things might not need, such as the mission editor scripts in base/editor, but you'll most of it. Much of the initialization and running of the engine/game happens in the scripts.
#4
My question was where the window is created, and i think it is in "base\main.cs" around line 17 "createCanvas"; correct?
Andy
08/29/2001 (4:35 am)
I'm sorry, i wanted to post earlier, but my provider was unable to provide a connection.My question was where the window is created, and i think it is in "base\main.cs" around line 17 "createCanvas"; correct?
Andy
#5
after a hard week in school, I now had some time to have a little closer look to v12. I'm still working on a minimum-app (lets call it helloworld-app). I put some very simple code together (its not working yet) - see below.
My aim is not to learn v12 through scripting the example; i'm going to learn it by growing the smallest app possible. Mayby, if we get this piece of code working, we could make a tutorial of it.
This is what i did:
1 copy v12.exe in the helloworld-dir. create a ui-dir and a pref-dir
2 copy all the pref-files (see code) in the prefs-dir
3 make a simple gui in the example-app with a simple exit-button (command quit();) and put it in the ui-dir
4 create a main.cs in the main dir and add the code below
OK, it's not working yet caused by any unknown mistake. Any1 has an idea to get it working? Dont forget: i want the simplest v12-app possible.
If you think, my ideas are completely crazy, plz tell me.
main.cs------------------------------------------
/***********************************************/
/* HelloV12World */
/***********************************************/
/* Based on V12-Technology */
/* by garagegames.com, Sierra and Dynamix. */
/***********************************************/
/* Copyright 2001 Andras Jung. */
/***********************************************/
//Jump-in
JoinV12();
/***********************************************/
/* Name: JoinV12 */
/* Desc: Fake main-function, that collects */
/* all startup-calls. */
/***********************************************/
function JoinV12()
{
echo("Hello World!");
echo("");
//initialize and prepare the engine
InitV12();
//display the screen
DisplayGUI();
}
/***********************************************/
/* Name: InitV12 */
/* Desc: Prepares the engine. */
/***********************************************/
function InitV12()
{
//load preferences (took from example)
exec("prefs/audio.cs", true);
exec("prefs/clientDefaults.cs", true);
exec("prefs/serverDefaults.cs", true);
exec("prefs/clientPrefs.cs", true, true);
//init engine
createCanvas();
}
/***********************************************/
/* Name: DisplayGUI */
/* Desc: Loads and displays the gui-files. */
/***********************************************/
function DisplayGUI()
{
//load the guis
exec("ui/HelloWorld.gui");
//display main gui
canvas.setContent(HelloWorld);
}
/* EOF */
08/31/2001 (1:50 pm)
Hi,after a hard week in school, I now had some time to have a little closer look to v12. I'm still working on a minimum-app (lets call it helloworld-app). I put some very simple code together (its not working yet) - see below.
My aim is not to learn v12 through scripting the example; i'm going to learn it by growing the smallest app possible. Mayby, if we get this piece of code working, we could make a tutorial of it.
This is what i did:
1 copy v12.exe in the helloworld-dir. create a ui-dir and a pref-dir
2 copy all the pref-files (see code) in the prefs-dir
3 make a simple gui in the example-app with a simple exit-button (command quit();) and put it in the ui-dir
4 create a main.cs in the main dir and add the code below
OK, it's not working yet caused by any unknown mistake. Any1 has an idea to get it working? Dont forget: i want the simplest v12-app possible.
If you think, my ideas are completely crazy, plz tell me.
main.cs------------------------------------------
/***********************************************/
/* HelloV12World */
/***********************************************/
/* Based on V12-Technology */
/* by garagegames.com, Sierra and Dynamix. */
/***********************************************/
/* Copyright 2001 Andras Jung. */
/***********************************************/
//Jump-in
JoinV12();
/***********************************************/
/* Name: JoinV12 */
/* Desc: Fake main-function, that collects */
/* all startup-calls. */
/***********************************************/
function JoinV12()
{
echo("Hello World!");
echo("");
//initialize and prepare the engine
InitV12();
//display the screen
DisplayGUI();
}
/***********************************************/
/* Name: InitV12 */
/* Desc: Prepares the engine. */
/***********************************************/
function InitV12()
{
//load preferences (took from example)
exec("prefs/audio.cs", true);
exec("prefs/clientDefaults.cs", true);
exec("prefs/serverDefaults.cs", true);
exec("prefs/clientPrefs.cs", true, true);
//init engine
createCanvas();
}
/***********************************************/
/* Name: DisplayGUI */
/* Desc: Loads and displays the gui-files. */
/***********************************************/
function DisplayGUI()
{
//load the guis
exec("ui/HelloWorld.gui");
//display main gui
canvas.setContent(HelloWorld);
}
/* EOF */
#6
Is my english that bad you don't understand me, or don't you even know like me?
I don't know how to continue that way. Could someone give me a basic idea, where the major bug is?
09/03/2001 (11:02 am)
Hmm, no reply.Is my english that bad you don't understand me, or don't you even know like me?
I don't know how to continue that way. Could someone give me a basic idea, where the major bug is?
Torque Owner Christopher Mayfield