← Home ← Back to /g/

Thread 106496190

55 posts 18 images /g/
Anonymous No.106496190 >>106496221 >>106496284 >>106496333 >>106498695 >>106499772 >>106499778 >>106502370 >>106502584 >>106502597 >>106502630 >>106503265 >>106504819 >>106511173 >>106511884
/g/ Approved Progamming Books
I want to program my own indie game without any spaghetti code, what books should I read for this? I already understand some of the basics like: functions, classes, variables, and callbacks but I don't know how to structure and plan out my code, so I always feel lost. I basically never know what the best course of action is. I also code in c# but I assume that's probably not relevant since I'm not asking for language specific advice.
Anonymous No.106496221 >>106496314
>>106496190 (OP)
>c#
are you using unity?
Anonymous No.106496284 >>106496314
>>106496190 (OP)
you will never learn how to code without actually doing it yourself.
Anonymous No.106496314 >>106496333
>>106496221
Godot
>>106496284
I have coded before, I just usually end up with bad spaghetti code that is not worth keeping
Anonymous No.106496333 >>106496451
>>106496314
>>106496190 (OP)
see the issue about gamedev is it's not about coding
you are already using an engine
good
all the hard stuff is already implemented for you, and whatever you wanna do you can easily google/chatgpt/youtube to make it

the hard part is the art/animations/music etc.
unless you are good at that stuff and want to spent most of your time drawing, don't bother
if you really wanna learn to code make something else not a game
Anonymous No.106496451 >>106496618 >>106498778 >>106499811
>>106496333
>you are already using an engine, good
>all the hard stuff is already implemented for you, and whatever you wanna do you can easily google/chatgpt/youtube to make it
The problem is I still need to implement game systems for stuff like entering vehicles, jumping, falling, running, climbing, dying, picking up objects, special abilities, etc, and upgrading weapons. Idk how to manage all that since those tasks sometimes overlap and I don't want to do an infinitely long "if else" chain. I know this is probably one of many stupid noob problems I have, hence I want to expand my knowledge and not just copy and paste some random spaghetti code from an AI or stupid youtuber.
>the hard part is the art/animations/music etc.
I'm not super great at that stuff but I can do it and have done it in the past before(excluding music). If it ever becomes too much work for me to handle I can always try collaborating with others.
>if you really wanna learn to code make something else not a game
I'd be willing to try making small applications to learn, but my ultimate goal is still making a game.
Anonymous No.106496618 >>106496673 >>106498767
>>106496451
oh ok in that case you need to learn OOP
Anonymous No.106496673 >>106496883
>>106496618
Yeah I think so. Any book recommendations?
Anonymous No.106496883 >>106496889 >>106502630
>>106496673
no
just do stuff and then refactor
CS books are a meme unless you are going for the really advanced stuff, which you aren't
you just learn by doing

watch a youtube/udemy/whatever course and then just do stuff
make it work
and then keep refactoring
Anonymous No.106496889
>>106496883
this
Anonymous No.106496966
https://teachyourselfcs.com/
Look up a bunch of stack overflow or reddit threads and see what is mentioned the most
Anonymous No.106498202
just start making games and when you dont know something look it up. your first few games will be really bad but eventually you will get good at it.
Anonymous No.106498695
>>106496190 (OP)
k&r c
Anonymous No.106498767
>>106496618
Learning OOP is a trap since you start trying to make patterns before figuring out the problem.
Some people never get out of this stage.
Anonymous No.106498778
>>106496451
>The problem is I still need to implement game systems for stuff like entering vehicles, jumping, falling, running, climbing, dying, picking up objects, special abilities, etc, and upgrading weapons.
Unless that's 2D, you are aiming too high. FUck, I'd say even then, that's already too much. Make a "tower defense" where you are a single sniper who has to abandon his tower during the day, climb another while removing small annoying enemies, and then getting ready to fight during the night by sniping packages coming from the sky. Very little movement, you'll have jumping, running and falling. Also dying. Forget picking objects, but you can include special abilities and upgrading them. Don't over do it. Fuck, again, I think this is a lot already.
Anonymous No.106499772
>>106496190 (OP)
"Game Programming Patterns" by Robert Nystrom. You can read it online as well.
t. pogeet !!b2oSUmilA2N No.106499778
>>106496190 (OP)
/gedg/ approved resources : https://rentry.org/gedg-resources
its mostly videos and articles with too few books
Anonymous No.106499811
>>106496451
>I don't want to do an infinitely long "if else" chain
there's nothing wrong with this, don't let nocoder misinformation warp your perception
Anonymous No.106499866 >>106499873 >>106505020 >>106505104 >>106511156
You might want to read some books about the software engineering side of coding, like Clean Code, Code Complete, or The Pragmatic Programmer.
t. pogeet !!b2oSUmilA2N No.106499873 >>106500490 >>106504760
>>106499866
>Clean Code
Anonymous No.106500490 >>106507801
>>106499873
It's a Bible for compsci and one of the top books that everyone should read along with Pragmatic Programmer and SICP
Anonymous No.106502370 >>106503244 >>106505501 >>106507810
>>106496190 (OP)
shrimple as
Anonymous No.106502584 >>106502633 >>106502637
>>106496190 (OP)
>don't know how to structure and plan out my code, so I always feel lost. I basically never know what the best course of action is. I also code in c#
Anonymous No.106502597 >>106502632
>>106496190 (OP)
reading books is for nerds
real men read code

i used to say that ironically
but now i have 300k+ lines of code under my belt
i have become... UNIRONICAL! (*audible gasps in the audience*)
Anonymous No.106502630 >>106502648 >>106502724 >>106503234
>>106496190 (OP)
>i have a problem with taking action, procrastination and analysis paralysis
>i think that code is supposed to be "perfect"

and then the rest of the thread is full of people with the same issue, who larp more about writing code than they write code.

only valuable post in this thread >>106496883
Anonymous No.106502632
>>106502597
cont.
the only book i consult is the manual for the language im working with, really
otherwise i look at opensored code. or even i stack-overflow the thing
which is still looking at code.
Anonymous No.106502633 >>106502648 >>106502678 >>106502687 >>106502692
>>106502584
>Read book
>Understand everything
>MMmmh yes those concepts are interedasting
>Can't wait to use them
>Start programming
>WTF pattern do I need
>Start implementing a random one
>It goes off the rails
>Never quite sure which one I actually implemented or what pattern is good for what case
Am I a retard bros ?
Anonymous No.106502637
>>106502584
Oh and look intp grasp patterns as well, which might be more important than these
Anonymous No.106502648
>>106502633
>>WTF pattern do I need

>>106502630
>who larp more about writing code than they write code.
youre not a retard just keep making shit in the same language and it wil become muscle memory.
Anonymous No.106502678 >>106502692
>>106502633
>Am I a retard bros ?
yes
how could you ever believe that a book will teach you how to think?

if you want actual advice:
do shit. as in: add variety to your life
but you sound autistic and yoiur likes have negative amounts of intellectual flexibility

youre not fucked
its just that this capability is at the level of a 5 years ' old
so you have ~20 years of missed development to catch up
Anonymous No.106502687
>>106502633
The whole point of learning design patterns is knowing when to use which one better than intuition allows, so yeah, you might be
Anonymous No.106502692 >>106502739
>>106502678
>>106502633
cont
again
it IS feasible
but you have to show superior character to overcome your natural handicap.
especially now.
Anonymous No.106502724
>>106502630
>>i think that code is supposed to be "perfect"
reality check felllahs
https://www.youtube.com/watch?v=QZ6rLbu4LQw
go make your ugly shit bros!
Anonymous No.106502739
>>106502692
con t of cont
especially after all these years

while you were hiding behind your shitposting to convince other in order to convince yourself that you arent a complete fucking retard
i was doing enrichment shit
i was doing metal/wood working
i was doing art
i was doing music

when you were learning the fucking man by heart
and now you suck cock through the ass at problem solving

thats completely normal
not only nature retarded you
like gave you a sledgehammer strike to the head
but also you spent the last 20+ years at coping and seething
so not only youre naturally handicapped
but also you dont have the skills associated with thinking

therefore youre motherfucking retarded
but hey
it is reversible

you only have to catch up 20 years of no development at all
*mental development
which makes you
a mental RETARD
you are RETARDED in its purest sense
youre 20 fucking years late in your intellectual development
Anonymous No.106502810
>no, answer, technical or otherwise
you learned lesson nr1:
if you have fuck all to say,
shut the fuck up
Anonymous No.106503234 >>106503244
>>106502630
i looked into it and there is a good book for you guys if you need something that will help you transform your thinking from "i need to be perfect" into "i need to create"
Anonymous No.106503244
>>106503234
nice its on the book list >>106502370
Anonymous No.106503265
>>106496190 (OP)
You need to experience the pasta before you can fully appreciate anything structured.
Anonymous No.106504760
>>106499873
Problem?
Anonymous No.106504801
Euclid's Elements
Anonymous No.106504819
>>106496190 (OP)
Just use AI. "Spaghetti" does not even matter. The AI will handle the code you just tell it "implement vehicle code" and it will do it.
Anonymous No.106505020
>>106499866
No it's not. You don't need an entire book to tell you that you should refactor your code. It's like thinking you need a book to lose weight when all you have to do is diet and exercise.
Anonymous No.106505104 >>106507567
>>106499866
>, like Clean Code,

Absolutely AVOID that piece of shit

Uncle bob should be imprisoned
Anonymous No.106505501
>>106502370
Lmao I completely forgot about the compilers book with the cgi dragon on the cover. I’ve got it somewhere from my compilers course in university
Anonymous No.106507567 >>106507823
>>106505104
Nah
Uncle Bob is based
Anonymous No.106507801 >>106507813
>>106500490
>It's a Bible for compsci and one of the top books that everyone should read along with Pragmatic Programmer and SICP

baka when putting SICP, written by real luminaries of Computer Science, on the same paragraph with Clean Code, a book written by a self-taught opinionated prick who isn't even smart enough to put well-written code in the VERY SAME book that he has the nerve to call "Clean Code"

Uncle bob should be in jail.
Anonymous No.106507810
>>106502370

based
Anonymous No.106507813
>>106507801
Nah. He should be executed.
Anonymous No.106507823 >>106509429
>>106507567
>Uncle Bob is based

lol kid
Anonymous No.106509429
>>106507823
Problem?
Anonymous No.106510992
I see a book thread, I answer.
But I do not have a good response to your question OP.

I learned by reading enough books to find the few that teach you more than just syntax. Usually these are books that teach you something specific "how to make games", "x for hackers" etc, as opposed to "intro to c#" type of books.
Anonymous No.106511156
>>106499866
>recommending Uncle Bob unironically
You could have stayed silent and avoided outing yourself as a beginner. At this point, a good rule of thumb is that if Robert Martin is recommending something, you should avoid using it.
Anonymous No.106511173
>>106496190 (OP)
Nystrom's Game Programming Patterns
but the real answer is experience, you need to write lots of sloppy code before you get sick of it and get good
Anonymous No.106511884
>>106496190 (OP)
The Architecture of Open Source Applications and A Philosophy of Software Design supposedly help. But personally, I haven't found an answer other than maintaining your own projects for months to years and learning on your own mistakes. Whatever you do, don't listen to Uncle Bob.
Anonymous No.106513909
bump for interest