-
Notifications
You must be signed in to change notification settings - Fork 0
asmtilde/Aphelion
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Aphelion Game Engine ==================== Aphelion is a lightweight, single file 2D game engine written in C with lua scripting support. It's designed to make it easy to create simple 2D games with minimal setup. Features -------- - Lua Scripting: Embed game logic in Lua with access to engine functions. - 2D Graphics: Draw shapes, text, and images, with support for transformations. - Audio: play sounds and music. - Input Handling: Keyboard and mouse input support. - Configuration: Easy configuration via a simple text file. - Resource Management: Automatic loading and unloading of resources. - Math Utilities: Common math functions for game development. Getting Started --------------- Requirements: - C Compiler - RayLib: https://www.raylib.com/ - Lua 5.4+: https://www.lua.org/ Make sure both RayLib and Lua are installed and accessible to your compiler. Building -------- To build the engine, simply compile the `Aphelion.c` file with your C compiler, linking against RayLib and Lua. For example: ```bash gcc -o aphelion Aphelion.c -lraylib -llua -lm ``` You can also use the provided Makefile if available. Making your first game ---------------------- 1. Create a configuration file (config.aphdat): ``` title = My First Game author = Alice Dev width = 1280 height = 720 fps = 60 script = game.lua fullscreen = false vsync = true ``` 2. Write your game script (game.lua): ```lua function game_init() print("Hello from Aphelion!") end function game_update() engine.draw_background(30, 30, 30) engine.draw_text_centered("Welcome to Aphelion!", 640, 360, 32, 255, 255, 255) end ``` 3. Run the engine: ```bash ./aphelion config.aphdat ```
About
The engine behind Orion Public Transit