Warscale - Debug started
by Guimo · 03/25/2008 (5:20 pm) · 2 comments
Hi all,
I moved to Sydney this year and started working in a financial company almost inmediatly. I had no much time for visiting the city. So the last holidays I went visiting some places like The Rocks, Circular Quay and the Blue Mountains. I had a nice time with my family.
But of course I made some free time for Warscale and thats why I'm writing this blog.
After writing scripts and code for about four weeks I decided that I got a nice definition of how all the game would hold up. So, I decided to start debugging.
The first thing was to finish my model editor. In warscale a model can be a sorcery, a creature or an item. So the model editor had so handle such information as name and description, the artist name (I will talk about the importance of artists for Warscale), hit points, mana points, regeneration, movement, attack, defense... in brief, lots of characteristics you may find in a common RPG game.
But being a child of Magic The Gathering, each object may fire different effects each time it is summoned, enters play, unsummoned, killed, attacks, damages, is damaged etc etc. And of course it should allow to pick a model and skin.
At this moment I can say that the model editor is 90% finished and is stable enough to help me create my models. In the future, when things become more rounded, it will get easier and get more features, but for now is more than enough. I have already created a couple of creatures and a spell and everything goes fine even. Of course these objects havent been tested but as they comply with the general data structure I feel confident they will work as a charm.
So, after finishing the model editor I moved into testing the game. As I have mentioned, Warscale is basically a web based game. Unfortunately I dont have a network of servers so I'm developing and testing in the same computer. Originally I was programming using TGEA but decided to move back to TGE in order to make it compatible with more platforms. Also I decided to buy the awesome AFX. So I ported the code to TGE which was really simple because all my scripts work like a mod and and engine modfications are located in a separate directory. I just plugged everything in and recompiled and everything started running. I had a minor complication due to the fact that while in TGEA you can run multiple instances in the same computer, in TGE you have to compile in debug mode in order to do the same. So running a master erver, a shard server and two clients (for testing purposes) was a little complicated.
So, I decided to keep the servers in TGEA and the clients in TGE. This worked as a charm and is a proof that my objective of having the servers in any platform (Windows, Linux, OSX) and clients also in any platform supported by any Torque engine. It demonstrates that I can write a client for TGE, TGEA, T360, TWii and it will be able to connect and play against any other platform.
So after ironing some things, I started testing the game in a multiple client environment. The objective was to get all the code for creating and joining a game room working. I killed a lot of bugs but on the end I managed to make the clients connect, chat and create a game, join a game room and leave a game room. The shard even detects if the game creator has left the game and it may transfer the game room control to other player which still remains in the game.
The game is ready to start. So I decided to debug the game creation process. I must say this is also a very difficult thing to do because it requires two clients to connect and join the game and send the staring message and track the bug in the shard script. I killed more and more bugs but on the end I have decided that I need a single version of the game so I will be able to make the game logic work before moving to a networked environment.
Again one step back, but its a nice step. I created a basic menu which allows the user to join a web game or start a single player game. The single player game will still use all the networking logic except that the specialized TCPObject (WSTCPObject) which I use for packet transmission wont send the packets through the web. Instead it shortcuts the packets so the local player will inmediatly get the message back. This will allow the client work seamlessly in local or networked environments.
Aaaaaaaaaand... thats all... I think it was a very productive weekend. And the Blue Mountains are a beautiful place to visit even when (I must say this... sorry Australians) they are just a shadow compared to the mountains in Peru, where I come from. Just visit the Sacred Valley in Cuzco and you will approve this assertion :)
Luck to everyone!
Guimo
I moved to Sydney this year and started working in a financial company almost inmediatly. I had no much time for visiting the city. So the last holidays I went visiting some places like The Rocks, Circular Quay and the Blue Mountains. I had a nice time with my family.
But of course I made some free time for Warscale and thats why I'm writing this blog.
After writing scripts and code for about four weeks I decided that I got a nice definition of how all the game would hold up. So, I decided to start debugging.
The first thing was to finish my model editor. In warscale a model can be a sorcery, a creature or an item. So the model editor had so handle such information as name and description, the artist name (I will talk about the importance of artists for Warscale), hit points, mana points, regeneration, movement, attack, defense... in brief, lots of characteristics you may find in a common RPG game.
But being a child of Magic The Gathering, each object may fire different effects each time it is summoned, enters play, unsummoned, killed, attacks, damages, is damaged etc etc. And of course it should allow to pick a model and skin.
At this moment I can say that the model editor is 90% finished and is stable enough to help me create my models. In the future, when things become more rounded, it will get easier and get more features, but for now is more than enough. I have already created a couple of creatures and a spell and everything goes fine even. Of course these objects havent been tested but as they comply with the general data structure I feel confident they will work as a charm.
So, after finishing the model editor I moved into testing the game. As I have mentioned, Warscale is basically a web based game. Unfortunately I dont have a network of servers so I'm developing and testing in the same computer. Originally I was programming using TGEA but decided to move back to TGE in order to make it compatible with more platforms. Also I decided to buy the awesome AFX. So I ported the code to TGE which was really simple because all my scripts work like a mod and and engine modfications are located in a separate directory. I just plugged everything in and recompiled and everything started running. I had a minor complication due to the fact that while in TGEA you can run multiple instances in the same computer, in TGE you have to compile in debug mode in order to do the same. So running a master erver, a shard server and two clients (for testing purposes) was a little complicated.
So, I decided to keep the servers in TGEA and the clients in TGE. This worked as a charm and is a proof that my objective of having the servers in any platform (Windows, Linux, OSX) and clients also in any platform supported by any Torque engine. It demonstrates that I can write a client for TGE, TGEA, T360, TWii and it will be able to connect and play against any other platform.
So after ironing some things, I started testing the game in a multiple client environment. The objective was to get all the code for creating and joining a game room working. I killed a lot of bugs but on the end I managed to make the clients connect, chat and create a game, join a game room and leave a game room. The shard even detects if the game creator has left the game and it may transfer the game room control to other player which still remains in the game.
The game is ready to start. So I decided to debug the game creation process. I must say this is also a very difficult thing to do because it requires two clients to connect and join the game and send the staring message and track the bug in the shard script. I killed more and more bugs but on the end I have decided that I need a single version of the game so I will be able to make the game logic work before moving to a networked environment.
Again one step back, but its a nice step. I created a basic menu which allows the user to join a web game or start a single player game. The single player game will still use all the networking logic except that the specialized TCPObject (WSTCPObject) which I use for packet transmission wont send the packets through the web. Instead it shortcuts the packets so the local player will inmediatly get the message back. This will allow the client work seamlessly in local or networked environments.
Aaaaaaaaaand... thats all... I think it was a very productive weekend. And the Blue Mountains are a beautiful place to visit even when (I must say this... sorry Australians) they are just a shadow compared to the mountains in Peru, where I come from. Just visit the Sacred Valley in Cuzco and you will approve this assertion :)
Luck to everyone!
Guimo

Torque Owner Gary "ChunkyKs" Briggs
Or just "fix" [yes, neuter :-)] Platform::excludeOtherInstances() on each platform where you want multiple instances running.
Or grep the code for excluseOtherInstances and fix each call appropriately, there's only two to worry about :-)
Gary (-;