GDevelop-examples icon indicating copy to clipboard operation
GDevelop-examples copied to clipboard

[Platformer] Extract events into functions.

Open D8H opened this issue 1 year ago • 4 comments

I won't do a changelog because I simplified and move event everywhere so the whole project must be reviewed anyway.

Unimplemented ideas

  • The score could become a behavior on the text object, but maybe it would be going too far.
  • Functions about the player could be moved in a behavior but it may cause 1-frame delay so I didn't do it.
  • A button could be used for the game over (maybe we should wait to find a good one).

D8H avatar Dec 06 '22 00:12 D8H

Preview the game(s) changed or added in this Pull Request

  • https://editor.gdevelop.io?project=https://raw.githubusercontent.com/GDevelopApp/GDevelop-examples/platformer-extensions/examples/platformer/platformer.json

This is an automatic message displaying links to the games in this PR - double check the JSON in case of doubt.

github-actions[bot] avatar Dec 06 '22 00:12 github-actions[bot]

Images automagically compressed by Calibre's image-actions

Compression reduced images by 78.3%, saving 16.04 KB.

Filename Before After Improvement Visual comparison
examples/platformer/assets/Checkpoint_1.png 6.40 KB 1.34 KB -79.0% View diff
examples/platformer/assets/Checkpoint_2.png 6.91 KB 1.49 KB -78.5% View diff
examples/platformer/assets/Checkpoint_3.png 7.18 KB 1.62 KB -77.5% View diff

4438 images did not require optimisation.

github-actions[bot] avatar Dec 06 '22 20:12 github-actions[bot]

Thanks for taking the time to improve this :)

Typos:

  • Ennemy => Enemy (everywhere, name of extensions, behaviors and descriptions)
  • MonterEnemmy => MonsterEnemy
  • charcter => character

Other things:

  • "Animate the character according to the platformer state." => "platformer state" is frightening in the description.
  • "BeKilled" is not a proper action name, because "Be" is not a proper verb here. It should be "SetKilled" or "SetDead" or "TriggerDeath". Prefer Trigger in this case.
  • "PARAM1 fall into PARAM3" is not understandable. This is an action so there should be a verb, and fall is not understandable in this context. "Animate PARAM1 so that it's absorbed into PARAM3"
  • Also rename the name and description ("Fall into the portal" => "Absorb into a portal")
  • I don't like "Main" as the scene name, can it be "Level"? A bit more beginner friendly.

4ian avatar Dec 07 '22 10:12 4ian

A button could be used for the game over (maybe we should wait to find a good one).

Yes please! :)

4ian avatar Dec 07 '22 10:12 4ian

I haven't tested mobile and gamepad controls yet (I ran out of time), but everything seems to work so far (after adding the missing return value on a function).

tristanbob avatar Dec 31 '22 06:12 tristanbob

I tested this on a game controller and it works great.

Mobile controls work well, except that the jump button doesn't work the first time it is pressed.

Other than that, I think we have time to sneak one of those new custom buttons in to replace the "Retry" text. :)

tristanbob avatar Dec 31 '22 18:12 tristanbob

Images automagically compressed by Calibre's image-actions

Compression reduced images by 29.8%, saving 716 bytes.

Filename Before After Improvement Visual comparison
examples/platformer/assets/Purple Button With Shadow_Hovered.png 805 bytes 564 bytes -29.9% View diff
examples/platformer/assets/Purple Button With Shadow_Idle.png 804 bytes 569 bytes -29.2% View diff
examples/platformer/assets/Purple Button With Shadow_Pressed.png 797 bytes 557 bytes -30.1% View diff

4491 images did not require optimisation.

github-actions[bot] avatar Jan 03 '23 10:01 github-actions[bot]