DEV Community

Cover image for Making a Game Engine using rust lang. (Rust Game Engine Dev #0)
UJWAL KC
UJWAL KC

Posted on

Making a Game Engine using rust lang. (Rust Game Engine Dev #0)

So, I have major project coming up and i am developing game engine. You may think why game engine my answer is why not. It will make a good protfilo as well. And the reason i am choosing rust programming language for this project is that it has different syntax than typical programming language, it also has new concepts like borrowing ownership .... , and rust language is getting hyped.

Another reason for using rust is it considered memory safe since i am making game engine for major project and i have less time so you don't have do memory management manually which saves time.

I was thinking of using winit for window management and wgpu for rendering but i changed my mind and will use SDL2 for window management and OpenGL for rendering the reason for not using winit and wgpu is because i found their documentation sparse and hard to understand and i think it is not well documented as OpenGL and SDL2 and there are a lot of learning resources and tutorial for OpenGL and SDL2 which saves me a lot of time in research and since i have less time this is the safe and best choice for me and my major project.

First you need to know rust programming language. You don't need to be professional at rust you just need enough knowledge in rust. You should have comprehensive knowledge on rust's Ownership, Borrowing, Lifetimes, Data Structure, Enums, Error Handling, Modules, Crates, Traits, Generics, Closures and Iterators. In programming you will "Learn as you" go so you don't need to have huge background knowledge on rust. You learn build skills along the way. According to me that is the proper way of learning programming and This is my first proper project that i am documenting and giving my full focus. I have some background in programming it is not that good. So this will be a little bit more challenging for me.

I am using Ubuntu as my OS. FYI.

And i will be documenting all the process as well and i will include learning resources that i used for developing this engine. So wish me good luck for this project. And if you have any recommendation for me you can tell me about it.

It will take time for each post to publish since i am building the engine it is not built yet so don't worry if you don't see the further post for weeks. And i will create a post after i have completed a part of the project. I have divided the project in parts for each week so i don't feel overwhelm. Next will post will arrive in about a week after i achieve set milestone.

Learning Resources For rust that i used

  1. The rust book :

  2. Youtube Playlist :

  3. Rustling Exercise :

    GitHub logo rust-lang / rustlings

    πŸ¦€ Small exercises to get you used to reading and writing Rust code!

    Rustlings πŸ¦€β€οΈ

    Greetings and welcome to Rustlings This project contains small exercises to get you used to reading and writing Rust code This includes reading and responding to compiler messages!

    It is recommended to do the Rustlings exercises in parallel to reading the official Rust book, the most comprehensive resource for learning Rust πŸ“šοΈ

    Rust By Example is another recommended resource that you might find helpful. It contains code examples and exercises similar to Rustlings, but online.

    Getting Started

    Installing Rust

    Before installing Rustlings, you need to have the latest version of Rust installed. Visit www.rust-lang.org/tools/install for further instructions on installing Rust. This will also install Cargo, Rust's package/project manager.

    🐧 If you are on Linux, make sure you have installed gcc (for a linker).

    Deb: sudo apt install gcc

    Dnf: sudo dnf install gcc

    🍎 If you are on MacOS, make sure you have installed Xcode and…

These are the resources i used for learning rust and see you in next post after you learn rust. In next post we will discuss how to set up the project.

Hot sauce if you're wrong - web dev trivia for staff engineers

Hot sauce if you're wrong Β· web dev trivia for staff engineers (Chris vs Jeremy, Leet Heat S1.E4)

  • Shipping Fast: Test your knowledge of deployment strategies and techniques
  • Authentication: Prove you know your OAuth from your JWT
  • CSS: Demonstrate your styling expertise under pressure
  • Acronyms: Decode the alphabet soup of web development
  • Accessibility: Show your commitment to building for everyone

Contestants must answer rapid-fire questions across the full stack of modern web development. Get it right, earn points. Get it wrong? The spice level goes up!

Watch Video 🌢️πŸ”₯

Top comments (0)

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❀️