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

Puzzle game added #17

Closed guilhermehto closed 5 years ago

guilhermehto commented 5 years ago

Here's how it's currently looking:

image

The player is a KinematicBody2D and boxes are RigidBodies. The platform is an Area2D. It emits signals when pressed and unpressed.

There's one bug in the game as of now: image

The player can push boxes through walls because he's a KinematicBody2D. I'm pretty sure it's possible to fix this using Raycasts though this game is aimed at beginners so I'd like to know your opinion on this one @NathanLovato :)

I also tried with a RigidBody player but controls felt weird.

Other than that, everything is pretty straight forward. As always, suggestions are welcome.

NathanLovato commented 5 years ago

Beginner or not, you can't ship a game where you can get interactive objects stuck into walls. We don't teach people to make bugged games.

The boxes should be KinematicBody2ds as well or something else if RigidBodies won't work. This way you can use move_and_slide in response to the player walking against the box.

Another option is to have the player push boxes on a grid: when you push against the box it moves 1 cell relative to the tilemap. This way you don't need to rely on the physics engine. You can use area2d to detect the player pushing against the box.

guilhermehto commented 5 years ago

We don't teach people to make bugged games.

I didn't intend to ship a bugged game, that's why the [WIP] tagged was used in the PR. This way we could discuss how to handle the issue to better suit the video.

Another option is to have the player push boxes on a grid

Agreed. I believe we could cover both, what do you think? :) This way we can tackle both of them. I can already see people asking for it in the comments 😅 I didn't start with a grid-based system because on discord you said: "not grid-based".

Anyways, unless you want me to add the grid-based box, it should be good to merge.

@NathanLovato

NathanLovato commented 5 years ago

I didn't intend to ship a bugged game, that's why the [WIP] tagged was used in the PR.

Sorry for the tone, didn't mean to sound harsh. I'm getting really tired lately.

I believe we could cover both, what do you think? :) This way we can tackle both of them.

Sounds good to me if you want to do that 🙂

I didn't start with a grid-based system because on discord you said: "not grid-based".

Forgot about that, sorry! Not grid-based for the character, but the box could have moved on a grid.

guilhermehto commented 5 years ago

Sorry for the tone, didn't mean to sound harsh. I'm getting really tired lately.

No worries :)

Added the grid-based box, should be good to merge.