Skip to content

FLYT is my version of a 2D fighter jet simulation I made to learn efficiency and clarity in Odin, its basically a A 2D space combat engine built with Odin and Raylib.

Notifications You must be signed in to change notification settings

loveucifer/flyt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

FLYT

A 2D space combat engine built with Odin and Raylib.

Screenshot 2026-01-24 at 02 12 28


Project Overview

FLYT is my version of a 2D fighter jet simulation I made to learn efficiency and clarity in Odin.
This is not my best work but I was sleep deprived when I made this. I just wanted to try out something simple.
If u find some issues please do make them seen.

The player controls a fighter jet navigating through an asteroid field, utilizing trigonometric vector calculation for flight orientation and projectile physics.


Some Stuff

  • Procedural Movement
    Vector-based flight mechanics with normalized diagonal velocity.

  • Oriented Combat
    Projectile spawning based on the jet's current rotational transform.

  • Memory Pooling
    Static allocation for bullets and asteroids to ensure zero-allocation game loops.

  • Wrap-Around Topology
    Asteroids utilize screen-wrapping logic to maintain a persistent play area.

  • Linear Algebra Collisions
    Efficient Euclidean distance checks for combat and damage logic.


Technical Architecture

The project is decoupled into distinct modules so i can later work on it and i dont usually write single file shit since i hate that kinda archs.

Modules

Module Responsibility
Main Orchestrates the game loop (Input, Update, Render) and state transitions
Entities Defines data structures for the Player, Bullets, and Asteroids
Math Handles custom type definitions and linear algebra abstractions
Constants Centralizes configuration, screen dimensions, and performance limits

Technical Specifications

  • Language: Odin (General-purpose, data-oriented, imperative)
  • Graphics: Raylib (OpenGL abstraction)
  • Math Library: core:math/linalg for hardware-accelerated vector operations
  • Memory Management: Explicit stack and package-level allocation; no garbage collection

Build Instructions

Prerequisites

  • Install the Odin Compiler.
  • Ensure Raylib is available (usually included by default in Odin's vendor library).

Compilation

Navigate to the src directory and run:

odin run .

About

FLYT is my version of a 2D fighter jet simulation I made to learn efficiency and clarity in Odin, its basically a A 2D space combat engine built with Odin and Raylib.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages