modules distributions..

hello…

as everyone knows, i´m not a programmer, just beginning with python, most of you maybe experts… no deubt.

Looking into akuryu game, he distribuited the game into various file inside “src” folder…

i am scripting a game all in one file, is this bad or will have slow load ?..

what do you recommend…
thank you.

It’s got little to do with load time. A program in one python file will load in about the same time, or maybe even a teeny tiny bit faster, than a program distributed across many python files.

It’s more a question of code management. One file is fine as long as your program is relatively simple and you can keep it all in your head at once. Eventually, as your program gets larger and more complicated, you will need to organize it into different files so you can focus on a small piece of it at a time.

So, short answer is, feel free to keep it all in one file as long as you can deal with it that way.

David

all clear… my game is very simple, has many functions but not too large… i guess intervals are extensive codes, it has many intervals…

thank you !