Fungeon Keeper

0 favourites
  • 8 posts
From the Asset Store
Show everyone that you are the best goal keeper in the world!
  • Join me as i attempt to rediscover some of the magic of my youth by recreating one of my most loved childhood games...Dungeon Keeper (in 2d).

    I will document my adventures here.

    Problem number 1, auto tiling a tilemap, including shadows. I use the bitwise method.

    https://www.dropbox.com/s/n03hhz8m3k6cuh7/fungeonKeeper1.mp4?raw=1

    I also did screen 'drag and scroll' and zooming, and tested a minion moving around with the inbuilt pathfinding.

    https://www.dropbox.com/s/sk6jg5v5ed8abr5/fungeonKeeperPathTest.mp4?raw=1

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Next problem is getting the minions to dig the rooms and build stuff.

    For now i paint on dig commands which will tell the minions the tiles i want digging out.

    My approach to the actual digging is first using a fast tilemap 'flood fill' to get all the tiles the minion has access to so i know a pathfinding test will always return true.

    https://www.dropbox.com/s/dhdt28lutjsz8f3/fungeonKeeperFloodTest.mp4?raw=1

    Then i can generate a list of tiles next to the ones i want digging out thats reachable. Of those i order the list by those with direct line of sight and nearest, then those without line of sight, perhaps in another connecting room.

    The work order list is simple, the minion will always do the closest task. In order to re-task them you pick them up (which cancels their current job) and drop them near the job you want them to do. They then pick the closest again and do the job until complete and move to the next one.

    Here is the next step.

    https://www.dropbox.com/s/79ty7x7tyetmltw/fungeonKeeperDigging1.mp4?raw=1

    Next i'll code the actual digging and a drag and drop of minions.

  • Fun stuff, I remember this game, it's so satisfying to carve out rooms. One of the most interesting things is emergent behavior of your monsters vs the incoming "PCs" - what are you thinking in terms of AI, etc.? It feels like you can actually go stronger here then the original - if C3 had access to some the latest ML/DNN tech, etc. hmmm...

  • Hey, from what i recall Dungeon Keepers ai was heavily scripted with the enemy bases pre built and triggers setting off events.

    I always thought of DK as more of an RTS then a base builder, i'm not yet certain how closely i will end up following DKs design, almost certainly i'll be adding my own stuff in, so i'm not so sure about the ai yet. I agree though, theres no part of DK, outside of 3d, that c3 can't handle.

    I've had to pause development for a moment as i discovered a bug in the LOS behaviour thats now been fixed for the next c3 update.

  • I added a finite state machine system to the imps to control their behaviour states, its simple for now but can be easily expanded on later for things like building and combat etc. It also make bug hunting easier as it gives some idea what state is causing any issues, although its been surprising bug free so far.

    So the imps current states allow them to check for any dig jobs and carry them out, when there are none they go idle for now.

    Tiles being dug out now also record how many imps have picked them to dig. I used this as an extra picking parameter so imps spread themselves out and dont all go for the same tile, with the exception of if a corridor is being dug then they will help each other.

    So the job picking order is now > tiles in reach > tiles in los > closest tile > tile with least imps digging it else tiles not in los > closest tile > tile with least imps digging it.

    There is a bug in R123.2 los behaviour so at the moment imps see all dig orders they can reach which throws off their picking order, but that should work in the next c3 update.

    Next challenges are giving tiles being dug health so they dont get dugout instantly, being able to pick up and drop imps, being able to slap imps to make them work faster.

  • This is coming along really nicely, I'm looking forward to see how it turns out!

  • Looks very interesting! :)

  • Thanks for the encouraging comments!

    I've now added the ability to pick up and drop minions. A single click to pickup and again to drop, holding down shift allows you to pick up more than one.

    Shadow needs a bit of work.

    Next i'll add slapping them to speed up work.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)