Because having worked with python a bit now and coming across all sorts of problems and solutions I just think we should go over these two questions.
1). What are the different types of methods for attacking a problem/bug/glitch in a game to fix it?
2). What are the different types of approaches for adding new functionality to a game?
Here are my answers for both of them.
[--------------------------------------------------------------------------------------------------------------------------]
1). The lazy hack
The lazy hack is a simplistic approach to creating a solution, usually it’s something simple like var=var2 * -1, it can be a simple addition to a line of code or another single line of code to shoehorn a solution that works. The big risk is that if you pile up too many lazy hacks where they’re everywhere and multiple hacks are piled onto the same line, problems down the road could be tricky and code could become very messy.
2). The normal hack
The normal hack is usually a hacky piece of code that can comprise of a number of lines or even a whole section of your script, it can be used to quick solve problems or quick give functionality to the game, but the risks are the same as in type 1.
3). Reshuffle, and regroup.
This type of approach is usually done to help keep code neat by helping to minimize duplicated code by use of things like nested if statements, this often comprises of code being deleted and copied into other places, pretty much anywhere that reduces duplicated code, risk of messing up your code is smaller, and could even make your code more tidy, depending on whether or not it bunches unrelated game elements into one nested group.
4). Simplify and add
This type is usually used to allow less code to do the same work and have less redundant code, it also is used to perhaps make it easier to add functionality in a way that the code is less convoluted and is able to be expanded more easily. This, like the above, can also be used to remove lazy and larger hacks and make a nicer, more expandable script that makes adding things to your game much easier.
5). Create a slottable system
This approach involves creating code from the beginning to give you the ability to slot in multiple features without resorting to too much hacking, changing, or rewriting, like an object respawn system, create code that allows you to easily slot in new objects as an addition to the system is paramount if you’re going to have tons of objects spawning in the game. Sometimes this requires large scale changes to the game logic if the game is already in an advanced state, but doing types 3 and 4 could help with that.
Now what approach types would you add or what would you change from what I wrote?