CitroFlex3DS is a lightweight game engine designed specifically for Nintendo 3DS homebrew development. It provides a simple framework for creating games and applications.
Features
- Scene Management: Scene based architecture
- Input Handling: Class handling 3DS inputs (buttons, touch, circle pad)
- Object System: Object based game entities
- Rendering: Built-in support for both screens
- Debug Tools: File logging system
- Misc: Random number generator and color presets
Getting Started
Prerequisites
- DevkitPro with 3DS toolchain
- libctru
- citro2d/citro3d
Installation
- Clone the repository:
git clone https://github.com/ADAMOUMOU/CitroFlex3DS.git
- Build the project:
Basic Usage
Here's a simple example of creating a scene with a movable object:
protected:
auto stick = input->GetCirclePadPosition();
}
};
private:
Player player;
public:
MainScene() : Scene("MainScene") {
}
};
int main() {
SceneManager manager;
sceneManager.AddScene(new MainScene());
manager.Run();
return 0;
}
CitroFlex engine main header.
@ TOP
Top screen.
Definition Scene.hpp:26
void AddY(double add_y)
Add to the Y position.
Definition Objects.cpp:36
void AddX(double add_x)
Add to the X position.
Definition Objects.cpp:24
Input::InputManager * GetInputManager() const
Getter for the InputManager.
Definition Objects.hpp:122
Rectangle shape object.
Definition Objects.hpp:128
void OnUpdate(Scene::Scene *scene) override
Custom update logic (can be override to add custom logic before Drawing)
Definition main.cpp:14
Base class for managing game scenes Handles objects, updates, etc...
Definition Scene.hpp:33
void AddElement(Objects::Object *element)
Add new element to scene.
Definition Scene.cpp:23
This code creates a scene with a player object that can be moved around using the circle pad.
Documentation
Full documentation is available HERE.
Key Components
- Scene System: Manages game scenes and object lifecycle
- Input Manager: Handles all input devices on the 3DS
- Object System: Base class for all game objects
- Debug Logger: File-based logging system for debugging
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Roadmap
- Lua/Python scripting support
- Collision detection system