Project 137: Star Commander: Point and Click Interface, Unit Selection, Frag Grenades, Game Lobby, Client-Specific Rendering, Game Rules.
I have made huge progress in Star Commander over the past week.
In addition to creating animations for grenade throwing (which still need some work!), I added code to allow for “Client-Specific Rendering”. This is basically where an object shows up on one client, but not on another. Since Star Commander is a tactical wargame, I will be modelling real-world variables, such as cover, concealment, etc. This means that some players will be able to detect an enemy before that enemy detects them, or vice versa. For this to work, I need to be able to control the visibility of each player object over the network. I have implemented this by simply hiding the mesh, as opposed to deleting it. The advantage to this is that the mesh is still in the game world, so it could still be hit by stray bullets or grenades, or detected by the footprints it leaves behind, etc etc, which is a desireable feature. I could have achieved this effect on the server of course, and hiding a mesh as opposed to deleting it does allow for the potential for cheating, if a player were to hack the client, so this is something I may look into and improve later.
I create a game lobby, and implemented most of it’s features. There is a fully colour coded (Red Team, Blue Team, and Observer) player list and chat system, the ability to choose teams, choose spawnpoints, and enter the game, and the ability to send chat messages to everyone or only to your team. A different set of spawn points are loaded for each Team, ensuring members of opposing teams dont spawn beside each other, and a map wil be shown behind the spawn select buttons, providing a visual indication of where it is.
I implemented the beginnings to the games rules. Star Commander will have a complex system of rules for governing things like accuracy, detection ability, chance to be detected, etc etc. These rules wil be based on variables such as morale, stamina, health, whether the AI is in cover or not, how many casualties have been taken by the players team, or the enemies team, etc. I have come up with al algorithm to convert all of this into a percentage chance of hitting a target, and an offset vector determing how much a player misses by if they do miss.
I spent quite a bit of time implementing a point-and-click object selection system. I had to make several changes to the C++ source for this to work, as well as do a lot of GUI work. Players can now click on the screen with the mouse and the 2D screen coordinates will be translated to 3d coordinates, and used to select items in the game world. This means I can combine an on-screen gui with object selection, I don’t have to hide the gui menu while the player is controlling the camera, and then show it again, which is what I was doing before. Players use the left mouse button to select squad members, select orders, and issue orders. Holding the right mouse button allows the player to rotate the camera in full 3d. The videos below show this in action.
Finally, I added some simple Decals to indicate which player was currently selected, and I implemented frag grenades. (Both of these should be in the video below too) as well as creating and setting up a dedicated server for the game. For the initial release of Star Commander, I will have about four or five dedicated servers, running different missions. I will eventually add the ability for players to host their own missions.
I have tested the network play on a LAN, and everything seems fine. I can’t test the network play on the internet from my machine, because due to the way Torques networking works, I can’t connect over the internet to a game while I am on the same network as the game server. I intend to upload a simple playable test version of Star Commander soon, to be used for internet testing.









March 6, 2014 @ 9:59 am
I have been looking into buying a new gaming desktop however have been a little stuck in making my selection. Well I was stuck anyways until I stumbled across your website. Keep it up