Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Wall Kick [MMF2/Sonic Worlds]


Xeric

Recommended Posts

I hope i'm posting this in the right place..

Hey there! I'm new to the community and looking for some assitance reguarding my fan game. I've been working on my game project:MIGHTY for some time now using Game maker but recently aquired a copy of MMF2 through my college so im in the process of porting everything over to Sonic Worlds. It used to be a rom hack but decided aganist it due to limitations.

rayprojectmighty.png

Here's a poor screenshot to actually show something. All i've really done so far is play with the art.

Anyway, i'm a pixel artist/spriter at heart so I don't have the foggiest where to start.

Basically, i'm requiring the Wall Kick manovuer that Mighty does in Knuckles Chaotix for.. well, Mighty. The Sonic Dash+ engine I was originally using had it so it wasn't a problem, but Sonic Worlds lacks it.

I was wondering if anyone could help me out? Of course i'll try to repay you some how, with sprite help or something.

I'm unsure of the etiquette here so hopefully i'm not out of line for asking for help with this.

Link to comment
Share on other sites

I'd encourage you to try to figure out how to solve the actual programming for this problem on your own, but I'll give you some tips... as well as a warning about the wall kick from a level design standpoint.

First, Sonic Worlds handles actions in states. There are states that exist for actions ranging from jumping to running normally to hanging from bars grafted into the ceiling. Understanding states is a core concept that is basically necessary for adding most special moves and certain gimmicks to the engine.

The simplest form of wall kick can be accomplished simply by allowing the player to jump away from a wall if he is touching the wall from a jumping state. You can check the state of the player by examining the "action" state value from the Player Values object (It's the blue octagon shaped object with a white M on it in the player objects). The value for jumping is 1, so to check jumping use the following condition:

*Action of Player_MovementValues = 1

Obviously you need another condition to decide if the player should be allowed to jump off the wall, and that's that the player is actually hugging the wall. You also have to do this for both the left wall sensor and the right wall sensor. Fortunately this is pretty easy. You simply check the following:

*Collision of (sensor being checked) = 1

In this case, collision is alterable value Z of the sensor. This is helpful because it checks for actives that are considered solids too.

So you can combine those two conditions with checking for the jump button being pressed in two separate events to do something like the following...

*Action of Player_MovementValues = 1
*Collision of Player_SensorRightBig = 1
*KeyActionAPressed of Player_Input = 1
    Set Y_Speed of Player_MovementValues to XXX //XXX being the jump strength you want upwards.  Generally a negative value.
    Set X_Speed of Player to XXX //XXX being how hard you want to force the player from the wall.  Generally a negative value.
    Play Sound - Jump Sound Effect

And similarly for the left wall...

*Action of Player_MovementValues = 1
*Collision of Player_SensorLeftBig = 1
*KeyActionAPressed of Player_Input = 1
    Set Y_Speed of Player_MovementValues to XXX //XXX being the jump strength you want upwards.  Generally a negative value.
    Set X_Speed of Player to XXX //XXX being how hard you want to force the player from the wall.  Generally a positive value since its to the right.
    Play Sound - Jump Sound Effect

Of course, you can add an infinite amount of complication to it and even use an intermediary state to slide on the wall Mega Man X style instead of just jumping immediately.

As for the warning... wall kicks can be a severe game changer when it comes to making a platform game, primarily from the aspect of level design. I would encourage to actually avoid creating obvious vertical coordiors for using it as much as possible because these tend to be samey and vertical movement is generally much more enjoyable if you provide the player with something to interact with to move upwards. I think it's better in general to use wall kick type moves to do occasional fun things like saving yourself from falling to your death. Bottom line, if you rely on it a lot when you could be doing something to add variety instead, your game will probably end up being really boring.

EDIT: By the way, you can forward that sprite work you owe me to Overbound.

Link to comment
Share on other sites

  • 1 year later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...