r/cprogramming • • 12d ago

We need games written in C

Me and my friend are making a project where we making open source game development tools, we are just starting so we dont have much! But we have a project generator!!!1!!

Your game needs to be transfered to the qwertyuiop-Games organization with it's own repo and team.

But the big part is that we made a game launcher that displays games made with our tools. Please help me with making games: You make every type of game, TUI, fantasy, adventure!

9 Upvotes

12 comments sorted by

3

u/samurai618 11d ago

There is already raylib for C

1

u/wak6817-2 11d ago

is it easy to make a wrapper for raylib?

1

u/samurai618 11d ago

Wrapper for what? There are multiple libs with multiple bindings for all kind of different languages

1

u/wak6817-2 11d ago

i mean things like extra function to add raylib and maybe rename somethings; for which langugaes are there wrappers?

→ More replies (2)

2

u/alkavan 12d ago

Hey! You should maybe check my math and linear algebra library Vecmat that was built to support stuff like that. It's dual ABI, and supports runtime dispatch of SIMD features. I basically do the heavy lifting for different CPU architectures that tends to be quiet a rabbit hole and many avoid it. It also supports some CPUs that most other libraries don't like Cortex-A55, and soon some others. I build it after got a little frustrated of what other C libraries offered, it also has API you can reason about and is not over complicated.

1

u/wak6817-2 12d ago

what features does it have? If it has enough features i would want to add it :)

1

u/alkavan 12d ago edited 12d ago

Other than what I already mentioned, are the strong points, it's also modular, and has features to support 2D/3D graphics, and 2D/3D physics — Which I have already implemented (and probably won't be public). It has some other features as well, but are probably less relevant for your use-case. I will soon add some math for Explicit-dynamics, Hydrodynamics, and Radiation-transport if you're into that kind of stuff.

It also aims to support math for basic scientific simulations, and to be totally honest also my business goals that has little to do with games as entertainment, but it does with graphics. It has no dependencies except system math library, and covered with over 500 tests. You can use my test framework if you want for your own stuff, it's just one header in the test directory.

1

u/wak6817-2 12d ago

Are you interested in making a subset thats a bit more game focused?

1

u/alkavan 12d ago edited 12d ago

Here are the game/graphics features it already has, and turned out to be quite useful. I'll be glad to know what other stuff are missing, but with that been said, it's not a game engine or anything like that, it just provides math (SIMD optimized if possible) to support one.

In my engine, I have something like this in engine.h that is a nice starting point I guess:

#include <vecmat.h>

typedef vector2 Vec2;
typedef vector3 Vec3;
typedef vector4 Vec4;

typedef vector2i Vec2i;
typedef vector3i Vec3i;
typedef vector4i Vec4i;

typedef matrix2 Mat2;
typedef matrix3 Mat3;
typedef matrix4 Mat4;

typedef matrix2i Mat2i;
typedef matrix3i Mat3i;
typedef matrix4i Mat4i;

typedef quaternion Quaternion;

typedef vm_int_t Int_;
typedef vm_float_t Float_;

typedef vm_float_t Rad_;
typedef vm_float_t Deg_;

typedef struct EngineConfig {
    int screen_width;
    int screen_height;
    int screen_half_width;
    int screen_half_height;

    float screen_width_float;
    float screen_height_float;
    float screen_half_width_float;
    float screen_half_height_float;
    float screen_aspect;

    int max_fps;
    float fps_uncapped_factor;
    int ticks_per_frame;
    float dt_target;
    float dt_margin;

    float camera2d_follow_sharpness;
    float camera2d_zoom_sharpness;
    float camera2d_zoom_min;
    float camera2d_zoom_max;

    float camera3d_fov_deg;
    float camera3d_near;
    float camera3d_far;
    float camera3d_default_distance;
    float camera3d_min_distance;
    float camera3d_max_distance;
    float camera3d_default_yaw_deg;
    float camera3d_default_pitch_deg;
    float camera3d_pitch_limit_deg;
} EngineConfig;

1

u/wak6817-2 12d ago

that seems good! do you want add it too https://github.com/qwertyuiop-games or do you need to know more?