How I'm making my game in C++

  Рет қаралды 3,262

The Simplest Game

The Simplest Game

Күн бұрын

I'm making my indie game in C++ and use mostly the win32 api and OpenGL. I will show you my project and build setup and walk you line by line through the Start.cpp file to give you an overview of the project.
00:00 Intro
00:40 Build Setup
03:01 Includes
05:03 Main Function

Пікірлер: 29
@qwerty86381
@qwerty86381 4 ай бұрын
Cool :D nice to have readable code
@diegoaredes2721
@diegoaredes2721 4 ай бұрын
Amazing video😮.
@albertojesusalvaradogarza1009
@albertojesusalvaradogarza1009 4 ай бұрын
imagine this, but in 3D, thats my final proyect for oop, i had a 2D version but using assembly, good job
@alexdev404
@alexdev404 4 ай бұрын
Damn and I think that creating a rental system in QT/SQL is hard 😭
@albertojesusalvaradogarza1009
@albertojesusalvaradogarza1009 4 ай бұрын
@@alexdev404 dont worry, im not even a good programer, a lot was already made in the proyect, but i have to create the player, objects, etc
@alexdev404
@alexdev404 3 ай бұрын
@@albertojesusalvaradogarza1009 gosh well- i hope everything goes well! And thanks, I'll try my best, too!!
@ryanlockhart5328
@ryanlockhart5328 3 ай бұрын
weird flex bro
@Wyoming307
@Wyoming307 4 ай бұрын
you can use the DirectWrite windows api to render text if you want to get rid of freetype
@kplays_6000
@kplays_6000 3 ай бұрын
Looks great! Personally, when not using VS Solutions etc., I prefer VS Code - it's a lot more lightweight!
@courterart
@courterart 3 ай бұрын
wow, this cpp app couldn’t be further than what I’ve been taught project setup wise. Is there a reason you don’t just use Visual studio to compile your project? As a single platform cpp developer myself, I’m very interested in following the development of this project to see how smoothly it goes. I’m all for making the process streamlined and simple for development, you’ve made some interesting choices here. If it works it works, I always say. Good luck on the project and thanks for sharing.
@brettrogers4208
@brettrogers4208 3 ай бұрын
My game design teacher said to never use unity builds but to only include header files. Odd, i guess its just coders choice
@Aragubas
@Aragubas 3 ай бұрын
great now add support for Vulkan, Linux and Wayland 👀
@agaveboy
@agaveboy 3 ай бұрын
owww why not sdl ;( opengl is pain
@m4rt_
@m4rt_ 4 ай бұрын
Btw, you don't need to release/free the allocated memory when you are already going to exit. The OS will handle this, and this will just make it slower to close/exit the game.
@paradox8425
@paradox8425 4 ай бұрын
That's a bad practice tho
@theunsignedtarik
@theunsignedtarik 4 ай бұрын
diing the same in rust
@ojima510
@ojima510 4 ай бұрын
You really shouldn't include .cpp files ever. You want to split your code across different source files and only include header files across them. Including all your source files into one means your compiler needs to recompile all your code every time you change anything, instead of only having to recompile the files you edited since the last compilation. It can also make for more readable and structured code if you create clean headers.
@victorgallet3174
@victorgallet3174 4 ай бұрын
You are totally missleading... Actually it's called unity build, and the idea is that there is only one compilation unit, the whole program, and you recompile it every time. Just measure the performance, for small/mediums projects, it's quite often faster to recompile the whole project rather than compiling each object files individually and link them together. And you get extra benefit of quick and easy compiler optimizations because it knows the whole structure of your program, and can do a great job at inlining some parts of the code. And nowadays with compilers like zig cc (which is llvm under the wood with a cache system), even in unity build compiler can easily cache files which don't changed to blob and use that in place when generating object file.
@potato8236
@potato8236 4 ай бұрын
Honestly, with modern pcs, compilers and build systems I really don't see much of an advantage, especially considering that you can only compile unity builds only single threaded. using ninja on 24 threads is so fast in compiling and linking that I don't think incremental small changes will win in a unity build. Maybe still in a clean build if each translation unit is really small... @@victorgallet3174
@victorgallet3174
@victorgallet3174 4 ай бұрын
​@@potato8236 Just use compiler with caching capabilities, like zig cc, and you'll see you will never need anything other than unity builds. If you actually need to recompile and change lots of code for debug purposes, actually what you need is hot reload (probably compiling to dll and (re)load the module at runtime when file is modified), or jit compiler features (like tcc offers for c). And incremental build was not the solution of the problem in the first place.
@ojima510
@ojima510 4 ай бұрын
​@@victorgallet3174 Oh, I did not realize that this was nowadays actually common practice (sorry, I had no intentions of being "misleading", I was just going of my 10-y/o GCC experience when compiler optimizations weren't that advanced I guess). Guess it's a stylistic choice then, but whenever I see things like this I often feel like I'm looking at a one-person project that will end up stalling within a month due to unreadable spaghetti code (but maybe I'm wrong).
@Rupour
@Rupour 4 ай бұрын
​@@ojima510 It seems like he's definitely been working on this for longer than a month. And looking at the structure of the includes, it seems nicely encapsulated. I suppose we'll see as time goes on, but it looks like a nicely structured codebase so far. I agree it looks like a one-person project, but apparently there are a lot of old c libraries that use unity builds, so maybe not.
@RoboGameOfficial
@RoboGameOfficial 4 ай бұрын
0:50 why not just use VS Code then?
@coolmanthecool603
@coolmanthecool603 3 ай бұрын
He already explained, he doesn't want to use cmake, vscode does't manage projects, its just a file explorer terminal and text editor, it cannot compile code, letalone manage it
@someever2
@someever2 3 ай бұрын
​@@coolmanthecool603​ ?? that's not what he meant. he doesn't use visual studio to compile his code, he uses it for text editing. the compilation is done in a batch file, which is why vscode might actually be a better option, it's more lightweight than visual studio. it also has everything that he needs: a text editor, a file explorer and a terminal.
@The_Simplest_Game
@The_Simplest_Game 3 ай бұрын
I use the visual studio debugger and memory inspector from time to time. Forgot to mention that.
So I Made My Own Game Engine...
10:19
Chadderbox
Рет қаралды 85 М.
СНЕЖКИ ЛЕТОМ?? #shorts
00:30
Паша Осадчий
Рет қаралды 7 МЛН
3 wheeler new bike fitting
00:19
Ruhul Shorts
Рет қаралды 46 МЛН
Climbing to 18M Subscribers 🎉
00:32
Matt Larose
Рет қаралды 34 МЛН
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 425 М.
I made the same game in Assembly, C and C++
4:20
Nathan Baggs
Рет қаралды 656 М.
Why is Raylib becoming so popular?
9:24
Chris_PHP
Рет қаралды 18 М.
The Linux Experience
31:00
Bog
Рет қаралды 262 М.
I Made a Graphics Engine
6:42
Zyger
Рет қаралды 242 М.
Learning SDL2 in 48 Hours - GMTK Game Jam 2020
9:19
PolyMars
Рет қаралды 3,1 МЛН
How I Structure Entities In My Own C++ Game Engine
5:13
FuniGameDev
Рет қаралды 10 М.
Jonathan Blow on why C++ is a bad language for games
13:45
Jonathan Blow Highlights
Рет қаралды 29 М.
I Made a Graphics Engine (again)
8:27
Zyger
Рет қаралды 159 М.
Minecraft Clone in C++ // Code Review
40:29
The Cherno
Рет қаралды 323 М.
😨 Это реально Самый Высокий миф в Майнкрафт
37:29
skibidi toilet - season 24 (all episodes)
25:14
DaFuq!?Boom!
Рет қаралды 20 МЛН
FUN&SUN | Update 0.29.0 Trailer | Standoff 2
2:32
Standoff 2
Рет қаралды 1,4 МЛН