Skip to content

BoxEngine is an application to build 2D and 3D general applications like games using the scripting language Lua

License

Notifications You must be signed in to change notification settings

RodrigoPAml/BoxEngine

Repository files navigation

BoxEngine

BoxEngine is an engine designed to build both 2D and 3D general applications, such as games, using the Lua scripting language. This engine is ideal for creating applications quickly, thanks to its abstract layers implemented with OpenGL, which facilitate fast prototyping.

Key Features:

  • GameObject Architecture: Construct your scene using a GameObject architecture, where scripts are attached to objects to define their behavior.
  • C++ Core: The engine is built in C++ for performance, with Lua as the scripting language, featuring a Just-In-Time (JIT) compiler.
  • Dual Mode Operation: Projects can be run in two modes:
    • Production Mode: Execute the project by passing the folder as an argument.
    • Editor Mode: Utilize a built-in editor for project development.

1111

Features

Scripting features

Read the scripting api documentation here

  • Input module (keyboard and mouse)
  • Audio module (2d and 3d audios)
  • Font module (with support for any .ttf)
  • Camera module (support for 2d and 3d camera manipulations)
  • Debug/logging module (logging support also in scripting)
  • Texture module (allows to manipulate texture with the GPU)
  • Shader module (allows to create and use shader with the GPU)
  • Vertex module (allows to allocate mesh with the GPU)
  • Framebuffer module (manipulate framebuffer via GPU)
  • Primitives module (allows to draw basic shapes in 2d and 3d, including to draw textures)
  • Scene module (allows to instantiate GO and scripts and manipulate the game scene)
  • Import module (allows to import 3d object files, currently have a basic version)
  • Renderer module (allows to draw 3d models, currently have a basic version)
  • GUI module (to do, basically por ImGui inside framebuffer)
  • Physics module (to do)

Editor features

  • Open and create projects
  • Play and Editor mode which can be detected via script/GO to manipulate the scene
  • Manipulate game scene via Game Tree (create GO, duplicate, delete)
  • Logs tab to help debug the editor and the application
  • Files tab to help manipulate project files (game assets)
  • Info tab to see engine internal information (instance of mesh, textures, fps, frametime)
  • Inspector to allow manipulate a game object, add scripts and modify project settings
  • Integration with VS Code for scripting (recommend using Lua server extension)
  • Script debugging and much more

Script example

Basic script behaviour when attached to game object

function teste.start()
    local this = engine.current()
   
    engine.log('starting')
    engine.log('My GO id is' .. engine.go.current())
    engine.log('My script name is' .. engine.script.current())

    this.var = 'abc'
end

function teste.update()
   engine.log('updating')
end

function teste.destroy()
    engine.log('destroyed')
end

Libraries used

Projects

The projects can be found in the projects/external folder, where you have to do a git submodule init and then a git submodule update

First 2D Game

The first game is called "Air Figther" and game be found in games folder

It's a game about destroying enemies airplane and getting to destroy a final boss

This game was made to validade the engine release and can find it here

344542415-626d74f0-02ab-4131-b86f-79beaca382bc

1

2

Fractal project

One implemented fractal and one retrieved from shader toy (link in shader file)

Repository in here

342025723-f0cdc027-e9da-4c5c-a3c9-d00d14629f50

image

My fractal

image

3D Scene

Open an 3d object an draw it with renderer, this is in the projects/example folder

image

image

image

2D Ray Tracing

The first attemp to implement ray tracing in OpenGL using BoxEngine

Repository in here

341635143-a9ac4be1-9bad-4b85-b388-6e76e238fad3

341636423-16672cc7-eecc-4122-853e-a39805f39d06

image

image

About

BoxEngine is an application to build 2D and 3D general applications like games using the scripting language Lua

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published