Skip to content

A WIP framework built on top of SDL3. More to come later.

License

Notifications You must be signed in to change notification settings

Chukobyte/seika

Repository files navigation

Seika

windows-msvc-build Actions Status windows-mingw-build Actions Status ubuntu-gcc-build Actions Status macosx-clang-build Actions Status

A framework for windows, macOS, and linux that can be used to make games.

Tech Stack

Current Features

  • 2D Sprite Renderer
  • Font Renderer
  • Customizable shaders (with custom langauge)
  • Audio
  • Networking (udp only for now)
  • pthread wrapper and thread pool
  • ECS
  • Multiple data structures such as hashmap and array list (vector)

How to include in a project

Seika uses cmake to build. To include in your project, add the following to your CMakeLists.txt:

# Include old_seika framework as a dependency
include(FetchContent)

FetchContent_Declare(
        seika
        GIT_REPOSITORY https://github.com/Chukobyte/seika.git
        GIT_TAG v0.2.0
)

FetchContent_MakeAvailable(seika)

Make sure to link seika to the target with target_link_libraries.

target_link_libraries(${PROJECT_NAME} seika)

Example

A simple example of creating a window and querying for inputs.

#include <stdio.h>

#include <seika/seika.h>
#include <seika/input/input.h>

int main(int argv, char** args) {
    ska_window_initialize((SkaWindowProperties){
        .title = "Simple Window",
        .windowWidth = 800,
        .windowHeight = 600,
        .resolutionWidth = 800,
        .resolutionHeight = 600,
        .maintainAspectRatio = true,
    });
    ska_input_initialize();

    while (true) {
        // TODO: Need to update this
        ska_update();

        if (ska_input_is_key_just_pressed(SkaInputKey_KEYBOARD_ESCAPE, 0)) {
            break;
        }
        if (ska_input_is_key_just_pressed(SkaInputKey_KEYBOARD_SPACE, 0)) {
            printf("space just pressed\n");
        }
        if (ska_input_is_key_pressed(SkaInputKey_KEYBOARD_SPACE, 0)) {
            printf("space pressed\n");
        }
        if (ska_input_is_key_just_released(SkaInputKey_KEYBOARD_SPACE, 0)) {
            printf("space just released\n");
        }

        static SkaColor windowBackgroundColor = (SkaColor){ 0.2f, 0.2f, 0.2f, 1.0f };
        ska_window_render(&windowBackgroundColor);
    }

    ska_window_finalize();
    ska_input_finalize();

    return 0;
}

Example projects found here.

About

A WIP framework built on top of SDL3. More to come later.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published