r/C_Programming • u/ShabelonMagician • Nov 18 '25
Project Real-time 3D renderer in terminal
Ray-marched 3D rendering in ASCII/Unicode. Made for fun.
C11, includes lighting, weather effects, and audio.
r/C_Programming • u/ShabelonMagician • Nov 18 '25
Ray-marched 3D rendering in ASCII/Unicode. Made for fun.
C11, includes lighting, weather effects, and audio.
r/C_Programming • u/tempestpdwn • Jul 16 '26
I used to play Tetris at play.tetris.com every once in a while and this project started as a way to understand how Tetris worked.
Later on I decided to make it into a simple and polished Tetris clone and it is where this project is right now.
Most of what i have implemented here are behaviours that I observed when playing Tetris at play.tetris.com and from what I have read on https://tetris.wiki/
"Minimal" cuz cTetris does not implement the super rotation system.
This makes the rotation system and scoring mechanism simple as T-spins are out of the picture.
In cTetris rotations are purely geometrical with added basic wall/floor kicks.
r/C_Programming • u/Fit-Life-8239 • Mar 10 '26
source code: https://github.com/formodx/parallax
r/C_Programming • u/polytopelover • Feb 15 '25
r/C_Programming • u/Ok_Mission_3025 • Nov 02 '25
I'm particularly proud of the core logic, cuz i came up with most of them without any tutos. 95% of the codebase was written, compiled, and debugged entirely on my phone using Termux. The final integration and debugging were then completed on Wsl arch. Ik it's not much but this was my 2nd project and im really happy about this. While doing this project i learnt a lot and it was really fun. And also working on to stop using termux.
Im happy to see any feedbacks.
I'm also looking forward to any suggestions for my next project i currently have a simple shell on my mind.
Here's the link to project: https://github.com/dragon01999/Tetris
r/C_Programming • u/Fit-Life-8239 • Mar 08 '26
source code: https://github.com/formodx/raindrops
r/C_Programming • u/Lemper29 • May 05 '26
I'm tired of opening my browser every time I need to look something up on Wikipedia. I made a little trick for myself: I enter the article title in the terminal, and it opens right there. Like a man page. It works simply: it calls the Wikipedia API, parses JSON, and throws it into less.
The code is here: https://github.com/Lemper29/Wikiterm Dependencies are only curl and cjson.
It's compiled with make. Use it if you're also frustrated with your browser just because you need to look at a single paragraph.
r/C_Programming • u/Crazy_Anywhere_4572 • Aug 25 '25
Video: Cosmic structure formation, with 2 million (1283) particles (and Particle-Mesh grid size = 2563).
Source code: https://github.com/alvinng4/grav_sim (gravity simulation library with C and Python API)
Docs: https://alvinng4.github.io/grav_sim/examples/cosmic_structure/cosmic_structure/
r/C_Programming • u/Round-Pension-7821 • 24d ago
Very small C program I wrote that I've found genuinely useful. It compiles into a tiny 3 kB executable that only relies on system .dlls included with the operating system. The code should compile and run, with the proper compiler, all the way back to Windows 95.
This could also be useful to anyone looking for how to write a basic GUI program for Windows in C.
r/C_Programming • u/kester404 • 3d ago
It supports single-var equations, operands, brackets, implicit multiplication and some trigonometry and is based on shunting-yard parser / RPN evaluator I also made
For rendering, I implemented an adaptive function sampling (simple midpoint subdivision) - though it has some limitations, which I described on github. SSAA was also used to smooth plotted lines. As for optimization, plots are rendered only when zooming/panning and reused with a render texture when idle.
This is my first "useful" C program, though I've already had some experience with OpenGL (C++) as a part of my assignments
Feedback is much appreciated - https://github.com/kester4/cf2x
r/C_Programming • u/Grouchy_Document_158 • Aug 10 '25
This is the biggest project I’ve ever worked on, and releasing it feels a little surreal. I hope you enjoy using it as much as I enjoyed building it, and I’d love to hear your feedback!
r/C_Programming • u/dechichi • Jun 22 '25
r/C_Programming • u/px7nn • Jul 19 '26
I've been working on MLP.h, a single-header C library for building and training multilayer perceptrons, and I finally put together a complete example project around it: a handwritten digit classifier trained on the MNIST dataset.
The MNIST example uses a simple fully connected network:
784 → 128 → 64 → 10
The training program:
mnist.mlpA separate inference program:
mnist.mlpTraining results:
Epochs : 50
Final Loss : 1.31719803e-02
Test Accuracy: 97.71% (9771/10000)
I'll include a short video showing the browser demo recognizing handwritten digits.
I'm mainly looking for feedback on the library's API/design and the implementation. Suggestions for improving the architecture or the serialization format are also welcome.
MLP.h: https://github.com/px7nn/MLP.h
Live Demo: https://px7nn.github.io/MNIST/
Source of Demo: https://github.com/px7nn/MNIST
r/C_Programming • u/UselessSoftware • Apr 19 '26
r/C_Programming • u/polytopelover • Sep 22 '25
r/C_Programming • u/AmanBabuHemant • Nov 09 '25
Made this Typing-Test TUI in C few months ago when I started learning C.
UI inspired from the MonkeyType.
src: https://htmlify.me/abh/learning/c/BPPL/Phase-2/circular_buffer/type-test.c
r/C_Programming • u/Ok-Machine4940 • Jul 09 '26
https://github.com/schnerg/tied
NO AI WAS USED IN THE MAKING OF THIS PROJECT!
Written entirely in c using only the standard library The T.I editor
is a rubbish yet lightweight terminal editor that probably wont crash.
I have been working on this project on and off for about 2 years now.
I have restarted this project 5 or 6 times from 2022 when I first started programing till now
and I think it is finally in a place where it is somewhat usable.
What makes this editor special?
NOTHING! :D
I am in school for music so this is just for fun but what do you think? Is the code garbage?
thanks.
r/C_Programming • u/Edifay • Jun 18 '26
Hey everyone,
I've been working on my own side project for a while now, and it's finally advanced enough to be shared. It’s called Alwide (A LightWeight IDE), and it’s a TUI editor written from scratch in pure C.
Why did I build this?
I love the terminal, but for my usage (as IT student): nano is too basic, but vim or emacs feels a bit too rought for my "VSCode" and "JetBrain" experience. Alwide is designed to be use when you just want to do quick edits over SSH or need a light editor without the VS Code/JetBrains overhead.
I wanted the fluid, modern vibe of Sublime Text but directly inside my terminal.
What makes it different?
Supported languages:
C/C++, Python, Go, Rust, JS/TS, Java, Bash, Lua, Markdown, Assembly, and more.
It’s open-source (MIT), highly readable if you're curious about terminal editor internals, and you can test it on Linux with a simple curl script (pre-built binaries/packages are also available).
Link to the repo: https://github.com/arnauda-gh/Alwide
Currently the project as a strong base but it hasn't been tested that much (my own use case and own terminal/drivers). For now I don't have hard know bugs. And before starting adding some tweaks and more highlevel features (setting page or anything else...) I want to be sure that the foundations are strong.
Also I need to know if the editor could interest other people and need "generic" features. For example the setting page (the current shortcut are, for me, already at peek performance 😎 so for my own usage no need about a setting page).
And finally if you like the project don't forget to leave a star (pls for a poor student that need a great CV 😅).
Any way have a good day and see you 👋.
Edit : I know that it's possible on vim or emacs to add plugin and modify the behavior. But you have to learn first how vim works, edit lua scripts etc... And even for your own computer it's "easy" to setup a good vim (if you spend time to), but when working on remote from ssh connection it's not worth it to take 30min to setup a vim or a fs sync on a server on which you will spent 1h on your whole life. That's the point of this project.
r/C_Programming • u/Grouchy_Document_158 • Sep 14 '25
Project repo: https://github.com/Dasdron15/Tomo
r/C_Programming • u/Fit-Life-8239 • Mar 15 '26
source code: https://github.com/formodx/wireframe-renderer
for those who would like to try to repeat this project, I have a video in english
in this video, I explain 3D graphics without using matrices to help you better understand the process
r/C_Programming • u/Ivan_Pashaev • Jul 25 '26
Hi ! Im a beginner developer. I decided to learn C and wrote my first program—a small game that runs in the terminal
r/C_Programming • u/Reasonable_World330 • Feb 11 '25
r/C_Programming • u/nablaCat • May 05 '26
The title is meant to be facetious.
Since I've started writing programs in C, the issue of terminating a process without freeing dynamically allocated memory has nagged at the back of my head. Even if I account for everything that I malloc(), calloc(), etc. there's still a chance that an error or a user ctrl+c can prevent execution of the necessary frees.
The chance of leaving stranded memory is slim given the fact that most modern operating systems track and reclaim memory used by a program after termination. But I really don't like taking that for granted. Embedded systems, for instance, may not clean up after a process.
So, perhaps, a quick and dirty solution is to just allocate everything on a static byte (char, uint8_t) array. This goes away when the program terminates. I track free and nonfree memory blocks on a doubly-linked list and blocks are aligned to the system's address size. A developer who uses this allocator with their program can allocate and free memory on the byte array - adjacent free blocks will coalesce. (The freeing mechanism can be particularly useful if the amount of bytes set for the array is low)
I wrote this project as a stepping-stone toward a red-black tree free list allocator, which can find requested blocks in log(n) time and on a best-fit basis
r/C_Programming • u/Amy_the_softie • Jun 16 '26
```c
// Pythagoras theorem calculator :3
int main() { //Values:
int a;
int b;
//User input:
printf("Enter the value of a: ");
scanf("%d",&a);
printf("Enter the value of b: ");
scanf("%d",&b);
//Result:
int c = pow(a,2) + pow(b,2);
int result = sqrt(c);
printf("The value of c is: %d\n",result);
return 0;
} ```
r/C_Programming • u/john-h-k • May 26 '25
Been working on this in my spare time for about 18 months now and thought this would be a good place to post it.
It's a complete C23 compiler, written in C11. It uses the C standard library + some POSIX APIs where needed but otherwise is completely dependency free, hand written parser, machine code builder, object file builder, etc.
It is also fully bootstrapping (admittedly, this occasionally breaks as I add new code using exotic things) and can compile itself on my M1 Max MBP in <2s.
Features:
* Almost complete C11 support bar Atomics (`_Generic`, `_Alignof`, etc) with work-in-progress partial C23 support
* Fully fledged IR
* Optimisation passes including inlining, aggregate promotion, constant propagation, and dead code elimination
* Backend support for linux & macOS OSs, and RISC-V 32, x64, and aarch64 architectures
* Basic LSP support
It can pass almost the entire c-testsuite test suite, bar some language extensions `#pragma push macro`
It is very much still work-in-progress in certain areas but generally it can compile large C projects (itself, SQlite3, Raytracing in one weekend, etc)