i used to try to make videogames from time to time and arguably i still do but less frequently. a thing that never stops bothering me - and this is not a Subchost, i just got to thinking about it again cause i saw some posts - is how "it's easy to get started making a game with (tool) and (tool)" is such a common thing to see, and more importantly, seems to work for a lot of people.
another good example of a thing that perennially bugs me: mario jump - we all agree with this; he sure fuckin do my guy. but how?
well it turns out the logic for that is, again, 50 if statements.
on every tick, check if the player is pressing jump. this is a separate line of code; there is no generalizing it, you are not using a switch statement or anything like that because you can combine jumping with many other things. you're going to have a line that says:
if (keys.pressed.contains(keys.jump))
and there is absolutely no getting around that. and it sticks in your craw like a dry pill, the fact you had to do this, that you have a line of hard code that references a specific key, not some kind of Input-Action Conversion Matrix. no. you are asking "is player, mario jump??" in those specific words.
and you can't move it. if you "refactor", you run the risk of breaking mario jump. because somewhere near this is "mario move??" and that massively affects mario jump. so it has to live on Exactly Line 1385, Between Mario Move And Mario Fall.
and then you have to do more ifs. do mario jump? well, do mario stand? do mario collide with something above he? is mario jump already? has it been long enough since mario jump?
and even this is just going way past the sale, because job one is "did the player let go of jump since the last time mario jump?" because you don't want the situation where holding the button causes him to jump again every time he lands.
and that leads to some godforsaken BASTARD line of code like
bool pressedMarioJump;
and it just makes you want to take a shower. it makes sense for this to be a global variable.
it turns out that every single input the player can give is a complex state machine with tons of dependencies that you have to think about and fully internalize, at all times, and every single goddamn line of it is almost literally "a natural-language description of how the game rules work." and it's SO un-computery, it's SO un-programmery, that if the only reason computer ever made any sense to you is because it's logical and procedural, then the enormous stack of utterly arbitrary if statements you have to make, nested 6 deep, will invariably make your skin crawl every time you look at it.
there is no avoiding player.cs

