Help wanted to recreated this projectile-esque mechanic

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Create a boss fight with this easy to follow game pack. Recreate the classic attacks of Mutoid Man from Super Smash TV
  • Hi! So, I'm trying to replicate this mechanic from the Mickey's Magical Quest (SNES) series where the player can grab blocks or enemies and throw them. Blocks roll until they find an enemy or a wall and then are destroyed; enemies keep rolling through blocks (destroying them) and can bounce back on walls up to three times until dying. You can check it out here, there's a specific time selected already:

    I've managed to program the blocks to be picked up and thrown, and the enemy can also die from being hit by a block or if the player jumps on their head. The rest, I have a slight notion of how to do. My issue is with slopes. As we can see in the video, when Mickey throws a block or an enemy, it moves along the terrain, including going up and down slopes. The way I've done slopes in my project is by manually editing the slopes' hitboxes on the tilemap object and the blocks have both Bullet and Platform behaviors so that it clings to the terrain and keeps on moving. When arriving at an uphill slope, it simply stops. I'd love some ideas on how to solve this, no matter how difficult (but keep in mind I'm a beginner T-T).

    Here are the events on catching and throwing the blocks:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For some reason the link to the video got lost, but here it is: youtu.be/uhZdr2BCo1M

  • One idea could be to move the thrown objects manually vertically then horizontally. Doing that allows you to have logic where if the block starts on the ground it will stick to the ground including slopes.

    A first iteration of that logic to make the thrown block stick to slopes when moving horizontally would be something like this:

    Every tick
    — block: move down
    
    Block: overlaps ground?
    — block: move up out of ground
    — block: move horizontally
    — block: overlaps ground?
    — — block: move up out of ground
    — else
    — — block: move down till just above ground
    Else
    — block: move horizontally. 

    The moving up out of the ground, or moving down till just above the ground is a sub problem that probably could be solved with a loop with overlap checks and moving a bit each step.

    Now I call that a first iteration of the logic since depending on the map you don’t want all the ground to be thought of as a slope. You’d likely want to be able to handle walls, ledges and ceilings too. But that’s mostly just busywork.

    Just an idea at least that you could explore.

  • Dan Medeiros, check it: construct.net/en/free-online-games/launch-sliding-boxes-83696/play

    Oh my, exactly what I needed! Thank you so much!

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