Monday, May 27, 2013

Well, it took longer than expected, but BlitzBotz is finally using the final version of my authoritative server setup. There are no more shortcuts to redo, and everything is working as expected. The client is now finally purely a graphical representation of what is going on at the server. You click to move, the server checks if can, where you are, when you last moved, etc. and sends the acceptance/denial to all members simultaneously. Lag switches and network manipulation has been officially thwarted :[] (
After completing the server system, I decided to make a few adjustments, add a few new tweaks, and browsed through the Asset store for some inspiration. My girlfriend and I are big fans of the zombie levels in Black Ops, and after finding an awesome zombie model in the Asset store (Micro Zombie Brain) I decided to start working on a zombie level for the game. My priority was to handle the zombies in the same way I would any player, just with a little AI to control movement/attacks/etc. So, the server handles all zombie spawns and movements (attacks are coming later) and, as with everything else, all of this data is sent to each client simultaneously. This will allow players to not only meet up with a friend in the game to try and best the current zombie high score, but will also allow for a matchmaking system, meaning that players can join a queue and find other players to blow-away zombies with from anywhere with an internet connection. The zombies do not attack yet, nor do they take damage, but I will get to this later on... I need to do some major tweaking on the servers damage calculations before continuing with this.

Next, the plane-with-a-texture arena is now gone, replaced with a 3DS Max model that I've textured with various textures I've found off the internet. I'm only using these textures temporarily, so that I can get things thrown together quicker, and it also helps us see the big picture now rather than later, so we aren't creating textures over and over as we change models, etc. I've had the idea to include pillars/walls/etc. that the player can interact with for a while now, so I did a little proof of concept work to test it out. Below is a screen shot of a player taking cover behind one of the arena's pillars. The circles on the ground represent the "buttons" that players can click & hold to have their bot take cover behind the object, reducing and/or removing any damage they would have taken otherwise.

Last but not least, I finished work on the Armor Ability for the Marine class. The Gladiator class has an ability that allows them to sprint forward at a very high rate of speed, stunning any enemy they come in contact with along the way. I want classes to have their own play-style and feel, so the Marine class comes equipped with a jetpack that can be deployed at any time to escape any nearby danger. The bot jetpacks up, away, and spins around before landing, putting them in near-perfect position to attack upon completion of the animation.

Below is a video featuring these new features. It's short and to the point, but I haven't made a post in quite a while so I figured I'd get an update up on the Dev blog to showcase the work we've been doing. We are hoping to go public with a Zombie's-only version of the game very soon, which will basically pit players up against each other for rights to the high-score throne. Chances are it will not be co-op when first released, but we need to do these things one at a time, and there are only two of us, and only one of is a programmer.

The next goal is finish up tweaks on the damage calculation. The server now handles all damage calculations, and the client merely displays the servers data to the player, so adjustments will not be difficult as much as they will be time consuming. Zombies will probably get mostly completed during that time frame, since I will be using the zombies and their AI to test the attack systems, since trying to control two bots via two devices at once is not exactly an efficient use of time.

More coming soon!!.. and post will probably become a little more and more frequent as my newborn daughter starts sleeping through the night.

Wednesday, May 15, 2013

I've been working on things here and there with the game when I have time, and there are a few new things I wanted to get posted in the Dev blog. First off, I created a loading/matchmaking screen for the Arena. Now, while you are searching for another player, there is a window that is displayed explaining that it is searching, and when an opponent is found, a preview of both Botz are shown to both players as the countdown starts.

Once in the arena, Botz now use the appropriate animations when attacking. Before this update, the sniper rifle animation was played regardless of which weapon was used. There are now animations for every Primary and Secondary weapon, and I also threw together a quick animation for swapping weapons. This is also the beginnings of the final version for the attacking system. I had cut some corners as far as the authoritative server request/response system when doing proof-of-concept mock-ups, but what you see below is literally just a graphical representation of data on the server. When you hit the attack button, a request is sent to the server making sure you are allowed to hit that button at all... if this passes then the request is sent to all users, and the weapon swapping animation is played if necessary. Next, when you aim, the same thing happens... a request is sent to the server, and if approved, is then sent to all players at the same time.

The last part that I need to finish for this authoritative system is damage-distribution. It was much simpler to calculate damage via the Unity client than the Java server while doing proof-of-concept work, but the damage functions are now getting moved to the Java end. Once that is completed, a few checks for deaths and respawns (already half-done) will be put in place, and the system will be able to send out instructions to clients to play death animations/apply ragdolls/etc., the goal always being to render network manipulation/lag-cheats useless.

This isn't a very big update, but work has kept me pretty busy lately. I'm hoping to spend some time working on the updated damage system soon.

We are still taking pre-registrations for Phase I Alpha testing, so be sure to sign up if you'd like to participate in the coming months.

Friday, May 3, 2013

After a long day of working on my clients app, I volunteered for the late night/early morning baby feedings and decided to play around with a concept I've had for some time now while the baby slept. The HUD window that hovers above the players thus far was not was done for looks by any means; it was just a proof of concept for the information being displayed. After taking screenshots for the website the other day, the need to redo these status "windows" gnawed at my brain more and more, until I couldn't resist the urge to try out my concept for first draft status bars. The following image has half a screen from the old HUD on the left, and half a screen from the new HUD on the right:

Personally I think it's quite an improvement, and am satisfied with the results, at least for now. My girlfriend (the graphics design side of the studio) will make them (along with everything else) much more appealing to the eyes once all proof-of-concepts are completed. The inner bar is the "energy" bar, which will be depleted when attacks are used but will regenerate rather quickly. The outer bar is your standard "health" bar. I used a full health bar graphic set to a very low alpha to show what size the full bar is at all times, which aides in determining what percentage of your life remains at a glance. I then used two graphics, both representing the current life remaining, spaced slightly on the Y-axis to give a hologram effect to the bars.

After a lot of consideration, I decided the effect is worth the small frame-rate hit on my mobile phone (my mobile phone is old and crappy, but I am still maintaining a 45+ FPS rate on it, and my goal is to keep it as close to 45 as I possibly can), mainly because each player adds only a handful of transparent textures to be rendered, and my phone seemed to handle that without too much of a frame rate loss... even when I brought several other bots into the same arena.

Lastly, I saw an easy way to distinguish between yourself/your teammates and the opponents using these new graphics. A full screenshot of the result is below:

Right now every players status bars default at 50%, and within the next few days I will hopefully find time to make them functional. I would do it now, but I need sleep.