Singleplayer game inspired by agar.io written in Rust

Overview

Cells

Cells is a singleplayer game inspired by agar.io written in Rust.
Every cell/entity can have a mix of differents capabilities.

It's been optimized so that 1 million+ entities can be in game at the same time, but full FPS is not guaranteed with this amount of entities!

img img2

Demo.mp4

Status

It's a demo/experiment.
It is no more actively developed.
Some hacky code here and there!

How to run

git clone https://github.com/psincf/Cells
cd Cells
cargo run --release

Features

  • In-game Editor
  • Multiples examples maps

Controls

Ingame

  • Mouse: moving
  • Space: split
  • W: throw cell
  • R: revive
  • Right CTRL: Enter/Leave Debug Mode

Debug Mode

  • R: Revive/reset mass of local cells to minimum
  • E: Local cells can merge
  • Right click: Teleport
  • Z: Augment Mass
  • Up: add 1 computing thread
  • Down: remove 1 computing thread
  • +: add cells speed
  • -: remove cells speed
  • *: Multiply cells speed by 2
  • /: Divide cells speed by 2

Engine detail

  • Multithreaded. Amount of threads can be changed in real time.
  • Struct Of Arrays optimization
  • Cells can have multiple different properties/capabilities
  • Custom threadpool crate
  • Custom multithreaded physics engine
  • Custom reflection crate written with procedural macro ( #[derive(Reflect)] )
  • Custom automatic inspection crate for reflected struct with both Imgui and Egui ( inside reflect crate).
    Used for Editor mode.
  • Custom profiling crate (benchmark). Real time profiling data can be seen in Debug mode
  • Separate threads for Graphics and Update -> Synchronization through a quintuple buffer
    The quintuple buffer allow the retrieval of the last 2 game updates on each frame. A timer mesuring the elapsed time between 2 game updates is constantly updating. Thanks to this, interpolation can be done and the game can be at full FPS even if the Update thread is lagging.
  • Custom Slab implementation
  • WASM scripting (a bit hacky and limited)
You might also like...
My first attempt at game programming. This is a simple target shooting game built in macroquad.

sergio My first attempt at game programming. This is a simple target shooting game built in macroquad. Rules Hit a target to increase score by 1 Score

A game made in one week for the Bevy engine's first game jam

¿Quien es el MechaBurro? An entry for the first Bevy game jam following the theme of "Unfair Advantage." It was made in one week using the wonderful B

A Client/Server game networking plugin using QUIC, for the Bevy game engine.
A Client/Server game networking plugin using QUIC, for the Bevy game engine.

Bevy Quinnet A Client/Server game networking plugin using QUIC, for the Bevy game engine. Bevy Quinnet QUIC as a game networking protocol Features Roa

Managed game servers, matchmaking, and DDoS mitigation that lets you focus on building your game
Managed game servers, matchmaking, and DDoS mitigation that lets you focus on building your game

Managed game servers, matchmaking, and DDoS mitigation that lets you focus on building your game. Home - Docs - Twitter - Discord 👾 Features Everythi

Examples inspired by 'Nature of Code' in Bevy 3D and Rust
Examples inspired by 'Nature of Code' in Bevy 3D and Rust

rust-bevy and the Nature of Code The book The Nature of Code from Daniel Shiffman is a wonderful book about programming. https://natureofcode.com/book

Rust-lang Continuous Wavelet Transform(CWT) library inspired by fCWT.

fastcwt Rust-lang Continuous Wavelet Transform(CWT) library inspired by fCWT. This crate is a direct translation of fCWT Library written in C++ by Art

An online judge sandbox server in Rust, inspired by go-judge, for SAST OJ.

RsJudge An online judge sandbox server in Rust, inspired by go-judge, for SAST OJ. Table of Contents Features Build from source Prerequisites Build Fe

a prototype crate for creating modular and performant 3D CPU particle systems, inspired by Unity's Shuriken Particle System.

bevy_prototype_particles This is a prototype crate for creating modular and performant 3D CPU particle systems, inspired by Unity's Shuriken Particle

Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita
Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita

Sandbox Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita. It's also a precursor for an ongoing game project. Sandb

Owner
null
Dwarf Fortress inspired frontend to Veloren, the multiplayer RPG voxel game written in Rust

velobracket ('veloren' + 'bracket-lib') velobracket is Dwarf Fortress inspired frontend to Veloren, the multiplayer RPG voxel game written in Rust. Us

Rodion Martynov 13 Dec 25, 2022
Solana Game Server is a decentralized game server running on Solana, designed for game developers

Solana Game Server* is the first decentralized Game Server (aka web3 game server) designed for game devs. (Think web3 SDK for game developers as a ser

Tardigrade Life Sciences, Inc 16 Dec 1, 2022
A game of snake written in Rust using the Bevy game engine, targeting WebGL2

Snake using the Bevy Game Engine Prerequisites cargo install cargo-make Build and serve WASM version Set your local ip address in Makefile.toml (loca

Michael Dorst 0 Dec 26, 2021
Victorem - easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust.

Victorem Easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust. Example Cargo.toml [dependencies] vict

Victor Winbringer 27 Jan 7, 2023
2-player game made with Rust and "ggez" engine, based on "Conway's Game of Life"

fight-for-your-life A 2-player game based on the "Conway's Game of Life", made with Rust and the game engine "ggez". Create shapes on the grid that wi

Petros 3 Oct 25, 2021
A tetris game I wrote in rust using ncurses. I'm sure that there's a better way to write a tetris game, and the code may be sus, but it techinically works

rustetris A tetris game I wrote in rust using ncurses. I'm sure that there's a better way to write a tetris game, and the code may be sus, but it tech

Eric G 3 Oct 15, 2022
Wasm game of life - A Rust and WebAssembly tutorial implementing the Game of Life

wasm_game_of_life Conway's Game of Life in Rust and WebAssembly Contributing | Chat Built with ?? ?? by The Rust and WebAssembly Working Group About T

Rust and WebAssembly 236 Dec 24, 2022
Conway's Game of Life implemented for Game Boy Advance in Rust

game-of-life An implementation of a Conway's Game of Life environment on GBA. The ultimate game should have two modes: Edit and Run mode which can be

Shane Snover 1 Feb 16, 2022
2d Endless Runner Game made with Bevy Game Engine

Cute-runner A 2d Endless Runner Game made with Bevy Game Engine. Table of contents Project Infos Usage Screenshots Disclaimer Project Infos Date: Sept

JoaoMarinho 2 Jul 15, 2022
A game for the game jam "1-Button Jam 2021"

One click ninja A game for the game jam "1-Button Jam 2021" written in Rust with the Bevy engine. A rhythm game, where you play a soldier that can def

Alex Helfet 7 Apr 12, 2022