WIP: Lootbot Rush


  • Fuze Team

    New stuff: Air boosting and level transitions! It only supports one level at a time, so I'm basically taking a screenshot of the previous level, creating the next level, and then I can draw them both during the transition.

    @SteveZX81 It's pretty basic, I can go through the algorithm quick. This is actually the first time I've ever done any procedural generation, and it's really fun!

    Room setup:

    1. Start with a grid where every square is occupied
    2. Make an empty list of rooms
    3. For each of N rooms with initial size W and H:
    4. Choose a semi-random room_w / room_h for the room based on W and H
    5. Choose x and y for the room, making sure x + room_w and y + room_h don't go off the edges of the map
    6. If the chosen rectangle doesn't overlap an existing room, go back to step 4 (ignore if this is the first room)
    7. Mark the grid squares defined by the room as unoccupied
    8. Reduce available room W and H by 1 for next room (with some minimum)

    Platform setup:

    1. For each of N flat platforms with initial width W:
    2. Choose a start/end x location and y location for it such that it fits in the map area
    3. Check to make sure there are no occupied tiles around each of the endpoints. If there are, go back to step 2
    4. Mark the grid squares defined by the platform as occupied
    5. Reduce available platform W by 1 (with some minimum)

    After that, an entrance and exit are placed by checking for the leftmost open tile and the rightmost open tile and then clearing tiles until we're off the map. For this game, entrances can only be on the left and exits can only be on the right.

    Some more checks happen at this point to make sure there's no solid walls horizontally or vertically through the whole map (although there shouldn't be, theoretically). If there are, the map is discarded and we try again.

    There's no pathfinding check for whether or not a level is completable. I wanted to do a simple check, but doing it recursively (like a flood-fill) hits a F4NS recursion limit. I could do it with A* pathfinding but I'm not sure if it's actually needed, so I'll cross that bridge when I come to it. It seems like it's all pretty completable so far because the player has good movement abilities.

    Collision between the level and objects is done exclusively with sprites, and I can go over how that works in another post.


  • F

    Incredible work!

    @Willpowered said in WIP: Lootbot Rush:

    There's no pathfinding check for whether or not a level is completable. I wanted to do a simple check, but doing it recursively (like a flood-fill) hits a F4NS recursion limit.

    Yes, I hit the same limit trying to implement a flood-fill in my drawing program. I was able to fix it by avoiding recursion using a simple array of vectors as a stack of places to visit. Turns out you can sometimes hit the limit in my file system program if you copy/paste a folder with really really deep sub-directories.


  • Fuze Team

    Added crates to break open and gems/coins to collect within!



  • @Willpowered nice one! Looks fantastic!


  • F

    Amazing work! I love the look and wow, you're making the rest of us look really shabby.. haha Well done, keep it up!


  • Fuze Team

    I love everyone's creations! Some of you have done stuff that I wouldn't even know where to start on.

    Here's the latest progress:

    A life bar has been added! You lose life constantly over time, and if you collect loot it replenishes your life. Keys and locked doors have also been added.

    If you take damage while you're holding a key, you lose it and have to re-collect it. There can be up to 3 keys/locked doors per level, and you can hold 3 keys at a time.
    Next I'm probably going to look at adding some real enemies to blast!



  • This is looking incredible. The character reminds me of Ristar, and (strange thing to pick up on) I really like the way the key follows you


  • Fuze Team

    So cool and polished looking Will. Congratulations, amazing work! These additions are super xciting


  • Fuze Team

    I started working on this again in some of my free time. Here's a new enemy and some new special effects:

    The walk animation of the enemy is animated in code- The legs are just static images. Looking forward to doing more on this soon!


  • F

    Very happy to hear that you are continuing this! It looks amazing and very fun!


Log in to reply