Greed - a proc gen dungeon crawler sort of thing

0 favourites
From the Asset Store
Random Maze Generator with Door & Key System - tutorial capx
  • Thought I'd post a little preview of what I'm working on - a procedurally-generated mining/roguelike/bullet hell/Gauntlet-ish kind of thing, tentatively titled Greed.

    Updated 26/1/15

    Latest version here. Feedback appreciated!

    WASD to move, arrow keys to shoot, space to drop bombs. I for inventory, M toggles map view, L toggles lighting, Q and E to switch rings. Find the rings, collect the loot!

    Check the devlog for all the latest stuffs.

  • Looks nice. Frame rate is steady 60 on my pc, so .. not yet too many sprites.

    Some suggestions..

    I'd like to see the moment to end on grid positions.. sometimes its hard to know what block the character is digging. This will be important on the future when there will be monsters and one has to know what direction to hit.

    For magic spells: I don't know if you have ever played games like Moria, but at least on some of them there are spells that light the entire level, and other spells that reveal key items (like money, starcases or monsters) on screen even if those are have not been discovered yet.

  • this is awesome dude. I see huge potential in it!

    would you care to give us a bit of insight into how you're generating the levels and doing lighting? I know a lot of guys on here have been struggling with decent "fog of war" and procedurally generating maps just sounds fucking cool!

  • goyo666 Sure <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> I'm a bit obsessed with procedural generation at the moment - this is my first project that uses it and while the engine still needs quite a lot of work, I'm pretty happy with how it's going. I started with abhilash's procedural generation tutorial ( ... 43387.html) and while I didn't end up using his miner method exactly, it was a great introduction to concepts like nested loops and using arrays to generate a map (fun fact: until a month or so ago I'd never used either, I thought all that stuff was too advanced for me…). I definitely recommend that tutorial for anyone who's interested in proc genning in Construct 2.

    The engine works in steps - first I fill the map array with the value corresponding to "EarthTiles", then I do some miner method-type stuff to add the "BedrockTiles" value, then the gold seams, then some oblong-generation stuff to add the rooms and walls, then the tunnels. There are safeguards built in along the way to make sure things don't get too messy - eg tunnels can't overlap floor tiles in rooms, and rooms can't overlap bedrock or each other. The rooms were probably the most complicated bit, I spent ages getting those right!

    Then there's the final step where I use the array to generate the actual tiles: most of the tiles are made using a Tilemap object, but some are good old sprites for convenience of working with the lighting system. The end result is that I have a bunch of variables I can play with to adjust the amount of rooms, bedrock, gold, tunnels etc on the map. I know I haven't provided too much detail here, but I'd be happy to PM you the capx and explain a bit more if you like <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    The lighting's comparatively simple: I have a layer of darkness (nontransparent black background) above the main layer, and I'm generating "lightwindow" sprites on this layer which are 46x46 black circles set to Destinationout. Whenever a lightwindow overlaps a floor tile sprite, it generates another lightwindow on that floor tile - because the tiles are 16x16 and the lightwindows are 46x46, this means they "radiate" out and don't spread to any tiles that aren't floor.

    Because the lightwindow sprites were building up and affecting framerate as the player explores, I started using Rojohound's fantastic Canvas plugin: whenever a lightwindow is generated, it's pasted to the canvas and destroyed after 0.2 seconds, which is a much more framerate-efficient way of doing it (1 object instead of thousands! Same with Tilemap).

    Argh that was a long post, but I hope it helps a bit! As I say, happy to chat a bit more about it and share the capx in PM - but definitely check out abhilash's tutorial, that pretty much laid the groundwork for everything I've done here.

  • lolpaca

    dude, this is pure gold

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is great work, runs nice on my old PC too, well done!

    I don't quite get the reasoning behind a key for each digging direction though, feels clunky and awkward, I'd prefer either "auto dig" when pressing against soil or just one dig key based on which way the player is facing...

  • I like so much the dungeon generation....

    I think you have to set a minimum room generation and generate dungeons more big.

    Nice work!

  • Joannak Thanks, that's good to hear. This game is definitely destined for desktops/laptops rather than mobiles, so as long as the framerate holds up on a reasonably capable machine I'm happy!

    I agree about the digging, I think that's to do with the way the dwarf sprite is drawn and animated. I'm using a "Hitpixel" sprite to determine where his pickaxe lands, which is always set to 16px away from the hidden, central "Dwarf" sprite, so the collisions are consistent at least - it just doesn't always look that way. I'll keep tinkering with the sprite until it feels right.

    RE the spells, I plan to have a "Map" pickup on every level, which will reveal where the rooms are (but not anything else). The spells will be in the form of different enchanted rings that can shoot various energy bolts (fire, ice, electricity etc) - you'll be able to equip up to 2 at a time and shoot baddies with them instead of having to getting close with the pickaxe, but you'll be limited by a slowly recharging mana reserve. Also there'll be bombs, potions, pickaxe upgrades, all that good stuff, but that's some way off yet!

    My biggest problem at the mo is deciding how the enemy AI will work. Since the obstacle map is constantly changing, pathfinding isn't really an option, so I need to get a bit clever about how they'll move around. I have some basic stuff set out but it needs a lot of work... anyway, enjoy the tunnels while they're still rat-free

  • pixel perfick Hmm, I kinda wanted it to feel like a twin-stick shooter - sorta like an arcadey Smash TV-type setup. As mentioned above, you'll eventually have to run around while dodging/hitting enemies, firing off spells etc, so I think it makes sense to have separate directional controls to attack. I like the idea of auto-mining when you push up against a wall though, I'll give that a spin!

  • Great start for really addicting game, i played for couple minutes just to find that gold . Looking forward to see more in the future.

    Btw game runs smoothly on my old pc - no lags even after heavy digging.

  • lolpaca; with the new updates on pathfinding and collision cells, I think it may be possible to use pathfinding behaviour for enemy AI. It's still possible it won't be fast enough but there is a chance so I advice to try it first before giving up on it. I was also working on a tile based digging environment for an rts game so would be glad if you could share the results Who knows, I may even go back to it.

  • Windwalker Which updates do you mean? My main concern with pathfinding was that I'd have to regenerate the obstacle map each time a tile is mined, which causes a very noticable stutter (or did when I last tried it) so it didn't seem ideal for this.

  • lolpaca; regenerating a portion of the obstacle map was in Ashley 's to do list for a while, and with the collision performance update, pathfinding began to make use of collision cells. I am not sure if this translates to obstacle map regeneration (which was also the problem with my tile based rts game, untis couldn't regenerate obs map without a second of pause) but now it may work I think. Let me see... here... ... on-in-r155

    in this article Ashley mentions pathfinding cell generation being done the new way but I'm not sure if it works now. Have to dig my old project files to try...

  • ooo, definitely worth looking into, thanks for the headsup

  • Just wondering. How much memory are you using if you have canvas the size of the whole map?

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