WWDC22 Student Challenge Accepted 🎉
Endless Asteroids in Swift Playground App Gameplay Demo
☄️ Asteroids are target to shoot. When you hit by Asteroids, you lose 1 life
Asteroids are spawned with random position & movement direciton every beginning of waves. If asteroids goes out of screen, it appears at opposite side of screen.
i.e. When asteroid goes off screen at right-top point
, it appears at left-bottom
of screen again
There's 3 types of Asteroids: Big
Midium
Small
. When asteroid get hit by bullet, it usually splits into two smaller types of asteroids and in case of small
asteroid (which is smallest one), it vanished.
When Asteroid is splited, thier moving direction also changes randomly in 3 types: Horizontal
Right Up
Right Down
From graph above, (a,b)
is direction of existing asteroid
🌊 When you destroys all asteroids, you will face harder tiral...
Wen player destroys all asteroids, next wave with more and faster asteroids is comming. Speed and number of asteroids are decided by internal formula. Thus, there are endless wave.
🔋 The more waves you beat, the more difficult waves are comming. You should be stronger with these Power Ups
You can get Power Ups when you beat wave (100%) or hit astroid (with low chance)
Fire Faster Once you shot bullet, you need to wait until gun is reloaded. Makes you to fire faster. This reduce delay between shoots.
1 more Life Getting hit by asteroids is inevitable. Recharge more life as much as you can and prepare for harder wave
Score & Life | Asteroids Left | Backlog
- Score & Life Display current Score & Life left
- Asteroids Left Display number of Asteroid left. Bacuse some asteroid split into 2 when get hit, usually number of asteroid increses
- Backlog Notice events to user
Wave Starts
Get Power Ups
Loaded | Explosion
- Loaded Ship color represents bullet availability.
White
-> Can shoot /Black
-> Need to wait - Explosion Notice every Asteroid Collision (Hit by bullet, hit ship, Destroyed) using explosion effect
Download playground app from here
- Download
Asteroid.swiftpm
. If you are not downloded from iPad, put this file into iPad - Download Swift Playground from App Store and open.
- Tap "Location" (It's on Top left of playground app)
- Navigate and Select
Asteroid.swiftpm
- Tap "Asteroid" from main screen (aka my playgrounds)
- Tap
▶︎
- Download
Asteroid.swiftpm
- Run project using
iPad
Device or Simulator
Asteroids, Ship, Bullet, Explosion are all Vector Image
This app is developed for iPad
- iPadOS 15
- MacOS 15
- SpriteKit
- Swift 5
- Item Sprite: SF Symbols
- Sound Effect: Free Arcade Sound Effects from mixkit
If you get higher score, leave PR