Asteroids

A simple Asteroids clone I made just to see how it would feel to work on a project with a small scope and known boundaries. I still managed to have some feature creep, but I got it done in a fairly short amount of time.

The game is based on the classic Asteroids, but mostly on this:
http://www.classicgaming.cc/classics/asteroids/index.php

The classic game mode replicates the original as closely as I bothered to make it. The custom game mode lets you tweak a few settings. There's some additional settings available for tweaking in the project that I didn't bother making available in-game.

To submit your high score you have to be playing the classic game mode.

Sounds effects are taken from the above link. All credits go to them. The only exception is the shield hit sound effect which I made myself.

The entire project is available for download by clicking the link on the right, no strings attached, do whatever you want with it.

I made a work in progress thread for this project on the official Unity forums if you're interested in seeing that. It is probably the tightest most structured project I've done in Unity, which was cool. Sadly none of the old builds are available, but it may be of some interest anyway. Here's a link to the thread:
http://forum.unity3d.com/threads/asteroids-clone.282022

Øyvind Strømsvik's picture

About Øyvind Strømsvik (TwiiK)

I've been passionate about games all my life and started dabbling in game development about 15 years ago with BlitzBasic,... read more but I quickly lost interest and began doing 3d modeling instead. 3d modeling remained a hobby and I picked up game development again around the release of Unity 2.0. My driving force behind wanting to get back into game development was my lost interest in commercial games as they started appealing to a group of gamers I was no longer in. Indie games were the only games that still looked interesting, but at the same time some of them looked like they would be just as fun to make as to actually play. And many of them were made by just one guy.

Tagged with: 2D, Classic, Unity

Standalones

Windows:
Download v.1.0.2 (10.64 MB)

Mac:
Download v.1.0.2 (13.24 MB)
Mark's picture

Mark

Thanks for giving away the project. This is a really fun game and its cool to see how its made. Will you continue to work on it?

Øyvind Strømsvik's picture

Øyvind Strømsvik

@Mark: Hey, Mark. Glad you like it. I doubt I'll continue with this project. I only did this project to get me started with Unity game development again. I had been away for a long time and I find it very hard trying to get back into the some of my old, big, never-ending projects. Sometimes it's just easier to find a small project or a tutorial to kickstart the process. :) One of my old, big, never-ending projects is a Grid Wars / Geometry Wars clone. I'll rather work on that than continue on this.

john's picture

john

how do you do the high scores on the website?

Øyvind Strømsvik's picture

Øyvind Strømsvik

@john: John, you can download the entire project and see for yourself, here:
http://twiik.net/sites/default/files/unity/project/asteroids-1.0.2.zip

I am also thinking of doing a tutorial on the subject. About the server side coding and database setup required. I can't say anything on whether or not this will happen or when it will be done though.

Add new comment

Rank Name Score Date
1 james 22200 12.04.2016 16:09
2 TheVorbicle 18400 18.02.2015 20:56
3 GotTheHighscoreNowjusttosuicide 18400 10.06.2015 06:02
4 Anders 11740 24.02.2015 12:44
5 1 11070 22.12.2016 10:31
6 james 10870 12.04.2016 16:11
7 QWE 8500 27.03.2015 04:47
8 Anders 7900 24.02.2015 19:06
9 q 7530 19.12.2016 08:41
10 z 7350 19.12.2016 08:56
11 a 7300 19.12.2016 10:05
12 Dave 6760 25.04.2016 16:28
13 a 6530 19.12.2016 08:59
14 TheVorbicle 6510 17.02.2015 22:59
15 dammit 6380 11.12.2014 23:56
16 1 6380 16.12.2016 05:59
17 1 5980 19.12.2016 08:32
18 tontool 5880 29.04.2017 20:52
19 a 5860 22.12.2016 10:33
20 aaa 5850 12.04.2016 15:34
21 1 5820 19.12.2016 04:33
22 z 5720 19.12.2016 08:54
23 aaa 5550 20.05.2016 15:19
24 a 5500 19.12.2016 10:02
25 a 5480 19.12.2016 08:43
26 Anders 5380 24.02.2015 19:00
27 1 5380 16.12.2016 09:55
28 ASD 5380 27.03.2015 04:54
29 Anders 5280 24.02.2015 19:02
30 butthole 5130 17.02.2015 23:45
31 sss 5030 21.05.2016 16:18
32 q 4930 17.03.2017 12:56
33 DASD 4830 27.03.2015 04:40
34 1 4760 19.12.2016 04:24
35 aaa 4680 30.11.2015 20:30
36 durr 4630 11.12.2014 23:54
37 a 4580 22.12.2016 09:33
38 Superduperdude1000absolutekiller 4480 11.12.2014 19:34
39 Kyle 4480 05.11.2017 06:57
40 a 4410 20.12.2016 08:59
41 Anders 4360 24.02.2015 19:03
42 TwiiK 4330 11.12.2014 19:46
43 SAD 4260 27.03.2015 04:45
44 1 4230 19.12.2016 05:37
45 df 4160 11.05.2016 00:50
46 qa 4160 19.12.2016 08:48
47 DSAD 4130 27.03.2015 04:43
48 wd 4110 21.04.2016 11:17
49 ASD 4110 27.03.2015 04:49
50 1 4080 22.12.2016 10:34
51 1 4060 19.12.2016 08:33
52 1 4030 19.12.2016 04:26
53 james 3950 12.04.2016 15:37
54 q 3940 17.03.2017 12:55
55 s 3930 19.12.2016 08:51
56 HHH 3880 28.02.2015 18:07
57 asshole 3780 05.05.2016 15:35
58 ASDF 3780 27.03.2015 04:51
59 xD 3780 18.06.2017 18:35
60 poop 3780 20.07.2016 03:15
61 cappie 3710 23.09.2015 21:36
62 aaa 3530 19.12.2016 10:07
63 a 3480 19.12.2016 09:36
64 Nick 3440 11.02.2017 18:35
65 1 3430 16.12.2016 10:20
66 Anders 3370 24.02.2015 18:57
67 q 3330 18.03.2017 04:52
68 james 3310 12.04.2016 16:02
69 ce 3310 05.12.2015 23:12
70 z 3290 23.06.2016 13:03
71 Adam 3290 01.02.2015 23:10
72 Anders 3190 24.02.2015 12:09
73 1 3140 16.12.2016 10:18
74 Anders 3070 24.02.2015 12:11
75 james 3050 12.04.2016 16:01
76 lol 2930 30.12.2014 00:13
77 a 2920 19.12.2016 08:45
78 1 2910 19.12.2016 04:47
79 s 2900 27.09.2016 10:19
80 1 2880 19.12.2016 08:29
81 ze 2850 15.06.2016 10:04
82 m 2850 27.09.2016 10:37
83 1 2840 16.12.2016 04:44
84 ffff 2810 21.05.2016 02:52
85 ThisIsANiceSite 2780 15.07.2015 17:29
86 Jordi 2780 09.02.2015 18:49
87 q 2780 20.03.2017 09:35
88 Bazze 2780 02.03.2017 02:29
89 Yanex 2770 29.11.2016 16:59
90 ee 2740 29.03.2016 17:50
91 q 2720 17.03.2017 13:04
92 1 2720 19.12.2016 04:34
93 1337Master 2720 01.12.2017 22:06
94 Zach 2710 02.02.2016 05:31
95 a 2690 23.12.2016 10:17
96 unity 2680 06.08.2016 23:14
97 A 2680 22.12.2016 09:35
98 miguelitoelpro 2680 03.11.2016 14:50
99 james 2630 12.04.2016 16:04
100 DS 2600 27.03.2015 04:48
101 james 2600 12.04.2016 15:38
102 erg 2600 16.01.2016 12:40
103 mak 2580 27.09.2016 09:35
104 wd 2580 21.04.2016 11:19
105 1337 2570 05.12.2017 23:20
106 Anders 2570 24.02.2015 18:58
107 Dave 2500 25.04.2016 16:25
108 ASDSA 2480 27.03.2015 04:36
109 aaa 2480 30.11.2015 20:27
110 q 2480 19.03.2017 02:12
111 sd 2430 01.11.2017 07:48
112 1 2430 16.12.2016 10:16
113 hurr 2380 11.12.2014 23:53
114 Chartman 2380 07.04.2015 19:54
115 redbaron 2380 02.11.2015 08:06
116 tontool 2380 29.04.2017 20:55
117 james 2380 12.04.2016 15:24
118 Anders 2380 24.02.2015 12:07
119 Anders 2380 24.02.2015 12:40
120 Arvs 2380 28.07.2017 02:34
121 nmm 2380 09.02.2016 00:47
122 1 2380 16.12.2016 09:51
123 ASD 2350 27.03.2015 04:51
124 nowinner 2330 11.05.2016 01:05
125 meh 2280 01.05.2015 14:50
126 DSAD 2280 27.03.2015 04:38
127 a 2280 22.12.2016 10:28
128 eeee 2280 26.09.2015 14:08
129 NIKKIYANEZBOIIIIII 2280 29.11.2016 17:27
130 nevermind 2280 23.11.2016 18:47
131 a 2280 16.12.2016 04:45
132 q 2180 17.03.2017 12:53
133 a 2180 19.12.2016 08:49
134 aaa 2180 30.11.2015 20:28
135 yiyo 2180 02.11.2016 21:04
136 idiot 2180 05.05.2016 15:36
137 ddd 2180 21.05.2016 02:51
138 a 2130 19.12.2016 08:44
139 Magnu 2080 10.06.2015 05:44
140 1 2080 16.12.2016 05:56
141 1 2080 16.12.2016 05:57
142 t 2080 16.12.2016 04:42
143 Mark 2080 26.02.2015 15:32
144 Derpatron1000 2080 11.12.2014 19:33
145 xD 2080 18.06.2017 18:36
146 q 2080 24.12.2016 05:20
147 ppp 2030 18.02.2015 15:23
148 ddd 2030 27.02.2016 08:56
149 t 2030 16.12.2016 04:41
150 1 1980 20.12.2016 08:50
151 1337 1980 05.12.2017 23:16
152 sa 1980 31.08.2016 16:32
153 555 1980 06.10.2015 14:03
154 NJ 1980 01.02.2016 13:50
155 a 1980 19.12.2016 08:52
156 Magnu 1980 10.06.2015 05:49
157 q 1960 18.03.2017 04:54
158 dm 1930 29.03.2015 22:36
159 1 1930 01.12.2017 22:07
160 q 1880 20.03.2017 09:34
161 453 1880 02.06.2016 22:40
162 t 1880 16.12.2016 04:39
163 m 1880 27.09.2016 12:21
164 1 1880 19.12.2016 08:34
165 1 1880 19.12.2016 05:39
166 a 1880 19.12.2016 08:47
167 bobby 1880 27.07.2015 08:59
168 Arvs 1830 28.07.2017 02:33
169 james 1780 12.04.2016 15:22
170 fdf 1780 09.03.2016 15:51
171 1 1780 16.12.2016 06:00
172 SAD 1780 27.03.2015 04:42
173 SDAD 1780 27.03.2015 04:41
174 Marco 1780 26.09.2015 16:06
175 unity 1780 29.08.2016 02:23
176 bob 1780 04.03.2015 04:54
177 aaa 1780 21.05.2016 00:08
178 rg 1760 11.05.2016 00:57
179 Spiff 1730 11.12.2014 23:57
180 dw 1730 21.04.2016 11:13
181 dsa 1680 22.02.2015 19:40
182 Magnu 1630 10.06.2015 05:47
183 aTomas 1630 26.03.2017 23:18
184 unity 1630 06.08.2016 22:49
185 q 1630 19.03.2017 02:13
186 A 1630 21.05.2016 02:42
187 aaa 1580 21.05.2016 02:55
188 dfdf 1580 21.03.2015 17:31
189 as 1580 27.03.2015 04:35
190 james 1580 12.04.2016 11:31
191 q1 1580 16.12.2016 09:51
192 a 1530 19.12.2016 08:38
193 1 1530 19.12.2016 05:38
194 a 1530 28.02.2015 18:05
195 Yanex 1480 29.11.2016 16:35
196 John 1430 11.12.2014 19:02
197 DASDASD 1430 27.03.2015 04:49
198 RedBaron 1430 02.11.2015 08:04
199 dkfg 1430 23.11.2016 22:32
200 olive 1430 05.04.2015 11:46
201 sdsd 1380 02.04.2015 04:54
202 test 1380 02.03.2016 04:15
203 a 1380 24.02.2015 19:06
204 sss 1330 20.05.2016 15:17
205 ka 1330 27.09.2016 10:21
206 aa 1330 25.02.2016 19:46
207 1 1330 16.12.2016 04:46
208 1 1310 19.12.2016 04:48
209 56 1280 16.12.2015 08:52
210 q 1210 18.03.2017 04:51
211 Dontbossmearound 1180 03.05.2016 02:35
212 q 1180 24.12.2016 05:19
213 wd 1180 21.04.2016 11:16
214 kjames 1160 12.04.2016 15:18
215 dwa 1110 21.04.2016 11:15
216 a 1080 19.12.2016 08:35
217 112233 1080 24.04.2016 01:58
218 Arvs 1010 28.07.2017 02:32
219 dios 980 27.02.2016 22:39
220 1 980 16.12.2016 09:53
221 JUAN 980 02.11.2016 05:37
222 dfds 960 22.09.2015 00:40
223 12342fasdf 960 02.11.2016 18:47
224 unity 960 11.09.2016 13:18
225 james 910 12.04.2016 16:11
226 Tug 880 02.11.2016 14:16
227 uip 860 10.03.2016 01:53
228 gad 830 21.06.2015 17:44
229 Ames 810 26.09.2016 06:18
230 1337Master 810 01.12.2017 22:04
231 asdfhaskjdhfklas 780 02.11.2016 14:43
232 2 780 24.04.2016 01:11
233 yuy 730 02.11.2016 04:26
234 aaa 710 06.09.2016 14:41
235 tuyt 680 27.07.2015 08:58
236 1 660 24.04.2016 01:11
237 wda 560 21.04.2016 11:14
238 B 540 12.12.2014 21:07
239 vadsa 540 22.02.2015 22:20
240 wewew 520 13.01.2016 09:25
241 a 510 29.09.2016 11:51
242 test 510 16.12.2015 08:50
243 m 510 27.09.2016 12:07
244 q 490 19.03.2017 06:07
245 TwiiK 440 08.01.2017 19:16
246 james 390 12.04.2016 15:00
247 Frank 380 23.01.2015 20:45
248 d 360 08.06.2016 23:58
249 1 340 22.12.2016 04:43
250 1 310 02.04.2016 07:19
251 Ethan 310 28.09.2016 06:11
252 Seakull 290 28.03.2016 16:34
253 me 290 16.04.2017 14:48
254 q 280 19.03.2017 02:11
255 b 270 29.03.2016 06:31
256 o 260 22.12.2016 04:42
257 Luis 260 02.11.2015 20:27
258 1 240 02.04.2016 07:27
259 TwiiK 210 11.02.2015 21:16
260 essai 170 30.03.2015 15:36
261 fgdsa 170 02.11.2016 04:22
262 hfkjsdf 160 02.11.2016 04:19
263 1 140 22.12.2016 04:44
264 Lul 90 08.01.2017 18:47
265 1 90 22.12.2016 04:43
266 rtyui 90 02.11.2016 04:23
267 Ethan 90 30.09.2016 08:42
268 w 90 01.12.2016 17:14
269 g 90 27.12.2016 09:04
270 1 90 19.12.2016 08:29
271 yiyo 90 02.11.2016 04:23
272 ftyui 80 02.11.2016 03:48
273 w 60 01.12.2016 17:12
274 Tom 60 11.12.2014 19:01
1.0.2 - January 8, 2017
  • Upgraded the project to Unity 5.4.4.
  • Made the highscore code work with the standalone builds and re-added the highscore display that I removed when the Web Player went away.
  • Added Windows and Mac standalone builds.
  • Removed my end point urls and secret key from the project because leaving those in was a slight security issue.
  • Added a README.txt to the project.
1.0.1 - January 1, 2016
  • Upgraded the project to Unity 5.3.
1.0.0 - February 20, 2015
  • Misc bug fixes and polish.
  • Made the project folder available for download.
0.9.0 - February 11, 2015
  • Changed "Volume" to "Game volume".
  • Changed "Preset" to "Game mode".
  • Added descriptions to what the different game modes are.
  • Added "Game over" title text and a slight delay before the score prompt appears.
  • Added a small delay before the next wave starts.
  • Added extra lives at score multiples of 10000.
  • Changed it so asteroids don't spawn on top of the player.
  • Added a few seconds of invulnerability after death.
  • Allow UFO's to spawn on the right side of the screen and fly left.
  • Spawn less UFO's.
  • Tweaked the way UFO's reorient themselves after colliding in shield mode.
  • Made it so that you can only submit your score if you play the Classic game mode.
  • Fixed a bug where asteroids would rotate in classic mode.
  • The music beat now stops when transitioning to a new wave.
0.8.1 - December 12, 2014
  • You now have to enter at least 1 letter to be able to submit your score and you can only click the button once.
  • Fixed a bug where the shield and/or flame of your ship would be visible when you died or teleported.
  • Removed the next-gen mode. I've decided to cut features and instead include them in another project.
0.8.0 - December 11, 2014
  • Highscores are now in the game
0.7.0 - December 9, 2014
  • Added game presets to the menu. You can now choose between "classic", "next-gen" or "custom". Next-gen is lackluster at the moment, but I have some ideas. :p
  • Added the pointy flame to the end of your ship.
  • Added stars in the background.
  • Tweaked the way the shield mode works. You now have 20 shield and lost 5 when taking a hit. You regain 1 shield every 5 seconds if you don't get hit.
0.6.0 - December 7, 2014
  • Added a new game option. You can now choose to play with a rechargeable shield instead of the normal 3 lives. Enemy UFO's will also have shields with this option selected, but their shields do not recharge.
  • Fixed asteroid collisions when that option is enabled.
  • Added the small UFO which actually aims at you.
  • Given the UFO's some form of AI. The small one is smarter than the big one.
  • Fixed the known bugs.
0.5.0 - December 3, 2014
  • Added an option to turn on asteroid collision. It's not perfect yet, but it's fun
  • Added UFO's. Currently one UFO spawns every 10 seconds on the left side of the screen and travels across the screen randomly firing in all directions.
  • Asteroids now have random shapes.
  • Added the "Jaws" background music.
  • Known bugs
    • Some options seem to "stick" after the game restarts if you lose all your lives so you may not get the correct bullet cap and asteroid collision setting it seems.
    • I think the UFO's reset your bullet cap if you have it enabled.
0.4.0 - December 1, 2014
  • Added a menu with a few options. Many more options to come.
  • Fixed the transitioning from left to right and top to bottom. Asteroids, bullets and the player should now smoothly exit and enter the screen from all angles.
  • Added the default 4 bullets max mode from the original. I've chosen to keep autofire though. Having to spam the spacebar to fire is not very user friendly. May make it a choice later to preserve the original click to fire design.
  • Added simple particle effects.
0.3.1 - November 30, 2014
  • Removed Vectrosity from the project. It required to many changes to work properly
  • Made it so the line renderers draw the lines once normally and once in reverse order. This covers up a lot of the twisting and makes the lines look much better than they did before. Not as good as Vectrosity, but close.
  • Since Vectrosity caused all the known bugs they are all fixed now.
0.3.0 - November 26, 2014
  • Started using Vectrosity instead of Line renderers. Looks so much nicer
  • Made the game black & white
  • Added lives
  • Added the hyperspace button (shift) which teleports you to a random spot on the screen
  • A new level will start each time you clear out all the asteroids
  • Known bugs
    • If you lose all your lives the game restarts, but Vectrosity crashes catastrophically when that happens
    • There's some weird flickering as if it's trying to render using both Vectrosity and Line renderers at the same time
    • When you hyperspace the ship graphics stay behind when they should disappear
0.2.0 - November 25, 2014
  • Added some sound effects
  • You can now blow up the Asteroids
  • Added a score counter
0.1.0 - November 24, 2014
  • Initial release

There are no known issues or planned features at this time. If you've encountered a bug or have suggestions for additional features feel free to leave a comment and let me know.