Warscale - Single player mode
by Guimo · 03/31/2008 (11:55 pm) · 1 comments
Hi all,
A new week, a new blog. No shots yet but coming closer.
This last weekend I was a little busy with my son's first birthday so not much time left for coding but I managed to make some progress.
Skirmish: Single player mode
Warscale is conceptually a web game. It gets enhanced by throwing player one on one (up to 4 players) in battles. Unfortunately one of the most difficult things to in a MP game is debugging the server and the clients. Just one problem in one side and you must stop all (two clients and a shard), fix and start again everything. A time consuming process.
I usually use my job laptop to program the game while I'm on the train going to work. Its a nice way to spend the 45 minutes it takes me to reach the job (and 45 minutes back that it 1:30 hours a day). But I just dont want to install all the servers in that laptop so I required to simplify the process.
I decided to write a single player version of the game but keeping the basic networking architecture. The basic idea: shortcut the TCPObject that sends the information to the shard server so that it receives the message back. Then program a seudo server with limited capacity (one on one player against a computer only) to handle those messages and send response packets back. Its completely transparent and the final code can work with web too. Of course TorqueScript makes me way easier to handle all the logic.
Now, part of the fun in Warscale comes from collecting your units and your magic items in order to customize your wizard. In the case of this single player version, you get access to all the units available and can build your army as you see fit. Of course you wont be able to use these single player armies on the web game. But it allows you to test units so you already know their strengths and weaknesses and can adjust your game style. When you get into the web game you already know what you are looking for. I guess this is important because in the game you can sell units but at a slightly lower value than you paid.
Campaign: Single player mode
I havent started this one yet. But this new single player configuration allows for some single player fun. I was planning creating a map where the player may advance from one territory to the next territory battling oposing armies, gathering new recruits, monsters, treasure, magic items and spells so that you can join the next battle with a better army. And if you finish the camaign ou may get some units for your web army. Of course this is an idea only and may be inplemented later but looks like fun.
WSAIPlayer
Of course the single player will only be possible with an AIPlayer. When I started programming the web game I planned to do this but I discarded the idea because it was too hard to integrate at the moment. Unfortunately even in a web game you may not find a suitable opponent and you may want to play against an AI opponent. Now this is possible. Currently the AIPlayer is a dummy object which just passes its turn. It requires more work and I will flesh it later but the point is that it is already integrated in the Warscale core mechanic. It gets its own turns and can make its own moves. I can make it more and more intelligent later. As I said, my first objective is to have everything working.
Business model
Some friends ask me about the game business model. How much will it be sold. How much do I plan to make. My answer... almost nothing. Maybe $10 tops but being free is not discarded.
So is this an AdverGame? In a way it is but not your usual advergame. You wont see a Pepsi banner flying on the screen and I dont pretend to have the CocaCola polar bears as game creatures or summoning the M&M of power.
Warscale will sell artists and 3D models.
I'm pretty sure you are puzzled. I will leave it this way for now. I will go on more detail later. :)
Progress
So, my progress this week:
General
a. Moved the game to a Single player architecture.
Single player
a. Created new menus to handle the new modes (dummy screens. need work). Designed in paper the GUI organization for army editor/store and magic item editor/store.
b. Created the AIPlayer object and integrated it into the game architecture. Its a dummy for now but it works fine.
c. Created a the message manager that will connect and send the logical game events to the 3D simulation.
d. Debugged all the game startup. The game loads one mission (curently the AFX day mission) and sends the acknowledge back to server.
e. Debugged the turn startup. The player receives a turn message and rejuvenates the player units. Assign move points, mana points, draw units. Should be able to handle the end of some spell effects and enchantments.
Multi player
a. Simplified disconnection procedure. Correctly handles game disconnections and informs to all the clients in web mode.
This week plan
a. Create a new map specific for warscale. Simple flat map is enough for now.
b. Allow avatars to enter the 3D simulation.
c. Allow initial turn effects to show in the 3D simulation.
d. Hard part: Receive a new unit in hand and load it resources on the fly.
e. Hard part: Load arcaneFX datablocks on the fly.
See you next week. Luck!
Guimo
A new week, a new blog. No shots yet but coming closer.
This last weekend I was a little busy with my son's first birthday so not much time left for coding but I managed to make some progress.
Skirmish: Single player mode
Warscale is conceptually a web game. It gets enhanced by throwing player one on one (up to 4 players) in battles. Unfortunately one of the most difficult things to in a MP game is debugging the server and the clients. Just one problem in one side and you must stop all (two clients and a shard), fix and start again everything. A time consuming process.
I usually use my job laptop to program the game while I'm on the train going to work. Its a nice way to spend the 45 minutes it takes me to reach the job (and 45 minutes back that it 1:30 hours a day). But I just dont want to install all the servers in that laptop so I required to simplify the process.
I decided to write a single player version of the game but keeping the basic networking architecture. The basic idea: shortcut the TCPObject that sends the information to the shard server so that it receives the message back. Then program a seudo server with limited capacity (one on one player against a computer only) to handle those messages and send response packets back. Its completely transparent and the final code can work with web too. Of course TorqueScript makes me way easier to handle all the logic.
Now, part of the fun in Warscale comes from collecting your units and your magic items in order to customize your wizard. In the case of this single player version, you get access to all the units available and can build your army as you see fit. Of course you wont be able to use these single player armies on the web game. But it allows you to test units so you already know their strengths and weaknesses and can adjust your game style. When you get into the web game you already know what you are looking for. I guess this is important because in the game you can sell units but at a slightly lower value than you paid.
Campaign: Single player mode
I havent started this one yet. But this new single player configuration allows for some single player fun. I was planning creating a map where the player may advance from one territory to the next territory battling oposing armies, gathering new recruits, monsters, treasure, magic items and spells so that you can join the next battle with a better army. And if you finish the camaign ou may get some units for your web army. Of course this is an idea only and may be inplemented later but looks like fun.
WSAIPlayer
Of course the single player will only be possible with an AIPlayer. When I started programming the web game I planned to do this but I discarded the idea because it was too hard to integrate at the moment. Unfortunately even in a web game you may not find a suitable opponent and you may want to play against an AI opponent. Now this is possible. Currently the AIPlayer is a dummy object which just passes its turn. It requires more work and I will flesh it later but the point is that it is already integrated in the Warscale core mechanic. It gets its own turns and can make its own moves. I can make it more and more intelligent later. As I said, my first objective is to have everything working.
Business model
Some friends ask me about the game business model. How much will it be sold. How much do I plan to make. My answer... almost nothing. Maybe $10 tops but being free is not discarded.
So is this an AdverGame? In a way it is but not your usual advergame. You wont see a Pepsi banner flying on the screen and I dont pretend to have the CocaCola polar bears as game creatures or summoning the M&M of power.
Warscale will sell artists and 3D models.
I'm pretty sure you are puzzled. I will leave it this way for now. I will go on more detail later. :)
Progress
So, my progress this week:
General
a. Moved the game to a Single player architecture.
Single player
a. Created new menus to handle the new modes (dummy screens. need work). Designed in paper the GUI organization for army editor/store and magic item editor/store.
b. Created the AIPlayer object and integrated it into the game architecture. Its a dummy for now but it works fine.
c. Created a the message manager that will connect and send the logical game events to the 3D simulation.
d. Debugged all the game startup. The game loads one mission (curently the AFX day mission) and sends the acknowledge back to server.
e. Debugged the turn startup. The player receives a turn message and rejuvenates the player units. Assign move points, mana points, draw units. Should be able to handle the end of some spell effects and enchantments.
Multi player
a. Simplified disconnection procedure. Correctly handles game disconnections and informs to all the clients in web mode.
This week plan
a. Create a new map specific for warscale. Simple flat map is enough for now.
b. Allow avatars to enter the 3D simulation.
c. Allow initial turn effects to show in the 3D simulation.
d. Hard part: Receive a new unit in hand and load it resources on the fly.
e. Hard part: Load arcaneFX datablocks on the fly.
See you next week. Luck!
Guimo
Torque 3D Owner JulianR