Skip to content

Repository files navigation

Tridingine-3DSlib

Tridingine-3DSlib is a lightweight cross-platform game development library focused on PC and Nintendo 3DS.

Its goal is simple: write your game once and compile it for both platforms using the same API and project structure.

🚧 Status: Early Alpha

The 2D API, core systems and audio system are currently usable. 3D rendering and sprite atlases are still under active development. APIs may change in future versions.


🎮 Orbit

Orbit is a small game created with Tridingine-3DSlib and included as an example.

You control a circle while enemies spawn around the edges of the screen and chase you. Collect orbs to increase your score and remove the enemies. If an enemy reaches you, the game ends.

The example demonstrates several parts of the library working together, including:

  • 2D rendering
  • Input
  • Delta time
  • Random generation
  • Text rendering
  • Colors
  • Game state
  • Score and high score
  • Collision/gameplay logic

Orbit gameplay


✨ Features

2D Rendering

The 2D API currently supports:

  • Points
  • Lines
  • Rectangles
  • Triangles
  • Circles
  • Ellipses
  • Rotation
  • Depth
  • Alignment
  • Text rendering
  • Fonts

Input

A platform-independent input system allows the same game code to work across platforms.

Currently supported:

  • Nintendo 3DS buttons
  • Circle Pad
  • C-Stick
  • D-Pad
  • Touch screen
  • PC mouse
  • Virtual button mapping
  • Input Actions
  • AND, OR and XOR action logic

Audio

The audio API provides a common interface across supported platforms.

Currently supported:

  • Sound effects
  • Music
  • Voices
  • Ambience
  • Master volume
  • Per-category volume
  • Playback control
  • Pause and resume
  • Audio channels
  • Repeated playback

Audio resources are managed through the S3D_* API.

Resources

The library provides systems for working with:

  • Textures
  • Fonts
  • Audio
  • Localization
  • Save data
  • Random numbers
  • Time
  • Colors
  • Vectors and other mathematical utilities

3D Rendering

A 3D rendering API is currently being developed.

Current experimental functionality includes:

  • 3D camera
  • Camera movement
  • Camera direction utilities
  • Models
  • Cuboids
  • Spheres
  • Materials

⚠️ The D3D API is highly experimental and should not yet be considered stable.


🖥️ Platforms

Platform Status
Windows 🚧 Experimental
Linux 🟢 Supported
macOS 🚧 In development
Nintendo 3DS 🟢 Supported
2D rendering 🟢 Usable
3D rendering 🚧 Experimental
Audio 🟢 Usable
Sprite atlases 🚧 In development

The engine is designed to keep the game code as consistent as possible between PC and Nintendo 3DS.


🚀 Getting Started

Requirements

For Nintendo 3DS development:

For PC development:

  • CMake
  • A compatible C/C++ compiler

See the complete installation instructions:

01 - Installation


Creating a project

Tridingine-3DSlib includes ProjectMaker, a tool that generates a ready-to-build project from the development kit.

After building the library:

ProjectMaker -o MyGame

This creates a project containing the required CMake configuration, templates and build scripts.


Minimal example

A basic game follows this structure:

#include <Tridingine.h>

int app_main()
{
    S2S_ScreensInit();

    while (S2S_ScreensRunning())
    {
        S2S_BeginFrame();

        // Game logic
        // Rendering

        S2S_EndFrame();
    }

    S2S_ScreensExit();

    return 0;
}

The same project can then be built for the supported platforms.

For a complete introduction, see:

02 - Getting Started


📚 Documentation

The documentation is divided into several sections:

🚧 Some documentation is still being written.


🛠️ Development Status

Tridingine-3DSlib is currently under active development.

The main focus is improving the core systems and expanding the engine while keeping the API simple and consistent.

Current priorities

  • 2D rendering
  • Text rendering
  • Input abstraction
  • Input Actions
  • Fonts
  • Save system
  • Localization
  • Random utilities
  • Math/vector utilities
  • PC support
  • Nintendo 3DS support
  • Audio system
  • Sound effects
  • Music
  • Voices
  • Ambience
  • Example game
  • Sprite atlas system
  • Expand 3D renderer
  • Expand documentation

🎯 Philosophy

Tridingine-3DSlib is designed around a few simple ideas:

  • Write the game once.
  • Use the same API across platforms.
  • Keep the API simple.
  • Make Nintendo 3DS development accessible without sacrificing PC development.
  • Keep the game's behavior and appearance consistent across platforms whenever possible.

The engine is not intended to hide every platform difference. Instead, it provides a common foundation while still allowing platform-specific functionality where necessary.


🤝 Contributing

The project is currently in an early development stage.

Contributions, bug reports and suggestions are welcome, especially around:

  • Nintendo 3DS compatibility
  • PC compatibility
  • Documentation
  • Rendering
  • Audio
  • Examples
  • Testing

Please keep in mind that the API may change significantly before the first stable release.


📄 License

Tridingine-3DSlib is distributed under the Apache License 2.0.

See LICENSE for the complete license text.

About

Cross-platform game development library for PC and Nintendo 3DS. Write your game once, build it for both platforms.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages