• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    Zig
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Zig-based framework for creating game tools and helper apps

Upaya

upaya: a means that goes or brings one up to some goal; skillful means

Zig-based framework for creating game tools and helper apps. Consists of the following:

  • Sokol: used for cross-platform window creation and rendering
  • STB Image and Rect: image loading, image saving and rect packing
  • Tiny Filebrowser: cross-platform filebrowsers and dialogs
  • Dear ImGui: needs no introduction
  • Known Folders: staple of many zig codebases. See the GitHub page: known-folders

Upaya provides a set of conveniences to speed up tool building:

  • upaya.fs: one-liners for saving/loading JSON/binary files
  • upaya.mem: C allocator and a temp allocator (just use and never free)
  • upaya.menu: helpers for managing a main menu bar
  • upaya.colors: ImGui color translations and helpers
  • upaya.math: math helpers and a random number generator

Getting Started

First fetch Upaya: git clone --recursive https://github.com/prime31/zig-upaya/

Zig is a fast moving target right now and Upaya uses some of the newer features in the language. You will want to be using a nightly build of Zig rather than an older release. Once you have zig installed, you can use zig build help. The available examples will be listed in the Steps section. zig build run will always build the most recent example.

Your First Upaya App

A full basic Upaya app is below. You can start putting code right in the update method which will be called each frame.

const upaya = @import("upaya");
usingnamespace upaya.imgui;

pub fn main() !void {
    upaya.run(.{
        .init = init,
        .update = update,
    });
}

fn init() void {}

fn update() void {
    _ = igBegin("My First Window", null, ImGuiWindowFlags_None);
    igEnd();
}

Building a Command Line App

Parts of Upaya can be used for command line tools as well. For example you may want to build a command line image manipulator that uses the STB Image and STB Image Write libs included in Upaya. To do that, the Upaya build.zig file has a separate method that you can use to setup the dependencies for you executable: linkCommandLineArtifact. When you call linkCommandLineArtifact it will skip linking Sokol, Dear ImGui and Tiny Filebrowser giving you a stripped down binary. Note that you must manually initialize the temp allocator by calling upaya.mem.initTmpAllocator(); See the "texture_packer_cli" example code.

More Repositories

1

Nez

Nez is a free 2D focused framework that works with MonoGame and FNA
C#
1,799
star
2

CharacterController2D

C#
1,032
star
3

TouchKit

Gestures and input handling made sane for Unity
C#
896
star
4

GoKit

Lightweight tween library for Unity
C#
583
star
5

RecyclerKit

Object pool manager for Unity
C#
363
star
6

TransitionKit

Modular, extensible transitions in scene and between scenes
C#
300
star
7

SpriteLightKit

Blended lighting system for Unity that works with standard Sprites
C#
227
star
8

StateKit

Dead simple, lightweight "states as objects" system
C#
220
star
9

ZestKit

Tween library for Unity. The best of GoKit and GoKitLite combined in an easy to use API
C#
156
star
10

Nez-Samples

Samples and demos of various Nez features
C#
148
star
11

zig-ecs

Zig
144
star
12

P31UnityAddOns

Mostly defunct. Features were added and components broken out in the *Kit repositories.
C#
142
star
13

MessageKit

Decoupled message sending system meant as a replacement for SendMessage and its variants.
C#
122
star
14

zig-gamekit

Companion repo for zig-renderkit for making 2D games
Zig
103
star
15

CameraKit2D

Framework for creating 2D camera systems
C#
95
star
16

zig-renderkit

Zig
54
star
17

zig-flecs

C
51
star
18

GoKitLite

A super duper lightweight tweening library for Unity
C#
51
star
19

SoundKit

C#
45
star
20

Unity-Ripgrep-Search-Tool

C#
42
star
21

P31TaskManager

General purpose task manager that provides a lot more control and power than a standard coroutine
C#
35
star
22

via

V 2D game library
V
29
star
23

UnityCgShaderTutorials

Source code for the Unity Cg Shaders tutorial series on YouTube: http://www.youtube.com/playlist?list=PLb8LPjN5zpx1tauZfNE1cMIIPy15UlJNZ
C#
27
star
24

V-C-Wrapper-Generator

Helper for generating Odin and V wrapper code from C source
C#
19
star
25

Simple-ECS-Sharp

C#
18
star
26

ecs-lua

A simple, hybrid ECS
Lua
17
star
27

zig-miniaudio

Zig
17
star
28

SpriteKit

DEFUNCT: Unity now has 2D tools built in. This is now not maintained.
C#
15
star
29

PaletteKit

Helpful editor classes for importing and displaying color palettes
JavaScript
12
star
30

LearningUnits

C#
10
star
31

Odin-Sublime-Text-Plugin

Python
9
star
32

ImGuiGL-Renderer

C#
9
star
33

zig-vulkan

C++
5
star
34

egui_curve_tool

Rust
4
star
35

zig-aya

Zig
4
star
36

App-Engine-Task-Manager

Python
3
star
37

Odin-Libs

C
3
star
38

v-temp-modules

V
3
star
39

zig-fmod

Zig
2
star
40

Hugo-Helper

macOS app for managing a Hugo website
C#
2
star
41

prime31.github.io

HTML
2
star
42

fips-flecs

fipsified version of the Flecs ECS
CMake
1
star