# data[].attributes.body
1. We were interested in the pyaudio library introduced in class, and wanted to do some interactive projects about sound

2. After discussing the direction of interactive webpage and new media interaction, we finally decided to make a pygame.

3. Inspired by the game "Flappy birds", we want to use pyaudio to pick up the volume level, as a one-dimensional variable mapped to the x/y coordinates of the control object, to simulate the pattern of mechanical movement.

# data[].attributes.attachment_caption
Two player game mode attempt (keyboard control)

# data[].attributes.body
1. Set up a two-player game mode to increase the playability and interactivity of the game.Tried the two-player mini-game mode - feasible.Envisioned controlling two objects with voices respectively - worried that the voices of two people would interfere with each other - decided that one person would be controlled by keyboard and one by voice.

2. Set up two roles, one is a keyboard warrior and the other is an orator - the two roles are similar, confrontational and co-operative are not strong, the game mechanism is difficult to design - PASS!

# data[].attributes.headline
11.7-11.14 Functional Requirements Analysis (Game Plotting) 

# data[].attributes.subject
11.7-11.14 Functional Requirements Analysis (Game Plotting) 

# data[].attributes.body
Game plot planning (preliminary):

1. set up two main roles, a keyboard-controlled warrior to save the princess, a voice-controlled soldier chief (soldier chief with the voice of the soldiers to control the regiment)

2. The player who plays the warrior will lead the princess to escape from the palace, avoid the patrolling soldiers to reach the safe area, then the game will be successful, on the contrary, the game will be intercepted by the soldiers, then the game will be failed.The opposite is true for the player who plays as the Soldier Leader.

3. The palace area is randomly infested with ghosts, and the warrior player loses the game if he is found and attacked by the ghosts.

Corresponding to the functions that need to be achieved (preliminary)

1. run the main programme

2.button object (start interface rendering, click to enter the game screen to start the game)

3.Corps object (implemented by pyaudio to detect the sound size and mapped to the coordinates, so as to control its movement up and down in the running window, intercepting the warrior, interception lasts more than a minute, then the corps win, otherwise the warrior wins)

4. Warrior and Princess objects (movement controlled by keyboard, warrior loses if it encounters ghost/corps, or warrior loses if stalemate lasts more than a minute)

5.Ghost object (randomly appear in the left part of the window, as the warrior's obstacle, if the warrior touches the ghost, the game is lost)

6.Requirements.txt

# data[].attributes.body
One of the main features of the game is implemented ——the keyboard-controlled Warrior player is successfully intercepted by the voice-controlled Soldier Leader player, and the game fails.

# data[].attributes.body
Game Name

Game Background

Game Rules

# data[].attributes.headline
11.21-11.27 Programme Development Completed + Functional Integration

# data[].attributes.subject
11.21-11.27 Programme Development Completed + Functional Integration

# data[].attributes.headline
11.21-11.27 Programme Development Completed + Functional Integration

# data[].attributes.subject
11.21-11.27 Programme Development Completed + Functional Integration

# data[].attributes.body
3. Set the mode of the chase game, assuming that one player controls the sugar peas, the other player controls the little monster to eat the sugar peas will win, and vice versa, the other side wins - because at present there is only one variable of the sound size, the sound module can only control the movement of an axis -pass

4. Two player co-operative game, suppose two players need to co-operate to escort a food to the other side of the river - can the keyboard and voice control the same object?--Technically it is possible to control the X/Y axes separately, but it is not playable enough. Both players have to manipulate an object separately, and the distance between the centres of the two objects must not exceed a certain value, otherwise the mission fails.-Sound control can not be particularly accurate, randomness is large -pass

5. The final determination of the two players were using the keyboard and voice control different objects, one side to break into the barrier one side to intercept, and then add some security areas and random factors set to enrich the game content.

# data[].attributes.attachment_caption
Main programme and various programmes for subassembly

# data[].attributes.headline
11.14-11.21 Programming Framework Definition 

# data[].attributes.subject
11.14-11.21 Programming Framework Definition 

# data[].attributes.body
Functional additions:

1、Record the duration of the game and display it in white letters in the upper left corner of the window.

2、If control_image collides with random_image or audio_image, the game screen stops and the control image is replaced with another externally loaded image, and "Guards Win!" appears in the centre of the screen.

3、If control_image doesn't collide with random_image and doesn't collide with audio_image, and its x-coordinate is greater than 600, then the game screen will stop and "Warrior Win!" will appear in the centre of the screen.

4、If the duration of the game is more than 30s, then the game screen will stand still, and the words "Guards Win!" will appear in the centre of the screen.

5、To enter the ‘END’ game state, click the mouse to enter the END state after 2, 3, or 4 above.

# data[].attributes.body
1. Pixel style form

2. The game scene viewpoint is mainly top-down (such as the reference picture)

# data[].attributes.body
Start viem BGM

Classic & retro style

# data[].attributes.attachment_link.title
American Patrol（FC版《马戏团》第一、四关BGM） - コナミ矩形波倶楽部 - 单曲 - 网易云音乐

# data[].attributes.attachment_link.description
歌曲名《American Patrol》，别名《FC版《马戏团》第一、四关BGM》，由 コナミ矩形波倶楽部 演唱，收录于《A9VG 怀旧游戏音乐精选100》专辑中，《American Patrol》下载，《American Patrol》在线试听，更多American Patrol相关歌曲推荐，尽在网易云音乐

# data[].attributes.body
The ghost position is random, there may be a special situation that the ghost position at the beginning of the game and the warrior player overlap and the game fails. Modify the setting that the random ghost object will not coincide with the warrior player's object in the first 5 seconds of the game.

# data[].attributes.attachment_caption
Fix Bug 2 Changing the movement speed of soldiers

# data[].attributes.body
Tested adjusting the movement rates of the Warrior player and the Guard player as well as the Ghost. Keeping the game as balanced in difficulty as possible for both sides, with each winning and losing.