-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AdvancedJump] Add wall jump, wall sliding, air jump and dash #325
Conversation
WallJumpingAndAirJumpingExample.zip these are the new files for this btw(I've changed the desc of the extension since I forgot to add one) |
how would I update the files in this?, cuz I don't think it updates to my latest one |
This submission is related to this one: Behaviors about jumping should be integrated with the "Advanced Jump" extension. |
ooh didnt see that when i did PR(maybe my tiredness got to me)
both(airjump and walljump)? |
Everything that uses the action to jump again. This is to make sure there is no conflict when using the features together. |
okay |
okay so asked me to make the extension part of the advanced jump right?, which means I would need to give an export for that one right? |
Extension: the one I made earlier(i made some changes to it) Example this has both in it |
I assume you meant merge it to advanced jump so I decided not to make the changes to the one I made(well I made the air and wall jump in the advanced jump thing to but you get what I mean hopefully), anyway changes are I added a condition for checking if the object is next to the wall and changed "block" object to wall object(cuz for wall jump it makes more sense) |
There should not be any action that the extension user needs to execute every frame. The lifecycles are used for this.
Relying on other objects every frame should be avoid at all cost.
The air jump counter could probably be reset when a wall jump happens. As it's not possible to have an optional required behavior, we will probably end-up with most of the behavior requiring on each other. At the end, the 3 behaviors will probably be merged, but let's keep 3 behaviors for now. I'm not sure the "falling" mode is useful. Do you know any games that works like this? |
i dont know how to do it without raycast(cuz um any another way like collision would be buggy unless I have points) and I need to check if the object is collision with wall for the conflitch thing okay i could do that, for falling then i would say well i personally know of no games but i think its a good idea(that's just my opinion doe) and may i keep the 2 added behaviors as that would be easier in most ways for me at least but if you want i can try to merge them in the main one |
for the object thing i could make an object group called walls maybe and put it in desc for it? |
oooh you said this, ill try it |
What about the solution I suggested? (Edit, ok)
Of course, this is what I suggested, it will be easier to write them in their own behavior first. |
ooh kay btw I didn't understand the solution you gave and my idea of using a object group didn't work |
and i don't wanna do left or right pressed and I'm unsure what to do for it and I used a action(for walljump at least) cuz of I needed it to say the object, unless I check if there is a wall next to player then idk another way to do it |
ooh i remembered some mobiles game with double jump having a falling system for instead of released though I cant name them :( |
That's ok, I can help for this. I'll give it a try after your next version. |
okay all I can really do is change air jump cuz idk what to do for wall jump and my walls group idea failed |
can we talk on discord cuz i found a issue and well its cuz of the lifecycle function? |
changes: air jump is now fully the behavior wall jump only has 1 action(this is cuz I need to know what object is on the wall, but I believe D8H said he would try to do a wall-jumping system for it, so in theory this is temporary(hopefully)) |
I've merged air jump and wall jump together and made wall jump work without action now(but there is still two new behaviors one for key released and one for falling types) |
My version with working air and wall jumps still in their own behaviors. I'll take a look at yours. |
I can't test your version because I don't have a QWERTY, but the code seem more complicated than mine and the speed should not be used to check if an object doesn't move as the platformer behavior could have an option to keep its speed when colliding obstacles one day and it would break it. Take a look at my version and if you are ok with it, we can add actions and conditions to allow to change the configuration and the state. |
i didn't do that cuz my way of doing it isn't good I think(but I might be able to make a better system of mine for it) |
Errors were detected in this submission:
|
Errors were detected in this submission:
|
Errors were detected in this submission:
|
why have add dash this is advanced jump, not advanced movement? |
The dash can't be in its own extension because we couldn't make it work with the wall jump. |
yep, I understand why dash is added but it is called Advanced jump so it wouldn't make sense, so something like Advanced platformer movements or something like that would be better in my opinion, well if there's a dash or another movement types like dash then it would be better(in my opinion) |
Thanks, I updated the project.
Have you updated to GDevelop 5.0.127? (I'm adding it next to the link)
They will be very useful for the next person that changes the behaviors.
A gravity is an acceleration. Its a |
oh didnt know it requires the latest version of gdevelop, i will update it 👍 |
I'm too much involved in this extension to merge it. |
@Bouh can you make a quick check before we merge this? :) |
There are a lot of behaviors and two technical behaviors required, if they are not present the other behaviors don't work. OR One big behavior rather than adding technical behaviors to resolve conflicts between platformer character and fix miscalculations with Coyote And Air Jump Integrater inside this extension update. |
There is no Advanced Jump behavior, it's called Coyote time from a user point of view. I asked for this name at the time because I though it wouldn't be possible to do separated behaviors. The last 2 behaviors doesn't really provide direct game features. I think there is no need to get into details in the extension description.
The Platformer Configuration Stack behavior can actually be useful for extension users that need to change Platformer Character configuration.
Ok, these 2 behaviors are small enough to be merged without making them hard to maintain.
The debug is only useful for extension mainteners. I think it should not be exposed to extension users. |
A build with the last change to check everything is ok: |
The air jump behavior lets platformer characters jump in mid-air. The wall jump behavior lets platformer characters jump and slide against walls. The horizontal dash behavior makes platformer characters dash horizontally. The dive dash behavior makes platformer characters dash toward the floor.
48677ae
to
3e720b4
Compare
I couldn't rebase the commit history because of the case change of the "extensions" folder, but the commit are still accessible on my fork: https://github.com/D8H/GDevelop-extensions/commits/AirJump |
Changes
This update adds:
These behaviors are ready to use and let extensions users define their own game rules.
The behaviors doesn't use any kind of collision condition nor move any object manually. It only rely on the platformer extension collision handling and movement. So, they are efficient and less prone to weird side effects.
"PlatformerConfigurationStack" is the only behavior that uses JavaScript.
Behavior interactions
Handling "Allow to jump again" conflicts (CoyoteAndAirJumpIntegrater)
Both the air jump behavior is executed before the coyote time behavior use the actions to allow or forbid to jump in mid-air. This can result to miscalculations of the number of remaining air jumps. The "CoyoteAndAirJumpIntegrater" handles the following cases.
When the Air jump behavior is executed before the Coyote time behavior, these scenarios will happen:
Coyote jump time frame is missed
Coyote jump happens in the time frame
When the Air jump behavior is executed after the Coyote time behavior, these scenarios will happen:
Coyote jump time frame is missed
Coyote jump happens in the time frame
Handling character configuration changes conflicts (PlatformerConfigurationStack)
In previous versions, the wall jump behaviors were saving the configuration before changing it for doing wall sliding or wall leaps. This can't work if another behavior does the same because when the configuration changes cross with each other. For instance, one will save the configuration of the other custom movement and put it back instead of the actual character configuration.
The "Platformer character configuration stack" behavior allow to handle these conflicts. This behavior keeps track of the configuration changes like layers. The background is the character configuration setup by the user and each behavior add a layer that can change some properties. When an extension changes the configuration, it adds a layer on top and when the behavior decides to revert its change, it removes the layer. This way behaviors don't override each other changes.
Checklist
Demonstration
JavaScript part
Revert configuration changes
Revert configuration changes for one identifier and update the character configuration to use the most recent ones.
Configure a character property
Configure a character property for a given configuration layer and move this layer on top.