Giter Club home page Giter Club logo

Comments (2)

danieldeankon avatar danieldeankon commented on June 2, 2024 1

My additions were:

  • Centering the game field
  • Preventing more than one box from being pushed by the player
  • Making animation frame duration more easily configurable for myself

I also partially implemented differently-coloured boxes and spots before actually reading that section of the book.

from rust-sokoban.

iolivia avatar iolivia commented on June 2, 2024

hey @danieldeankon! thanks for the feedback!

Unused imports
I agree the imports are confusing, especially unused imports. They are there because code moved around in the starting stages of the book and code samples ended up split between multiple chapters so some of the imports were kind of left behind. I've created #79.

Compact imports
Yep, I think as a matter of style we should probably use compact imports throughout, created #80.

Explaining imports
I think this is probably the least explained part, but I kind of did this intentionally. I wanted to leave a bit for whoever is following to have to figure out themselves, add/remove imports and try to understand why they are there. I think once we remove unused imports and unify the import style hopefully this one will be better.

I found it a useful exercise to go off the book's track at various places and implement my own additions to the sokoban game

This is great! What did you implement extra? I might add a few ideas throughout the book for people to try out.

I'd like to know more about why games use ECS so often

This is a great question. I kind of glossed over this on purpose since it's a really big topic. I think you certainly don't have to use ECS, it's entirely possible to do a game using inheritance or composition. For rust games specifically, I have found ECS to be easier to work with the borrow checker.

from rust-sokoban.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.