Start programming a game

>start programming a game
>get ~20 hours in, very basic networking works, very basic animation works, very basic damage/health system works
>code is too much a fucking messy ball of mud to expand on it
>abandon the project

done this literally like 7 times now, how do I not be retarded with planning project architecture

Attached: 1558853389096.jpg (1209x756, 460K)

Don't write all of your shit in one file, compartmentalize your mechanics and systems, it's a lot more formatting work and calling upon other files but it makes it so much cleaner. The main piece of code that your game runs on should just be calling dozens of other pieces of code in other documents to perform functions. Also plan out your shit ahead of time and ensure your systems are open ended enough to expand upon

Attached: patrick1.jpg (408x408, 97K)

no, that's stupid, you won't get anywhere with "planning project architecture"
>abandon the project
that's your problem, all code gets messy in time, you need to stick with it and refactor to new insights you gained while you were working on the program.

the biggest difference between oldschool and newfag programmers is that later have absolutely zero self-discipline and commitment, and their interest in particular code vanishes after they create the first semi-working, bug-ridden version of it

And now you see why the dropout rate for game programmers is so high universities. Most people don't actually want to code video games for a living. That's the reality.

learn to refactor
read some books on software architecture
do the homework faggot

You might be retarded.

>read some books on software architecture
Got any recommendations?

No I don't have anything to recommend you. I'm not going to spoon feed you.

Fuck you
I don't remember the name of the most pertinent book I read, but try The Mythical Man-Month

One file for each thing

Just keep writing. My first OpenGL project was a fucking mess. Literally all the rendering and setup code was done in one file. I'm mean it's a hobby project so who cares if the initial code is messy. I love to optimize and refactor code.

Literally learn to refactor

That's insane. One file per int? One file per string? That would be impossible to manage.

Try writing documentation first. Write a document containing how you're going to structure it, the names of things and what they mean, and maybe some use cases.

are you a brainlet?

>just put each thing in one file bro
I don't know are you?

im pretty sure he didn't mean every int and every string

smaller project scope
zero planning

the former is your solution, the latter is your problem

>networking code
you haven't finished one yet, why the fuck are you trying to network shit

Design patterns and modularization, son.
You want to abstract things in a way that in order to do X you don't need to know how the module you're calling does it. This way you can replace your modules and not have to write everything from scratch.

Read up on them, and by reading I mean books, not cliff notes or stackoverflow posts. The other alternative would be to spend years contributing to huge projects where you MIGHT learn about said patterns as a byproduct.

Then what every class? That's how you get long classes and weird inheritance structures. Logically related stuff needs to be kept together.

If your class file is more than 500 lines long, you're doing it wrong.

>

Attached: droolpepe.png (671x519, 146K)

Post your github otherwise I can't tell what would apply to the problem.