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

Boxy Box Pusher #242

Open
8 tasks done
mistafixxa069 opened this issue Apr 8, 2022 · 22 comments
Open
8 tasks done

Boxy Box Pusher #242

mistafixxa069 opened this issue Apr 8, 2022 · 22 comments
Labels
✨ New example A new example

Comments

@mistafixxa069
Copy link

mistafixxa069 commented Apr 8, 2022

Describe the Example

Boxy Box Pusher, or BBP for short, is a Sokoban example for GDevelop. It includes some simple systems like player movement and box pushing, you however can only move one box at a time and can't push a box with another box.

Checklist

  • I've followed all of the best practices.
  • My game has a proper name in the game properties.
  • My game package name behind with com.example..
  • My game has all events unfolded.
  • I've added myself as the author in the game properties.
  • I've included a file called "README.md" with a description in proper English, explaining what this example is doing.
  • I confirm that this game and all of its resources can be integrated to this GitHub repository, distributed and MIT licensed.
  • I've cleaned unused resources.

Game folder

Sokoban Example.zip

@mistafixxa069 mistafixxa069 added the ✨ New example A new example label Apr 8, 2022
@Midhil457
Copy link
Contributor

Hi, great game!
I didn't see any issues with the example except, that the readme's short description can be the project's description. Though you can keep the rest. And remove the first title

@mistafixxa069
Copy link
Author

mistafixxa069 commented Apr 10, 2022 via email

@D8H
Copy link
Contributor

D8H commented Apr 16, 2022

Thank you for submitting this example. This is a very good start. The events as well organized.

I have some suggestions:

  • The history could be a behavior and use an array variable instead of objects. This will avoid to have events for each objects and make the events easier to read.
  • The collision system could also be made a behavior with actions like "Character can move 'left' according to Box and Wall". It will make the logic as easy as reading English.
  • Custom points can be used to check the collision instead of relying on temporary objects. It's more performant and can be used in extensions.
  • Object names must start with uppercase.

@mistafixxa069
Copy link
Author

mistafixxa069 commented Apr 17, 2022 via email

@mistafixxa069
Copy link
Author

I have updated the example

@D8H
Copy link
Contributor

D8H commented Apr 21, 2022

Good job on simplifying the events.

Some collision checks are done every frame. It doesn't affect performance much because Sokoban maps are not huge, but, as it's an example, it's still important to show optimized events.

Currently, the events do this:

  • Check if there are any obstacle 2 squares from the player
  • Check if there is a box 1 square from the player
  • Check in which direction the player is going

It should be done the other way around because checking the player input is really fast and if players don't move left, there is no need to check if they can push something this way.

  • There are unnecessary pick all conditions.
  • Any reason why tween is no longer used? Did you face some limitations with it?
  • The goal check can probably be done only at the end of a box push or at the end of a player movement.
  • Did you give up the rewind?
  • The camera following extension could be used to avoid the big formula.

GridBasedMovement extension

  • There should not be "?" in condition names and sentences.
  • Condition names (in the sidebar) can start with "Is" when it fit which is the case here
  • Avoid condition with negative phrasing NotMoving should probably be IsStopped.
  • Why is the speed multiplied by 4? What is the unit of length of the speed? It should probably be square per second².

@mistafixxa069
Copy link
Author

mistafixxa069 commented Apr 21, 2022 via email

@Midhil457
Copy link
Contributor

The example can't use multiple file saving option (cuz the system doesn't support)

@mistafixxa069
Copy link
Author

mistafixxa069 commented May 3, 2022 via email

@mistafixxa069
Copy link
Author

mistafixxa069 commented May 3, 2022 via email

@Midhil457
Copy link
Contributor

Oh, my bad. Didn't realise they were tilesets 😅

@Bouh
Copy link
Contributor

Bouh commented May 10, 2022

Sorry but the example doesn't works see in video:

2022-05-10.15-25-30.mp4

@mistafixxa069
Copy link
Author

mistafixxa069 commented May 10, 2022 via email

@Bouh
Copy link
Contributor

Bouh commented May 10, 2022

@mistafixxa069 I can't make it work with the extension. The same problem happens.

I tried to reuse the extension made by @D8H for PixelPerfectTopDownMovement.
We have almost the same result, there is still a few fixes to do I guess?

sokoban.zip

@mistafixxa069
Copy link
Author

mistafixxa069 commented May 10, 2022 via email

@mistafixxa069
Copy link
Author

Fixed it

@Bouh
Copy link
Contributor

Bouh commented May 20, 2022

  • Did you check what I've done in my zip file here?
    I optimized a lot the resources, the objects, the layers, and the zorder, and lot of stuffs.

  • What is for the extension ObjectHistory ?

  • Game description: A simple sokoban example for Gdevelop GDevelop

  • Set a custom package name

  • Add a timer or the new Wait action, when we press a key to move, because if we stay a bit too much on the pressed key the player move to the next case, it's hard to be precise.

  • Moves text on bottom left, delete the related events for the position, instead use the anchor behavior, (use the 5.0.133, the behavior has been improved to be easier to use!)

@mistafixxa069
Copy link
Author

The object history extension was supposed to be my solution to the undo feature the original had. Also, did I not remove the text? Huh, that's an extra object

@D8H
Copy link
Contributor

D8H commented Jun 16, 2022

I've made some changes on top of Bouh version:

  • Fix player movement and animation
  • Reorganize the events in groups
  • Use Tweens to simplify the player animation
  • Make collision checks only once when the player chooses a move for efficiency
  • Use a small dedicated extension for box pushing
  • Remove the camera scrolling because it makes me car sick

https://www.dropbox.com/s/xu9t303bkue61jd/sokoban_REVIEW.zip?dl=1

You said that levels are from Boxxle. This game is probably under copyrights. Levels must be copied with respect of licenses or done from scratch.

@mistafixxa069
Copy link
Author

mistafixxa069 commented Jun 16, 2022 via email

@D8H
Copy link
Contributor

D8H commented Nov 23, 2022

Hello @mistafixxa069
Any news about this example? It would be a very good example even with only 2 or 3 levels. Maybe there are some open-source level packs that could be used.

@mistafixxa069
Copy link
Author

mistafixxa069 commented Nov 24, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ New example A new example
Projects
None yet
Development

No branches or pull requests

4 participants