
I've got a fair bit of stuff set up - working on the maps, textures are all in, custom playerclass in, everything is good. But eventually, I will need to begin to add in the weapons/items into the game, and do some things that are fundamentally different from Doom, and this is where the problem lies.
In summary:
- The player may hold up to 9 weapons, which may include multiple copies of the same weapon, each with their own individual ammo count. If the player's weapon inventory is empty, they are given a default weapon that has infinite ammo (but a poor rate of fire and weak, as one would expect). Upon a weapon reaching zero ammo, a weapon actually stays in the player's inventory until it is shot again; no shot is produced but the weapon is then removed. A rare power-up can refill all ammo for all guns in the player's inventory to full.
- The player may hold up to 9 keys, which may be of three colors, can be multiple copies of the same color, and like weapons, carry over from level to level. Each color-coded door uses up one key and stays open permanently once activated, while the used key is then removed from the key inventory. Naturally, you need the right color key to open the right color door.
- A lives system (which theoretically should be easy enough to implement). Game over if all lives are gone, naturally.
- A bonus system if the player doesn't get shot while killing 3+ enemies (ditto).
- Upon killing the level boss, the player must return to the start room within a time limit, or be instantly killed, lose a life, and respawn the level boss, which must be killed again to restart the countdown.
- One obstacle in the level, a mine, prints up a message (along with damaging the player) if they come into contact with it.
- Possibly the trickiest thing I can think of besides the weapons - while player spawns at a spawn point, throughout the level are objects the player can choose to blow up. If the player blows one of them up, then dies, the player respawns next to this object, with the game remembering the last one the player shot and destroyed. I have no clue how I'd make something like this work.
- While I do know how to code up weapons (indeed, the default weapon is already in, if slightly imperfect due to having a faster rate of fire when tapped than if held down), I have no idea how to make it so that a second copy of the weapon can be picked up with its own individual ammo counter. The only workaround I can think of is that it remains one gun but just gets extra ammo, along with incrementing a variable so that if "9" guns have been picked up without dropping below a threshold (which would remove "1" gun), the game disallows it. But this is a huge kludge and not at all close to how the OG game did it.
- Ditto for the keys - though this is theoretically much simpler. The bigger challenge would be how to enable multiple keys to be picked up, and of course, using the right key upon using the door line.
- Lives aren't implemented at all. Shouldn't be too hard to implement though in theory, would just need to make sure you get dumped out to "demo reel."
- Bonuses aren't implemented at all, but the way this works is pretty simple - if you kill an enemy, it goes up one. If you manage to kill three enemies without taking a hit, you get a bonus (which changes depending on how many you've gotten - can be anything from weapons, to powerups, to extra lives). If you get shot, decrement this counter by one unless it's zero.
- Level boss system isn't set up yet, but I think the cheap and quick way to do it (besides, of course, running the countdown timer, changing the texture effects - it pretends to be flashing red/blue lighting, etc.) would be basically to just be able to mark a target sector (i.e; the starting sector) as the one to return to in order to stop the countdown and move the player to the tally screen. How to do that, I'm a bit less sure.
- The mine is in-game and properly functions (though I do have to figure out how to make the explosion do damage rolloff), but I can't get it to print the message to the player for triggering it - possibly I've messed up code somewhere, but I can't see where.
- I have no idea how to implement a moving respawn point at all - or indeed, if it even is possible.
Oh yes, the OG game was up to two players, so ideally, I'd like solutions that would be netgame compatible if possible. (In practice, I'd like to expand this limit, but for now I will stick with trying to get the game as close as possible on GZDoom before I attempt to extend it.)