Yeah, there are plenty of open-source C++ games that run on Linux and can help you learn game development. Here are a few solid ones:
- Godot Engine (with C++ modules) – While Godot mainly uses GDScript, you can extend it with C++ for performance-critical parts. Check out its source code here.
- SuperTux – A classic side-scrolling platformer similar to Super Mario. Its codebase is relatively easy to understand for beginners. Repo: https://github.com/SuperTux/supertux.
- Battle for Wesnoth – A turn-based strategy game with a well-structured C++ codebasFor physics engines and networking in C++, these open-source games and engines will be really useful:
- Box2D – Not a game, but a powerful 2D physics engine used in many games. Studying its code will teach you how physics simulations work. Repo: https://github.com/erincatto/box2d.
- Bullet Physics – A widely used physics engine for 3D games, including real-time simulations. Repo: https://github.com/bulletphysics/bullet3.
- Godot Engine (C++ modules) – While primarily using GDScript, Godot allows custom physics and networking via C++. Repo: https://github.com/godotengine/godot.
- Torque 3D – A full-featured game engine with built-in physics (Bullet) and networking. Repo: https://github.com/TorqueGameEngines/Torque3D.
- OpenTTD – A transport simulation game with multiplayer networking. The networking code is well-structured and useful for learning. Repo: https://github.com/OpenTTD/OpenTTD.
- Teeworlds – A 2D multiplayer shooter with networking and physics interactions. It has a clean and efficient network implementation. Repo: https://github.com/teeworlds/teeworlds.
- For pure networking, you might also want to look into ENet (https://github.com/lsalzman/enet), which is a simple and lightweight networking library used in many multiplayer games.e, useful for learning AI, networking, and game mechanics. Repo: https://github.com/wesnoth/wesnoth.
- 0 A.D. – A real-time strategy game with a highly professional C++ codebase. If you’re interested in complex game development, this is a great resource. Repo: https://github.com/0ad/0ad.
- OpenRA – A modernized engine for old Command & Conquer games. It’s great for learning about game engines and networking. Repo: https://github.com/OpenRA/OpenRA.