Search Unity

WIP Orbital Assault

Discussion in 'Works In Progress - Archive' started by PhobicGunner, Aug 5, 2014.

  1. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Check us out on IndieDB:




    Recently I launched a new game project, tentatively named Orbital Assault. It's going to be a free to play first person shooter aiming for a quality desktop shooter experience coupled with well-designed and balanced F2P monetization. I've been posting on IndieDB, so I may as well post here too.

    I've now got a level designer, audio designer, and 3D artist working on the project. We're going to be working on releasing early demonstrations of the visual features we expect to have, gameplay features, etc.

    In the meantime I have been and will continue working on a multiplayer gameplay prototype. It's not much to look at, but this is being worked on independently of everything else so naturally everything is asset store freebies and primitives at the moment.

    The game will employ server authoritative networking. The reason for this is, on the one hand, so the server gets complete control over which weapons you own (it will download your weapon loadout upon connecting, that way a player isn't able to cheat and give themselves weapons they haven't purchased or rented), and additionally to significantly reduce the amount of cheating in the game. While it's impossible to stop all cheats (ESP, aimbot, speedhacking, etc are all still possible), there's a number of cheats that this renders impossible (noclip, n-step, flying, super jump, infinite ammo, infinite health, instant kill, 100% weapon accuracy, etc). For the rest, I'll likely have to make do with a conventional anti-cheat system.

    Anyway, the movement is fully server authoritative and is a partial port of the movement code from Quake 3 modified to work with Unity's CharacterController component. That means you can strafe and circle jump, rocket jump, and more.
    The weapons are also completely server authoritative, the client only sends state of the mouse buttons to the server and predicts weapon fire locally while the server does the actual hitbox detection and damage dealing.
    As I'm using Bolt, it also does hitbox rewinding, meaning you won't have to lead your targets when aiming. I've implemented hitbox rewinding before (there's a chapter about it in my book Unity Multiplayer Games, as well as a chapter on server authoritative movement), but it's nice to have a solution that does everything for me so I don't have to worry about it.

     
    Last edited: Dec 3, 2014
    User10101 likes this.
  2. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Another update. No videos or anything, I've spent much of the day merging the multiplayer prototype into our main SVN and fixing things as well as coordinating with the team on our first demo.

    I'd like to talk about AI in this post, however.
    It might seem strange, given that this is primarily a PVP shooter, but we're also planning a cooperative survival mode in which players attempt to survive waves of incoming alien enemies as long as they can.

    For this, we're not going to go the standard route of Zombie Mode. Zombies are dumb, are cliche, are not challenging, and don't fit within our world. So, alien enemies which can wield guns and shoot you only seems fitting.
    For the enemy design, we've gone for a few enemy behaviors:
    • Enemies which stand at the front lines, not dealing much damage but are able to take lots of it.
    • Enemies which hover around those, healing them as needed (or taking potshots at the player if there's no allies to heal)
    • And finally, enemies which keep their distance and pile on the damage from behind the guys at the front lines.
    If this sounds familiar, it's because our enemies are going to be designed to employ the popular so-called "tank and spank" strategy from many MMORPGs.
    Basically, our enemies are designed from the ground up to cooperate with each other in order to defeat you, the player. That means a more challenging scenario, not because the enemies are physically stronger, but because they actually work together and that has implications on how you need to approach them.

    We're also going to focus on smart AIs. Traditionally game developers have used FSMs, which has been around since the earliest computer games. Nowadays, developers use behavior trees.
    We're not using FSMs, and we're also not using behavior trees either. We're going to be using a technique called Hierarchical Task Networks, or HTNs for short.
    If you were to look at the graph for an HTN, you'd see that in reality it looks a lot like a behavior tree, but it works differently and has a different purpose. Unlike a behavior tree, where it finds and updates a single action, an HTN will go through the tree and return a plan, which is a sequence of actions the character needs to execute.
    The way it does this is, each action has a set of preconditions which must be met in order for the action to be considered for a plan, and a set of results which are to be applied if this action is chosen (preconditions and results both deal with a set of variables called a blackboard, which generally contains an entity's perception of the world state)
    Basically, the HTN searches through the tree for a set of actions (plan) in which all of the preconditions are properly met, and returns that. In even simpler terms, it picks the first plan that works.

    It will then proceed to execute that plan. If, during the plan execution, any action reports failure, it will stop and re-plan. Additionally, should the state of the blackboard change sufficiently, it will again stop and re-plan. Otherwise, it keeps executing the plan until it is finished.

    The whole idea here is that the AI doesn't just impulsively do whatever it decides is needed RIGHT NOW. Instead, it observes the world state, deliberates and decides what it needs to do, and produces a cohesive sequence of actions which will (hopefully) produce the desired result - or if not, it will reconsider the plan to find another one that works. And that, hopefully, makes for much smarter AI, and a much greater challenge.
     
    Last edited: Aug 6, 2014
  3. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Our artist Adrian has been putting together some environment concepts for indoor spaces in the game.



    And a battleworn variation after the bullets have been flying, things exploding, and people leaking blood all over the place.


    We're still debating on whether we want to go for an overall clean and shiny look (which, no doubt, would be a great way to show off physically based shading), or a dirty grungy look (which might also be a good way to show off PBS)
     
  4. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Got a new gameplay video of the multiplayer prototype.
    Quite a bit has gone into this update.

    - Recoil and bullet inaccuracy are in.
    - Ammo and reloading are fully networked now
    - Fixed a minor bug with damage messages and health display
    - Tweaked the assault rifle's rate of fire
    - Announcer sounds added. Right now First Blood, Headshot, multikills, killing sprees, Game Over, and Victory are implemented.

     
  5. PixelNecktie

    PixelNecktie

    Joined:
    Dec 20, 2013
    Posts:
    13
    Enjoying the updates, keep it coming!
     
  6. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Thanks.
    I'll probably have a few more multiplayer prototype updates soon, but we're still working hard to get the first demo out which will showcase some of the characters, weapons, enemies, and graphical features we expect to have in the full game.
     
  7. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Ah, the joys of programming netcode.

    Currently in the process of ripping out the weapon inventory code I had written and replacing with something else. This is the thing with server-authoritative stuff - once you've committed, you really have to go all the way.

    So weapon switching will now be done in the exact same manner that movement, firing, ammo, and reloading is being done. The player will send the state of the scroll wheel to the server, and locally predict the weapon switch action while the server performs the action as well. Additionally the server will send back the currently equipped weapon as part of the state correction message if necessary.

    I was going to send these as separate messages (or Events as they're called in Bolt), but that would almost certainly cause odd desync issues as it executes outside of the client prediction and server authoritative code.
     
  8. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Got the weapon scrolling in. It was way harder and took far longer than I thought it would, on account of getting the client prediction <-> server authoritative stuff working properly. Went through a couple iterations before I settled on what I have now. At the moment the client actually has complete control over which weapon they have equipped, and are responsible for relaying that information to the server as part of an input command.

    Still, I'm sure this will work fine as the server still has full control over ammo and there won't really be a situation where the client equipping a weapon the server doesn't want them to will actually be harmful. It will just produce strange (clientside only) results.

    Anyway, video time. There's now a pistol. Unfortunately it's useless at the moment, because the amount of damage it deals only reduces the enemy shields even once you've emptied a clip, and by the time you reload their shields are fully recharged. This is probably going to take a lot of tweaking.

     
  9. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Another video update.



    Several things in this update:

    - Shields have been tweaked. Now, they take significantly longer to begin recharging (whereas before they almost instantly started recharged). This makes the pistol much more effective at killing someone, as you have enough time to first take down their shields, reload, and then kill them.
    - Grenades are in! You can throw them, and they explode. 'nuff said, really.
     
  10. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Working on sentry turrets. No AI behavior yet, but now they're deployable, they scan back and forth and make noise.



    Still working on the best approach to the netcode for these guys.
     
  11. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Sentry turrets are now (nearly) fully functional!



    - Sentry turrets query an octree for nearby players, then prune that list with a number of criteria (not on my team, line of sight test passes, not outside field of view, etc). They then sort by distance, pick the nearest target, and transition to the Attack state.
    - Still need to add support for damaging and destroying sentries. Then they will be fully functional.
     
  12. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
  13. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I'm currently working on making this into an FPS kit.

     
  14. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    By the way, didn't post them before, but Adrian drew some soldier concepts a while ago and I must say they look pretty badass.
    One variation without extra equipment, one variation with equipment. We'll probably have these as cosmetic options when you're buying armor in the store.


     
    Last edited: Sep 14, 2014
  15. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Fixed some issues in the FPS kit. Reload animation now triggers properly in all cases.
    Also added placeholder third person animations (no look animations as the pack I'm using doesn't contain any for some reason, also the animations don't map correctly to the soldier character so he looks kinda funky, but at least pretty much all of the code is in)

    WebM link:

    https://dl.dropboxusercontent.com/u/99106620/FPSKit3.webm
     
  16. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    • Added support for multiple weapons, added SMG to loadout.
    • Changed how UI works, it's now more modular (different pieces of the UI are stored as separate prefabs)
    • Added scoreboard which shows name, kills, and deaths of each player.
     
  17. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    New update for FPS kit.



    • Fixed FFA scoreboard (had several bugs)
    • Added kill feed
    • Added round timer and place/score display
     
  18. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    FPS Kit Update #6

     
  19. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    FPS Kit Update #8



    A little test against some AI units.
    Wrote a little bot "API", which gives you a simple interface for moving units around (SetLookTarget, ClearLookTarget, SetMoveTarget, ClearMoveTarget, SetIsFiring, SetIsSprinting, Jump, Reload, etc) and acts as a replacement for player input. Therefore, bots are not really any different from players.

    Wrote a little test AI script, nothing fancy, not a terribly good AI. Works for testing though.
     
  20. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813


    Added Team Deathmatch
     
    Whiteleaf likes this.
  21. Whiteleaf

    Whiteleaf

    Joined:
    Jul 1, 2014
    Posts:
    728
    This is looks cool! Following for more progress!
     
  22. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    New video, added a rudimentary main menu.

     
  23. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    A little test of a muzzle flash effect.

     
  24. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Package inbound... stand by for delivery.

     
  25. Whiteleaf

    Whiteleaf

    Joined:
    Jul 1, 2014
    Posts:
    728
    That was....EPIC!
     
    PhobicGunner likes this.
  26. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Thanks! I'm actually ridiculously pleased by how well it turned out. Even then I'm still thinking of adding some other details, like maybe a ring at some point shortly after the drop starting where it "pierces" the atmosphere or something.
     
  27. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Done some more work on drop packs.
    This drop pack refills health when you interact with it, and your shields begin to recharge as well.
    Also, it kills you if you stand underneath it.
    Watch on Chrome for 60 FPS.

     
  28. Whiteleaf

    Whiteleaf

    Joined:
    Jul 1, 2014
    Posts:
    728
    So cool! I love the lens flare effect and the fire effect when it lands! So sweet! And I was wondering what happened when you stood under it... :p
     
  29. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    Looks pretty solid, although those sprint and walk animations need a fix.
     
    Whiteleaf likes this.
  30. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Not our own models, they're just placeholders :)
     
  31. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I'm now taking a crack at the bot AI.
    I have totally scrapped the previous code and started from scratch. The new bots are using a technique called Hierarchical Task Networks, which are a form of planning used by many AAA games such as Killzone, Transformers, and more.

    The plan is to have bots be mostly autonomous, but to also allow those bots to take orders from a higher-level Commander AI (commands like Explore, Defend, Pursue, Escort, etc)

    At the moment, I've got basic wander behavior for the bots, and code to scan for and target enemies.
    Bots now take all other players into account when firing at opponents, searching for a position with line of sight to the target so that they do not accidentally fire upon allies. I demonstrate this in the following video by being a dick to my ally and blocking his shot. He often moves out of the way in order to have a clear shot to his target rather than attempting to shoot through me. (bots do not yet actually fire their weapon, but the basic behavior is in place for it)

    Bots also now maintain a minimum distance from their target. I demonstrate this by getting up in my opponent's business, like a weirdo. He consistently attempts to back away from me to a distance of at least 5 meters.

     
  32. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Update 11
    Working on the AI in Orbital Assault.
    Watch on Chrome for best results.



    We're using Hierarchical Task Networks for the AI in Orbital Assault. The HTN graph for the AI has a number of "goals" laid out according to priority, in order from highest priority to lowest priority. The highest priority nodes of the AI involve keeping the bot alive (taking cover, avoiding grenades, maintaining distance, etc), followed by engaging potential targets (selecting targets, navigating to points with line of sight, throwing grenades, firing weapon ,etc) , and finally the lowest priority goals are carrying out orders the bot has been assigned. At the moment, the bot only takes EXPLORE and ESCORT commands (EXPLORE meaning to randomly wander the map, and ESCORT meaning to follow a particular ally)

    The AI overall is divided into three layers. There's the Commander, which divides bots into squads and gives each squad orders. Then the squads will translate those orders into orders to give to each individual squad member. Finally, the bots will satisfy those orders as long as they are not already preoccupied with staying alive or engaging opponents.

    Also, for kicks and grins, I added new primary weapons, a burst-fire Combat Rifle and a quick-firing SMG.
     
  33. DeadKenny

    DeadKenny

    Joined:
    Apr 14, 2013
    Posts:
    195
    Sweet stuff bro.
     
  34. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    A lot has changed in this update.

    - Finally got around to adding crouch
    - Changed team auto-assign behavior (if both teams are equal in size, randomly chooses between red and blue)
    - Added radio announcer
    - Fixed several bugs involving switching weapons while sprinting
    - Added more soldier lines

     
  35. Whiteleaf

    Whiteleaf

    Joined:
    Jul 1, 2014
    Posts:
    728
    I would change the "We're losing the lead" to "We've lost the lead". Sounds more, I guess right to me. I don't know, just my personal preference. Other than that, the game is looking mighty fine!
     
  36. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    John-G likes this.