题意:

用Java设计与实现一款结合消除、弹珠等元素的Shadow Bounce游戏,包括绘制UML图及代码实现

解析:

在一张2D棋盘上有一些不同类别的钉子,玩家通过投掷球消除所有的红色钉子进入下一关,每一关玩家有20次机会,通过所有关卡赢得游戏,若机会用尽游戏失败。

钉子有四种颜色:蓝色钉子最普通;灰色钉子不能被消除;红色钉子在初始化关卡时,由随机从蓝色钉子取出的5分之1转换而来;绿色钉子在每关初始化时随机生成1枚,和其它钉子不同的是,普通球碰到其他钉子将反弹,碰到绿色钉子将分裂产生两个新的球,分别以10像素每秒的速度分别以斜向右上和斜向左下方向移动;

球有两种类型:普通球和爆炸球,普通球碰到普通钉子反弹,爆炸球碰到第一个钉子将自爆,伤害以钉子位置为中心周围70个像素范围并消除包含的所有钉子。每关开始时有0.1的机会随机生成一个不断移动的爆炸源,当普通球撞上爆炸源powerup后,将升级为爆炸球,同时爆炸源消失;

幸运桶:bucket是一个运动在地图底部的幸运回收桶,初始位置是(512,744),以每帧4像素的速度向地图左侧移动,当球撞进桶内,本次投掷不计数;若桶超出地图,重置为初始位置,而球超出屏幕则玩家次数减1;

游戏一共有5关,地图信息存储在对应的csv文件中,每行信息代表了钉子在地图的位置

涉及知识点:

UML、面向对象、Bagel库

**更多可加V讨论

qq :2956598334

pdf

SWEN20003 Object Oriented Software Development Project 2, Semester 2, 2019
The University of Melbourne
Department of Computer Science and Software Engineering
SWEN20003 Object Oriented Software Development
Project 2, Semester 2, 2019
Released: Friday 13th September
Project 2A due: Friday 27th of September, 11:59pm
Project 2B due: Friday 18th of October, 11:59pm
Updated Thursday 19th of September
Overview
In this project, you will create a graphical arcade game in the Java programming language, continuing from your work in Project 1. We will provide a full working solution for Project 1; you are
welcome to use all or part of it, provided you add a comment explaining where you found the code
at the top of each file that uses the sample code.
This is an individual project. You can discuss it with other students, but all submitted code must
be your own work.
There are two parts to this project, with different submission dates.
The first task, Project 2A, requires that you produce a class design demonstrating how you plan
to implement the game. This should be submitted in the form of a UML diagram showing all the
classes you plan to implement, the relationships (e.g. inheritance and associations) between them,
and their attributes, as well as their primary public methods. (Methods such as getters and setters
need not be explicitly included.) If you so choose, you may show the relationships separately to
the class members in the interests of neatness, but you must use correct UML notation. Please
submit as PDF only.
The second task, Project 2B, is to complete the implementation of the game as described in the
rest of this specification. You do not have to follow your class design; it is there to encourage you
to think about object-oriented principles before you start programming. Indeed, it is expected that
some aspects of your design will need to change when you start programming.
1
SWEN20003 Object Oriented Software Development Project 2, Semester 2, 2019
Shadow Bounce
Game overview
Shadow Bounce is an arcade game where the player must attempt to clear the game board of red
pegs with a limited number of shots. Once the board is cleared, the player can progress to the next
board, and so on until all boards are cleared or the player runs out of shots, whereupon the game
should end. A turn begins when the board is first loaded, and ends when all balls from the turn
have fallen off the bottom of the screen. When the turn ends, a new one begins.
The player begins with 20 shots. Each turn after the first, the number of shots should decrease by

When there are no more shots left, the game should end.
The game can be divided into three main types of objects: pegs, which can be destroyed to advance
to the next level; balls, which are used to destroy pegs; and a powerup, which can be activated by
striking it with the ball to get a bonus.
Boards are loaded from comma-separated value (.csv) files, numbered 0.csv (the first board) to
4.csv (the final board). You will not be tested on any other boards. Boards 1 through
4 will be released at a later date. Each line of these files is in the following format:
type,x,y
where type is the type of peg to be created, x is an integer representing the x-coordinate to create
the peg at, and y is an integer representing the y-coordinate to create the peg at. The pegs should
be created with their centre at these coordinates.
The pegs
Pegs come in three shapes. The shape will be specified along with the type; e.g. blue horizontal peg,
grey vertical peg. If it is not specified, the shape should be normal.
• Normal pegs:
These are the usual circular pegs from Project 1.
• Horizontal pegs:
these pegs are a horizontal rectangle shape.
• Vertical pegs:
these pegs are a vertical rectangle shape.
They come in four types. Blue and grey pegs are specified in the board files; the others are created
after the board is loaded.
• Blue pegs: these pegs have no special behaviour.
2
SWEN20003 Object Oriented Software Development Project 2, Semester 2, 2019
• Grey pegs:
these pegs behave as the blue pegs, but cannot be destroyed.
• Red pegs:
at the start of each board, one fifth (rounded down) of the blue pegs should become red
instead. When all red pegs are destroyed, the game should advance to the next board.
• Green pegs:
at the beginning of each turn, a random blue peg should become green. If the green peg is
destroyed, two balls of the striking ball’s type should be created at the green peg’s position,
with an initial velocity of 10 pixels per second diagonally upwards and to the left and right
respectively. At the end of each turn, if the green peg was not destroyed, it should become
blue again.
The balls
There are two types of ball the player has access to. In Project 2, balls should bounce off pegs they
strike. If the ball strikes the peg from the top or bottom, it should reverse its vertical direction.
Similarly, if the ball strikes the peg from the left or right, it should reverse its horizontal direction.
The Rectangle class in Bagel contains a method to help you with this. As in Project 1, the circular
pegs may be treated as though they were square.
• The normal ball:
this ball has no special behaviour. It is created in the same way as Project 1, and moves
with the same gravity. Note: If your screen is too small to display the window fully, you
may reduce the size of the window (by calling AbstractGame’s constructor). The ball should
then be created with an x value of half the window width, and a y value of 32. All pegs must
remain visible.
• The fire ball:
the fire ball behaves as the normal ball, except when it strikes a peg, all pegs within 70 pixels
of the struck peg’s centre are destroyed. When the turn finishes, the ball returns to normal.
The powerup
At the start of each turn, with a 1/10 chance a powerup should be created at a random position on
the screen. The other 9/10 of the time, no powerup should be created. The powerup should choose
a random position on the screen and move towards it at a speed of 3 pixels per frame. When the
3
SWEN20003 Object Oriented Software Development Project 2, Semester 2, 2019
powerup is within 5 pixels of its destination, it should choose another random position. If the ball
strikes the powerup, the powerup is activated and destroyed.
• Fire Ball: when this powerup is activated, the player’s ball should be replaced with the fire
ball.
The bucket
The bucket begins at the coordinate (512, 744). Note: As with the ball, if you need to reduce the
window size, you can; the bucket should begin with an x value of half the window’s width, and a
y value equal to the window’s height minus 24.
The bucket moves left at a rate of 4 pixels per frame. When any part of the bucket reaches the left
or right sides of the screen, it should reverse direction.
If a ball leaves the bottom of the screen while making contact with the bucket, the player should
get an additional shot.
Implementation checklist
This project may seem daunting. As there are a lot of things you need to implement, we have
provided a feature checklist, ordered roughly in the order we think you should implement them in,
together with the marks each feature is worth:
The board is loaded and visible on screen (1 mark)
Grey pegs cannot be destroyed (0.5 marks)
Pegs are randomly chosen to be red when the board is loaded (0.5 marks)
The game advances to the next board when all red pegs are cleared (1 mark)
The game ends when all boards are cleared or the player runs out of shots (0.5 marks)
A peg is randomly chosen to be green pegs each turn (0.5 marks)
When the green peg is destroyed, the extra balls appear and move correctly (1 mark)
Powerup appears and moves as described (1 mark)
Powerup causes fire ball (0.5 marks)
Fire balls destroy multiple pegs (0.5 marks)
The bucket functions correctly (1 mark)
4
SWEN20003 Object Oriented Software Development Project 2, Semester 2, 2019
Customisation
Optional: we want to encourage creativity with this project. We have tried to outline every aspect
of the game design here, but if you wish, you may customise any part of the game, including the
graphics, types of units, buildings, resources, game mechanics, etc. You can also add entirely new
features. However, to be eligible for full marks, you must implement all of the features in the above
implementation checklist.
For those of you with too much time on your hands, we will hold a competition for the best
game extension or modification, judged by the lecturer and tutors. The winning three will be
demonstrated at the final lecture, and there will be a prize for our favourite. Past modifications
have included drastically increasing the scope of the game, implementing jokes and creative game
design, adding polish to the game, and even introducing networked gameplay.
If you would like to enter the competition, please email the head tutor, Eleanor McMurtry, at
mcmurtrye@unimelb.edu.au with your username and a short description of the modifications you
came up with. I can’t wait to see what you’ve done!
If you like, you may submit a minimal version of the game to be assessed, and email a second
extended version to Eleanor. Extensions submitted this way may use any libraries you like, not
just Bagel and the Java standard library.
The supplied package
You will be given a package, oosd-project2-package.zip, which contains all of the graphics and
other files you need to build the game. You can use these in any way you like.
Submission and marking
Technical requirements
• The program must be written in the Java programming language.
• The program must not depend upon any libraries other than the Java standard library, the
Bagel library, and Bagel’s dependencies.
• The program must compile fully without errors.
• Every public method, attribute, and class must have Javadoc comments, as explained in
later lectures.
Submission will take place through the LMS. Please zip your project folder in its entirety, and
submit this .zip file. Do not submit a .rar, .7z, .tar.gz, or any other type of compressed
folder.
Ensure all your code is contained in this folder.
5
SWEN20003 Object Oriented Software Development Project 2, Semester 2, 2019
Extensions and late submissions
If you need an extension for the project, please email Eleanor at mcmurtrye@unimelb.edu.au
explaining your situation with some supporting documentation (medical certificate, academic adjustment plan, wedding invitation). If an extension has been granted, you may submit via the LMS
as usual; please do however email Eleanor once you have submitted your project.
The project is due at 11:59pm sharp. Any submissions received past this time (from 12:00am
onwards) will be considered late unless an extension has been granted. There will be no exceptions.
There is a penalty of 1 mark per day or part thereof for a late submission. If you submit late, you
must email Eleanor with your student ID so that we can ensure your late submission is marked
correctly.
Marks
Project 2 is worth 22 marks out of the total 100 for the subject.
• Project 2A is worth 6 marks.
{ Correct UML notation for methods (1 mark)
{ Correct UML notation for attributes (1 mark)
{ Correct UML notation for associations (1 mark)
{ Good breakdown into classes (1 mark)
{ Sensible use of methods and attributes (1 mark)
{ Appropriate use of inheritance, interfaces, and abstract (1 mark)
• Project 2B is worth 16 marks.
{ Features implemented correctly: 8 marks (see Implementation checklist for details)
{ Coding style, documentation, and good object-oriented principles: 8 marks
∗ Delegation: breaking the code down into appropriate classes (2 marks)
∗ Use of methods: avoiding repeated code and overly complex methods (1 mark)
∗ Cohesion: classes are complete units that contain all their data (1 mark)
∗ Coupling: interactions between classes are not overly complex (1 mark)
∗ General code style: visibility modifiers, magic numbers, commenting etc. (2 marks)
∗ Use of documentation (javadocs) (1 mark)
6

墨尔本大学 SWEN20003 Project2 课业解析相关推荐

  1. 莫纳什大学 FIT1045 assignment2课业解析

    题意: 使用python解决两个task,锻炼使用算法解决问题的能力 解析: task1-partA:找到列表数字的峰值(峰值定义为大于其邻居的数字.一个峰值可能是列表中的第一个或最后一个数字,在这种 ...

  2. 莫纳什大学FIT1043 assignment2课业解析

    题意: 使用python来研究一个热带大气海洋数据集 解析: 任务A:分析数据集,查看数据集行与列的大小,每列中的最值,列出每个月的记录数,删除缺失值,可视化不同月份的海面温度,探索降水测量,调查每日 ...

  3. 新南威尔士大学COMP9021 QUIZ1课业解析

    题意: 巩固复习python中字典的相关知识 解析: 题目要求有4点,1补全print语句,统计mapping字典中元素的个数 ,2统计mapping字典中,没有值的键,存储在nonkeys列表中 , ...

  4. 墨尔本大学COMP10001课业解析

    墨尔本大学COMP10001课业解析 题意: 编程实现电子投票自动计数功能,对不同的投票方案有良好的支持性 解析: 背景: 大会选举,每位选民只能支持自己最喜欢的候选人,一人一票,获得最多选票的候选人 ...

  5. 新南威尔士大学COMP1531Iteration1课业解析

    新南威尔士大学COMP1531Iteration1课业解析 题意: 通过测试.开发和维护python后端服务器写几个开发文档 解析: 1.在协议接口中为所有的功能创建测试 2.写一个pdf,记录你当前 ...

  6. 大学加权平均分计算器_墨尔本大学商学院(MBS)2021研究生、博士、本科、预科录取要求更新...

    原创文章 | 澳洲政策解读 | 有趣活动 | 吃喝玩乐 | 关注我们没错哟 今年墨大录取的改动比较大,UNILINK会做一些各学院的录取要求和申请攻略,还没发布的专业和学院可以直接点下面卡片查询: 墨 ...

  7. 澳洲 计算机 本科学费,澳大利亚墨尔本大学一年学费和生活费清单

    去澳大利亚读书,选择名校的留学意味着更高的开销,所以大家在进行规划的时候,一定要认真的进行,确认清楚.今天为大家带来澳大利亚墨尔本大学一年学费和生活费清单. 学费 本科学费 1.农业.工程.科学和兽医 ...

  8. 美国计算机加音乐专业,史上最全的美国大学音乐学院专业解析

    原标题:史上最全的美国大学音乐学院专业解析 美国的音乐类研究生专业设置分为MM.MA两种学位. MA是Master of Arts的简称,主要是一个研究性的学位,学习重点是在创作和研究技能上,所以申请 ...

  9. 墨尔本大学计算机硕士gpa,2020年去墨尔本大学读硕士gpa成绩要求是多少?各专业入学要求汇总...

    作为与中国时差最小,教学体制最完善.气候最适宜的澳洲,吸引了无数中国学子前来求学,其中最受欢迎的就是墨尔本大学,因为该校代表了澳洲最顶尖的教学质量.最雄厚的师资力量,那么,问题来了,去墨尔本大学读硕士 ...

  10. 圣路易斯华盛顿大学计算机科学,圣路易斯华盛顿大学计算机科学硕士项目解析...

    圣路易斯华盛顿大学计算机科学硕士项目(MS in Computer Science)介绍: 计算机科学理学硕士是针对计算机科学背景的学生,更侧重于软件课程.该项目可以是一个纯粹的授课型项目,也可以结合 ...

最新文章

  1. mysql延迟判断模板
  2. 为什么要学习 Markdown?究竟有什么用?怎么用?
  3. Hbase 查看 rowkey在哪个region中
  4. SQLServer 系统数据库
  5. Python学习week2
  6. 二本学医还是学计算机,二本医学院毕业的医学生,最后都去了哪里?看完莫名心酸!...
  7. [转] 面向对象编程 - 获取对象信息
  8. 多个项目共用同一个redis_比Redis快5倍的中间件,为啥这么快?
  9. 安卓rom制作教程_MIUI官方ROM(卡刷包、线刷包)合集
  10. 算法设计与分析重点总结
  11. Python 利用 BeautifulSoup 爬取网站获取新闻流
  12. 网站制作笔记一域名购买与主机备案
  13. 虚拟机设置共享文件夹之后看不见文件(失败合集+成功分享)
  14. 家庭生活保养保洁大全(化学保洁)
  15. 指针进阶:函数指针的应用场景
  16. win7计算机属性资源管理器停止工作,Win7系统Windows资源管理器已停止工作怎么解决?...
  17. 《大数据架构和算法实现之路:电商系统的技术实战》——3.2 案例实践
  18. 查找计算机里包含相关文字,搜索word包含文字内容
  19. A Comparison of CNN-Based and Hand-Crafted Keypoint Descriptors论文阅读笔记
  20. ffmpeg js转换音频_linux下使用ffmpeg将amr转成mp3

热门文章

  1. css中标准盒模型和怪异盒模型的区别,如何将标准盒模型转换为怪异盒模型
  2. 四川大学计算机考研信息汇总
  3. 冯康 计算机组装与维护,计算机组装与维护_毕业论文.doc
  4. 2021湖北省技能高考成绩查询,刚刚!湖北高考查分及志愿填报时间公布!
  5. 机器人工作空间解析分析
  6. 机器人学笔记之——操作臂运动学:驱动器空间、关节空间和笛卡尔空间
  7. mysql提权(mof udf 反弹端口)
  8. MapReduce作业提交流程
  9. 《ZLToolKit源码学习笔记》(17)网络模块之基础接口封装类SockUtil
  10. 如何有效率的学习马克思主义基本原理概论