SciNEStist
Well-known member
Do you have a feature you really wish was in the beat-em-up module? please share your wish list!
One of the more frequent things I have heard people ask is about getting jumping enabled in the adventure and beat-em-up game modules. I've always had an Idea on how it could be accomplished, but never had the time to pursue it until recently. Anyone who frequents Discord and even the facebook group might have seen some vids I posted on my progress, but I thought I would share it here.
At this point it is just an experiment in progress. No full plans for a full game, and no promises on any full tutorials/code release yet. I am trying to make it in a way that it could be potentially released as a module (so it can be customized ink various ways without the need to alter compicated code) if anyone has questions, or more importantly, SUGGESTIONS, please post!
Here is what I've been able to do so far:
enable jumping
by adding a z axis in addition to x and y, then modifying the jumping/gravity from the platform/arcade modules, we now have a virtual 3rd dimension. Then by modifying the drawing of the objects in the "handle drawing sprites" script, the player appears higher on the screen the higher their z position is.
Added multiple ground level tiles
by setting a "floor height" object variable in tile scripts, we can prevent the player from moving over a tile if their z position is below the new floor, so now they have to jump to move over a higher tile.
changed the tile collision code to set priorities
in nesmaker, if a player is touching more than one non 0 or 1 tile, it will use the tile thats touching the top left corner first, then the top right, then bottom left, then bottom right. as long as you space out your special tiles, this isnt an issue. but it wouldnt work for certain applications. as a solution, I altered the tile collision to set a priority based on what tile # is the highest and reduced the tile collision checks down to 2 (left and right of the players feet)
added a new dimension to object collision
now it checks if other objects are going to hit not just by checking the x and y , but also the z values. so objects can pass above and below eachother with no contact.
added a new type of "walk behind tile"
the common method of walk behind tiles is done by forcing the player object to draw behind the tile layer. its a simple and effective method, but the drawback is that the player would be drawn behind all tiles, not just the tile you want them to be, so you have to surround these walk behind tiles with fully transparant tiles. Using a different method, it allows objects to walk behind the raised platform tiles and be blocked visually by them, but still be drawn in front of the other tiles. This is done by drawing solid sprites over top the objects, but behind the background layer. This effectively acts as an invisibility cloak.
8 directional walking
enabled 8 directional walking but also checks vertical and horizontal movement separately, so now the player won't just stop dead when walking up to a wall at an angle, but slide along that wall. This makes movement much more fluid.
overhauled the combat
punching in the original module was done by creating a 2nd object that acts as a fist for the player. But to prevent glitchiness, it prevents the player from moving while attacking. with this new method, the player can not only move and attack, but their outward stretched limbs stay with the player. this is done without creating a 2nd object in order to prevent slowdowns. It also allows for multiple attack types, like jumpkicks
Accurate hitboxes for attacks, and varied effects of different attacks
different attacks have specific hitboxes that take all 3 dimensions into account. the effect of a hit can be altered based on what the hit object is doing at the time of the attack., or otherfactors
Planned features:
One of the more frequent things I have heard people ask is about getting jumping enabled in the adventure and beat-em-up game modules. I've always had an Idea on how it could be accomplished, but never had the time to pursue it until recently. Anyone who frequents Discord and even the facebook group might have seen some vids I posted on my progress, but I thought I would share it here.
At this point it is just an experiment in progress. No full plans for a full game, and no promises on any full tutorials/code release yet. I am trying to make it in a way that it could be potentially released as a module (so it can be customized ink various ways without the need to alter compicated code) if anyone has questions, or more importantly, SUGGESTIONS, please post!
Here is what I've been able to do so far:
enable jumping
by adding a z axis in addition to x and y, then modifying the jumping/gravity from the platform/arcade modules, we now have a virtual 3rd dimension. Then by modifying the drawing of the objects in the "handle drawing sprites" script, the player appears higher on the screen the higher their z position is.
Added multiple ground level tiles
by setting a "floor height" object variable in tile scripts, we can prevent the player from moving over a tile if their z position is below the new floor, so now they have to jump to move over a higher tile.
changed the tile collision code to set priorities
in nesmaker, if a player is touching more than one non 0 or 1 tile, it will use the tile thats touching the top left corner first, then the top right, then bottom left, then bottom right. as long as you space out your special tiles, this isnt an issue. but it wouldnt work for certain applications. as a solution, I altered the tile collision to set a priority based on what tile # is the highest and reduced the tile collision checks down to 2 (left and right of the players feet)
added a new dimension to object collision
now it checks if other objects are going to hit not just by checking the x and y , but also the z values. so objects can pass above and below eachother with no contact.
added a new type of "walk behind tile"
the common method of walk behind tiles is done by forcing the player object to draw behind the tile layer. its a simple and effective method, but the drawback is that the player would be drawn behind all tiles, not just the tile you want them to be, so you have to surround these walk behind tiles with fully transparant tiles. Using a different method, it allows objects to walk behind the raised platform tiles and be blocked visually by them, but still be drawn in front of the other tiles. This is done by drawing solid sprites over top the objects, but behind the background layer. This effectively acts as an invisibility cloak.
8 directional walking
enabled 8 directional walking but also checks vertical and horizontal movement separately, so now the player won't just stop dead when walking up to a wall at an angle, but slide along that wall. This makes movement much more fluid.
overhauled the combat
punching in the original module was done by creating a 2nd object that acts as a fist for the player. But to prevent glitchiness, it prevents the player from moving while attacking. with this new method, the player can not only move and attack, but their outward stretched limbs stay with the player. this is done without creating a 2nd object in order to prevent slowdowns. It also allows for multiple attack types, like jumpkicks
Accurate hitboxes for attacks, and varied effects of different attacks
different attacks have specific hitboxes that take all 3 dimensions into account. the effect of a hit can be altered based on what the hit object is doing at the time of the attack., or otherfactors
Planned features:
- 2 player support, cause beat-em-ups are way more fun with a buddy
- weapon pickups? might be possible!
- destructible barrels/boxes that could be stood on? maybe!
- advanced enemy ai and pathing? hope so!
- new enemy spawn methods? thinkin bout it!
Last edited: