Search Unity

Games CA Shooter - A Top-Down Shooter Using Cellular Automata

Discussion in 'Projects In Progress' started by EternalAmbiguity, Apr 6, 2021.

  1. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    The purpose of this thread is to report the progress of a game I'm working on, last updated 2022-05-10.

    It's available on itch.io at https://eternalambiguity.itch.io/ca-shooter.

    A couple GIFs of gameplay at the time of thread creation:





    Main features right now are:

    Player character who can move around and shoot weapons (bullets, grenades, and sticky mines) and interact with climate controls
    An NPC who spawns trapped and must be saved by the player
    A "blob" enemy type who grows across the map. They follow a predetermined path but if they encounter the player or an NPC they will grow towards them. If they surround an NPC they will create a structure to trap them and siphon their health. They can also create a structure at certain locations on the map to heat up an area (which allows them to grow faster and can damage the player).
    Map/environmental controls to affect the temperature of an area. These in turn have various effects on enemies and the player.

    I added a bunch of stuff before this but upon recommendation I've removed a lot of it, to get the fundamental gameplay working at a level that's enjoyable on its own without throwing a bunch of mechanics and variations at it.

    As such, I'd love any and all feedback on the current experience.

    I'll continue to post here and update this as I add and tweak. My broad intentions are to move towards a "Metroidvania" with some simulation elements.
     
    Last edited: May 11, 2022
    mgear, adamgolden and SparrowGS like this.
  2. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    I've made an update to my game: I've introduced an enemy structure that can be built at certain locations on the map, once the enemy blob has populated them. For lack of a better name I'm calling it a "terraformer."

    This structure will raise the temperature of a surrounding area up to a certain value, as long as there are NPCs trapped - their health is siphoned and that is directly used to "power" the heating. This supports the gameplay related to the temperature affecting enemy grow rate (and potentially damaging the player, if too high), and thus being something the player must manage.

    Some GIFs:




    Related to this, I've made the temperature a direct simulation, with real time change/flow. You can see this in the second GIF where the temperature of a small area around the "terraformer" has increased, even though the room's been set to "cold" (or a temperature of 0, with zero enemy growth).
     
  3. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    I've made yet another update to my game. I've added a sort of HVAC system. Rather than heating and cooling being applied from the aether to an entire room, they emanate from visually identifiable locations and flow organically throughout the open space. A GIF below shows this in action.

    This should make temperature control more realistic but also more interesting and useful for gameplay.
     
  4. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    I've made an upgrade to my game: I've given "the blob" the ability to consume game objects (or GameObjects, as it were) on the map. This won't be very obvious from the player's side (until they arrive in areas to see them empty), but see the GIF below.



    Previously I had the "energy" and "biofuel/biomass" resources for the blob. This adds a third resource I don't yet have a good name for, just "enemy material." This resource will be used to allow the blob to create structures. Currently "biofuel" is used to allow the blob to actually break down the game objects, and "energy" is used for the terraformer objects to heat up their surrounding area.

    I'm thinking I'll include a poison/atmosphere generator for the terraformer and have that also consume biofuel. It would also be interesting to have the blob growth consume some resource as well.

    My next step, however, is generating "clutter" for the game - the objects the blob can consume. And not just creating them, but placing them on the map: I'm thinking about using procedural generation for this. I imagine that will be my next update.
     
  5. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    I've made a further addition to my game - the "clutter generation" I mentioned before. A method that first paths between doors in the room to create a universal, well, path, before reading from a list of prefabs and adding them to the open places in the room (largest first, then smaller and smaller). I have no fancy GIFs for this, just a screenshot of the game map:

    Unity_2021-05-22_09-24-17.jpg

    Right now there are a couple of variables for setting how much of the room it attempts to fill, as well as how much space around an individual placement it subtracts. I tweaked these a bit to get things how they are currently. It seems mostly okay to me.
     
  6. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    I've been quite busy with another creative project recently, but I've made some progress on my game: I've moved to a map I'd like to use for the final game, and added a door "locking" system which requires keys (I also added another weapon someone mentioned in the past, but it's not fully implemented). The game's been updated on itch.io, and a couple gifs are below.




    Things aren't well implemented yet, but the start is there. The "door locking" system is basically just a check against an int, and you can find keys on the map to go to open the doors. Smaller additions include some more sounds and visual indicators of the door lock/unlock states.

    I also reverted the temperature system to something that's only controlled from a single place you don't get access to until the very end (the highest door lock level).

    The door locking system is pretty cool, as simple as things are.
     
    Shreddedcoconut likes this.
  7. Shreddedcoconut

    Shreddedcoconut

    Joined:
    Jul 30, 2021
    Posts:
    61
    Saw this in your signature, and it looks pretty cool! That door locking system is awesome.
     
    EternalAmbiguity likes this.
  8. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Thanks! That part was actually much simpler than I originally anticipated but yeah, it's cool. It makes me think of metroidvanias, which was already something I'd hoped to lean into.
     
    Shreddedcoconut likes this.
  9. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    It's been a while--I've been busy working on other things, mainly the first link in my signature--but I've made some minor changes here and there. I've uploaded a new version of the game to itch.io: https://eternalambiguity.itch.io/ca-shooter

    I've streamlined a couple things significantly. I no longer look for "centroids" of a room, and the method of laying down clutter is also much simpler - it still checks against a room "filled percentage" but it no longer tried to nest to the most interior areas of a space.

    Both of the above were done with the intent of making as much as possible happen at runtime, with the possibility of randomization. That'll be evident if you play - the positions of the clutter items are all generated randomly at the start. I want to lean into the randomization--the "stochasticity" if you will.

    Most recently I've been playing with the combat. Trying to figure out how to balance it is weird due to the nature of the enemy. Not sure how to describe it but there's the element where the enemy just grows to fill space, as well as when it directly goes for the player (when they're in view). The latter seems engaging enough, but wiping out the stationary groups of the blob seems boring to me--difficult to figure out how to make it engaging without being too difficult or boring. I obviously need to get this right.
     
    Shreddedcoconut likes this.
  10. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Hello friends! I've been busy with other things (the second link in my signature...) but I have not been idle with regards to game dev! In my free time I've been tackling the performance problem I've had for a while with perhaps the most comprehensive refactor I could have done - I've shifted all of my background simulation to DOTS, vs. the C# threads I was using before.

    The only visible difference is better performance, which will hopefully remain as I add complexity to the game. I've not quite replicated all of the elements I had before, like the NPCs and the Blob building things (and consuming things), but I've got the base in and I wanted to make an update here for that.

    My next steps are to get those features back in. One I'm having a little difficulty with is the temperature/climate system - because it has to be resampled every iteration it works best as a single data structure, a NativeArray in ECS-land. However the actual element that uses the temperature is an entity, which is processed in an Entities.Foreach--and accessing a NativeArray in an Entities.Foreach takes a surprising amount of time. My stopwatch has to measure Ticks to see any differences, but because I have 250x250 entities it adds up.

    So I'll have to think about that and try a few things to see how best to re-add that feature.

    The game is, as always, available at https://eternalambiguity.itch.io/ca-shooter