[icon ] blenderdumbass . org

Free Software
Title
Author
Post Text
Description
Comments
Hashtags


[icon articles]The Spaghetti Code Of Dani's Race

  Unread  

[thumbnail]

[avatar]  Blender Dumbass

👁 140 💬 1



Spaghetti code! The insidious thing that often happens even to the best of us. No wander that it happened to me. When programming you want to break your code into functions that could be called from many other places. Doing everything as one large function is a problem, because sometimes you might want to do the same operation or the same check, or whatever, again in another place, and that will require you to copy paste large chunks of code. And if suddenly you decide to change something about those checks, or functions, you have to change that something in all those places one after another. Dani's Race my game, has a bit of a Spaghetti code problem.


#DanisRace #MoriasRace #GameDev #FreeSoftware #Gnu #Linux #OpenSource #GtaClone #Programming #Python #SpaghettiCode #UPBGE #blender3d


[icon articles]So I Cleaned Up Some Spaghetti from Dani's Race Code

  Unread  

[thumbnail]

[avatar]  Blender Dumbass

👁 95 💬 0



A few days ago I had told you that I'm stopping with making the police station in my game Dani's Race because it had a Spaghetti Code Problem. The main() function in the Main_Update.py file was 1683 lines of code long and contained way too many things in it. At the moment, the same function is down to 641 lines of code. This is still way too much stuff in the main() but this is a hell of a lot of reduction.


#DanisRace #MoriasRace #GameDev #FreeSoftware #Gnu #Linux #OpenSource #GtaClone #Programming #Python #SpaghettiCode #UPBGE #blender3d



[icon user] Login