Skip to content
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

New extension: Jumping In 3D #896

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Description

a quick and easy way to add jumping for a 3D game (using the built-in 3D engine).

How to use the extension

a premade jumping event for 3D games.
features:

  • jumping function:
    • Confugrable fall speed (pixels per frame).
    • Configurable Jump speed (pixels per frame).
    • Configurable player height (pixels on z-axis).
    • Configurable floor height (pixels on z-axis).
    • Configurable button for jumping.
  • Gravity function (experimental):
    • Configurable fall speed (pixels per frame).
    • Configurable player height (pixels on z-axis).
    • Configurable floor height (pixels on z-axis).
      you can also use the variable JumpingIn3D.IsJumping to detect if the player is jumping (true when the player is going up, requires Allow Jumping event to be active).
      and the variable JumpingIn3D.IsFalling to detect if the player is jumping (true when the player is falling, requires gravity event to be active).
      must be in an action that allows per-frame actions eg if a variable is true or false here is an example: example

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

JumpExtentionGameExample.zip
WASD, space movement, collect stars for higher jumps

Extension file

JumpingIn3D.json.zip

@github-actions github-actions bot requested a review from a team as a code owner May 23, 2023 21:50
@github-actions github-actions bot added the ✨ New extension A new extension label May 23, 2023
@github-actions github-actions bot mentioned this pull request May 23, 2023
3 tasks
@gabrielzv1233
Copy link

hi, i discovered a critical bug, I fixed it, so here is the updated extension, i accidentally used the wrong expression for an event in the "jump" function
JumpingIn3D.json.zip

@D8H
Copy link
Contributor

D8H commented May 24, 2023

Thank you for submitting an extension.

I have some suggestions:

  • TimeDelta can be used to handle speed as pixels per second.
  • What do you think about making it a behavior?

@gabrielzv1233
Copy link

gabrielzv1233 commented May 24, 2023

  • TimeDelta

gravity or jump function?
ill look into TimeDelta, haven't heard of it

@gabrielzv1233
Copy link

Thank you for submitting an extension.

I have some suggestions:

  • TimeDelta can be used to handle speed as pixels per second.
  • What do you think about making it a behavior?

so i got it to work, just going to let you know the game example i gave is quite outdated, so it is not using the new system, when ever i get around to it i will update it tho :), i will need around 4 hours, i am in school and don't have access to a windows device and then i will send the updated extension and if i get around it, the example :)

@gabrielzv1233
Copy link

ok so i added TimeDelta() and a few more methods to trigger jumping and updated the example game, i did not make them into behaviors because I just don't see a reason to do that.
example.zip
JumpingIn3D.json.zip

@D8H
Copy link
Contributor

D8H commented May 24, 2023

ok so i added TimeDelta() and a few more methods to trigger jumping and updated the example game, i did not make them into behaviors because I just don't see a reason to do that.

A behavior would allow to:

  • make several objects jump (some games may need enemies to jump)
  • do small or big jumps (by using an action to start the jump that can be called while the button is pressed)
  • configure jump properties
  • do air-jump
  • access jumping states
  • access current vertical speed

@gabrielzv1233
Copy link

gabrielzv1233 commented May 24, 2023

ok so i added TimeDelta() and a few more methods to trigger jumping and updated the example game, i did not make them into behaviors because I just don't see a reason to do that.

A behavior would allow to:

  • make several objects jump (some games may need enemies to jump)
  • do small or big jumps (by using an action to start the jump that can be called while the button is pressed)
  • configure jump properties
  • do air-jump
  • access jumping states
  • access current vertical speed

valid points, i will work on it but may take a long time
i can probably add:
access jumping states - done
access current vertical speed - done
configure jump properties - done
make several objects jump - done
do air-jump will likely need a entire rework for the system

@gabrielzv1233
Copy link

Here is the updated extension
JumpingIn3D.json.zip
i added the Behaviors most of the things you suggested (for the behaviors) and renamed some things

@D8H
Copy link
Contributor

D8H commented May 25, 2023

Great! I'll take a look.

This section of the platformer documentation explains how the vertical speed is calculated (the figures with yellow lines, the red ones are not useful for this case). In case it can give you some ideas.
https://github.com/4ian/GDevelop/tree/master/Extensions/PlatformBehavior#sequential-calculus-of-the-engine

@gabrielzv1233
Copy link

Great! I'll take a look.

This section of the platformer documentation explains how the vertical speed is calculated (the figures with yellow lines, the red ones are not useful for this case). In case it can give you some ideas. https://github.com/4ian/GDevelop/tree/master/Extensions/PlatformBehavior#sequential-calculus-of-the-engine

ok, i realized that the change property functions in the extension editor don't show in the game editor, so ill go fix that

@gabrielzv1233
Copy link

Changelog:
toggle Gravity function removed - alternative, disable/enable behavior
added change property function
Changed some labels

i will send the new file later (don't have access to a PC with the GDevelop app currenty)
i keep changing things so, making your job to review extensions harder so i will try to include a video showing the changes (unedited)
changes.webm
please provide any feedback as it helps me improve the extension
extension version - 1.1.1

@D8H
Copy link
Contributor

D8H commented May 25, 2023

If it's easier for you, you can focus on either box or model and I'll do some magic for the other one at the end.

Why do you need asynchronicity?
I don't know what effect it can have on doStep (the UI probably should forbid it).

A small tip: actions, conditions and expressions can be generated from properties:
image

@gabrielzv1233
Copy link

gabrielzv1233 commented May 26, 2023

If it's easier for you, you can focus on either box or model and I'll do some magic for the other one at the end.

Why do you need asynchronicity? I don't know what effect it can have on doStep (the UI probably should forbid it).

A small tip: actions, conditions and expressions can be generated from properties: image

did not realize i had synchronicity on, i turned them on and thanks for doing our "magic" less copy pasting for me lol, it may take a long time till i send the next update because my OS got corrupted on the device i export the extension on :(
ill also change the property setting thing to individual ones using ur method

@gabrielzv1233
Copy link

Hi I finally can export the extension, the same changes as the last message went over
JumpingIn3D.json.zip
hope ya like it

@D8H
Copy link
Contributor

D8H commented May 30, 2023

Hi I finally can export the extension, the same changes as the last message went over JumpingIn3D.json.zip hope ya like it

I took a look. The changes seems good but I couldn't try it with the first example you sent. You can send only the example if you want as the extension is inside it.

The feature of this extension is a bit like the platformer behavior but without collision detection (which is fine). Extensions users will handle collision themselves and your extension allows them to change the floor level which is a good idea.

Why is there 2 behaviors (one for jumping and one for falling) ?

@gabrielzv1233
Copy link

gabrielzv1233 commented May 30, 2023

i dont understand what you are meaning by "You can send only the example if you want as the extension is inside it."
i added a gravity function because i thought it would be helpful and add a bit more organization i guess. but i can remove it if you'd like :)

edit: i realized that the gravity behaviour was named inporpperly so ill fix that

@gabrielzv1233
Copy link

gabrielzv1233 commented May 30, 2023

i dont understand what you are meaning by "You can send only the example if you want as the extension is inside it." i added a gravity function because i thought it would be helpful and add a bit more organization i guess. but i can remove it if you'd like :)

i think i understand what u meant, I'm guessing it was to update the example so here is the example with the updated extension in use
BOUNCE.zip

@gabrielzv1233
Copy link

forgot to send the updated files, i fixed some gramatical errors and renamed some stuff :)
BOUNCE.zip
JumpingIn3D.json.zip
any idea how long the rest of the checks will take? its been on the same ones for like 2 weeks now.

@VegeTato VegeTato added the 👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. label Jun 13, 2023
@gabrielzv1233
Copy link

hey just wondering cuz ya know its been around over a month, how long could it take for this to be merged? i haven't seen anything changed (like get merged or something) and I'm kinda getting worried that it may have been forgotten about ig

@D8H
Copy link
Contributor

D8H commented Jul 6, 2023

Sorry for the wait, we are thinking of a way to avoid behavior duplication. As it will make this extension easier to do, I'm waiting for a future release of GDevelop.

@gabrielzv1233
Copy link

Sorry for the wait, we are thinking of a way to avoid behavior duplication. As it will make this extension easier to do, I'm waiting for a future release of GDevelop.
ok thanks

@gabrielzv1233
Copy link

Just a quick little thing, i will likely not be adding it the ability to use a object as a floor, this will just be left up to other people who want to update the extension as that is just beyond me.

@D8H
Copy link
Contributor

D8H commented Jul 28, 2023

Just a quick little thing, i will likely not be adding it the ability to use a object as a floor, this will just be left up to other people who want to update the extension as that is just beyond me.

It's totally fine.

@D8H D8H mentioned this pull request Jan 21, 2024
@D8H
Copy link
Contributor

D8H commented Jan 21, 2024

I credit you on this extension:

I you have time to test it, please tell me if you see improvements that could be made.

@gabrielzv1233
Copy link

gabrielzv1233 commented Jan 21, 2024

I may also convert this to just be a physics engine with wall collision ect, minus the like rotating that the normal engine dose when a object partually hits another, so just wall and floor)

@D8H
Copy link
Contributor

D8H commented Jan 21, 2024

I may also convert this to just be a physics engine with wall collision ect, minus the like rotating that the normal engine dose when a object partually hits another, so just wall and floor)

Actually, if you try the example that uses the extension (space bar to jump), you can see that it handles basic floor and wall collision.

@D8H
Copy link
Contributor

D8H commented Mar 19, 2024

Since the other extension was merged, I'm closing this PR.
Feel free to open it back if you still want to continue working on this extension.

@D8H D8H closed this Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. ✨ New extension A new extension
Projects
Status: Rejected
Development

Successfully merging this pull request may close these issues.

3 participants