Moving my game to Torque
by Guimo · in Torque Game Engine · 05/14/2006 (11:46 pm) · 3 replies
Hi,
We have decided to drop development on our engine. So I've bought a license to the TGE and now I'm trying to move our game to use it. As I'm new to this engine, I'm here to ask your help. I'm not asking for code, just for pointers to resources that may be useful.
First take a look at the shots at: http://www.warscale.com
Description
Warscale is a crossbred between a card game and Warcraft. The idea is to battle your opponent with a selection of spells and creatures.
Networking
Warscale requires the client to connect a master server for login. Once accepted the server sends a list of available game servers to the player. The player selects the game server and the master server negotiates with the game server and provides the client with a unique ID which must use in order to enter the game server (which will only allow access using this ID). This means we have a tree point connection (Master/Game, Client/Master and Client/Game). The issues are:
a. How do I start a dedicated master server which opens two ports (one for the game server and one for the client).
b. How do I start an independent game server with two open ports (one for master and one for client) and make it connect to server?
c. How do I create a client with two ports (to master server and to game server)?
d. How do I connect the servers to my OracleXE Database?
e. Can I do it just using scripts or should I modify the engine?
Note this setup is similar to MMORPG networking.
Game management
Once the player is connected to the game server, he enters a main chatroom. A 3D scene is presented in background and a semi transparent GUI is available. In this room he might chat, edit his army, enter the store or create a game. I was considering opening a mission for the background 3D rendering and create a GUI for the chatroom. The issues:
a. I really require some strong GUI controls like a chat message list and a grid in order to place the games, the player units and the store units. You may see the grid in some of the shots. Is there a control like this in Torque?
Game
When the game starts, it presents the game area and the avatars and a GUI with some options. In the lower left of the GUI the last selected/clicked/pointed unit is rendered in real time (Warcraft3 style). I was thinking about loading a mission depending on the game map and focus the camera to the middle of it. I also want to setup a camera pointing to other portion of the map where I show a copy of the selected unit for the GUI render.
a. Is it possible to load many independent missions in the same dedicated server? My current version allows for a single game server to handle many games. I don't know if the Torque architecture requires one server for one game only or may I start many games at once controlled by the same server.
b. Messages should be controlled with a strict exact order. Is the message list controlled by the server?
c. Is it possible to render the mini scene for the GUI? I currently do it by rendering to a texture and using this texture to render the GUI. Is this approach possible?
I know these are a lot of questions but as I said, I don't want code snippets... I just want to find resources about this. I'm currently searching the forums but I just don't find a clear solution fot these problems. I know there will be a lot of work. But if you tell me some portion of this may be REALLY hard or just requieres a LOT of internal programming then maybe I should try another engine. I mean... I dropped my engine specifically because I wan't to minimize engine programming. I don't know if the RTS kit may cover some of this points or may help me with this structure. I only want to get it working again... shadow, water and all the visual effects will be covered later.
Thank you for your patience.
Luck!
Guimo
We have decided to drop development on our engine. So I've bought a license to the TGE and now I'm trying to move our game to use it. As I'm new to this engine, I'm here to ask your help. I'm not asking for code, just for pointers to resources that may be useful.
First take a look at the shots at: http://www.warscale.com
Description
Warscale is a crossbred between a card game and Warcraft. The idea is to battle your opponent with a selection of spells and creatures.
Networking
Warscale requires the client to connect a master server for login. Once accepted the server sends a list of available game servers to the player. The player selects the game server and the master server negotiates with the game server and provides the client with a unique ID which must use in order to enter the game server (which will only allow access using this ID). This means we have a tree point connection (Master/Game, Client/Master and Client/Game). The issues are:
a. How do I start a dedicated master server which opens two ports (one for the game server and one for the client).
b. How do I start an independent game server with two open ports (one for master and one for client) and make it connect to server?
c. How do I create a client with two ports (to master server and to game server)?
d. How do I connect the servers to my OracleXE Database?
e. Can I do it just using scripts or should I modify the engine?
Note this setup is similar to MMORPG networking.
Game management
Once the player is connected to the game server, he enters a main chatroom. A 3D scene is presented in background and a semi transparent GUI is available. In this room he might chat, edit his army, enter the store or create a game. I was considering opening a mission for the background 3D rendering and create a GUI for the chatroom. The issues:
a. I really require some strong GUI controls like a chat message list and a grid in order to place the games, the player units and the store units. You may see the grid in some of the shots. Is there a control like this in Torque?
Game
When the game starts, it presents the game area and the avatars and a GUI with some options. In the lower left of the GUI the last selected/clicked/pointed unit is rendered in real time (Warcraft3 style). I was thinking about loading a mission depending on the game map and focus the camera to the middle of it. I also want to setup a camera pointing to other portion of the map where I show a copy of the selected unit for the GUI render.
a. Is it possible to load many independent missions in the same dedicated server? My current version allows for a single game server to handle many games. I don't know if the Torque architecture requires one server for one game only or may I start many games at once controlled by the same server.
b. Messages should be controlled with a strict exact order. Is the message list controlled by the server?
c. Is it possible to render the mini scene for the GUI? I currently do it by rendering to a texture and using this texture to render the GUI. Is this approach possible?
I know these are a lot of questions but as I said, I don't want code snippets... I just want to find resources about this. I'm currently searching the forums but I just don't find a clear solution fot these problems. I know there will be a lot of work. But if you tell me some portion of this may be REALLY hard or just requieres a LOT of internal programming then maybe I should try another engine. I mean... I dropped my engine specifically because I wan't to minimize engine programming. I don't know if the RTS kit may cover some of this points or may help me with this structure. I only want to get it working again... shadow, water and all the visual effects will be covered later.
Thank you for your patience.
Luck!
Guimo
About the author
#2
05/15/2006 (2:05 am)
It seems to me that most of your networking architecture concerns are not difficult with script. For a connection to an Oracle database however you would almost certainly have to modify the engine source. There are existing resources that add database support to TGE, I recommend searching for mysql and sqlite, to give you an idea of how to implement that kind of support.
#3
So now I have to deal only with the network. Does anybody knows where to find info on the basic login setup?
Luck!
Guimo
05/15/2006 (1:01 pm)
I found there is a resource in order to access a Oracle database using an ODBC driver. I was trying to avoid ODBC as it has quite a fame for being slower than a direct TNS connection. Anyway it can be done at thats the important thing.So now I have to deal only with the network. Does anybody knows where to find info on the basic login setup?
Luck!
Guimo
Torque 3D Owner Guimo
I have done some research and solved some questions.
a. I have found thet there is a text control that may be used as a grid contro. Except that I require a transparent background. But I guess that may be solved. Also there is a textList control that may be used ofr a chat. I havent testes it for line wrap but may help a lot.
b. There is a control called guiObjectView that may be used to display a dts file. I hope it works later with te TSE upgrade.
Thats just what I needed for the GUI. My problems in that area are solved.
So now my problems get down to check for the network architecture and server support.
Luck!
Guimo