Placing Enemies On Map - UQdeco2800/2022-studio-2 GitHub Wiki
As part of sprint 3, our team worked together with the map team in order to place enemies on the map.
Firstly, we needed to create a method to determine if the boss enemy for the level was still alive or not on the map. Therefore, I created this method for the level 1 boss (and a very similar one for the level 2 boss):
public static boolean ifHeraclesOnMap() {
return heracles.isDead();
}
This allowed the map team to add a conditional to their transitions between levels such that you can only go to the next level once you have killed the boss of the first.
Once the new maps were uploaded, we also needed to specify where to place the enemies. We did that in the following method. In the following method, we specify the positions where the enemies need to be, then we iterate through those adding enemies at each one.
private void spawnGymBro() {
ArrayList<GridPoint2> positions = new ArrayList<>();
positions.add(new GridPoint2(129, 22));
positions.add(new GridPoint2(99, 65));
positions.add(new GridPoint2(45, 47));
positions.add(new GridPoint2(118, 141));
positions.add(new GridPoint2(118, 175));
for (GridPoint2 position: positions) {
Entity gymBro = NPCFactory.createGymBro(player);
areaEntities.add(gymBro);
spawnEntityAt(gymBro, position, true, true);
}
}
The locations of enemies on map are as follows.
Basic Gym Bro Enemy: (129, 22), (99, 65), (45, 47), (118, 141), (118, 175) Heracles Boss: (153, 113)
Basic Poop Enemy: (37, 47), (32, 67), (20, 80), (65, 47), (85, 54) Mega Poop Boss: (35, 98)
In Sprint 4, we will gather feedback from users on what they think of the location of enemies. This will aim to discover if the users think the locations of the enemies are good or not. We will ask questions like: How many enemies should we have? Is the current amount enough, too many or too few? Do you think these locations make sense for the enemies? Is there a good progression of fighting enemies up to the boss? These questions will be in a survey so we can quickly and efficiently send it out and gather responses. Then based on these responses, we will adapt and change the positions of the enemies within the code.
In sprint 4 we sent out a form to gather feedback from users on where they think enemies should be, and how many enemies they think should be in each location. To do this, we annotated the maps to represent different areas and then asked users where they think enemies should be and how many they think there should be. The first half of the survey related to the level 1 map. This was the annotated level 1 map:
This was the first question:
In total, this survey received 7 responses. We decided that if an area received 4 or more votes, that would be a good area to spawn the basic enemies. We chose 4 as the limit as 4 votes for an area means over half the users want the basic enemies to spawn there.
Therefore, the areas to spawn basic enemies for level 1 were B, C, D, E, F, G and H.
The next question was:
Most users wanted the boss to spawn in area H. Therefore, we decided to remove area H from the basic enemies spawn areas.
The last question for the level 1 map was:
There were quite a few different responses, therefore we decided to take the average of all of them. (For mathematics purposes, if users wrote a response like 1-2, we took that as 1.5). The average was 3.08, therefore, we decided there should be around 3 basic enemies in each basic enemy area.
We repeated the same questions but with level 2. This was the level 2 map:
This was the first question:
We used the same reasoning as the level 1 version of the question to determine that the areas to spawn basic enemies for level 2 were C, D, E, F and G.
The next question was:
A large majority of people wanted the boss to be in area I, therefore we decided that the level 2 boss will spawn in area I.
The last question was:
We took the averages of the responses, and we got 2.9. By rounding, that means there should be 3 basic enemies in each basic enemy area.
Based on this feedback we updated the positions and number of enemies. The new positions of enemies are:
Area B: (99, 65), (89, 65), (105, 62)
Area C: (34, 100), (20, 106), (25, 99)
Area D: (80, 100), (63, 106), (90, 99)
Area E: (118, 173), (118, 141), (145, 152)
Area F: (153, 123), (153, 141), (153, 130)
Area G: (153, 113), (175, 113), (178, 123)
Area H: (170, 50)
Area C: (37, 47), (32, 47), (42, 42)
Area D: (32, 67), (45, 74), (35, 69)
Area E: (9, 88), (20, 90), (20, 88)
Area F: (65, 47), (60, 47), (63, 54)
Area G: (85, 54), (80, 48), (84, 60)
Area I: (35, 102)
In the future, we will do play testing with users to determine whether the locations of enemies and number of enemies are appropriate. There will be one group of 5 people (as per the rule of 5). Since we want to determine whether the locations of enemies and number of enemies makes sense, we will test a demographic of people who play RPGs that involve fighting enemies. We will let them play the game through, and then we will ask them a series of questions. These questions will be like: "Did the locations of enemies make sense to you?", "Were there too many enemies in any location, or conversely, were there too few enemies in any location?", "Did you feel like there was a natural progression of enemies and locations leading up to the boss fights?". The answers to these questions will allow us to further fine tune the location and numbers of enemies.