Game Development Community

Put official GG developer's response [here

by Berserk · in Torque Game Engine · 06/06/2006 (9:03 am) · 22 replies

Hi everyone.
I made quite a progress with Torque learning from the last time, but I still can't get some aspects
about developing with it.
Well, I tryed in all manners to have a barebone project running with Torque as tutorial.base does, but without any editor and with only 1 gui and 1 mission, without any character and neither a single dif or dts around, but just the mission as-is (with its terrain and sky, I don't mind for a waterblock).
That kind of barebone demo would be written totally by hand and without any source modification but just TorqueScript.
So, all I need to know is: what are the minimum "code requirements" to achieve something similar?
I mean, every demo has its own "client" and "server", with a bunch of functions and some support files.
What do I need to write to get a barebone demo? What do I can't forget to write down in my code editor in order to not get console warnings/errors but still keep it simple and stupid?
My goals are:
- 1 (and only 1) GUI (the main gui)
- 1 (and only 1 - completely empty) mission, with the minimum required into (eg sun, terrain, sky, etc)
- 0 (and not more than *zero*) DTSes, character included
- 0 (and not more than *zero*) DIFs
- 1 camera (I think I can't do it without at least a camera) for looking around the empty mission

And all I ask to get these is: what do I need to declare/use?
(datablocks, classes, packages, let's think about this like one would think about if him has to write all by hand - all, mission and datafiles included).
I can't find documentation about this (and I'm complaining - ignored - for this from about two years).

Bye, Berserk.
.
Page «Previous 1 2
#1
06/06/2006 (9:25 pm)
Please, let's close with this dub about Toqrue.
You know, this is afterall the most asked question by new users, other than my own main dub by many time.
If you are busy I offer myself to make up a resource on this, but I can't if I don't get a clear response first.
So, answer me on this please, let me learn something useful about Torque.

Bye, Berserk.
.
#2
06/06/2006 (9:45 pm)
Well. I think that the starter.fps is probably a good barebones example. It works. It is simple. It contains the bare minimum to let your character run around.

From it, you can create a custom mission and start adding script code to do whatever you want. You can delete what you want from the mission. However, I am not sure you can delete the character. I think you will need at least that DTS, but I am not sure about that.

I bought the 3D Game Programming book that they talk about on these forums, and it had a lot of very useful information.

Is there a reason that won't work for you?
#3
06/06/2006 (9:57 pm)
The tutorial.base that comes with the SDK is much more barebones than the starter.fps. It has nothing but a start menu, _extremely_ basic character which could be easily removed, and a couple sample datablocks. It only comes with six script files in the server directory, how much more minimal do you need?
#4
06/07/2006 (7:26 am)
Well, answers like these were expected. I taken in account these options and I also have already done something similar.
My issue is, I just want to write out code starting with an empty folder and a blank notepad.
Tutorial.base is indeed very minimalist, but it still have the "common" folder dependency issue and its gui are not limited to the main screen (eg: messageboxes). By the way, it has also some difs and a character model to control (along with a spawnsphere and some other non rendered dts objects).
In the mission editor I see it's possible to have a free camera looking around, and I wish to do something similar. The main gui I wish to use is just a matter of how to include both a gui and a single mission in the barebonest demo ever possible - but still functional, expandable and without console warnings/errors.
On the other side, I understand (in example) a gui requires a profile in order to have properties, as well as a mission requires a clientconnection class to "manage itself", and so on.
So, this is why I can't accept a similar kind of solution, I just wish to make it from scratch.
As a foot note, I already managed to have a gui displaying properly in a Torque demo without anything else, but I stopped when I was trying to understand what's really required and what's "typed in there" just for better structuring/supporting various game components/rules/3rd party extension.

Thanks for your answer by the way, but I really need to hear from an official source because it seems nobody really knows how to start a totally new game/mod from scratch except GarageGames guys.
Last, but not least, if GG wishes I would (and pleasurefully) make up a resource on how to have a new mod from scratch after getting mine working.

Bye, Berserk.
.
#5
06/07/2006 (8:23 am)
Everybody with TGE knows how to make a game from scratch. You just follow the model of Tutorial.base. You can start with your own empty directory but the base example shows you a sample minimum of what you need. Just start with an empty folder, and add the kinds of things that are in Tutorial.base. Add in only the parts you need, don't add in the parts you don't need.

As far as an "official" response of what is the bare minimum to make a demo run, that is very simple. You need a main.cs. You could literally put everything, including the gui and the mission, into the main.cs. Inside that main.cs you would need to define all your data structures, start a server, start a client, then have that client connect to the server. Done.
#6
06/07/2006 (12:02 pm)
Well, Berserk, I started my own game from scratch. But I did use the existing starter.fps as a reference. Everything I needed was there.

You should take some time and figure out what you really want. It seems to me like you are more interested in getting an "official response" instead of getting help with your question.

Everything you need to know to do what you want to do is there.
#7
06/07/2006 (12:49 pm)
And this is indeed what I was talking about.

Quote:
You just follow the model of Tutorial.base. You can start with your own empty directory but the base example shows you a sample minimum of what you need. Just start with an empty folder, and add the kinds of things that are in Tutorial.base. Add in only the parts you need, don't add in the parts you don't need.
This implyes not writing out from scratch, but following something already done. Where do GG staff started writing tutorial.base? (and the common folder)

Quote:
You need a main.cs. You could literally put everything, including the gui and the mission, into the main.cs. Inside that main.cs you would need to define all your data structures, start a server, start a client, then have that client connect to the server.
But this is dictated by logic more than by tutorials or so.

Quote:
Well, Berserk, I started my own game from scratch. But I did use the existing starter.fps as a reference. Everything I needed was there.
Indeed, you are using starter.fps. What if I don't want to "get crazy" following the code flow in common and tutorial.base/starter.whatever?

Quote:
You should take some time and figure out what you really want. It seems to me like you are more interested in getting an "official response" instead of getting help with your question.
No, I'm not. I would accept yours (in example) as well as anybody's, if I'm lucky enough to find somebody (other than GG) writing completely from scratch and able to describe me briefly what's needed for a mod/game to work, without suggesting to follow pre made mods.
In order not to be misinterpreted, I have to add: there is people capable of this (Kenneth Finney, Edward Maurina, maybe Melv May, others for sure as well as GarageGames itself).

Bye, Berserk.
.
#8
06/07/2006 (1:38 pm)
I remember someone doing a series of... resources I think... where he reduced a bunch of the functionality and filesize of TGE, including merging common into a standard directory. I don't have the links on hand, not sure if anyone else remembers this?
#9
06/07/2006 (8:44 pm)
I don't know how to be more clear. To start a game from scratch follow these steps.

1. Create a main.cs in your executable's directory
2. Initialize the server
3. Initialize the client
4. Connect the client to the server.

That is all you need to do to have a game from scratch.
#10
06/07/2006 (8:59 pm)
@ Paul: I think you're talking about TGE Simplyfication tutorial series. Yes, I tryed them and got them to work with TGE. This is my next step :-)

@ Ben: *thanks*. Now, I'll try what you say. Am I right saying I need to use clientconnection and serverconnection class/datablock?

Bye, Berserk.
.
#11
06/07/2006 (10:20 pm)
There's the MiniApp tutorials, I think thats what Paul was talking about...

If you want to remove dependancy on the 'Common' folder, copy the directory into the mod directory and change
loadDir("common");
in the ./moddirectory/main.cs to the directory your common script base is located.
Alternativley, you can copy the files into any script folder and load each one individually.
#12
06/08/2006 (6:56 am)
Well, I'm not afraid about a folder called common, but about its content.
What I need is the total absence of pre-written TorqueScript code. I already got a single gui to work, the problem arises when I try to load a mission because I don't know what a mission needs to load and render properly.
I'm just back from work, now I'll try with the gameconnection class. Of course I'll keep everyone posted about progresses and if this reaches a good interest level I could make up a resource on it for beginners and new engine licensees.

Bye, Berserk.
.
#13
06/08/2006 (7:05 am)
>I could make up a resource on it for beginners

and I shall call it --- starter.fps .. yes, starter.fps it shall be..
#14
06/08/2006 (7:10 am)
I would suggest, if you want to rewrite all the functionality of starter.fps from stratch, you should start by READING all that stuff in the common, server, client folders, trying to understand what everything does. that way you can try to adjust the way it works for your project, practice your typing, and learn a lot.

(i can tell you: you will learn so much, that you'll understand why torque works with starter packs, and why it would have been wise to follow the advice to just use it and change it to your needs)
#15
06/08/2006 (11:04 am)
David, why could I make up another starter.fps, if people cmplains about its complexity? No, I'm going to do the barebonest demo ever made with Torque (I think) with a single gui, a single mission and not even a "are you sure you want to quit?" messagebox. Is this load enough or have I to expect more sarcasm the next days?

Arthur, please: read what I just wrote to David. By the way, I understand your point and already read all the common and starter.fps scripts throughly. However, I just can't keep in mind every reference as well as I can't leave opened all the script files at once (or so).

Well, changing our talk... Now I have a very simple structure, and that's it:
root
 - main.cs
 - client.cs
 - server.cs
 -  - data
 -  - (various folders, containing mission, guis, images, support files and so on.
        file count: 51 from images, scripts, gui cache and similars)

Now, knowing the gui is already working, what should I write in client.cs and server.cs in order to have a totally blank mission (except for the terrain, sky, sun and water block) to render without any character (but just with a camera)?
Note, I'm not asking to write me my code, I just wish to know wich classes are really required in order to see a mission. Nothing else.

Bye, Berserk.
.

P.S.: Please, don't be sarcastic anymore, because this is like an invite for me to be (as you sayd) "rude".
.
#16
06/09/2006 (6:43 am)
No more great ideas? Does anybody know how to start a new mod/game from scratch?
I just can't believe everyone uses starter.fps as the only base, It's a lie. ;-)
By the way, and more seriously, what should I do?
I tryed to use the loadtestmission function as base, declaring functions and so, but nothing changes. I still can't load a mission.

Bye, Berserk.
.
#17
06/09/2006 (6:52 am)
Hi Beserk,

I would recommend you to buy Ken Finney book on 3D game programming: All in One (his first book). The first few chapters Ken guides through creating main.cs -> blah -> blah -> client side -> server side -> load mission. This is a good book, highly recommended.

I do not understand these client-server connection much, after all, my job only involves modeling, texturing and importing. GG has already done all the grunt-work-behind-the-scene. :D


Regards,
Broken_Sword
#18
06/09/2006 (8:48 am)
I'm sure not everyone starts their game from starter.fps. I know I didn't. But when I need to know something like "how to load a level" I just crack open starter.fps and see how they load theirs. Then I take that methodology, rewrite it to my purposes, and use that. The resources are all there to teach you how to load a level. Just dig in. I also recommend Ken Finney's first book for learning about coding a game from scratch.
#19
06/09/2006 (10:08 am)
@Broken Sword: I get it, but the time being I wasn't able to follow it because of my totally lack of knowledge about Torque. I think I should give it another try now.

@ Ben: Well, it was more a joke than anything else. Even if this thread finds me a little disappointed, it wasn't meant as offence against anyone. Same as for Broken Sword about Ken Finney book.

@ All: I understand your point, and partially agree with that. But as now I'm not a beginner anymore (even if I can't call myself neither an advanced nor intermediate user, but I think I'm a little more than beginner) and I can follow starter.fps scripts understanding what the various function meanings are. (Well, not at all in fact: I still can't get how to load a mission... lol...)
But I also think suggesting to buy a book in order to learn something wich should be already clearly explained in included manual (true condition now, but not when I bought the engine) or also suggesting to follow the large starter.fps + common codebase flow are not options.
Doing reverse engineering on other's code is good, but only when other's code logic is fully understood (thing achieved only through documentation and explicit code comments) and I don't count on this when the code is as large as starter.fps and common. In addition, most of the functions/classes used in starter.fps strictly requires functions/classes from the common folder, so the entire work doubles in volume and more than doubles in troubles.
Overall, I teached myself programming since C=64 until C++ (thanks to the community for the pointers help).
So even programming logic explained in programming classes are unclear to me until I recreate them in my mind. I think for most beginners is more or less the same, many people comes here maybe with just the high school, maybe with no or very few programming experience and they come with theyr dream in mind: to create a game.
No matters if the game will sell, neither if the code will be polite, but just to see theyr game running and most of them chooses Torque.
I wish to help these people because this is my dream too. I'll read 3D-GPAI-1.

Bye, Berserk.
.
#20
06/12/2006 (10:23 am)
Update:
I managed to get a mission to load tracing out console functions from trq_tutorial_base.
I can't render anything, thoug. These are the functions I ripped:
- addtoserverguidlist
 - buildloadinfo
 - clearloadinfo
 - createserver
 - destroygame
 - destroyserver
 - endgame
 - endmission
 - GameConnection::loadmission (GC- from now on)
 - GC-onconnect
 - GC-onconnectrequest
 - GC-setplayername
 - isnameunique
 - loadmission
 - loadmissionstage2
 - messageallexcept
 - messageclient
 - onmissionended
 - onmissionloaded
 - onservercreated
 - onserverdestroyed
 - sendloadinfotoclient
 - startgame
I traced starting from loadtestmission() until quit(). Now, I'm getting 2 errors.
First, spawnspheremarker isn't recognized as a gamebasedata class member. Second the engine says the player shape needs validation (?).
Excluding the spawnsphere issue if is not strictly required, what else do I need to do?
Thanks in advance.

Bye, Berserk.
.
Page «Previous 1 2