COMP222 Asteroids Game

COMP222 - 2022 - First CA Assignment

Individual coursework

Asteroids-like Game

Assessment Information

Assignment Number 1 (of 2)

Weighting 12%

Assignment Circulated Friday 4 February 2022

Deadline Monday 28 March 2022, 17:00

Submission Mode Electronic

Learning outcome assessed 2. An appreciation of the fundamental concepts associated

with game development: game physics, game arti-

ficial intelligence, content generation;

The ability to implement a simple game using an

existing game engine

Purpose of assessment To implement a simple 3D game using a game engine

library

Marking criteria The marking scheme can be found in Section 3

Submission necessary in order No

to satisfy Module requirements?

Late Submission Penalty Standard UoL Policy

I enforce a “no error policy” in this module: If your code does not compile,

your mark will be capped at 40%. Thus, you may get a higher mark for an

incomplete solution than for an advanced sketch.

1

Figure 1: Before shooting asteroid Figure 2: After shooting asteroid

Objectives

This assignment requires you to implement a simple 3D game using the jMonkeyEngine

library. Optionally, you can use Unity 3D or Unreal Engine.

Basic Game Description

The objective of this assignment is to implement a game inspired by the classic arcade game

“Asteroids”, see, for example,?https://en.wikipedia.org/wiki...(video_game)

and?https://www.youtube.com/watch...

The game is played on a rectangular “field” bounded by walls from above, below, left and

right (the original game has no walls, but your game has). The game objects (“asteroids”)

are positioned inside the field and can “float” in a linear movement (by translation). When

an asteroid collides with a wall or another asteroid, it “bounces” (changes direction according

to Newton Laws without gravity). A player controls a spaceship that is able to “fly” inside

the field and to “shoot” bullets. When a bullet strikes an asteroid, the asteroid “breaks”

into a few smaller asteroids (at least 2 ) that float in directions and speeds different than the

direction and speed of the original (broken) asteroid. An asteroid can break into smaller ones

at most 5 times, i.e. when an asteroid of minimum size gets shot by a bullet, the asteroid

disappears (is removed from the field). The player wins when all asteroids are removed from

the field. The player loses when an asteroid collides with the spaceship.

Figure 1 shows an example of the the game’s setup, i.e. within a field bounded by 4 walls,

there exist 3 asteroids (large green balls) “floating” according to the blue vectors (arrows),

as well as 1 spaceship (blue triangle) shooting towards one asteroid (red dashed line). Figure

shows the effect of the bullet hitting an asteroid, i.e. it is removed from the game and

replaced by two smaller asteroids (smaller red balls) that float towards different directions

and speeds than the removed greed ball.

2

Marking Scheme

The assignment is split in a number of steps. Every step gives you some marks. You do

not have to implement them in any particular order. Also, the steps below describe what

is expected from you in a bit more detail. It is up to you if you implement the following

functionalities using your game engine’s internal functions, or if you write your own functions

to do so. Neither choice will be favored with extra points.

Step 1: Modeling the environment (10%)

Model the playing field (4 walls), the asteroids and the spaceship. You can either use a 3D

modeling tool like Blender or use the shapes of the game engine you implement the game

in. You must put at least 3 asteroids on the field, and exactly one spaceship. Make sure

that the playing field is relatively large, i.e. if the size of the field does not facilitate smooth

gameplay, marks will be removed.

Step 2: Keyboard interaction (20%)

In this step you should implement the control of the spaceship from input given by the human

player. Preferably the player should use the keyboard. However, using other input methods,

such as the mouse, is not disallowed. The step is further divided into smaller sub-steps.

Step 2.1: Implementing “fly” (15% / 20%)

In this step you should implement the “flying” of the spaceship. The spaceship has some

initial direction and has its initial speed equal to 0. Assuming you take input from the

keyboard, you assign 4 buttons: button “forwards” increases the speed of the spaceship

along the current direction; button “backwards” decreases the speed of the spaceship along

the current direction; button “rightwards” rotates clockwise the direction of the spaceship

with some fixed angular speed; button “l(fā)eftwards” rotates counter-clockwise the direction of

the spaceship with some fixed angular speed.

Step 2.2: Implementing “shoot” (5% / 20%)

In this step you should implement the “shooting” of the spaceship. Assuming you take input

from the keyboard, you assign 1 button “shoot” which releases a bullet from the position

of the spaceship and along the current direction of the spaceship. The speed of the bullet

should be relatively fast (at least faster than the spaceship). The amount of bullets is for

you to decide. The interaction of the bullet with the asteroids is described below in Step

3.3.

3

Step 3: Physics 30% total

The purpose of this step is to model the physical interaction of the game entities. The step

is further divided into smaller sub-steps.

Step 3.1: Implementing “float” (5% / 30%)

In this step you should implement the “floating” of the asteroids. They move linearly

according to a given initial direction and speed.

Step 3.2: Implementing “bounce” (10% / 30%)

In this step you should implement the “bouncing” of the asteroids. When an asteroid

collides with a wall, it should reflect off the wall. When two (or more) asteroids collide with

each other, they should reflect off each other. The bouncing should follow Newton’s Laws

and should not take gravity into account, because supposedly the game takes place in outer

space. When an asteroid collides with the spaceship, the player loses.

Step 3.3: Implementing “break” (15% / 30%)

In this step you should implement the “breaking” of the asteroids. An asteroid “breaks” into

smaller ones after it has collided with a bullet. “Breaking” means that the original asteroid

is removed from the game and is replaced by 2 (or more) smaller asteroids. The direction and

speed of the smaller asteroids should be different than that of the removed asteroid. (I don’t

pose any other restriction, it’s up to you how the smaller asteroids behave.) Also, breaking

of an asteroid should be done at most 5 times, otherwise the game will never end. I.e. when

an asteroid of minimum size breaks, it is removed and not replaced by any asteroid(s).

Step 4: Gameplay (20%)

Add a visible points count and some kind of game levels. The point system is up to you to

define, for example every hit of a bullet with some asteroid gives 1 point, or you can have as

points the percentage of bullets used to bullets that have hit asteroids. To get full marks for

this steps, you should have at least 2 levels and it should be clear when the player progresses

to the higher level. Moreover, it is important that the levels have increasing difficulty. How

this is achieved is again up to you, e.g. higher levels can have more asteroids, or faster

asteroids, or break into more asteroids, or can break more times, or combinations of these

options.

Step 5: Creativity (20%)

You can see that the marks for the steps described above add up to 80%. In order to

get 20% extra you need to be creative and implement some nice features. Below are some

ideas: use textures, sound effects, lighting, power-up packs (making the spaceship immune

4

to impact with asteroids, or even able to function as a bullet itself), implement some system

on acquiring bullets, etc. Also, the above specifications do not define what happens if the

spaceship or a bullet hits the wall. Typically, they should simply stop at the point of collision.

However, you can be more creative here, and implement a weird bounce, or that they can

exit the field from the point of collision and re-enter from the opposite side (like the original

game).

Deadlines and How to Submit

Deadline for submitting the first assignment is Monday 28 March 2022, 17:00

Submission is via Canvas accessible from

https://liverpool.instructure...

All submission must contain the source code, the executable, the necessary files for the

runtime execution and a report.

For jMonkeyEngine submissions you are advised to export your project (File →

Export Project → To ZIP) and submit the ZIP file. Please ensure that the files you

submit can be loaded into jMonkeyEngine.

For Unity and Unreal Engine you are advised to build & export your game so that

it runs independently of these platforms; instructions are found online. To submit the

code you have scripted, copy it to a txt file. Please ensure that your submitted game

is playable.https://www.bilibili.com/video/BV1gA4y1f7kx

https://www.bilibili.com/video/BV1XW4y1C7yP

https://www.bilibili.com/video/BV1GY4y1x77y

https://www.bilibili.com/video/BV1AU4y117Gx

https://www.bilibili.com/video/BV1yY411K7BB

https://www.bilibili.com/video/BV15v4y1G7nC

https://www.bilibili.com/video/BV1vY411K7Tm

Please submit the report in the form of document (in pdf-format) containing a

check list indicating whether the above marking points have been implemented successfully.

In the extra features part of the checklist, describe the features you have

implemented.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市馍悟,隨后出現(xiàn)的幾起案子畔濒,更是在濱河造成了極大的恐慌,老刑警劉巖赋朦,帶你破解...
    沈念sama閱讀 216,692評(píng)論 6 501
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件篓冲,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡宠哄,警方通過查閱死者的電腦和手機(jī)壹将,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,482評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來毛嫉,“玉大人诽俯,你說我怎么就攤上這事〕性粒” “怎么了暴区?”我有些...
    開封第一講書人閱讀 162,995評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)辛臊。 經(jīng)常有香客問我仙粱,道長(zhǎng),這世上最難降的妖魔是什么彻舰? 我笑而不...
    開封第一講書人閱讀 58,223評(píng)論 1 292
  • 正文 為了忘掉前任伐割,我火速辦了婚禮,結(jié)果婚禮上刃唤,老公的妹妹穿的比我還像新娘隔心。我一直安慰自己,他們只是感情好尚胞,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,245評(píng)論 6 388
  • 文/花漫 我一把揭開白布硬霍。 她就那樣靜靜地躺著,像睡著了一般笼裳。 火紅的嫁衣襯著肌膚如雪唯卖。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,208評(píng)論 1 299
  • 那天躬柬,我揣著相機(jī)與錄音耐床,去河邊找鬼。 笑死楔脯,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的胯甩。 我是一名探鬼主播昧廷,決...
    沈念sama閱讀 40,091評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼堪嫂,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了木柬?” 一聲冷哼從身側(cè)響起皆串,我...
    開封第一講書人閱讀 38,929評(píng)論 0 274
  • 序言:老撾萬榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎眉枕,沒想到半個(gè)月后恶复,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,346評(píng)論 1 311
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡速挑,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,570評(píng)論 2 333
  • 正文 我和宋清朗相戀三年谤牡,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片姥宝。...
    茶點(diǎn)故事閱讀 39,739評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡翅萤,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出腊满,到底是詐尸還是另有隱情套么,我是刑警寧澤,帶...
    沈念sama閱讀 35,437評(píng)論 5 344
  • 正文 年R本政府宣布碳蛋,位于F島的核電站胚泌,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏肃弟。R本人自食惡果不足惜玷室,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,037評(píng)論 3 326
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望愕乎。 院中可真熱鬧阵苇,春花似錦、人聲如沸感论。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,677評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽比肄。三九已至快耿,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間芳绩,已是汗流浹背掀亥。 一陣腳步聲響...
    開封第一講書人閱讀 32,833評(píng)論 1 269
  • 我被黑心中介騙來泰國(guó)打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留妥色,地道東北人搪花。 一個(gè)月前我還...
    沈念sama閱讀 47,760評(píng)論 2 369
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親撮竿。 傳聞我的和親對(duì)象是個(gè)殘疾皇子吮便,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,647評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容