Comments (2)
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.
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)
- Unused and too big readme.gif file
- `ggez` related code seems outdated HOT 4
- Better README
- Procedural Macros are missing in book HOT 1
- Component traits missing from chapter 3 HOT 1
- Translations HOT 6
- use `sort_by_key` to improve readabilty HOT 1
- Chapter 2 Section 5 Missing code HOT 1
- Box can move in situation where it shouldn't move HOT 2
- Should be impl RenderingSystem<'_> { instead of pub struct RenderingSystem<'a> {
- Performance Issues due to Debug Mode HOT 2
- Remove unused imports
- Use compact imports
- [Translation] zh_CN HOT 4
- [Translation] ru_RU HOT 1
- [Translation] es_MX HOT 6
- InputSystem doesn't use input in correct order HOT 8
- Further performace improvements for rendering (image caching) HOT 1
- Not working with GNOME 3.38 + Wayland 1.19 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-sokoban.