this post was submitted on 24 Dec 2025
144 points (98.0% liked)

RetroGaming

26135 readers
642 users here now

Vintage gaming community.

Rules:

  1. Be kind.
  2. No spam, AI slop, or soliciting for money.
  3. No racism or other bigotry allowed.
  4. Obviously nothing illegal.

If you see these please report them.

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] elvith@feddit.org 1 points 3 hours ago

Im inclined to answer with "Yesn't"

Yes, the problem is readability. You can get "better" code of you know the exact tooling and settings for compilation, as you can then better guess what optimisations and tricks were used (by the compiler) and you may be able to "undo" them. There are so many places where this will only let you make guesses. You write a loop in your code, the compiler removes the loop and replaced it with another construct that may be a bit faster to execute, but may be way harder to understand - or tedious to change if you need to edit it especially if it's not a simple change (character can now run faster!) but needs new functionality that would completely break this optimisation (but it'd be trivial to add in the original code).

Also all context is removed. You won't work with code like this:

(Both pseudocode, not bothered to make a real example that maybe even compiles)

if keyPressed(MOVE_RIGHT){
  player.speed = min(player.MAX_SPEED, player.speed + player.acceleration*frametime)
}
else{
   player.speed = player.speed * player.MOVEMENT_DAMPENING * frametime
}

You'd get something like this:

int *fi93836290= 0x7363728
int *fi22425 = &fi93836290+0x23
fi22425 = fun7362782(0x63627)? fun42638(...)
//and so on