Ask a Game Dev

Ask a Game Dev



Don’t worry, Christian – you’re far from the only person unfamiliar with how computer software works. A software program is really a large set of explicit instructions to the computer on how to use data. Those data might be character models, animations, sound effects, visual effects, environments, lighting, damage tables, experience tables, loot tables, and so on and so forth. Most data in computer memory is erased when the computer is turned off. This includes “invincible” game characters – everything is just 1s and 0s in memory, and turning everything off resets it all to zero. This is why most MMOGs and live service games have weekly maintenance periods, we’re turning off the servers and turning them back on again in order to clear out any rogue data and starting over again.A character in a game will only react in the ways it has been programmed to. We have to add damage effects one by one to a character – play a hit reaction animation, subtract this much health, handle death or dying when health reaches zero, disable player input when playing the damage animation, etc. – in order for things to happen. If we don’t add the hit reaction, the character might take damage but not display anything. If we don’t add the health subtraction, the character will never die because it will never pass the dying condition – health less than or equal to zero. If, for example, the dying check only checks health equal to zero but we somehow reduce health to negative numbers, the dying can also get skipped over. This is a bug (unintended behavior) and should be corrected, either to make sure health never drops below zero (e.g. set it to zero if it would go below) or allow for the system to handle negative health.A character marked as “invincible” could be set never to take damage at all, in which case it wouldn’t die or play hit reactions. In the game I’m working on, we have two different versions – “god” mode where damage is bypassed completely, and “demigod” mode where health cannot fall below 1 so that we can still test all of the damage features. A character marked as god or demigod in my game only bypasses damage and death handling in game, it doesn’t stop a non-standard game over (e.g. a scripted game end) or other ways of ending the game (quitting to desktop). I hope this answers your question![Join us on Discord] and/or [Support us on Patreon]Got a burning question you want answered?



Source link