Chapter 1: Base game
Welcome to Rust Sokoban!
What is Rust Sokoban?
Rust Sokoban is an extended tutorial on making a Sokoban copy in Rust. We'll use an existing 2D game engine, pre-made assets and by the end we'll have a fully working game.
Who made this book?
This book was written by @oliviff with the help of awesome contributors: Blaine, Ivan, cobans, Hector, Matt, Guilhermo and Christian.
I started learning Rust in March 2019 and I've been making a game in Rust since. I've learnt a lot in the process about Rust, about making games, written a few blog posts and learnt a lot about the Rust gamedev ecosystem. This book is me writing it all up and hopefully helping more people get involved in Rust gamedev.
Do I need to know Rust to follow?
No, you don't need to know Rust! This book should be a good hands-on intro to making games in Rust, it will explain some of the syntax and basic Rust concepts, and it's meant to give you enough info that you can go read up more on your own about each topic and concept. I recommend you take everything in this book step by step and if there is anything you'd like to understand better there will usually be a link around to a resource that explains it in more detail. This book is not meant to be an in depth walkthrough of all of Rust's features, just a gentle introduction to the language doing a fun little task.
You'll see links like this which will point you to resources where you can learn more about the concepts introduced, either Rust or gamedev related.
MORE: Read more here.
You will also see links like this which will point to the full code in that chapter. Sometimes not all code will be included in the section, so check these out for details like imports, code order, etc.
CODELINK: You can see the full code in this example here.
If you find yourself in need of help or just want to ask a question, here are some good places:
- The Rust programming language book
- Rust learning by example
- Rust in motion course
One of the best things about Rust are the people behind it. There is an amazing community out there so please feel encouraged to reach out to any of us.
Now that we got the intro out of the way, let's get started making our first game in Rust (well, technically it will be my second, but hopefully your first).
Made with 🦀 and 🧡 by @oliviff