gdquest-demos / godot-kickstarter-2019

Create your Own Games with Godot, the Free Game Engine: sources from the January Kickstarter project from GDQuest
MIT License
242 stars 269 forks source link

Improve the official 2D Platformer demo #57

Open johnnygossdev opened 4 years ago

johnnygossdev commented 4 years ago

The 2D Platformer is the first demo to be reworked into the Best Practices guidelines as discussed in #56.

The work-in-progress project can be found on the feature/demo-platformer-2d branch.

I've made some notes of the changes I'd like to implement. Feedback is welcome!

General

Player

Enemies

Moving Platforms

Bugs

NathanLovato commented 4 years ago

Great plan! A little extra: as Godot 3.2 is coming out soon, could you port it to Godot 3.2? The 2d part is already quite stable, even using the official alphas.

johnnygossdev commented 4 years ago

Cheers! That's a good idea. I'll also port it to 3.2 👍

NathanLovato commented 4 years ago

As the character is a KinematicBody2D I'd take the opportunity to use the recent move and slide with snap to make it not slide down on slopes.

razcore-rad commented 4 years ago

So I'm not sure what the scope of this demo is. It seems to me more of a clone type of demo trying to be a somewhat finished project instead of a "feature demo". So because of that I'd say:

NathanLovato commented 4 years ago

Let's not increase the scope with UI scenes. We already have a complete demo of our own for that: https://github.com/GDquest/Your-First-Game-Godot-2d-Platformer

NathanLovato commented 4 years ago

This platformer code rewrite is a prototype to show what our styleguide, comments, etc. can bring to the official demos repo, so people can see the improvements we can bring to the table.

razcore-rad commented 4 years ago

I didn't think what I'm proposing to be a huge amount of extra work. Maybe menu & death/score is out of scope, but I don't really see a problem in keeping the touch controls.

johnnygossdev commented 4 years ago

The project runs fine on 3.2 Beta1.

I think a simple defeat/win overlay would be nice but I'll just refactor what's there without adding anything to tick off the aim. We can always assess after that.

aaronfranke commented 4 years ago

Will this be merged back into godot-demo-projects after 3.2 is released? Also note that there have been minor changes to the version on godot-demo-projects since, including ultra-wide support, so there will be some conflicts (it would probably be easiest to resolve all in favor of this version and then check that the demo project still works correctly with all its features).

johnnygossdev commented 4 years ago

Thanks for the heads up!

I think we'd like it to be but I'm not sure on the status. @NathanLovato might have more information

NathanLovato commented 4 years ago

@aaronfranke Yes, we made this as a contribution and proof of concept for a proposal to improve the quality of the official demos.

This demo is a +/- complete remake of the platformer. Johnny entirely rewrote the code to make it teach good practices, made a new level... It would replace the original code, leading to no conflicts. We can replicate new features added to the official demo, no problem.

We talked about improving and remaking official demos at GodotCon with Rémi and Juan, who approved our idea and plan. We had to get the GDScript styleguide improvements first, and now we're missing a clear design goal for the demos that everyone could follow, and that we could use to improve the overall quality of the repo.

This PR is an example of what we intend to contribute, in terms of code quality and educational value. We should probably move it to its own repo for now, so people can see and test it, and open a PR and discussion for the Godot demos repo. Sounds good to you, @johnnygossdev ?

johnnygossdev commented 4 years ago

Sounds good to me!