One of my favorite things to do on a computer is create games, and I'd love to do that with Pascal. Here's a summary of the game:
It will be called "Robot vs. Monster". As the name implies, the player takes the role of a giant robot defending a city from a monster. The game is entirely text-based.
The "City" is a grid of ASCII characters, each of which contains either empty road, a building, the robot, or the monster.
The player can choose to move 1 square north, south, east, or west; or, they can launch missiles at the monster to damage it. Missiles only hit the monster if the player and the monster are in the same row or column, and hit for about 15% damage. The player cannot move on a space occupied by a building or the monster.
The monster can either move or attack. The monster, like the player, moves 1 square per turn, but has eight-directional movement, which it uses to try to corner the player. The monster can only attack if it is adjacent to the player, but its attack is far stronger than the player's - probably about 50%.
Another thing the monster can do is smash buildings. If a building is impeding the monster, it will crush it and turn it into a "rubble" tile. Rubble tiles can be traversed by the monster, but not by the player.
The player wins by defeating the monster, and recieves a score upon doing so. The player's score is determined by how much health he has remaining and how many buildings are still standing.
How I plan to make the "abstract" map that only the computer will use:
The player and monster positions will be determind by two integers, which will be labelled "X" and "Y" and act as a coordinate grid. This will allow me to:
-Prevent the player from leaving the edge of the screen or moving onto an occupied space.
-Check whether or not the player's missiles hit.
-Have the program scan the monster's position and tell it where to move, smash buildings, or attack the player accordingly.
However, I've got one major problem: Making the map display work.
Oh, I think I could do it. The only way I can think of, though, is to make every single piece of terrain a variable and tell the program to analyze them one by one to determine what to display on the map, because it will need to check for the locations of the robot and monster. This would probably entail making hundreds of variable checks every time the map is drawn, something I'd rather avoid.
In summary, I've got a pretty clear idea of how I'm going to design this game. I would appreciate, though, if anyone could give me advice on how to design a good terrain/map system.
It will be called "Robot vs. Monster". As the name implies, the player takes the role of a giant robot defending a city from a monster. The game is entirely text-based.
The "City" is a grid of ASCII characters, each of which contains either empty road, a building, the robot, or the monster.
The player can choose to move 1 square north, south, east, or west; or, they can launch missiles at the monster to damage it. Missiles only hit the monster if the player and the monster are in the same row or column, and hit for about 15% damage. The player cannot move on a space occupied by a building or the monster.
The monster can either move or attack. The monster, like the player, moves 1 square per turn, but has eight-directional movement, which it uses to try to corner the player. The monster can only attack if it is adjacent to the player, but its attack is far stronger than the player's - probably about 50%.
Another thing the monster can do is smash buildings. If a building is impeding the monster, it will crush it and turn it into a "rubble" tile. Rubble tiles can be traversed by the monster, but not by the player.
The player wins by defeating the monster, and recieves a score upon doing so. The player's score is determined by how much health he has remaining and how many buildings are still standing.
How I plan to make the "abstract" map that only the computer will use:
The player and monster positions will be determind by two integers, which will be labelled "X" and "Y" and act as a coordinate grid. This will allow me to:
-Prevent the player from leaving the edge of the screen or moving onto an occupied space.
-Check whether or not the player's missiles hit.
-Have the program scan the monster's position and tell it where to move, smash buildings, or attack the player accordingly.
However, I've got one major problem: Making the map display work.
Oh, I think I could do it. The only way I can think of, though, is to make every single piece of terrain a variable and tell the program to analyze them one by one to determine what to display on the map, because it will need to check for the locations of the robot and monster. This would probably entail making hundreds of variable checks every time the map is drawn, something I'd rather avoid.
In summary, I've got a pretty clear idea of how I'm going to design this game. I would appreciate, though, if anyone could give me advice on how to design a good terrain/map system.