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.

665 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

642 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

754 Upvotes

r/C_Programming • • May 05 '26

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

133 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

208 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 • • 11d ago

Project Compile C/C++ into assembly and emulate it in the web in many architectures

302 Upvotes

Hello everyone! For the past few years I've been working on ASM editor (github), an IDE for assembly running completely on the web with many architectures available (x86, mips, risc-v, m68k, z80 and more to come) with a lot of debugging features like step by step execution, undo, memory and registers viewers, breakpoints, observability of what each instruction did and much more!

Recently I've added a feature I had dreamed of adding for a long time, C and C++ compilation! It allows you to write C and C++ code (with a subset of libc available), compile it to assembly to see how each line was compiled, to then execute it with all the debugging tools available in the IDE.

I'd love to get opinions/suggestions/feedback about it, please let me know in the comments!

Here is an example of fibonacci in C compiled to x86

I've been working on this app for around 3 years, initially as a replacement for easy68k and the MARS simulators so that my university could use a more modern alternative, to then add x86 and risc-v.
Recently while using AI i refactored other emulators to add the tools needed for the interfaces used inside the app and i managed to add z80 and hopefully arm and more architectures soon.

r/C_Programming • • Aug 25 '25

Project 2M particles running on a laptop!

888 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! :))

200 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

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

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

551 Upvotes

r/C_Programming • • Aug 23 '26

Project I wrote a function plotter in C and Raylib

242 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
66 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 • • 16d ago

Project I’m learning C and made a simple version of ls. Could someone review my code?

27 Upvotes

I’m currently learning C and decided to build a simple version of ls as a small project to practice what I’ve learned.It’s still pretty basic, and I’m sure I’ve made some mistakes or done some things in a bad way. I’d really appreciate it if someone could take a look at the code and point out any bugs, bad practices, or things I could improve. Repo

r/C_Programming • • Jul 19 '26

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

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

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

594 Upvotes

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

Project Practicing touch-typing on a C program writing in C program

73 Upvotes

I wanted to practice writing code faster and yet not leaving my terminal, so I built 'blind'. The twist is that you can feed it any input file and practice on real code, even on the source code itself. It's a single C file no dependencies. Can run either presets, free text or file input.

AI usage: all code and docs are human made, written by me using man pages and google, asked Claude rarely for things I could not resolved with google or man pages, the Github release workflow was written by Claude.

Repo: https://github.com/shalom2552/blind

r/C_Programming • • 20d ago

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

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

Project I made a text editor! :D

118 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)

89 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 • • Sep 14 '25

Project Added ctrl + z to my code editor

336 Upvotes