Overwhelmed
by Andrew Donelson · in Torque Game Engine · 07/31/2005 (6:33 pm) · 10 replies
Hi all. A year ago i decided to re-write an old 2D Spaces shooter game that is still popular today but lacks alot of features to keep players from cheating, not to mention alot of features of today. So i downlaoded teh DX9 SDK and started writeing my game engine. After a few months I was wanting to add so much, scripting, networking, VOIP, ect so that the dev time could be reused in other games i would write. So, I stopped work and started looking for affordable existing Engines. This particular game is 2D but I want it done in 3D engine to take advantage of some of the features. I ended up purchasing HGE v1.3 and was able to move really far in a short period of time. However it is just 2D/Sound and I found myself taking my code form my engine ie CStarfield, cShip, ect and adding it to that engine. So i decided that would not work, money wasted & time wasted. Now i run across HGE, look into it, donwload it, check the demos. Looks like it will do everything I want. Got networking, scripting, ect. So purchase HGE and have wasted lots of time. Although there is alot of community support, tutorials, code snippets, you cant find anything. I have made zero progress on a simple project. I simply want a 2D starfield as the background, this starfield cosists of 4 layers of stars, the deeper the level the slower the stars move to goive a realistic effect. I have the existing code already. Cant figure out how to add it to engine. Then I want a 2D (bitmap) in the middle of screen as the player and i want to be able to rotate left/right and when the players moves the starfield moves and his world position is updated. Cant get this to work either, i got a guiBitmap object in the middle of my screen butit just stays there. So now I am frustrated and beleive I have wasted even more money buying TGE and call and talk to them. I was told the T2D would do what i wanted and that I could combine the TGE/T2D together, cant find anything anywhere to tell me how to do this. The T2D does not even work on my dev computer which is a notebook, think its a compatability issue with the ATI x300 because it works on the desktop which i don't use to devlop on. Plus its network support is not complete and plenty of other issues. Now I have HGE v1.3, HGE & T2D and I still cant get a simple freaking basic asteroids style game.
I am totally frustrated, I search and search and cant find the anwsers anywhere. Where the hell you learn the basics, the real basics. Like what script is executed when, what order, how to extend the engine, how to billboard, or how to make the camera follow a billboard comtroller by the freaking player would be nice. I know I can take my CStarfield cod eand integfrate it, working on that now, and it will be available to add via script and I should be able to have it as a background bitmap. But interacting with it I have no idea how to make it react toi the players movement. So I am going to ask a few questions here and hope some of you have the time to answer them before I loose all hope. I am also going to post helpful source that i have including the CStarfield which is really quite nice and a link to the HGE version of the game im trying to write so you can take a look and know exactly what I am trying to do in TGE. the site is http://www.subspacere.net its small download check it out.
So my questions are:
1) How the hell do i integrate both TGE & T2D into a single engine?
2) Given the CStartfield code I posted (or will if you read this before ive done that) How do I get it into the engine, available from GUI editor, into the guiPlay and have it react to players movement?
3) How do I add player ships as Billboards that move around the world and a player billboard that always stays in middle of screen and controls the starfield?
If I can have these questions answered thenI can figure out the rest. I will be making most of the components available for all to use that have HGE/T2D since Im not planning on charging for the game anyway. HELP! Please, Im totally stumped and really want to stay with Torque!
I am totally frustrated, I search and search and cant find the anwsers anywhere. Where the hell you learn the basics, the real basics. Like what script is executed when, what order, how to extend the engine, how to billboard, or how to make the camera follow a billboard comtroller by the freaking player would be nice. I know I can take my CStarfield cod eand integfrate it, working on that now, and it will be available to add via script and I should be able to have it as a background bitmap. But interacting with it I have no idea how to make it react toi the players movement. So I am going to ask a few questions here and hope some of you have the time to answer them before I loose all hope. I am also going to post helpful source that i have including the CStarfield which is really quite nice and a link to the HGE version of the game im trying to write so you can take a look and know exactly what I am trying to do in TGE. the site is http://www.subspacere.net its small download check it out.
So my questions are:
1) How the hell do i integrate both TGE & T2D into a single engine?
2) Given the CStartfield code I posted (or will if you read this before ive done that) How do I get it into the engine, available from GUI editor, into the guiPlay and have it react to players movement?
3) How do I add player ships as Billboards that move around the world and a player billboard that always stays in middle of screen and controls the starfield?
If I can have these questions answered thenI can figure out the rest. I will be making most of the components available for all to use that have HGE/T2D since Im not planning on charging for the game anyway. HELP! Please, Im totally stumped and really want to stay with Torque!
About the author
#2
I notice you've only made one post in the forums, and never filed a support request. The first step to understanding Torque is to ask questions - preferably before you get overwhelmed and frustrated. It's a big and complicated engine!
1) Torque2D is implemented against stock Torque. It's basically a drop-in set of changes. If you spend some time looking at the code with Beyond Compare or WinMerge, you'll quickly see how it lives largely in its own subdirectory and there are a minimal number of outside changes.
2) Have you tried making a GuiControl subclass and putting the rendering code (assuming it's written to use OpenGL) in the onRender call? If you spend some time reading over the GUI code, starting from GuiControl and looking at specific sub controls, you should get a good basic idea of how things work. There are also a lot of resources and forum threads on the GUI system.
3) Torque2D ships with a simple asteroids demo, if I'm not mistaken. At the very least, the getting started guide that comes with it should explain in some detail how to set things up using T2D to make a game of that nature.
What's HGE?
Remember, the best way to learn is to ask questions and try things!
Ben
07/31/2005 (8:19 pm)
Howdy Andrew,I notice you've only made one post in the forums, and never filed a support request. The first step to understanding Torque is to ask questions - preferably before you get overwhelmed and frustrated. It's a big and complicated engine!
1) Torque2D is implemented against stock Torque. It's basically a drop-in set of changes. If you spend some time looking at the code with Beyond Compare or WinMerge, you'll quickly see how it lives largely in its own subdirectory and there are a minimal number of outside changes.
2) Have you tried making a GuiControl subclass and putting the rendering code (assuming it's written to use OpenGL) in the onRender call? If you spend some time reading over the GUI code, starting from GuiControl and looking at specific sub controls, you should get a good basic idea of how things work. There are also a lot of resources and forum threads on the GUI system.
3) Torque2D ships with a simple asteroids demo, if I'm not mistaken. At the very least, the getting started guide that comes with it should explain in some detail how to set things up using T2D to make a game of that nature.
What's HGE?
Remember, the best way to learn is to ask questions and try things!
Ben
#3
07/31/2005 (10:18 pm)
Im sorry, not HGE , TGE the 3D. I own them both. Don't want to do the 2TD because i want the full networking. But someone on the phone told me I could combine them pretty easily because T2D is build on TGE. Im still confused and looking for the Morons 1-2-3 :)
#4
07/31/2005 (10:19 pm)
Thanks Brandon, stepping through the code qould be quite helpful. Is it stepping through the c++ engine code or the script?
#5
If you are using VC6 or 7 you can use the debugger that somes with it to do the stepping through the source code.
07/31/2005 (10:40 pm)
Brandon's tutorial is about stepping through the script code.If you are using VC6 or 7 you can use the debugger that somes with it to do the stepping through the source code.
#6
It steps through the script code. Very useful. The main.cs located next to your executable is where it all begins, so if you want to see everything 'script' related, set a break point there, and enjoy the ride.
B--
07/31/2005 (10:40 pm)
@Andrew:It steps through the script code. Very useful. The main.cs located next to your executable is where it all begins, so if you want to see everything 'script' related, set a break point there, and enjoy the ride.
B--
#7
as a side note, i noticed that when quit() is called in the script that execution continues for a bit before actually quitting. This is in the engine and should be addressed. I understand its event driven, i have not found out yet what code is invoked when the quit() command is sent but it should at the very least set a variable that other functions check before execution.
Anyhoo, any help on this main.cs problem?
08/01/2005 (5:37 pm)
I seem to have everything installed (torsion & debugger) compiled (im using 1.3) and it wont let me update to 1.4. When i use torsion to step though script it says it cant load main.cs and gives path, but its there, valid file and path.as a side note, i noticed that when quit() is called in the script that execution continues for a bit before actually quitting. This is in the engine and should be addressed. I understand its event driven, i have not found out yet what code is invoked when the quit() command is sent but it should at the very least set a variable that other functions check before execution.
Anyhoo, any help on this main.cs problem?
#8
Just keep at it, you'll get it eventually ;).
- Eric
08/01/2005 (5:48 pm)
Also don't forget that TDN is in the works - it should help you with that "steep learning curve" that Brandon was talking about (and it is!).Just keep at it, you'll get it eventually ;).
- Eric
#9
08/02/2005 (1:44 am)
Torque2D ships with a simple asteroids demo?
#10
So basically i want a 3D game, but i will:
1) use 2D Starfield scrolling starfield with 4 planes as the background bitmap.
2) some billboarding space items.
3) 3D planets (for lighting effects)
4) 3D Prizes (for lighting effects)
5) Other players Ships (2D) on screen (More billboarding)
6) Players 2D ship in center of screen, this is top most layer.
Steps 2,3&4 are part of the existing framework, i'll figure it out :) Even step 6 (The player i middle of screen) can just be a guiBitmap.
So im really stuck on these:
#1 i'm trying o figure out, i want to create a guiStarfield and have it set background to block and draw stars moving according to players velocities (x&Y)
#5 Other players ships...hmmm guiBitmap's again? you can't see them unless they are onthe screen, adn the radar can be made from all world data. but how to update them.
Integrating the Starfield into the engine is the primary issue, after further thought and writing this post, i beleive i can figure the rest out in time just by beating my head against the wall.
08/02/2005 (7:10 am)
It has fishdemo and spacescroller. space scroller is on a planet fkying to your right, not asteroids but kinda fun. The 2D crashes and locks up my computer, trying to work it out. But i want to do it in TGE instead because of all FULL networking plus i want to be able to have some 3D objects in background also, plus some of the features of going 3D.So basically i want a 3D game, but i will:
1) use 2D Starfield scrolling starfield with 4 planes as the background bitmap.
2) some billboarding space items.
3) 3D planets (for lighting effects)
4) 3D Prizes (for lighting effects)
5) Other players Ships (2D) on screen (More billboarding)
6) Players 2D ship in center of screen, this is top most layer.
Steps 2,3&4 are part of the existing framework, i'll figure it out :) Even step 6 (The player i middle of screen) can just be a guiBitmap.
So im really stuck on these:
#1 i'm trying o figure out, i want to create a guiStarfield and have it set background to block and draw stars moving according to players velocities (x&Y)
#5 Other players ships...hmmm guiBitmap's again? you can't see them unless they are onthe screen, adn the radar can be made from all world data. but how to update them.
Integrating the Starfield into the engine is the primary issue, after further thought and writing this post, i beleive i can figure the rest out in time just by beating my head against the wall.
Torque 3D Owner Brandon Maness
Download Torison or TDev IDE and integrate the enhanced debugger resource from Tom Spilman. Then use these tools to step through the code slowly, so you will get a feel for what is going on when you load the engine.
I've started a very 'basic' scripting tutorial here:
torque.smdlabs.com/media/freeTutorials/introTScript/page1.htm
I hope this gets you moving in the right direction.
B--