A lot of my time lately has been sucked up by both school and work, but a lot recently went into getting the darned webserver configured with phpBB and getting mySQL to play nicely with it. But alas, this is now all done. The Discussion Forum is up and running. However, since the Alpha testing is currently closed, only specified testers will have access to the testing schedule and client program. But drop by and help keep things active! I think I have most of my journal readers on the Alpha team already. [grin]
This wasn't too hard to implement. You can PM someone ingame with the syntax: "[name] hello!". The 'name' can be abbreviated and is not case sensitive. You can also use a quick shortcut: to reply to the last person who sent you a message, typing " hey!" will automatically fill in the name for you.
5-Step Network Refactor
I won't go into much detail here, since the beef of it is already written out.
So far I have the first step completed, which is the change of network libraries from WSockets to HawkNL, which I'm finding somewhat more stable thus far. Plus, it has some cool built-in statistics (byes-per-second, # of packets, etc) that I could use to generate cool charts or something.
Most of the next step (order changed around), Server Authorative-ness, is completed. Previously I was letting the client make a number of decisions to make the game experience appear smoother, but as some people pointed out ways to explot this control the client had, I quickly realized that things had to change. So now the server calls the shots (quite literally!). All that's left is having the server keep track of ammunition/weapons so that the player can't potentially hack himself infinite uses on a weapon or utility.
Grenade Network Logic fix
I realized this one a little late, but when I did it blew me away. I set up my client to throw two grenades per throw: the local throw that the client usually sees, and the throw bounced off from the server that everyone else sees. Wow. Turns out that in numerous cases the landing location for both were off by a LOT. Especially in situations at high-speeds where one bounces off an object and the other didn't.
This ended up being because the initial velocity of a grenade throw is derived not only from how much you've primed it and what direction you face, but your player's velocity as well. So a small discrepency between the client and the server 'current-velocity' was resulting in a huge difference in the resulting throw.
Unfortunately rounding also played a key role here. My first tactic was to write two shorts for X-velocity and Y-velocity by multiplying both original values (floats) by 1000 and them integer-round them into a short, giving me precision to 3-decimal places. I thought that would be enough. Nope. Turns out even a tiny 0.0005 difference can mess up the trajectory of a grenade. Nuts. So now I've resigned and am sending two 4-byte floats. Groar. [sad]
- Nail grenade got a boost from 50 nails to 75. Should make things a little more exciting. :P
- Team auto-balance bug fixed. Forgot to remove a player from the Members list when he is removed from the game, which explains some of the really unfair games in our testing. [smile]
- Added InactiveTime to bullet projectiles. This is a duration of time before the bullet will become collidable with players and objects. Mainly it's for the bigger weapons like the Minigun whereas there's no way you can hit someone with a gun that size that close. Also gives folks with melee weapons the opportunity to dash into their minimum range and go to Stab Town on them. :P
- And just a little animation fix whereas (due to network lag) a player's firing animation would make them appear to be raising their gun to fire and then putting it back down again really fast in succession as they fired most guns. Looked weird, but that bug's quashed too.