My First Pong Game in Rust Bevy Game Development

First Week with Rust Bevy Game Development

After spending my first week exploring Rust and the Bevy game engine, I wanted to share my experiences, challenges, and learnings from this journey. And oh boy! It was quite the adventure in game development!

The Learning Curve of Rust Bevy Game Development

Getting started with Rust and Bevy proved to be a lot tougher than I expected. While Rust itself has great resources, the documentation on Bevy and its related libraries, such as Rapier (for physics), is severely lacking. Most of the knowledge and inner workings you need to get from examples on the Bevy website, which takes a lot of time to digest.

Game-Changing Resources

Luckily, during my first week of Rust Bevy game development, I found two absolute lifesavers:

  1. The Unofficial Bevy Cheat Book: This gem gives a lot more details and best practices on how to use Bevy and doing things in an easier way. Trust me, you’ll want to bookmark this one!
  2. Claude.ai: Having an AI assistant that understands Rust, Bevy, and Rapier gave me great suggestions on how to solve certain issues and make my code more Rusty. It’s like having a patient mentor available 24/7!

My First Project: Pong

As my first venture into Rust Bevy game development, I created a basic Pong version. It keeps track of scoring and you can play against the computer. I don’t have any menus or even end game state created yet. That’s something to tackle in the coming weeks.

Current Challenge: Input Delay

One issue I ran into, and still haven’t solved, is that there seems to be an input delay with Bevy. So in an update system you listen for key presses, but the movement of objects seem to always come a few frames later. I haven’t been able to solve this problem through Google, documentation, or the use of Claude. So if you read this and you know the answer, please let me know!

What’s Next?

For the coming week of my Bevy development journey, I’ll be working on some extra features in the Pong game:

  1. Create game state such as a menu and game over screen
  2. Add some randomisation to the ball when it spawns
  3. Add difficulty levels to the computer player
  4. Add a maximum speed that the ball can reach

Share and Collaborate

For anyone that is interested in seeing how a beginner approaches Rust Bevy game development, I’ve shared the source code on Github. Feel free to take a look!

Home » First Week with Rust Bevy Game Development

Comments

One response to “First Week with Rust Bevy Game Development”

  1. […] your Bevy game suffer from input delay? You’re not alone. Last week, I encountered frustrating input delays in my Pong! game implementation, but after thorough troubleshooting and help from Bevy contributor […]

Leave a Reply

Your email address will not be published. Required fields are marked *