nowfound

Dev tools · February 19, 2024

Creating a Snake game clone with Rust/Bevy

Code is here: https:&#x2F;&#x2F;github.com&#x2F;bebrws&#x2F;bevy-snake I had a lot of fun practicing Rust and Learning some Bevy concepts with this repository. Bevy has an incredibly powerful dependency injection system and follows a pattern called ECS which makes it very powerful (and new to me). This simple < 300 lines of code might help with learning some Bevy concepts. It also shows how to copmile for the web&#x2F;WASM and inject a canvas for the game (or use a pre existing div).

Creating a Snake game clone with Rust/Bevy launched on February 19, 2024 with 44 votes, #925 of 3,962 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 2 years on.

Visit bbarrows.com ↗Alternativestop 23% of February 2024

In plain words

This is a Snake game clone built with Rust and the Bevy game engine, available as open-source code on GitHub. It demonstrates Bevy's entity component system (ECS) architecture and dependency injection capabilities in under 300 lines of code. The project is designed for developers learning Rust and Bevy concepts, and includes examples of compiling to WebAssembly and embedding the game in a web canvas or existing HTML div.

written from the facts on this page · September 2026

From the sources

Brad Barrows' Blog

Bevy has an amazing dependency injection system that makes its "ECS" (Entity Component System) architecture very easy and ituitive to use. Really the DI system is one of the most amazing Rust feats that I have seen so far. ECS is documented here It describes some of the basic concepts of how the Bevy game engine works. Combined with a powerful dependency injection (DI) system, Bevy is powerful, easy to work with, and fun to use. For my snake game I only needed the concept of three entities really: the snake, the food, and the snake's body. This is done by the C part of ECS. I create a Component for each. This allows me to, later on, using the DI/query system executed on each game loop, to…from bbarrows.com

Does a similar job

all alternatives →
  • A minimal working Rust / SDL2 / WASM browser game2024 · github.com · ▲82

    "Game" is a stretch, but I put together this repo containing a pure Rust app which uses SDL2 and compiles to WASM (and can be run in a browser). Older resources were a bit out of date and a bit too verbose for my purposes, so here's a minimal working example.

  • AS
    A simple shoot 'em up game using Rust Bevy2023 · play.marcoinacio.com · ▲11
  • I open sourced a game I just released on Steam, written in Lua2021 · github.com · ▲496

    A replayable arcade shooter where you control a snake of heroes. - a327ex/SNKRX

  • Sandboxing untrusted code using WebAssemblyFeb 2026 · github.com · ▲76

    Hi everyone, I built a runtime to isolate untrusted code using wasm sandboxes. Basically, it protects your host system from problems that untrusted code can cause. We’ve had a great discussion about sandboxing in Python lately that elaborates a bit more on the problem [1]. In TypeScript, wasm integration is even more natural thanks to the close proximity between both ecosystems. The core is built in Rust. On top of that, I use WASI 0.2 via wasmtime and the component model, along with custom SDKs that keep things as idiomatic as possible. For example, in Python we have a simple decorator:…

  • Percy – A Rust and WebAssembly isomorphic virtual DOM implementation2018 · github.com · ▲234

    Build frontend browser apps with Rust + WebAssembly. Supports server side rendering. - chinedufn/percy

  • Interactive ECS Systems/Component Explorer for Cities: Skylines 22023 · captain-of-coit.github.io · ▲95

    Hello Hacker News! Long time reader but first time poster here... Recently I've been diving into doing mods for Cities: Skylines 2, which been very interesting as it's one of the first games that is using ECS and that I also have a deep interest into. I've mainly used ECS via Bevy before, but this time it's Unity, but many things still work the same way. In order to help myself and other modders to navigate the ECS Systems and Components from the decompiled code, I created this interactive D3 graph. You can click on nodes to "navigate" to that system&#x2F;component, and once you're zoomed in…

More dev tools this month

the category →
  • /dev/null▲468

    a social network for devs

    Dev tools · 2d ago · dev-null.sh

  • open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.

    Dev tools · 27d ago · github.com

  • Contribute to reladraw/reladraw development by creating an account on GitHub.

    Dev tools · 25d ago · github.com

  • OpenBot▲362

    Grok Bot alternative: free, local, open-source, multiplayer

    Dev tools · 22d ago · openbot.run

  • Talanoa▲340

    Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…

    Dev tools · 20d ago · talanoa.email

  • CoreSpeed▲332

    One MCP for everything your agents need: apps, memory, tools

    Dev tools · 27d ago · corespeed.io

Source: Show HN post ↗

Launched alongside, February 2024

the whole month →
  • Flipner AI▲1,623

    Capture your ideas & craft texts with AI's touch

    AI · 2024 · flipner.webflow.io

  • Typeframes▲1,315

    Video creation for makers

    Work · 2024 · revid.ai

  • Superlist▲1,252

    The task layer for your AI agents

    Work · 2024 · superlist.com

  • Never run out of marketing ideas ever again

    Growth · 2024 · marketingideas.com

  • Layers▲1,198

    A home for designers

    Work · 2024 · layers.to

  • Heyday▲1,178

    AI copilot for your own research, notes & conversations

    AI · 2024 · heyday.xyz