gunslinger
buddy_alloc
Our great sponsors
gunslinger | buddy_alloc | |
---|---|---|
10 | 7 | |
1,153 | 117 | |
- | - | |
7.5 | 7.3 | |
7 days ago | 23 days ago | |
C | C | |
BSD 3-clause "New" or "Revised" License | BSD Zero Clause License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gunslinger
-
game development with c
Here's a framework that's cool: https://github.com/MrFrenik/gunslinger/. We have a great Discord community, too. Even if you don't end up using it, there are plenty of people who are willing to offer guidance regardless :). Invite link is on the author's YouTube channel: https://www.youtube.com/watch?v=-_HxKDNuCqA
- Do you have any C game frameworks, or should I just learn C++?
-
Magnum: Lightweight, modular C++11 graphics middleware for games/visualization
Check out gunslinger, a pure C99 game framework, with a very clean design.
The development has been making huge strides and they have a fairly active discord channel:
https://github.com/MrFrenik/gunslinger
-
Looking for a game engine programmable in C
Make your own. If you really want to make a game in C, this may be the best option. Depending on how complex the game is that you want to make, this could be an enormous task, or not too big of a deal, in some cases it could even be easier than learning a game engine. You can use frameworks like Gunslinger to make it easier, as well. If you need guidance, the Gunslinger community is friendly and accepting of beginners :).
-
Generic data type in c
That being said, you may have your requirements satisfied with tagged unions which consists in implementing a struct with an anonymous union and label (like an enum) to keep track of what data is inside the union, this works really well when you know beforehand which data types you want to support. Another technique could be using macros, like the containers on the gunslinger framework, however I have never implemented something like this. Lastly you can always use void pointers, however you may need to be more clever to achieve it (I almost never use them).
-
What is your own favorite C project?
Some of my favorites are: sokol/pacman.c, Gunslinger, and gb
-
Recreating Noita's Sand Simulation in C and OpenGL | Game Engineering
And here is Github of his game engine of this guy: Gunslinger Game Engine
-
Bash and Powershell remote scripts to install header-only C and C++ libraries from github repo.
To install non exotic library from a github repo, specify just the repo-owner/repo-name or the absolute github link to the repo. E.g. to install gunslinger and stb from master branch
-
A Header Only OpenGL Framework Written In C
Looking quickly at this lib, functions of the API are not static: https://github.com/MrFrenik/gunslinger/blob/d5ebcce0647e97badc9337749d7cd9f5810eecfa/gs.h#L1415, so it might lead to ODR violation.
buddy_alloc
-
buddy memory allocator - project update (2 years)
If you need a sub-allocator with predictable performance feel free to give it a try. The code is here and it is licensed under the 0BSD license, making it as lax and as close to public domain as possible. Comments, issues and PRs are always welcomed and appreciated. Thanks!
-
Open-source MISRA-compliant projects
I maintain a project that's not technically MISRA compliant (due to being a memory allocator and MISRA disallowing the very idea) and I keep it at 100% test coverage with support for multiple compilers and operating systems. Over time I had a few users reporting back - since it's working for them I count that as success. Is it wildly popular ? Of course not, but it doesn't have to be.
-
One year ago I wrote a buddy memory allocator - project update
You are right about the tests - they are written with 64-bit in mind. I ought to rework them to switch sizes based on arch but that will take a weekend. I've filed https://github.com/spaskalev/buddy_alloc/issues/19 to track this.
-
is there some good tutorial about how malloc or mcheck works?
I also maintain a application-based malloc (that doesn't do obtaining and releasing memory through the OS, just managing sub-diving a larger memory block into smaller requests) at https://github.com/spaskalev/buddy_alloc - feel free to ping me with any questions about it.
-
I'm giving out microgrants to open source projects for the third year in a row! Brag about your projects here so I can see them, big or small!
I'm the author of https://github.com/spaskalev/buddy_alloc - a custom memory allocator for C (modern C11, works with C++ as well) designed for predictable and repeatable performance. It is suitable for use in embedded, games and any other system with soft or hard real-time demands. It has 100% line and branch test coverage and uses a fixed amount of space on the call stack when called. Recently the project had its first external contribution as well. Cheers!
-
What is your own favorite C project?
I made a memory allocator that turned out rather neat - https://github.com/spaskalev/buddy_alloc
What are some alternatives?
sokol - minimal cross-platform standalone C headers
rpmalloc - Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C
raylib - A simple and easy-to-use library to enjoy videogames programming
VulkanMemoryAllocator - Easy to integrate Vulkan memory allocation library
microui - A tiny immediate-mode UI library
isoalloc - A general purpose memory allocator that implements an isolation security strategy to mitigate memory safety issues while maintaining good performance
stb - stb single-file public domain libraries for C/C++
rotate - [WIP] static typed programming language that compiles to vm bytecode
nanovg - Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
gb - gb single-file public domain libraries for C & C++
pns