Game Development Community

Numerous setup questions

by D B · in Technical Issues · 08/04/2005 (6:03 pm) · 4 replies

Hi, I'm trying to start my game(an RPG) from scratch, and I have acquired Minapp, and I also have the Tourniquet guide. I've read through a lot of the documentation, the forums, the TGE source and resources, and searched around, but I am still having trouble. There are a number of things I am unsure of:

1. I want to export a mesh (DTS with DSQs) to my game. I know of datablocks (as a .cs file), and how they are set up to include the DTS and DSQs. But, I don't know how one specifically chooses how to put the mesh's datablock into the game and have it load that mesh rather than the current one (the orc), along with its datablock.

2. What is the difference between maps, difs, and missions? I've seen maps in the tutorial.base folder, and I know that difs are used as towers and the like in the fps demo, and missions are generally the level itself. From what I've read, the mission (be it a new one or an existing one) is saved as another file, opened in Notepad, and has everything deleted with some exceptions (sun, sky, etc.). After this, does one just take their map, convert it to .dif and put it in the mission there?

3. I also saw in a number of resources that code is added to the actual source of the engine. Is every game just a modified copy of the Torque engine (i.e. have the original as a backup, and then modify it all in a separate folder)?

I apologise if these questions come off as simple, but I'm really confused.

Thank you.

#1
08/04/2005 (6:37 pm)
Hi Danny

I'm not sure about what you want in your first Q, but I assume after creating datablock, you wanna know how to add it?

www.garagegames.com/mg/forums/result.thread.php?qt=5956

summary :
Basically, you just need to create the player datablock in game.cs and pass it back to client
Define the player datablocks (usually in player.cs):
datablock PlayerData(yourPlayer)
{
   renderFirstPerson = false;
   .......
}

Create it:
%player = new Player() {
      dataBlock = yourPlayer;  // this is where you define which player datablock
      client = %this;
     .......
   };

You gotta read up about spawn point as well.

From what I know, usually you create interiors (map) in quark and use Torque's Map2Dif to export it out as dif format. Then you add it to your mission file.

www.garagegames.com/docs/tge/general/ch04.php

For a start, it is advisable to copy/backup another copy of the tutorial demo or fps demo and play around with that.
Then download Torsion
www.garagegames.com/mg/forums/result.thread.php?qt=32499
Use this editor and learn the debugging technique through the tutorials from Brandon, you'll be able to step through the entire process of how the game works in script.

Hope these helps
#2
08/04/2005 (10:15 pm)
Danny check out demo/server/scripts/game.cs. the oncliententergame() function is where the player is created. if you simply want to get your mesh in the game, you could go to demo/server/scripts/player.cs, find the player datablock and change the "shapefile" attribute. this will get your character in the game but don't expect it to have the same animations as the orc. if you want to import a new datablock this must be done earlier during mission loading. when the game is loading, all the datablocks you'll be using are loaded into memory. you cant create others after this point, so you need to make sure your custom datablocks are being loaded earlier on in onservercreated() in game.cs. this is where all datablocks should be loaded.

re: maps, difs, missions

difs and missions are particular to torque, maps are particular to quark. difs are usually structural objects like buildings and bridges but really refer to any quark .map file compiled into a torque-compatible dif file. a "mission" is torques special term for the overall game environment. a map is quark's specific term for anything created in it. =)
#3
08/05/2005 (9:49 am)
Okay, so:

1. In my RPG, I am looking to have multiple main characters, which can be switched around as the "leader". How do I determine which one I use for the leader (which .cs file)?

2. So, for missions, I'd generally just take the mission, delete almost everything, and then add the dif to my mission file? That's all I need to do for it, right?

3. So I would make a copy of the FPS demo, right? Can it be outside of the Torque folder, or would it be required to be in there?

I'm still a little confused, so I'm just trying to clarify all of this.

Thanks again.
#4
08/06/2005 (1:14 pm)
So, would I be thinking I'm on the right track for 2 and 3 in my previous post? And what could I do for 1?