服务承诺
资金托管
原创保证
实力保障
24小时客服
使命必达
51Due提供Essay,Paper,Report,Assignment等学科作业的代写与辅导,同时涵盖Personal Statement,转学申请等留学文书代写。
51Due将让你达成学业目标
51Due将让你达成学业目标
51Due将让你达成学业目标
51Due将让你达成学业目标私人订制你的未来职场 世界名企,高端行业岗位等 在新的起点上实现更高水平的发展
积累工作经验
多元化文化交流
专业实操技能
建立人际资源圈Pacman_Game
2013-11-13 来源: 类别: 更多范文
I. INTRODUCTION
Overview of the game choice
In the original PacMan games PacMan would move horizontally and vertically through a maze eating dots, cherries and other bonuses. PacMan would also be chased through the maze by four ghosts each of which has its own unique style of moving through the maze to attack PacMan.
Reasons for choosing PacMan
I chose PacMan as I felt that it would provide me with a not only a challenge when developing but it would simply provide me with an entertaining game to play. I was also attracted to this game for its Artificial Intelligence (AI) which controls the movements of all four ghosts chasing PacMan, each on their individual way. I had never looked into AI before so I felt that I could develop most by choosing a game that made a very good use of it.
I also felt that the maze would provide an interesting challenge as I would need to design the game so that PacMan and the ghosts could move freely between the walls of the maze –and not through them! To be able to complete this task I needed to research functions and techniques that would enable me to design and implement this function.
Research on the original manual
When developing PacMan for the mobile phone I checked different websites and online resources for information that I could benefit from such as the PacMan’s movement. When I designed PacMan’s maze I wanted to keep it as similar as possible to the original map. The map I chooses to base my designs on can be seen in the picture below. Due to the limited size of the screen I had to however make some modifications to the layout.
Mobile phone platform
The mobile phone platform I chose was the Sony Ericsson K750. The primary reason for choosing this phone was the screen. The screen on the K750 unlike other available phones in the Sony Ericsson Software Development Kit has a square screen. The dimensions of the screen are 176x176 pixels. Another reason for choosing the K750 is the number pad and joystick which I feel is a good size making it good for user input. The nature of the game requires users to make quick input to avoid ghosts and collect as many points as possible hence it was crucial to choose a phone that would provide a good size screen and simple controls.
II. SPECIFICATION & DESIGN STEPS
Sketch of the screen layout
The layout of PacMan’s can be seen by three different layers. The first layer shows the grid in which PacMan and the ghosts inhabit and will move horizontally and vertically though it. The second layer contains the dots and cherries which PacMan consumes and gains points from. The third and final layer contains the intersection points. These points are used to control both PacMan and the Ghost AI. These work by controlling when the characters can change between moving horizontally and vertically. Say about how it is a grid 22x22 with each cell being 8x8.
When these three layers are placed on top of each other it looks like this:
The bottom of the screen is kept blank. This space is used to display both the players’ current score and number of lives left.
Description of the controls
PacMan has five possible movements: up, down, left, right and stopped. The user is able to select the direction in which to travel using the joystick control or the number keys 2, 4, 6 or 8. Once given a direction PacMan will continue to travel in the same direction until a different direction is given or he comes in contact with a wall or ghost. When PacMan comes in contact with a wall he will stop moving. When PacMan comes in contact with a ghost he will lose one life and return to the starting point.
Description of object behaviour
PacMan
PacMan has four possible directions in which it can travel and its face will always point the direction it is travelling as seen in the picture below.
Points
Each of the dot that PacMan eats he will earn a score of 10. Each cherry PacMan eats will earn a score of 20.
Blinky - Ghost
Blinky, as seen on the right, is the red ghost which chases PacMan through the maze. Blinky’s movement patterns are determined by PacMan’s current position. Blinky has two movement choices, he can move horizontally or vertically. However Blinky has been set to favour moving vertically to catch PacMan.
Inky - Ghost
Inky, as seen on the right, is the blue ghost which chases PacMan through the maze. Inky’s movements are very similar to Blinky’s however Inky favours moving horizontally to catch PacMan. Inky has two settings. When he is far away from PacMan he is attempting to catch an area near to PacMan’s position, when he is close he will attempt to catch PacMan at his current location.
III. GAME IMPLEMENTATION
Design
The first and I feel the most crucial part of the implementation was the initial design of PacMan’s maze. Hand drawn sketches were done of the maze ensuring that PacMan and the ghosts would be able to move within the maze. The maze is bound by rules, such as how and where dots and cherries can be placed. As PacMan and the ghosts will be moving about the maze the walls will also govern their movement.
Design of the characters was also a key element as they must be no bigger than the cells of the maze otherwise they would be unable to move within it. PacMan and both of the ghosts are 8 pixels by 8 pixels meaning that they fit inside each cell with no room either side.
Movements
PacMan
Once the design of the maze and the characters had been completed the next step was to implement PacMan’s movements. Event handlers were added that would watch for input from the user. Collision events were added to check if and when PacMan collides with the walls of the maze. Once PacMan was able to travel freely between the maze the next step was to add the ghosts.
Ghosts
The movements of the ghosts are controlled by AI. The AI uses PacMan’s current position compared to the ghosts’ to make the decision on which direction to travel. The movement of the ghosts is similar to that of PacMan and thus unable to travel through the walls or outside of the maze. Should a ghost come in contact with a wall its direction will change.
Testing
Alpha testing
This testing was carried out by me to ensure that the game functions correctly and in accordance to the plan. When new features were added checks on this feature would be carried out. After each new feature I would also test the old ones to ensure that there were no conflicts between them. An example of this is described below:
The old feature was a ghost moving. The new feature was the ghost moving away from a wall it touches. When putting in this new feature I needed to test that the ghost would still keep moving rather that get stuck in a loop where the ghost tries to stay in a corner.
Beta Testing
This testing was carried out at the end of development by my fiancée who is not a software developer but she was familiar with the original PacMan game. This type of testing was conducted to find out whether the game contained any bugs that could be encountered during normal game play. She did indeed indicate some problems and suggested improvement such as adding instructions and more sounds such as the ghost killing PacMan. The beta testing also revealed some bugs in the system. For example an issue was noted when starting a new game after PacMan had lost all three lives. The points would return to zero and the PacMan move to its starting point. However the dots were not reset. Carrying out beta testing well before the launch (assessment) date meant that I was in a good position to add most of the suggested features and also debug the game.
IV. CONCLUSION
Possible expansions to the future releases
Like mentioned above I did receive several suggestions from beta testing and additionally I have some suggestion of my own. The features to be considered for the Mobile PacMan 2.0 are listed below:
• Add a special ghost that would appear for a short period in every 15 seconds. This ghost would be moving across the walls (as real ghosts do). This short period would also change the background music to something spooky.
• Adding an effect from the original game. When PacMan eats cherries it would be able to chase and eat the ghosts or have immunity to them for a short period.
• Adding a timer that would mean that the play can only last for a specified period.
• Level system that would mean that when the user completes a round they would move on to the next level where ghost would be moving faster that way make the advanced levels harder.
• A score board that would save high scores and the players name or initials.
Short comings of game as it stands
During the testing process we identified lack of moving sprites, such as PacMan moving its mouth when eating.
Advanced/Novel/innovative features
Artificial Intelligence
The ghosts’ movements are controlled by artificial intelligence (AI). This AI updates with each game loop and uses PacMan’s current location to decide its own.
Complex sounds
Complex sounds are used in throughout the game. An example of this would be PacMan eating. Each time PacMan eats a dot or a cherry it makes a ‘Wooka Wooka’ sound. This can also be seen at the start of the game when the sound lets the user to prepare for playing.
Scrolling
This can firstly be seen in the menu screen, the user has the ability to first scroll up or down to choose their next step; Play Game, About or End. This feature is again used in the About section where the user is required to scroll the page to see the full instructions on the game.
Tilled backgrounds
Once I had decided on the game that I would develop I researched development aids that I could use to my advantage. I found a component called tilled layers that I felt would be highly beneficial to the development. The tilled layer reads an image and breaks it into segments. Each segment images are assigned a value showing which position it is on. The blank grid can then have those corresponding numbers added to it. An example of this can be seen using the top left hand corner;
2 5 5 5 5
6 0 0 0 0
6 0 2 3 0
6 0 6 6 0
6 0 4 1 0
Diagrams continued overleaf...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Ghosts
While the ghosts are not a new features to PacMan only having two on the screen differs the game from the original. The AI controlling the ghosts is better than that of the original as it tracks PacMan’s movements better.

