Closed guilhermehto closed 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.
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
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.
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.
Here's how it's currently looking:
The player is a
KinematicBody2D
and boxes areRigidBodies
. The platform is anArea2D
. It emits signals whenpressed
andunpressed
.There's one bug in the game as of now:
The player can push boxes through walls because he's a
KinematicBody2D
. I'm pretty sure it's possible to fix this usingRaycasts
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.