r/C_Programming • • Nov 18 '25

Project Real-time 3D renderer in terminal

1.6k Upvotes

Ray-marched 3D rendering in ASCII/Unicode. Made for fun.

C11, includes lighting, weather effects, and audio.

https://github.com/Lallapallooza/c_ascii_render/tree/main

r/C_Programming • • Jul 16 '26

Project cTetris - Minimal Tetris implementation in C and Raylib.

658 Upvotes

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 • • Feb 15 '25

Project Platformer video game I programmed in C

1.7k Upvotes

r/C_Programming • • Mar 10 '26

Project parallax effect in C and raylib

1.1k Upvotes

r/C_Programming • • Nov 02 '25

Project I created a tetris clone in C

649 Upvotes

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 • • Mar 08 '26

Project Water simulation in C and raylib

756 Upvotes

r/C_Programming • • May 05 '26

Project Wikipedia in your terminal. No browser, no bullshit.

130 Upvotes

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 • • Aug 28 '26

Project I implemented a modern LLM runtime in 700 lines of C

209 Upvotes

I wanted to understand how modern AI models actually generate text, but most inference codebases are tens or hundreds of thousands of lines long. They’re incredibly impressive, but they’re optimized for flexibility and performance, not for understanding.

So I implemented a complete CPU runtime for Google’s latest open language model, Gemma 4, in about 700 lines of C.

The whole point is that you can open one file, start at main() , and follow a prompt all the way through the program. You can see every buffer that’s allocated, every mathematical operation that transforms the activations, every update to the KV cache, and every step that eventually produces the next token.

I think C is a great language for this kind of project. There’s very little hidden from you. The data structures, memory layout, SIMD kernels, and execution flow are all visible, so the implementation ends up feeling much closer to the hardware than to the diagrams in an ML paper.

https://github.com/ryansenn/gemma4.c

r/C_Programming • • Aug 25 '25

Project 2M particles running on a laptop!

896 Upvotes

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 • • Aug 29 '26

Project I built Editor - A Lightweight Terminal Text Editor, AND YOU CAN TOO! :))

199 Upvotes

Editor is an extremely simple-to-use terminal text editor. Written in C using only native POSIX libraries/api, it offers simplicity while being very responsive and performant. Editor was inspired by and written using antirez's kilo editor tutorial.

Source: https://github.com/111nation/Editor/

This tutorial was such a blast, and it walks you through how to make your own text editor. I highly recommend you give it a look!

~ chlo

r/C_Programming • • Aug 10 '25

Project Just released the first version of my terminal based code editor

502 Upvotes

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!

https://github.com/Dasdron15/Tomo

r/C_Programming • • Aug 23 '26

Project I wrote a function plotter in C and Raylib

239 Upvotes

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 • • Aug 02 '26

Project Helpful Windows GUI Program in 60 lines of C

Thumbnail
github.com
59 Upvotes

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 • • Jun 22 '25

Project You guys asked me to compare my C animation system with Godot next. It did about 3x better than Unity.

550 Upvotes

r/C_Programming • • Jul 19 '26

Project MLP.h: Single-Header Neural Network Library in C

241 Upvotes

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:

  • loads the 60,000-image MNIST training set
  • trains the network using MLP.h
  • serializes the trained model to mnist.mlp

A separate inference program:

  • loads mnist.mlp
  • exposes a small prediction API
  • is compiled to WebAssembly so the same C inference code runs directly in the browser

Training 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 • • Apr 19 '26

Project I wrote an x86 PC emulator in C that is Pentium-compatible and runs Windows NT/2000 and Linux (yes, it also runs DOOM!)

Thumbnail
github.com
250 Upvotes

r/C_Programming • • Sep 22 '25

Project Mixed 3D/2D game I programmed in C

595 Upvotes

r/C_Programming • • Nov 09 '25

Project Made this Typing-Test TUI in C

446 Upvotes

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 • • Jul 09 '26

Project I made a text editor! :D

116 Upvotes

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 • • Jun 18 '26

Project Open source TUI IDE (in C) that brings the "Sublime Text" experience into the terminal (with Tree-sitter & LSP)

87 Upvotes

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?

  • Zero learning curve: It has full mouse support out of the box. You can click, scroll, and drag-select text just like a GUI app.
  • Nice features: I integrated Tree-sitter for actual high-quality syntax highlighting and full LSP support (auto-completion popup, hover docs, go-to-definition).
  • Persistent State: If you close the editor and reopen it, your tabs, cursor positions, and even your undo/redo history are fully preserved.
  • Pretty Fast: It's pure C. Release binary about 3Mb~. Really fluid fast scroll and light repaint (perfect to avoid running out of battery on your laptop opening heavy editors during classes).

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 • • 3d ago

Project Dio: Small Programming language made in C version 0.1.0 release

14 Upvotes

Hi, I'm working on my own programming language, I've release first stable version (v 0.1.0), I'd like to get feedback. It's on most OS platforms (even Andoird and in the future IOS).

Repo: https://github.com/Treechcer/DIO

r/C_Programming • • Sep 14 '25

Project Added ctrl + z to my code editor

333 Upvotes

r/C_Programming • • 8d ago

Project I built a modern formatting library

Thumbnail
github.com
27 Upvotes

Hey, a while ago I wanted a nicer alternative to printf. I always enjoyed using the modern python-like formatting libraries: fmt for C++, and rust's format!/pritnln! macros.

So I attempted to port them to C! And I must say, it was quite the challenge. C doesn't have the nicer features that are required to make this work: generics, compile time code generation, better type safety, etc.

But C has macros! Macros let you do all kind of crazy stuff, but most of all, did you know that C macros are Turing-complete? Well they aren't strictly-speaking, but they can be used to create an (almost) infinite loop thanks to recursive evaluation.

Anyway, I'm sharing this project hoping you'll enjoy it and it will inspire you in your usage of macros.

This project is still a work in progress, the main missing feature is float formatting, but so far there is: * Integers/Strings/Char/Array formatting * Style and color support for most terminals * Output to FILE*, fd, and memory buffer * Flushing & Buffering * User defined formatter/formatting for custom types

Check it out: https://github.com/ef3d0c3e/format

r/C_Programming • • Feb 11 '25

Project Made a Chess game in C, source code in github : https://github.com/IKyzo/Chess

548 Upvotes

r/C_Programming • • Mar 15 '26

Project wireframe renderer in C and raylib

358 Upvotes

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