All Projects → 17cupsofcoffee → Tetra

17cupsofcoffee / Tetra

Licence: mit
🎮 A simple 2D game framework written in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Tetra

Terasology
Terasology - open source voxel world
Stars: ✭ 3,247 (+559.96%)
Mutual labels:  game-development, game-engine, gamedev
Rizz
Small C game development framework
Stars: ✭ 428 (-13.01%)
Mutual labels:  game-development, game-engine, gamedev
Mxengine
C++ open source 3D game engine
Stars: ✭ 284 (-42.28%)
Mutual labels:  game-development, game-engine, gamedev
Glas
WebGL in WebAssembly with AssemblyScript
Stars: ✭ 278 (-43.5%)
Mutual labels:  game-development, game-engine, gamedev
Glide
Game engine for making 2d games on iOS, macOS and tvOS, with practical examples and tutorials
Stars: ✭ 353 (-28.25%)
Mutual labels:  game-development, game-engine, gamedev
Stride
Stride Game Engine (formerly Xenko)
Stars: ✭ 3,524 (+616.26%)
Mutual labels:  game-development, game-engine, gamedev
Game
⚔️ An online JavaScript 2D Medieval RPG.
Stars: ✭ 388 (-21.14%)
Mutual labels:  game-development, game-engine, gamedev
Panda3d
Powerful, mature open-source cross-platform game engine for Python and C++, developed by Disney and CMU
Stars: ✭ 3,035 (+516.87%)
Mutual labels:  game-development, game-engine, gamedev
Obengine
2D Game Engine with Lua Scripting made on top of SFML !
Stars: ✭ 335 (-31.91%)
Mutual labels:  game-development, game-engine, gamedev
Games
🎮 A list of popular/awesome video games, add-ons, maps, etc. hosted on GitHub. Any genre. Any platform. Any engine.
Stars: ✭ 18,676 (+3695.93%)
Mutual labels:  game-development, game-engine, gamedev
Cpp 3d Game Tutorial Series
C++ 3D Game Tutorial Series is a YouTube tutorial series, whose purpose is to help all those who want to take their first steps in the game development from scratch.
Stars: ✭ 400 (-18.7%)
Mutual labels:  game-development, game-engine, gamedev
Unity2d Components
A constantly evolving array of Unity C# components for 2D games, including classes for pixel art cameras, events & messaging, saving & loading game data, collision handlers, object pools, and more.
Stars: ✭ 375 (-23.78%)
Mutual labels:  game-development, game-engine, gamedev
Noahgameframe
A fast, scalable, distributed game server engine/framework for C++, include the actor library, network library, can be used as a real time multiplayer game engine ( MMO RPG/MOBA ), which support C#/Lua script/ Unity3d, Cocos2dx and plan to support Unreal.
Stars: ✭ 3,258 (+562.2%)
Mutual labels:  game-development, game-engine, gamedev
Defaultecs
Entity Component System framework aiming for syntax and usage simplicity with maximum performance for game development.
Stars: ✭ 286 (-41.87%)
Mutual labels:  game-development, game-engine, gamedev
Gdevelop
🎮 GDevelop is an open-source, cross-platform game engine designed to be used by everyone.
Stars: ✭ 3,221 (+554.67%)
Mutual labels:  game-development, game-engine, gamedev
Godex
Godex is a Godot Engine ECS library.
Stars: ✭ 307 (-37.6%)
Mutual labels:  game-development, game-engine, gamedev
Entitas Cpp
Entitas++ is a fast Entity Component System (ECS) C++11 port of Entitas C#
Stars: ✭ 229 (-53.46%)
Mutual labels:  game-development, game-engine, gamedev
Luascript
Lua language support for Godot Engine
Stars: ✭ 240 (-51.22%)
Mutual labels:  game-development, game-engine, gamedev
Melonjs
a fresh & lightweight javascript game engine
Stars: ✭ 3,721 (+656.3%)
Mutual labels:  game-development, game-engine, gamedev
Ncine
A cross-platform 2D game engine
Stars: ✭ 372 (-24.39%)
Mutual labels:  game-development, game-engine, gamedev

Tetra

Build Status Crates.io Documentation License

Tetra is a simple 2D game framework written in Rust. It uses SDL2 for event handling and OpenGL 3.2+ for rendering.

Features

  • XNA/MonoGame-inspired API
  • Efficient 2D rendering, with draw call batching by default
  • Easy input handling, via polling or events, with support for gamepads
  • Deterministic game loop by default, à la Fix Your Timestep
  • Common building blocks built-in, such as:
    • Font rendering
    • Cameras
    • Screen scaling

Installation

To add Tetra to your project, add the following line to your Cargo.toml file:

tetra = "0.6"

You will also need to install the SDL2 native libraries - full details are provided in the documentation.

Examples

To get a simple window displayed on screen, the following code can be used:

use tetra::graphics::{self, Color};
use tetra::{Context, ContextBuilder, State};

struct GameState;

impl State for GameState {
    fn draw(&mut self, ctx: &mut Context) -> tetra::Result {
        // Cornflower blue, as is tradition
        graphics::clear(ctx, Color::rgb(0.392, 0.584, 0.929));
        Ok(())
    }
}

fn main() -> tetra::Result {
    ContextBuilder::new("Hello, world!", 1280, 720)
        .build()?
        .run(|_| Ok(GameState))
}

You can see this example in action by running cargo run --example hello_world.

The full list of examples is available here.

Support/Feedback

Tetra is fairly early in development, so you might run into bugs/flaky docs/general weirdness. Please feel free to open an issue/PR if you find something! You can also contact me via Twitter or the Rust Game Development Discord.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].