Search Unity

Games Mittens' Adventure - Top down shooter + multiplayer

Discussion in 'Works In Progress - Archive' started by newjerseyrunner, May 18, 2018.

  1. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Thank you.


    I'm currently writing a neural network and a genetic algorithm. I'm having some trouble writing a good AI for the vehicles and I've used neural networks before in racing game so I'm going to give that a try. It'll be nice because I can train multiple versions for different difficulty levels.
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    You may be interested in
    Evolving Neural Networks NEAT With 3D Cars + Tutorial

    also check this guy channel
     
  3. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    That is exactly the type of thing that I wrote today. Mine is a little bit more complex as my neural network has four layers and a thousand neurons, but the idea is the same. I’m evolving them by putting them in a room with an enemy that spawns in a random location and attacks the brain until it’s dead, then it spawns a new enemy. The ones that are bred are the ones that get the most kills and survive the longest. I’m evolving a generic version, then I’ll also evolve them for the specific map they’ll be placed in.
     
  4. FoolishGamer

    FoolishGamer

    Joined:
    Jul 6, 2012
    Posts:
    12
    Man, this is an ambitious project for a 1 man band. Its impressive how much has already been put into this. Multi-player and multiple game modes! I definitely dig the cats versus rats universe you based it on. Also, the use of verticality in a top down is something I haven't really seen other people do. Of course I don't think I have seen cat soldiers in tanks either. So you might have cornered the market there.

    Just wondering, are you using Unity multiplayer services or something like Photon? Have you needed to code anything to compensate for latency such as using prediction?

    Congratulations on the work so far. I will continue to follow.
     
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    In this example you can expand easily to n number inputs and outputs on layers, as you like.
    But in NN, it is irrelevant if you have 3 or 100 layers. For second layer is only matter number of nodes.
    There is some paper discussing about it.

    But teaching techniques is pretty much the same.
     
  6. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Thanks for the encouragement. So far I have just written the multiplayer to work over LAN using the built in networking. I used encapsulation for the networking layer though, specifically because I figured that I might replace it at some point. When I implemented it, I just wanted to see something working. If there seems to be significant interest in my game once I start showing it off beyond this dev blog, I may convert to a real multiplayer system. I counteract latency by doing all the animation on the client to avoid jitter but that's it. Over the LAN, latency is not really a big deal, but I do know a little about how to do that so if I go true online multiplayer, I will write some.

    I've probably read those papers. You may have even read some that I wrote. :p. Breadth and Depth evolve quite differently and are suited towards different tasks. Breadth allows for a large range of combinations of behaviors, where depth allows for more defined behaviors to a point. I chose 4 because with how I've programmed my neurons, the minimum number of layers required to create an XOR logic gate is 3, so I added one more to allow combinations from that. Breadth is also much easy to do backward propagation calculations on and more reliable, however, I'm using a genetic algorithm to train them, which doesn't matter as much. An interesting note is that I always write neural networks with feedback loops. I have special output nodes that loop back around into special input nodes, which creates some really deep behaviors.

    I set up some initial DNA with some hand written path to allow the simplest behavior: aim the gun at the enemy, if the enemy is close and in a vehicle, back up, if they're close and not in a vehicle, run them over, and if they're far move towards enemy. I'm debugging the network and evolution system today and will probably evolve a test batch overnight.
     
    Antypodish likes this.
  7. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    My neural network is completely debugged and I've written a default set of DNA which will more or less mimic what I had programmed for the vehicle AI. It's been a while since I've programmed a network so I had to remember how to visualize it.

    I've also created the test environment, 12 identical rooms which will spawn 12 copies of the same individual. This way I get an average performance score rather than taking an individual score, which seems too variable. I spawn in one enemy at a time for each vehicle, which fight until one of them dies. If the enemy dies, it respawn somewhere else, but if the vehicle dies, it's done.

    I iterator between two different scoring systems, one that prioritizes survival and longevity, and one that prioritizes killing efficiency. It also iterates between types of enemies, each of which have different behaviors. Some are very aggressive, some aren't. Some put out bursts of damage and some continuously fire. Some throw grenades, some don't and some jump around a lot.

    I allowed it to iterate through both scoring system and all enemies three times with the same individual because I wanted to make sure that my tests were sound and that I got the results I expected before starting to evolve anything. It also gives me a little more insight into exactly how the different enemies stack up against each other.

    Screen Shot 2018-11-15 at 9.50.23 AM.png

    AR - I expected these guys to produce the lowest survival scores because they have a long range and put out a ton of bullets. They basically don't stop shooting unless you stun them or they lose sight of you. I also expected them to give the AIs the lowest killing score because they jump around a lot when you look at them, they're the fastest enemies, and they have the highest health.

    Pistols - This is the canon fodder of my game so I expected the AIs to do the best against them. They are armed with only pistols, but they do throw grenades. They're also not very aggressive. They're the dumbest enemies too and lack any real kind of evasive maneuvers so I expected them to have high scores in the killing. They also have fairly low health.

    Shotguns - I expected this guy in the middle for survival because while it's weapons are way more damaging than the pistol guys, their aim isn't that good and they're not very aggressive. I'm very happy that it seems right smack in the middle of the AR and pistol scores. I expected them to also be in the middle for the killing score. They're behavior is not much more complex than the pistol guys, but they have higher health.

    Stalker - I was surprised at the survival score for this enemy. It has an AR, but it doesn't continuously fire it. This does make the AR significantly more accurate though so I think what's happening is this guy isn't shooting as much, but hitting much more often. I was also surprised by how high the killing score was, I suppose it's because this enemy likes to get into a good spot then stay there, which allowed bombs to land on it over and over again.

    Cats - These are your allies and the toughest entities in the game. I expected the networks to get a pretty low score in terms of survival. The cats only have pistols, so they're not quite as good as the AR guys, but are extremely aggressive so it makes up for it. I expected the networks to score poorly here in the killing category , the cats are the smartest ais in the game.


    Now that my baseline is set, it's time to evolve some networks. I expect to do mostly testing on the genetic algorithm today and likely run thirty to fifty generations overnight.


    A side effect of doing this experiment I predict is that I'll discover some weird behaviors of the AI that need to be fixed. Neural networks tend to find and exploit bugs in systems and cheat.
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    Yep, I love AI with NN based "cheating" ;)

     
  9. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    So I'm only six generations in with a population of only eight and already I see some fascinating behavior. It's nearly tripled it's scores from the base state and already I see why. It's default values had it throwing bombs when it was way too close, so it'd end up damaging itself. It's increased the distance that it starts throwing bombs for and it's also doing something really interesting. It's tossing the bombs out behind the enemy, which has less chance of hurting the network, and causes the enemies to be blasted towards the tank, which makes it easy to run them over. It's switched to getting most of it's kills by splattering rather than the main weapon. It's quite efficient at this actually already. I'm planning on creating several small populations, then interbreeding them, just to avoid a possible local minimum situation.
     
  10. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I've seen that robotic presentation before, it was great.

    So I got some cool behavior in a group of 8 over 50 generations and going to breed a few more small groups, then crossbreed them.

    I did notice that they found an exploit. They found a set of circumstances that causes the frame rate to drop, which causes the rat's AI to not work as well. I've both fixed the problem with the rat AI and the exploit that causes the frame rate to drop. Neutral networks are such great testers.
     
    Last edited: Nov 16, 2018
  11. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Since I don't plan on doing much work during Thanksgiving week, I've spent some time making sure that I can run automated tasks during this time. I will probably allow the tank AI to do training for more than a week, which will probably end up being around 500 generations.

    Here is what a tank in generation 50 looks like as it's going through it's training. There are 12 instances of this fight happening at the same time. As you can see, it's reluctant to use it's weapon when the enemy is close because it hurts itself more than the enemy does, but it gives the enemy a long period where they can just chip health down, so I expect some behavior to evolve to correct that.

     
    Last edited: Nov 19, 2018
  12. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I just got a huge confidence boost about how I did my main menu. The way you select a multiplayer match is by selecting the levels you want to play, then checking the game modes you want, then it randomly selects one.

    The Halo Master Chief collection just updated their multiplayer menu. It’s almost identical to what I did. Good thing I posted this somewhere in the 2nd page of this thread or else no one would believe me that I came up with t on my own.
     
  13. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    My neural network for the tanks is evolving along nicely. It’s slow, but it’s steady progress and it’s work that gets done while I sleep so it’s definitely worth it.

    I am going to make a hard push next week because I have my first full campaign alpha test planned on Saturday. I need to update the hint system in case the player gets stuck or lost, and I need to make sure that all triggers work perfectly.

    My tester will play through while I record them and take notes on anything of note. I expect she may get lost a few times, I don’t expect her to forget any of the mechanics but I do expect there to be a little bit of learning time for the controller. I layed out the first level mostly to practice movement so I hope that by the second level, she’ll be able to hit her targets with the generous aim assist. I expect that maybe some jumps or ledges she may get hung up on, all of that will be fixed before I send it off to my second tester next week.

    After that sill consider the campaign in code freeze status and finalize the multiplayer.
     
  14. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    I do wonder, how many inputs and outputs you have in your net?
    Can you not accelerate the game.

    This is what I did on my NET. Simply accelerating physics, just for training.
    As long is not breaking critical elements like collisions, if needed.
     
  15. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I had considered seeing if I could do that. I think it would take too much work to do right now for the demo stage, but I may invest that time later for the full game.

    I have 16 inputs and 10 outputs. The enemy targeting is controlled by the driver so there is an x and y offset to the enemy. The distance to the enemy, the relative angle of the enemy from forward. A raycast distance forwards backwards and in both directions offset 20 degrees. The tanks health and whether or not the enemy is also in a vehicle. The rest don’t have real inputs but are loopbacks from the output.

    The output basically maps to the controller plus some helper outputs. There is an x and y offset to put the crosshairs at, an x y movement offset which maps directly to a player controller and a fire button. There is also an angular crosshairs and movement offset. The rest of the outputs aren’t used but all outputs are connected to those special input nodes.

    The ATV network that I’ll have to evolve I’ll also include a line of sight input but the tank lobs bombs so it doesn’t need line of sight.

    I’ve increased the width of the hidden layers as well when I saw how little CPU even a dozen tanks were taking in the profiler.
     
  16. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I did some more polishing, added some instructions in same places where I think the player might get stuck. All on timers or something to not annoy players that don't need help. I also solved the animation bug with the quadrupeds where the rear feet weren't moving correctly, but introduced a new bug so I'll need to solve that tomorrow.

    I'm also doing some final linking. I've added the ability to actually quit the game without the editor, as well as get back to the main menu from the game. I've also introduced a Pause button.

    Screen Shot 2018-11-26 at 4.34.31 PM.png

    Of course, any place I can put a lolspeak replacement in, I'm doing it. In cutscenes they even say "meow" in place of "now."
     
    Last edited: Nov 26, 2018
  17. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Demo is getting closer and closer. I was able to play the campaign all the way through today with only minor bugs. I also recorded the entire thing and did a voiceover to act as a walkthrough for anyone who downloads the demo and gets stuck (also linking my alpha testers to it.)

    I beat the demo in about a half an hour, and I expect most players to be able to beat it in two. This should make the full game have about 10 hours of campaign content.

     
    Antypodish likes this.
  18. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I'm still on track to have by first full-campaign alpha test this weekend. I've been playing it all the way through over and over again, writing down bugs, then crossing them out and repeating.


    My tanks are about 200 generations into their evolution and they are still performing better than each previous generation. I will continue to breed them until they reach some sort of local minimum. I will likely use my hardcoded versions for the demo, and continue to evolve these as I build the rest of the game.
     
  19. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Oh baby, is it looking good. All of those little nagging things that I just accepted because they weren't core to the experience are almost completely cleaned up and it's starting to feel more like a product.

    I added a fastest time and highest score display on each level, so that you have a reason to go back and play it again. I've found myself trying to beat my high scores on some of the levels and it's interesting to see how fast I can really speed run through some of them. I'm having my first alpha test tomorrow.

    I expect:
    She might get confused about where one of the switches is in The Village
    She will get lost in Rat Maze
    She will die 3-5 times total, because I expect her to play on "Casual"
    It will take about 2-3 hours to complete the game because they'll hunt around for upgrades
    She will comment that the controls feel weird at first, but should be acclimated by the end of the tutorial
    She may pick a single weapon and stick with it, or they may start to discover certain weapons are better for certain enemies
    She may forget certain moves like double and wall jumps
    I expect to get a laugh out of some of the bloodier gibs
    She will find about half of the guns/upgrades
    She will try her best to shove the tank through the gates of The Temple even though it's clearly blocked off and might succeed
    She will fall from high places repeatedly, but get less as time goes on
    She will somehow blow herself up, either with a rocket or grenade and I'll get a dirty look for laughing
     
  20. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I've up until now only had testers deal with isolated experiences but I just finished my first play-test of the demo. It took about two hours, which is what I expected and there were a number of things I found out. This is mostly a list for my own reference, but I figured everyone else might be interested too.

    General:
    Dead enemies should be more contorted because from overhead it's difficult to see who's standing/sitting and who's laying dead. Perhaps I'll give dead enemies a dedicated blood decal at it's head to show that it's really dead.

    The cursor kept going up the walls and she kept shooting above enemies. I think I'll remedy this by having it do a series of checks if it's on a vertical wall: if it's got an enemy in it's sight, just fire as is, otherwise, check if there is an enemy level with the player, and if so, level the gun and fire.

    The levels are too long to start from scratch if you die near the end, I need checkpoints. I will implement them for every difficulty except for the hardest, which I'll require you to beat the level in one go. I thought just leaving the doors unlocked would be enough, but one of the longer levels doesn't have any doors and there is a boss at the end of it.

    Fine control is easy on a keyboard because you kinda flutter the keys, but with a joystick it's far more difficult and she constantly said like he was out of control. I think I'll tie his speed to the square of the joystick value rather than it's true value.

    Overwold
    She didn't realize this was an overworld, A hint needs to pop up if the player doesn't go into the first level within five seconds.

    Landing
    Player didn't move cursor much, aimed by moving. Jumped directly from the ramp to the shotgun, which I didn't expect, but was thrilled by. I'll leave this option available.

    Village
    She jumped in the fountain and her allies followed her. They seemed to have gotten stuck in there, need to add that to the navmesh.

    She started aiming the weapon more, which is exactly what I expected, she seems proficient with aiming now.

    First death taking on a guy with a shotgun in the closed box where she couldn't get the cursor on him fast enough because it was on a wall.

    The max jumps are not easy for her, I should implement a ledge grab if you're just off from the jump.

    She didn't realize that she was supposed to be looking for switches, even though she saw the doors. I need a popup like in Quake "This door is opened elsewhere."

    She's starting to really use the melee function and getting up close to both deal maximum damage and collect the health faster, this is the push-forward combat style that I worked so hard to steer the gameplay towards. I think I've nailed it.

    Temple
    She drove the tank backwards for most of it, I expected the player to make a 3 point turn. I need to slightly alter the controls so that the tank prefers to move forwards.

    She started to see that she needs to jump up to shoot enemies above her as they can hit her easily, but most of her bullets don't land.

    The ramp up the spiral was not obvious despite being the only thing in the room, needs a light.

    She tried to get the secret rocket launcher that you're supposed to have to get the double jump to reach, but she cheesed it by wall jumping... hmm. Might move the rocket launcher to somewhere else that can't be cheesed and put armor there instead.

    "isOnGround" seems to be messed up when going down a ramp, as double jumping from it was weak, not sure why since I use my own system with coyote time. Increase coyote time?

    Catwalks
    She's not sure what the armor is, needs an audio queue for the pickup like each gun.

    Despite multiple forks, she went the same way I normally do. I designed this by use of lighting and it seemed to have worked.

    She fell on the double jump, this needs a box next to it to make retrying it easier.

    After the level, she got stuck trying to get back up. Five jumpers in a row before really learning about them isn't good. I need to figure something else out, maybe just open up a teleporter?

    Rat Maze
    Was confusing, but not for the reason I expected. I need to add a lot more light and make the ground more distinguishable from the walls.

    She also got nearly to the second switch before reaching the first one, I thought I walled you off from that area.

    She got trapped in the end room where she's meant to shoot a rocket or bomb at a broken wall. I need to put a hint in there that triggers after twenty seconds or so after the boss dies if you still haven't bombed that wall. She played Zelda enough to know which wall was special, but not how to break it.
     
    Last edited: Dec 3, 2018
  21. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    So last night and this morning I made a ridiculous amount of improvements.


    First, I noticed that the jumping seemed different in the editor and out, which was weird because none of my math requires is dependent on the frame rate. I realized that I had done a differential incorrectly and recalculated the derivative. This was why max jumps were so tricky for her.

    I decided instead of a vertical auto aim, just to add some resistance to the cursor when you try to push it up a wall (and an assist when coming down a wall.). This effect is subtle, but seems to really confine the cursor more to the floor, as soon as you try to bring it up a wall, it slows down. This affects only a controller, I don't want to take any control away from a mouse user.

    I added checkpoints for all levels, and some even have multiple checkpoints.

    I added a lot of hints and popup messages for things like doors, breakable walls, and I provide an objective at the beginning of each level.

    I reworked some of the level design and added some things to make navigation easier.

    I changed the tank code so that it prefers to move forwards and will reorient itself to if need-be.

    I moved some of the advanced weapons to places that can't be cheesed with wall jumps.

    I made the player speed relative to the offset of the joystick squared to have more control over finer movements.

    I redid a lot of the lighting in the maze level and changed where some doors were to block off more of it at first.

    I've also decided to cap the frame rate at 30. There are a number of reasons for this, mainly so that I keep a consistent frame rate during intense split screen battles. I can also add more blood.
     
    Last edited: Dec 3, 2018
  22. ClaudiaTheDev

    ClaudiaTheDev

    Joined:
    Jan 28, 2018
    Posts:
    331
    I really am a lazy reader so i actually didnt read a lot from this thread.
    Just wanted to say that i find you really inspring! Being so motivated and analyzing a lot - you seem to be e very productive and energetic person:) Can everyone play the demo when it's done?
     
  23. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I don't expect many to, it's more of a blog.

    Thanks and yes. There will be a full game released in a year or so for either 5 or 10 bucks, but the demo with 6 levels will always be free.
     
    ClaudiaTheDev likes this.
  24. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Tons and tons of polish, just ironing out minor bugs that show up here and there.

    The camera would jitter sometimes and I couldn't figure out why, turns out the AI that kept it away from walls had a bug where it retraced too far and always thought the character was occluded. There was also a bug in my zooming math which caused a quantized value to pop out instead of a continuous curve.

    Altered the shaders for smoke to make it way more visible and fixed a bug with the first few renders of a smoke frame.

    I added zones that have different materials so that the correct color dirt gets kicked up by footsteps and vehicles. It also allows for sounds, so in the water, each footstep makes a small splash.

    Fixed a problem where one of the checkpoints spawn the player after a required trigger to fill the rest of the level.

    Added more gore to the gibbing system.


    I haven't trained the neural networks for a few days, it'll be interesting to see how long it takes them to adapt to the alterations that I made to the vehicles.
     
    Last edited: Dec 4, 2018
  25. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Today I went into my special scene that has rooms with every enemy type and I debugged all remaining behavioral bugs that I could find. The enemies didn't melee if you were underneath them so I fixed that because a lot of my enemies jump at your during their melee attack. Some enemies also would continue to stalk me after I became invisible.

    I also added the melee weapon today. You can drop all your weapons and fight by punching everything in sight, but I also have a sword powerup, as well as an "enchanter" powerup which makes your attacks more powerful and creates a magic smoke from either your claws or sword. This will make it so that it's technically possible to beat the entire game without picking up a single weapon.

     

    Attached Files:

    Last edited: Dec 6, 2018
  26. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I put my speed running skills to the test today. I've speedrunned most of my favorite games so I've got a wide variety of way to break games under my belt and I put my game through the paces to see what exploits I could find. I found a lot of weird edge cases and corrected them.

    I was certain that there was no way to clip through the map, I have code specifically to test for that case so no matter what I did, that code did it's job. I clipped through a few times but it was corrected instantly. I tried pushing myself with explosives and having all of the different enemies and vehicles try to push me into corners of all angles.

    I tried corner clipping to try and wall jump in places that I shouldn't be able to and tried to get myself to be able to land on walls that I shouldn't be able to. I found a way to stick to the wall, which I decided to leave in because you can't do anything other than fall down once you get to that state and cats are good climbers.

    I found out you can preserve the force I use to slide you off of large slopes to gain extra speed, which was an easy fix. You could also use slides on walls facing downwards to get a boost up, which I removed.

    I tried clipping through corners where I knew two separate pieces of geometry met, but found it impossible.


    I’ve had multiple people tell me they want feedback on the health of their vehicle. Instead of adding a health monitor, I decided to simply add some visual feedback. The vehicles have six states now: good, small smoke, big smoke, small fire, big fire, dead. This provides way more feedback for your own vehicle as well as the enemies. It feels more satisfying now to beat up in the enemy tanks now that they get beat up faster.
     
    Last edited: Dec 6, 2018
  27. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Here you can see some of the polish compared to what had been. The tank battle is far more colorful and feels easier to control. It has a lot more visual appeal and I think the power of the tank mortar comes off better and the gore of the gibs are more excessive. Even in the thumbnail you can see two of the blue enemies being torn apart in a cloud of blood. Notice that I get gibbed myself at the end of the video, Mittens' head comes to rest right at the foot of the tank staring right up at the camera.



    The thumbnail also gives you a freeze-frame of what the bomb looks like. It's design was inspired by the bombs in Super Metroid, which was one of my favorite classic games weapon.
     
  28. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    It’s been a week since my first real play test and I’ve solved most of the issues that I saw and gave the player more subtle assistances. I also think I’ve solved all of the “where to go” issues too.

    I was still concerned about some players forgetting about the bombs because you get them at the end of a cutscene and aren’t forced to use them like the other powerups. So I decided to show it off twice and make a little QuickTime event after you beat the temple level where Mittens throws a bomb to open the path ahead.
     
  29. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Just finished the second playtest. All of the improvements that I implemented seemed to have worked well and I see some other improvements that’s I could make.

    I see a few minor navigational upgrades that I can do as well.

    I’m so glad that I decided to focus on and release a small demo because it’s allowing me to hone in on good level design concepts and stuff before expanding to the bigger world.

    I plan on changed four sticky notes worth of stuff then send it out to a remote tester as well to get further feedback. in the next week as well as debug the coop system so that next weekend I can do a coop playtest. The weekend after that I plan on doing a multiplayer playtest.
     
  30. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I kept getting feedback that the controller felt strange under some circumstances and I realized there was a fundamental mathematical error in how I calculated the movement vector. I wanted the thumbstick to have a geometric push, so if you held the stick all the way to the left it'd move at 100% it's speed but if you held it 50% left, the actual movement would be 12.5%. This worked because I cubed the values, but then I realized that this created an asometotic draw towards the two axis and that 45 degrees was actually the hardest direction to travel, which is where everyone was having trouble. I fixed the issue by multiplying the vector as a whole by it's magnitude squared, rather than it's components. I've also removed the completely free range of motion from the thumbstick and movement now snaps to multiples of 7.5 degrees. This makes it easier to move at exactly 45 degrees and not drift off of a thin catwalk.
     
  31. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    The addition of the melee weapons greatly expands the types of play that are supported. For the hell of it I decided to try to beat the level Catwalks with just the sword.



    0:00 - I show that I start in the hardest difficulty setting.
    0:12 - I switch to my "Enchanted Excaliber" for this challenge
    0:30 - I hear a bunch of enemies get alerted and try to stay out of sight, but end up having to make a run for it, they hit me hard.
    0:40 - I take a second and wait to ambush anyone stalking me, doesn't look like anyone
    0:55 - I'm trying to figure out how to tackle the two shotgunners in front of me
    1:00 - I hear a bomb come from behind, so there was someone stalking me after all and panic. I accidentally throw a bomb and clear out the gunners, so I rush to the button.
    1:15 - This guy one shots me with a pistol and kills me (or maybe he punches me?)
    1:26 - Attempt number two, I spawn at the first checkpoint just below the first switch
    1:40 - I'm really not sure where to go, the enemies in my way are the ones that hurt me so badly the first time, try sneaking up?
    2:25 - Great, back to the same gunners with the same amount of health.
    2:40 - I try to just rush up, but they shoot the barrels and blow me up
    2:55 - Ugh! I gotta find a different approach, wait a minute, I start with full health, maybe I can sacrifice some to get a better position on them right now.
    3:00 - Nice easy grenade jump behind them, they didn't even see me! Feel the fury of my sword!
    3:15 - Nice acrobatic wall-jump / sword swing. You can see the enemy's head fall down onto the barrels.
    3:30 - Not sure why I went in that hallway, I thought the chain gunner had seen me
    3:40 - Another leap onto unsuspecting enemies and a fury of sword swipes, I grab the Time Shifter because otherwise the next hallway would shred me
    4:00 - With the Time Shifter I'm able to sidestep the majority of the bullets fired at me and tear through them in a rain of blood and body parts
    4:10 - That doctor brought the worst enemy back to life, he starts stalking me with this assault rifle so I run
    4:35 - That's something weird that just floated by, what could it be?
    4:55 - Celebration for beating the level without firing a shot.
     
  32. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I did more honing if parameters on my camera and player, preparing for the next big push of play testing the cooperative mode.

    I also made it so that you can deflect enemy bullets back at them with the sword. It’s quite satisfying. I did this because I found it annoying to have no long range abilities and made the sword just somewhat of a novelty in the campaign. Now it gives you some defense as well (I had planned on simply giving you a shield but I like this better.)
     
    Last edited: Dec 12, 2018
  33. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I was playing Halo yesterday on the level Derelict. In this particular level there are long cubbies that players hide in and I use grenades to get them out. I often throw one grenade on the ground, then toss another as it explodes. This pushes my second grenade into the cubby where my first one can't reach. I don't use this technique much, but realized how useful it can be. So I implemented it in Mittens. Explosions now throw push grenades around. This creates a lot more chaos in levels where there are a lot of grenades going off, which is always fun.

    I’m doing a coop playtest today, I think I got all of the issues with it out of the way.

    Screen Shot 2018-12-12 at 12.55.12 PM.png
     
    Last edited: Dec 12, 2018
  34. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Check out the co-op!

    After we did our playtest, we went back into one of the levels to do a recording. My MacBook was surprisingly able to both handle the game and do the HD recording without any lag so I feel good about my engine.

    I’m the player on the left, my wife is playing on the right. Both of us are using Xbox One controllers.

    I’m especially proud of how it sounds. Unity only has one microphone so I had to do some tricks to get the sound to work properly. It not only takes into consideration how far away each player is, but also whether or not they are behind a wall and it adjusted the volume and pitch accordingly. The soundtrack also intelligently reduces itself during intense firefights.




    0:13 - We start the level together
    0:20 - My wife switches to a flamethrower and drops down to burn everything while I double chaingun everyone up above
    0:35 - I come down to the floor to help my wife as she’s literally lighting the whole place (including both of us) on fire
    0:50 - We’re trying to clear the area and hunt down all of the doctors so that it stays clear
    1:40 - This part of the floor is clear so we move on
    1:50 - I get the time shifter powerup and in coop you can see better how it works, notice how when my wife gets close to me, time slows for her, but it runs normally far away. Imagine the implications for multiplayer
    2:10 - Fully automatic chain gun and a double shotgun grenade launcher creates utter chaos
    2:30 - Look at the amount of blood and bullet holes!
    2:50 - We split up so I can go activate the second switch while she finishes clearing the bottom
    3:34 - We meet again to head upstairs together
    4:20 - Together we shred through the enemies
    4:40 - My wife uses her phaser to shoot the guy I normally gib through the wall
    4:55 - I fire a bullet spray at the angled corner to bounce them into the hallway
    5:30 - I die from a grenade and respawn
     
    Antypodish likes this.
  35. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I’ve been putting together the multiplayer manager. Other than polishing, this is the final component that I need for my demo. This will complete the sandbox for the game and allow me to churn out the rest of the leveled more quickly.
     
  36. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I honed the spawning system today for both multiplayer and campaign. When you die in a coop campaign now you’ll spawn back at whatever the last checkpoint was. In multiplayer it will put you in whatever spawn point is furthest from any enemy.
     
  37. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Still working on how the multiplayer spawns will work. I've now ranked them all based on where the enemies are in relation to it, and I randomly select one of the top three. I've come to realize that without a crouch, there is no way to tea-bag your enemy's bodies. I'll have to find some way to taunt your enemies after you kill them.

    Here is me just testing out the spawning system. Notice how the enemy always spawns on the opposite side of the may, but not necessarily always at the same spot. Where the enemy spawns will become way more variable with more enemies.



    You may notice how at first, it takes more shots to kill an enemy than later on. That's because you'll hear during the game "Weapon Pickups Upgraded" which change them all to more powerful versions of themselves.

    You'll probably notice a few bugs if you look closely. Like the rockets failed to give out ammo and that some of the audio sounds distorted. It's because it's trying to balance the sound between the two cameras and I haven't flagged the weapon upgrades as specific to a character yet.

    I've also added even more special code for the controller to keep the player's cursor where they think it should be. It now stays on the floor while you are moving, I'm seeing how this works. I’m constantly altering the movement as I start doing deathmatch testing, finishing the sandbox before starting the rest of the game.
     
    Last edited: Dec 19, 2018
  38. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I decided to play DOOM last night, but wanted a different challenge so I downloaded and installed the Brutal DOOM mod. I've heard about this mod before but never actually played it. It's hilarious. There is so much gory goodness and it feels even more awesome than the game normally is. I've decided to adopt several of the things that I saw that I think will be easy to reproduce.

    In the past hour, I've implemented a system where characters swap out textures with gory versions of them based on their health. There are about a dozen body parts to each character so the spread of what's got bullet holes in it and what doesn't gives visual feedback of exactly how weak an enemy (and Mittens) is. This is especially useful for the player because while during combat, they tend to look at the crosshairs which has their health readout, during jumping and dodging, they look at Mittens and it's nice to see his armor bloodied up to know that you need health. It also makes the enemies look a lot more dead.

    I'm also working on a pool of blood that expands out from the head and stays with dead enemies so that if you come back to an area and the blood pool has recycled all of the decals, you still have a clear indication that this enemy is dead and bled-out.

    I also plan on having intenstines spill out when you gib an enemy and act as decals on the floor.

    I implemented a splatter system where all bullets that injure enemies spray blood against the walls.

    I (might) create a box collider around some of the larger decals for a brief window which will trigger characters to leave bloody footprints for a while. The trail of blood footsteps was one of my favorite parts of the Brutal Doom mod.


    Here is the extra blood:
     
    Last edited: Dec 20, 2018
  39. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I see that John Romaro has been streaming his new Doom episode and he’s talking a lot about his level design choices so I think I’m gonna watch them all and learn as much as I can.
     
  40. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    So I had my first real deathmatch with two players using controllers. I knew it worked fairly well with a mouse and keyboard so I wanted to take make sure I got a good test with the arguably much more difficult controller. It went... poorly. I'm going to have to do a lot of tweaking, but I'm not too disheartened by this. The controls for the single player with mouse and keyboard was clunky once too and it got good by lots of iterations. This is literately the first time I'm trying to shoot another player like this and players are fairly fast and move erratically. I see several huge improvements that I can make right off the bat.

    Check out these two five minutes matches. I'm on the left, my wife is on the right


    0:20 - We're both racing to the rocket launcher in the middle of the map
    1:08 - I get the first kill with a grenade
    1:34 - I get second by rushing in close and getting the melee in
    2:08 - She gets her first kill with a rocket, but I get a grenade off resulting in her health dropping to 30
    2:30 - We trade lives, she gets me with a rocket, I get her with my assault rifle
    3:10 - We're both with pistols only so we rush in, I kill her but am hurt badly
    3:40 - I get her in a bad spot with only a pistol so I mow her down with the AR
    4:11 - Again we trade, I kill her with a grenade, I die from a rocket
    4:35 - I don't realize that she's above me and she gets a good couple to kill me
    5:14 - Heated exchange leaves me dead and her weak right at the last second


    0:43 - I went the wrong way at first so I knew she'd beaten me to the rockets so I got a lucky grenade
    1:05 - We both have ARs, and rush in to box, she gets the better of me with a punch
    1:37 - I finally get a rocket kill, which deflected one of her grenades
    2:03 - We bump into each other and I get the kill. I think I actually hit her with a rocket, but before the delayed fuse was triggered.
    2:25 - Too close for rockets, so I switch to a close quarters weapons and she gets me in the mean time
    2:50 - We both end up at the rockets and battle it out, I get the gun, but she gets in the deadly punch
    3:15 - I miss most shotgun blasts, but get in the melee
    3:41 - We end up both with claws out and box it out, she won
    4:20 - She chases me with claws only and throws bombs, I back away peppering her and her own bomb gets her
    5:00 - I think I mid-air snipe her wit a rocket


    Oh bloody hell, I found the reason it felt so difficult to aim. There was a bug where it was checking if an enemy in the auto aim radius is your enemy. It was checking whether or not you were local, which is left over from when I didn't expect to have a split screen. Both videos above are fought entirely without any aim assist. It'll be interesting to see how the next ones go.
     
    Last edited: Dec 21, 2018
  41. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Not knowing where combat is taking place slows the pace of the game, be it in deathmatch or a coop campaign where the two parties are seperated.

    I’ve found a way to fix this by having an audio indicator which points in the direction of offscreen gunshots and other special sound effects. This is especially useful in split screen because you hear audio from both players at once and need to differentiate (stereo also goes away in split screen.)

     
    Last edited: Dec 22, 2018
  42. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I’ve been testing the deathmatch by just going back and forth killing an extra player. This is allowing me to see how one might progress through the levels in multiplayer. I’ve been adding extra paths and jumpers for multiplayer mode to make navigation way easier.
     
  43. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    My wife had played all of the Zelda games, but my first was Breath of the Wild (don't worry, I went back and played the whole series.) During my play, I stumbled across a bunch of chickens walking around. The following conversation happened.

    Me: I'm gonna shoot the chicken
    Wife: Don't shoot the chicken
    Me: I wanna shoot the chicken
    Wife: Don't shoot the chicken
    Me: *shoots chicken*
    Me: Whoa wait, wtf!
    Wife: I told you

    I always wanted to put something like that as a reference to Zelda in my game, so I did it.



    Other than than, I've been running around my levels a lot, making sure that all of the pathways are easy to navigate and that it's not annoying or tedious to get to any particular part of the map from somewhere else in the map.

    I always hated teleports, but now I understand from a level design standpoint why they can be necessary. I'm trying to minimize the number of necessary teleporters through level design, but I've had to place a few in order to make getting around the maps easier. I've also implemented and tested telefragging, so you can't block a teleport, if you try, you'll be blown to bits.
     
    Last edited: Dec 24, 2018
    Antypodish likes this.
  44. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I added a lot of polish and optimization to the spawn system which acts very differently depending on the game mode. I'm still tweaking the geometry ever so slightly as I find myself getting hung up on corners and such. I've also placed some strategic pieces of moving geometry, which acts as a bottleneck not only in space, but in time. It's easy to defend a small space with an elevator that only comes up every twenty seconds, and it's quite difficult to ambush such a place. It forces players to wait for each other and go in guns blazing with backup, increasing the intensity of the firefight. I've placed a number of powerups on each multiplayer map and considered how they would be used.

    I have the deathmatch mode working in every map and am planning on finishing polishing it before polishing the team deathmatch mode. Then I'll move on to scoring the ball games.
     
  45. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Hey, just checking out your game.

    Looks interesting!

    I really like the camera angle and think you should keep it but somehow it confuses me at times. It may just be my brain but in some videos it's harder to define were the floor, walls and pretty much everything begings and ends. Its like my brain is lagging behind in its understanding of whats going. Ohh crap, nevermind... aging does that :p

    Some post effects may help (Ambiant occlusion comes into mind) and I'd play with the shadows strenght and angle to give the scene more perspective. Volumetric lights would definitly make wonders. I have HX Volumetric lights which I know would look awesome but there are also a few good looking volumetric light assets available for free on github that may work.

    One more thing, maybe try dirtying up the edges of the floors were it meets the walls. It's what happens in real life anyways, dirt piles up were we dont walk. It would help define the floor area. There are some assets that allow painting texture right in the scene, that may help?

    A little warning before I go, its late, so feel free to file all of this under crazy talk :confused:

    Good luck!
     
    Last edited: Dec 26, 2018
    newjerseyrunner likes this.
  46. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Hello and thanks for the interest. Is there any video in particular where the problem was particularly noticeable?

    Ambient occlusion would be a nice post processing addition and I will benchmark it. It would really define those edges a little better. OA is baked into the light map, but perhaps I can alter the parameters to be more obvious. Hell, darker lines along the edges might add to the cartoony feel.

    I will consider dirtying up the edges of walkways, but it may be problematic. The main texturing is all atlases so I can’t paint on a particular wall. I know I can layer multiple materials so maybe I’ll assign another texture, but that’s dramatically increase the drawcall time, so I may have to fudge it another way. Maybe I’ll see if I can make such a feature exist only if there are less than 2 cameras or something because I have a ton of wiggle room with rendering speed with a single player, but four player split screen is already pushing the limits of my frame rate. (Post processing doesn’t care about the number of cameras though so that’s probably how I’ll go.)

    I do plan on having volumetric lights but it’s not appropriate in all locations. I’m still trying to figure out how to make it efficient. (I’m not using a lot of assets because they tend to be very general and because of my limited camera angle, I can do a lot more smoke and mirrors in order to boost performance and fidelity.
     
  47. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I implemented an achievement system for completionists, as well as a special speed run mode, which causes some effects and cutscenes to be skipped. I'm testing how things that I don't usually put together interact together, polishing everything to complete the sandbox.

    The last major component will be intergrating all of the new stuff with the existing LAN code. I have a lot to test, like the powerups and some special weapons.

    I'm also playing all of the levels again and again to try and figure out what the par and gold times and scores should be for each level.
     
    Last edited: Dec 27, 2018
  48. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    @tcz8 I popped in the Post Processing Stack and tweaked it until I liked the look. I exaggerated Ambient Occlusion because it greatly benefitted me.

    No Post Processing
    Screen Shot 2018-12-27 at 6.47.18 PM.png

    Post Processing Stack
    Screen Shot 2018-12-27 at 6.47.22 PM.png
     
  49. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I’m considering the levels themselves in “code freeze” state, so I’m ramping up all of the lightmapping settings and letting my computer chug away at them.
     
  50. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I always meant to add the Post Processing stack and since I'm polishing, I did it and I thought I'd show off what it looks like now. It's very subtle, but seems really powerful. There is antialiasing, bloom, AO, and vignette active. Antialiasing gets rid of those noticeable edges along cutout textures and strange bright pixels showing up now and then. Bloom is making my lights look awesome and gives it a foggy look. The AO definitely highlights where edges are as well as creating a cheap shadow around characters. I wanted it to feel more claustrophobic and the vignette really makes it feel like it's dark off in the distance.

    You'll also notice the audio direction marker.