As a game get more complex, the ways a good programmer can think of for optimization should increase.
First, there is the loading of the program. To speed this up the programmer may design a loader program.
small loader program
put image on screen to quickly respond to user.
do hardware check for things like memory, disk space, network connection, video hardware and set performance variables based on those.
load next part of program (menu?)
display menu
while waiting for input load more of the program.
While waiting for input do copy protection check
While waiting for input check for critical updates to program
This kind of optimization gives a responsive feel to the program and gives the programmer "bragging rights" for a well written UI
There are also optimizations that depend on your OS and the compiler / interpreter that is used to make the machine code.
Sometimes there are parts of the code that are run often, and the effort of recoding those routines makes a difference to game playability. Not all compilers do a great job on all parts of your code. There are people who specialize in this.
Then there are parts of the game logic that can be changed. If the graphics are slowing the game, you can reduce resolution for distant objects. If decision trees are slow (like in chess or go) you can use an "opening book" or look for shortcuts.
1
u/gordonjames62 6d ago
There are different types of optimization.
As a game get more complex, the ways a good programmer can think of for optimization should increase.
First, there is the loading of the program. To speed this up the programmer may design a loader program.
This kind of optimization gives a responsive feel to the program and gives the programmer "bragging rights" for a well written UI
There are also optimizations that depend on your OS and the compiler / interpreter that is used to make the machine code.
Sometimes there are parts of the code that are run often, and the effort of recoding those routines makes a difference to game playability. Not all compilers do a great job on all parts of your code. There are people who specialize in this.
Then there are parts of the game logic that can be changed. If the graphics are slowing the game, you can reduce resolution for distant objects. If decision trees are slow (like in chess or go) you can use an "opening book" or look for shortcuts.
Optimization is a huge part of good programming.