After several weeks of struggling with making a dynamic flowing water shader, I have finally finished and uploaded a super early proof of concept of the unique tower defense game I am creating for mobile. I (lead programmer) did most of the work shown, with towers and "debris" completed by another programmer.
You can check out the earliest version as well as the latest version. This is using Godot 3.5.2.

If I stay in charge, this will be a water treatment themed tower defense with "flow-physics". If a collaborator takes over, at the very least that this will be a water themed tower defense game with flowing water. If I don't get hit by a car, I will design too a lazy river sim.

This novel approach to the tower defense genre brings the following exciting possibilities:

  • Clogs of debris spawning more fearsome foes
  • Towers that drop acid or oil into the water
  • Towers that affect the flow of water
  • Towers that drop allies into the water to clear debris
  • Debris allowed to stay stationary might turn into nasty poop land tiles which can't
    be built on and block water
  • Mazing, quality of maze foundations (dirt/concrete/steel) to build towers upon
  • The option to trap floating debris with land tiles

This is a profit share project that is open to collaboration. To simplify my system a great deal: a git commit grants share.

    Pretty basic, but you got something out there. Nice!

    Those enzyme sprayers need more potent enzymes 😃

    7 days later

    I'm working enough for my wrists to hurt bad. Here is a comparison illustrating the visual differences after a week:

    Click to reveal Click to hide


    And HERE's version 0.51 to try out.

    If player immediately builds a narrow zigzag strait it easy for shishkebabs to get completely stuck in there, even if the flow through the strait is fast. The level is basically beaten there.

      Yesterday I spent the whole day getting Wombo to create flora for me. I integrated it into a system that mirrors the terrain system visible here.

      xyz Yes! I am counting the player doing exactly that. Of course I have not yet implemented negative consequences for clogs because I have been waiting for you to advise me on how to best implement a 2D grime and muck shader. I guess just noise right? And a passing in information on where grime exists through the image as you illustrated previously.

      Looking neat with the flora elements.

      As for muck etc, yeah, I'd use a sliding noise texture ramped with some "muck density" value packed into the flow texture.

        Today I sat down and gleefully implemented my first set of punishments for the intuitive "just clog everything" strategy. Excited for your feedback and curious how long you xyz are able to hold on before the flow takes over =D. See the grime here!

        • xyz replied to this.

          Erich_L Oh, I see. I see the grand idea now 🙂
          It's becoming fun to play.
          It took me a few tries to stabilize it:

          What's next? Indestructible land tiles? Or deep water tiles? 🙂

            xyz Haha I’m so glad you gave it a try and persevered! I also started having fun especially with the muck and submarining, and I haven’t even made any of my own towers yet so that’s probably next, you can tell now there’s a lot of potential directions.
            I ended up making a shader I really liked for the muck but it won’t be visible until *drum roll the pool can get drained.

            • xyz replied to this.

              Erich_L Keep going. It may end up a really great game.

              19 days later

              I'm not smart enough to code a real time fluid simulation. Too bad I did it anyway watch out 4 pp.

              Have you uploaded the fluid version to itch? Has to be seen to be believed 😃

                xyz A version with fluid is here:
                https://stactory.itch.io/drain-defense-061
                I figured I'd spend the morning throwing together a chlorine pump in case you got tired of how gross it looks. It's just a visual element atm.
                Edit: Also I had to get my fluid stuff off of a thread which html5 doesn't support.

                  Erich_L Visually it's good but any plan to give some coffee to sleepy guys (Joe B. ?) in towers ?

                  The evil thing we're suppose to destroy sink but still continue to flow to the syphon and it looks like they are harder to get rid of.

                  I think that is the last version of the game you’ll see where it’s still a tower defense. Over the last month it has become very evident that I and everyone else involved is more interested in making a novel simulation than a tower defense. That’s too bad because the fluids do seem to add a lot to a typical tower defense game.

                  Fluids look nice.
                  Coffee to the tower guys but also explain them to zero in on a single floater until it is destroyed.

                  14 days later

                  I remember back in the day I thought "I'd better stick to 3D cause 2D won't have confusing enough math". Yeah, wish past me had any idea how much of a challenge it is to stack donuts on a cone all in 2D.

                  3 months later

                  ![

                  I briefly thought it wise to switch the entire game concept to a Lazy River water park simulation- the work load there caught me off guard and led to me getting burned out and a month later I had stopped working on the project. I have a lot of silly fun ideas for a lazy river sim (shocking the bad kids who pee in the pool ect..) but I have been wising up and returning to finishing this water treatment plant themed tower defense game.

                  In this new upload for version 0.73 here, the game is somewhat in a sandbox like state. I have the fluid system working just about as good as it needs to get and I am happy with the idea that if clean water is exiting the plant you get bonus money- a goal perhaps for later plays when you've mastered the fecal challenges.

                  I was told one bigger downsides to tower defenses is that you lose by getting behind on kills. I hope to solve this issue by paying the player for all debris that enters the map instead of debris that the player destroys. I will still maintain limiting factors such as time limits, lives, or both for the necessary stress, but I am also allowing the player to just close off the sewage drain if they feel swamped.

                  I've tried it and I think it's an ambitious and refined game despite dealing with actually shit.
                  As casual player I was initially confused, i think such a game needs an initial tutorial
                  More description on turrets info also can help.
                  As a reward method, a tower defence usually offers upgrades to the towers.
                  These are my thoughts, well done!

                    I really like your tower defense style of this game!

                    from a marketing perspective, i would recommend considering putting humor on the elements for the game vs real life names and shapes...

                    example:
                    gummy worms
                    donuts with a byte out of them
                    fancy donuts with various styles of icing, chips, ect

                    maybe also a gameplay mechanic with
                    potato chips or tortia chips that float and you can navigate various things on them to cross a path. they wouldnt have turrets target them except in some later levels with some turrets

                    maybe some special weapons that the player can target a screen-wide laser beam to blast a few in a crowded spot. this might make for a thing you could micro-transaction sell to players or offer as bonus perks.

                    hth

                      fatalox I've tried it and I think it's an ambitious and refined game despite dealing with actually shit.

                      Hey now, this is serious business. Important too. 😉

                      fatalox "As a reward method, a tower defence usually offers upgrades to the towers."
                      Yes tower upgrades are very important and fun. I have no excuse for delaying their implementation, so I went ahead and used the weekend to make upgrades possible for the enzyme sprayer turret- which turned out to be quite more enjoyable than trying to mix digital fluids.
                      If you want to toy with them- pressing m gives free credits. Version 0.73c

                      ucmRich Thanks for your encouraging words! (Fatalox too). I am indeed going to add a lot of humorous stuff. I feel the best way to introduce some sillier elements is to first convince the player the game lives within the bounds of waste water treatment only- so that later when muck spawns algae that evolves into little evil creatures the player will be quite surprised. There are also as you mentioned plenty of strange things people flush so there's a lot of room for silly enemies.
                      I actually love the idea of spawning little floating units that help.

                      @Megalomaniak You have no idea how many hours of similar content I have watched. I have even interviewed plant control operators XD.

                      Edit: Post by Erich_L, I don't know why it says [deleted]??

                      Today I added a goop projectile shader for those shots of enzymes (uploaded to godot shaders here). They're also live on the itch page.

                      I was having trouble finding a similar shader, luckily it turned out making this one wasn't too much of a headache.

                        Erich_L This is actually a big improvement for the game. The enzymes shot now is very clear and smoothly and the upgrade of the tower looks really promising.
                        Here some thoughts:

                        1. Projectiles are still weird on dynamic, when many they slowly bug and going around the arena.
                        2. Projectiles collision interfere with other projectiles.
                        3. Toolbox text hovering messages (like "Sell, Upgrade, Info, ect) are too small and misplacement.
                        4. A global sound for when losing a life should need it, not just the proximity flush of drain.
                        5. Game Over and Retry screen, must have.

                        Out of this my already preview suggest of a tutorial because look still hard to understand many things around.
                        Like what the meaning of the stairs? And the little guy? Toolshed? Ratio of water and chemical need its?
                        Now i understand its on building, i am sure most of this things are already planned in your mind.
                        Anyway i really like the tower defense games, very fun!

                        I agree with what @fatalox said above and would add that I'd get rid of the hover text/hint the way it exists currently. I'd give the game a bottom bar with a info box for the hover text in the center and move everything down there like in many RTS games.

                        I can draw a mockup if you want.

                        Also, I'd make the lives always visible. But the heart fainter initially and more visible as it gets lower.

                        Also, 2 things that I still find confusing/don't understand. 1. How to get rid of 'muck'(all my water is pure far as I can tell but the icon perpetually shows 12) and 2. what each of the toggleable overlays respectively are.

                        I think you two are right about everything. The main thing I haven't remotely a clear idea for is how to do tooltips. The mobile users don't have a mouse to hover, and for PC I clearly can't control where that little tooltip shows up (99% sure I had looked it up before it's an engine bug).

                        One solution I have in mind is to display all the button options for each tower on the tower info screen, on that kind of screen I can show all the options with explanation. I know once the player has a level or two under their belt all the buttons are going to be easy to understand and I am striving to have the icon and button reaction be intuitive for kids to smash on and see a change.

                        My chief concern is UI overcrowding because this game already does and eventually will have a large number of things going on. Did you guys notice you can click on the icons top right to get more information?

                        You'll have to tell me if this is a good idea:
                        Another plan I had was to have a tower- such as a drain- bring up related info up on the top right. For example, you select the drain, and you can see water quality and lives info. When you click on the water faucet, water pour in vrs out shows up.

                          Erich_L
                          If you wanna keep the circle-hud will be necessary having info outside of descriptions.
                          Generally speaking mobile users probably are not the target for games with this level of complexity.
                          (well, now with folded smartphones people go around with actually monitors in their pockets.)

                          This can be an idea for re-arrangement the tool box, re-HUD them inside the visuals.
                          Code can fix a label with (int: %) number for selling, buying and upgrading (or not, fixed prices is even more simple).

                          About your idea of having extra info that depends how good and useful is the HUD.
                          I am fan of bottom left position for tower defense game (but this is just my personal preference).
                          For sure if the color of the HUD is like strong black then will suck in this colorful scenario.
                          Need to take care a lot of details.

                          @fatalox In that bottom left area I will have a button group allowing the player to switch tier (dirt then concrete then pipe then... idk... wires maybe). It took me almost 3 days to get an icon I like for the dirt tier (below). That way both bottom right and left will have something for the thumbs to have quick access to.

                          Creating decent art is a huge pain for a programmer such as myself. Ideally stuff is only up on the HUD if there's a pressing need.

                          @Megalomaniak Most RTS games leave too much HUD UI on the screen which I'm quite afraid will overwhelm a phone screen.
                          Muck
                          Muck generates algae and gives a defense bonus to any debris floating above it. You can see it as green goo globs on the bottom of the pool. One easy method to avoid their effect is to build terrain over them. Later I will have poor workers dawn scrubbing gear and enter the pool to wipe it off. It will also be removable by next release by paving concrete over it.

                          Toggleable Overlays (for debugging)

                          1. Shows water flow direction as a color
                          2. Shows water flow velocity increase from water source to drain path. (More faucets, faster flow)
                          3. Shows debris velocity
                          4. shows water contents

                          edit: meant left not right

                            @fatalox Also I'm just not sure about the text over buttons. Any words at all, especially if they're in a foreign language, can be very intimidating for children if they pick up the game. I am trying to be forgiving, if you sell a tower, for example, you can get all the money back (I'm not sure about money spent on upgrades though).

                            @fatalox You also mentioned the goo projectiles can hit each other and get knocked off course. Did that cause grief? Personally, I love it because all the projectiles feel as though they have a real weight to them. It also forces you to consider carefully tower placement/upgrades.

                              Erich_L @Megalomaniak Most RTS games leave too much HUD UI on the screen which I'm quite afraid will overwhelm a phone screen.

                              Responsive design to the rescue, I'll make the mockup then.

                              Erich_L I am trying to be forgiving, if you sell a tower, for example, you can get all the money back (I'm not sure about money spent on upgrades though).

                              No, the upgrades aren't refunded right now. But could make it a toolshed upgrade with 5% refund per upgrade up to 25% at max rank. And the currency for that toolshed upgrade could be cleared muck and wood from cleared trees or something.

                                Erich_L
                                I see your point, making a game without the language barrier,
                                Maybe a "green arrow" then, for tells that is an upgrade. Still probably need a lot of cuts if you don't wanna push on toolboxes, i think it really hard to understand some hud controls.

                                Erich_L I'm not sure about money spent on upgrades though).

                                I'm having more fun when tower games have prices on updates that just increase static.
                                Like this: [Level1] 50$ - [Level2] 100$ - [Level3] 200$ (x1, x2, x3).

                                Erich_L You also mentioned the goo projectiles can hit each other and get knocked off course. Did that cause grief? Personally, I love it because all the projectiles feel as though they have a real weight to them. It also forces you to consider carefully tower placement/upgrades.

                                Guess i am static guy and i like when 1+1 makes 2, thats my idea of fun.
                                I will like that projectiles don't collide with themself at all (or if they collide i want to see them both disappear)
                                Actually this is my perception of reality, when 1 hit 1, 1-1 become 0.

                                  I just want point out this game looks super rad. I love the concept and artstyle.

                                    Erich_L Great, I clearly remember I saved it but apparently half my work is missing, thanks Krita. Guess I'll just redo it... ah figured it out, apparently I had multiple copies open and one was outdated. When closing and saving the outdated copy overwrote the other. Oops.

                                    Anyways, mockups...

                                    Mobile

                                    PC

                                    Legend: Gray box is for the info text pertaining to any element active or hovered. White ones would be buttons.

                                    Realistically the mobile style could also work on PC, but probably not the other way around. I know a couple of games that were mobile first use the same style of UI also on the PC releases that followed up later.

                                    PM me if you would like to get the krita file too. Apparently uploading zip's isn't supported anymore here.

                                    Megalomaniak I could make "a toolshed upgrade with 5% refund per upgrade up to 25% at max rank." I think I like this idea more than just refunding all upgrades - or maybe I should just refund all upgrades I'm not sure. I am sure that I want to make a few different structures so the player has to make a conscious decision where to place some buildings and lose plant space.

                                    @"Megalomaniak "And the currency for that toolshed upgrade could be cleared muck and wood from cleared trees or something."
                                    You'll have to elaborate on that. (Didn't quite get what you mean)

                                    fatalox "Like this: [Level1] 50$ - [Level2] 100$ - [Level3] 200$ (x1, x2, x3)."
                                    I think I agree, I changed the upgrade price increases to be more linear and easier to predict. I think it would be fair perhaps then to not refund upgrades? As for the projectiles, I'll keep that in mind and if more people yell at me I'll think about changing it. My theme here is a "mess" so if the projectiles fly around on collision it makes me smile.

                                    heroic Thanks a ton for the feedback! I hope you like this next update.

                                    In today's update the biggest reason I posted it was to show @Megalomaniak my plans for the final UI with tier (tool) selection on the left which changes the sub-tools available on the right. This way I can have a great deal of different map altering buttons organized neatly. The towers will also show based on tier. Right now this feels a little annoying on the computer but I suspect it will feel just right with two thumbs.


                                    Also I hid the button that toggles debugging overlays but you can see that button again with the '/' key.

                                      Erich_L "And the currency for that toolshed upgrade could be cleared muck and wood from cleared trees or something."
                                      You'll have to elaborate on that. (Didn't quite get what you mean)

                                      The point was that relying on single currency for everything is annoying and bad because of the competing costs for the player to manage and balance. But if you are already implementing additional busywork like the muck clearing and I presume trees could be harvestable in the future then they can provide their own currency(biomass, wood respectively; resource = currency of a type) that would be dedicated for buying specific things, upgrades to utilitarian buildings such as the toolshed for an example.

                                      @Megalomaniak and others: How does this look? I'm really not the artist I wish I was but I am squeezing my brain! In that first yellow bar I'll put some icons that reflect the tower's limitations such as

                                      • must be built by water
                                      • no refund
                                      • Needs road access

                                      Possibly fine, but it's hard to judge in a vacuum. Need to see it in context.

                                      The price ("$200") is a little unreadable -- there's not enough contrast between the pale-green background and the white font. I would consider either adding a black outline around the text, or adding a darker background fill behind the text.