My first game part
Basically, I just wrote out a programme in C++ to calculate the amount of health lost by an attack, with or without armour, and to display the remaining level if the player character isn’t killed in the attack.
Okay, it’s not much and it requires the command line to work, but it’s a start! Here’s the pseudocode for if anyone is interested.
define the variables health, armour and damage;
ask the user to enter the health before the attack, then display it;
repeat for armour and damage;
health after = health before - (damage - armour);
if health <= 0, display a "game over" message
else display the remaining health points
While I think this is more suited to an RPG-style game such as Oblivion or a turn-based strategy game like Alpha Centauri or Battle for Wesnoth, I suspect something along these lines is happening inside most games, with the particular details varying from one game to another.