Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Build Your First Game With bloop

If you just want to get started and go wild, you can just build the Minimal Sample. However, if you learn better with structured guidance, this guide will take you from an empty project to a finished game comparable in scope to Bungeon in the Oven which was also made using Bloop.

There will be repeated information here as well in the minimal sample and reference. In this guide, we'll make sure you understand why things work the way they do and leave you with a great understanding of how to structure a game using an Entity Component System (ECS) framework. This does not serve as a tool for teaching Rust on its own and some familiarity will be assumed, but using Bloop successfully does not require advanced Rust skills.

Getting Started

Follow the Quick Start guide to get your project set up. For organization's sake, let's break out FFI into a separate Rust file in the src directory, call it ffi.rs:

srcffi.rs
use super::*;

include!(env!("ECS_GENERATED_PATH"));

Then we can clean up lib.rs to be a little nicer:

srclib.rs
use engine::prelude::*;
mod ffi;

#[system_once]
fn hello() {
log::info!("hello!");
}

Once you've done that, let's have a brief chat about systems and introduce our first major ECS concept.