Can You Write C++ Without Libraries?
Автор: Salar
Загружено: 2026-07-14
Просмотров: 3483
Описание:
What if you deleted every #include from your C++ program?
In this video, I rebuild the classic Snake game in C++ without using any library. No iostream, no std::string, no std::vector—just raw Linux system calls and inline assembly.
Along the way we implement our own interface to the operating system, configure the terminal manually, handle keyboard input, render directly to the console, generate pseudo-random numbers, and build the entire game completely from scratch.
Starter Code (constants & Linux syscall definitions):
https://pastebin.com/sZBZS7ge
Final Code:
https://pastebin.com/LykFnV9t
Topics covered:
Linux system calls (read, write, ioctl, nanosleep)
Inline assembly (asm volatile)
Terminal programming with termios
ANSI escape sequences
Manual string handling
Keyboard input
Terminal rendering
Game loop architecture
Building C++ without the Standard Library
If you enjoy low-level C++, operating systems, compilers, and systems programming, consider subscribing for more videos like this.
Chapters:
00:00 Introduction
00:19 Explaining the Constants
03:05 Building Our Own Linux API
09:08 Printing Without std::cout
13:00 Configuring the Terminal
18:10 Programming the Snake
20:49 Generating Random Numbers
23:10 Implementing the Snake
32:05 Collision Detection
35:46 Keyboard Input
40:17 Sleeping with nanosleep
42:35 Rendering the Game
49:12 Final Result
GitHub: https://github.com/SalarAlo
Discord Server: / discord
Dotfiles: https://github.com/SalarAlo/dotfiles
Neovim Configuration: https://github.com/SalarAlo/neovim_co...
On this channel I build software from scratch and document the process:
• C++ projects
• Game engine development
• Text editor development
• Programming language/interpreter implementations
• Neovim/Linux workflow
• Systems programming and computer science topics
Most videos focus on understanding how things work internally rather than just using libraries or frameworks.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: