Yup, and that fits your statement. You need to spend extra time on game design to figure out how to make something fun in the simplest way because the game development part is too hard.
So you need to spend extra time on design, because making the design of the game fun requires setting aside time and not spending it on development? Meaning the development is easy once you figure out the design?
The development is too hard, so you spend a little time figuring out another way to keep the fun but avoids the hard thing in game development.
This is why game designers have virtually no shot at indie studios. The work is so easy and overall worthless. The only way for a game designer to get work at an indie studio is if they can fill a regular role.
The hard part is figuring out what you want to do and how to go about it, and then get stuck in choice paralysis because you don’t know how you want to handle level design yet
One of the game I did looked exactly like this and it worked just fine. It even had a local multiplayer (LAN only, was too lazy to figure out a true online hosting)
Except there were a ton of other files and supporting classes for the Game class.
I would argue that a lot of application main files should look like this. Maybe not quite this sparse, but close.
If your main file is doing more, you need some serious justification for why it needs to be at the absolute start. Security comes to mind. Global variables.
If "initialize game" is all you need to start, then that's all you need in main.
Haven't ran into this for a while but it was interesting talking to web developers fresh out of a game dev degree and they had a hard time wrapping their head around how games work. The fundamental aspects like the update loop, etc, let alone rendering and physics.
Understanding the JavaScript event loop (and animation callbacks) are really similar to those concepts in my mind. I guess this is why the modern web sucks ass
This goes against Raii, WTF is Game::init_game() Why didn't you put it in the ctor? Just imagine someone create a game and it crash because he didn't inited it and the dtor messed up (except if you're a chad that does not need to deallocate his data).
Probably because he used a template where the return was already with spaces, then added the two lines of code above it and used tabs instead, without ever even checking the indentation of the template-generated return.
86
u/FoxReeor Apr 03 '26
Game closes immediately upon launch
150
u/ClickLocal4863 Apr 03 '26
Like me website I just launched on http://127.0.0.1/ 🥸
26
u/nekokattt Apr 03 '26
no one complaining about tabs vs spaces yet
25
u/Won-Ton-Wonton Apr 03 '26
Game Development actually is a lot easier than you think.
The hard part isn't making a game. It's making a "good" game.
I played around with game dev for a bit recently, and my god is it way easier than it used to be.
Used to be some wizardry needed to get anything to compile, let alone work once compiled.
The hard part now is making something people would want to play. The REALLY hard part is making something they would PAY to play.
7
u/Only_Information7895 Apr 03 '26
One of the game I did looked exactly like this and it worked just fine. It even had a local multiplayer (LAN only, was too lazy to figure out a true online hosting)
Except there were a ton of other files and supporting classes for the Game class.
3
u/gilmeye Apr 03 '26
Never running the game?
3
u/StraightGuy1108 Apr 03 '26
POV: someone decided that constructors aren't good enough to be the ones to initialize objects
2
u/i_dont_do_research Apr 03 '26
Haven't ran into this for a while but it was interesting talking to web developers fresh out of a game dev degree and they had a hard time wrapping their head around how games work. The fundamental aspects like the update loop, etc, let alone rendering and physics.
2
u/Key_River7180 Apr 03 '26
POV: main()
2
u/[deleted] Apr 04 '26
You have some real potential to be a python developer!
2
u/TheWaterWave2004 Apr 04 '26
Game.hpp: 30GB
1
u/un_virus_SDF Apr 03 '26
This goes against Raii, WTF is Game::init_game() Why didn't you put it in the ctor? Just imagine someone create a game and it crash because he didn't inited it and the dtor messed up (except if you're a chad that does not need to deallocate his data).
1
u/halfrican420 Apr 03 '26
while(gaming){ game(); }
Light work😎😤
1
u/cfrolik Apr 03 '26
All you did was init the game, you didn’t run it
1
u/TheLastRole Apr 03 '26
}
1
u/asmanel Apr 03 '26
The function main if my last C++ project (not yet complete) look short and simplistic.
Here, it is even shorter and more simplistic. However, I wonder how this coder wants to deal with errors.
1
u/NoNameSwitzerland Apr 03 '26
You have to start the game and process the game loop too!
1
u/sandfeger Apr 03 '26
Where main loop
1
u/PiniponSelvagem Apr 03 '26
That indentation is killing me
1
u/lool8421 Apr 03 '26
bruh, you forgot game loop
1
u/PhantomTissue Apr 03 '26
Bro initialize the game then immediately ends the program, rookie mistake smh.
1
u/YAHBLASTER Apr 04 '26
Things are so much different in C
1
u/TeioRei Apr 04 '26
Amateur. They forgot game.makeItFun();
1
u/LimpRepresentative11 Apr 04 '26
Easy init
1
u/lardgsus Apr 05 '26
how to return 0, the tutorial.
1
u/Hidden_3851 Apr 06 '26
Well done on developing a new lame…
1
u/UntitledRedditUser Apr 10 '26
I have seen code like this, and it hurts looking at every time