Scrap Mechanic

Scrap Mechanic

65 ratings
ASTEROIDS Logic Game
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
4.920 MB
23 Dec, 2023 @ 4:33pm
6 Apr @ 5:27am
2 Change Notes ( view )

Subscribe to download
ASTEROIDS Logic Game

In 1 collection by kiveon
kiveon's logic games
11 items
Description
Pilot a spaceship and shoot asteroids! Destroying a big asteroids splits it into two small ones. Be careful not to get hit by them!

!! Put this on the lift a second time after loading to clear any possible glitches !!

VANILLA
16,785 logic blocks


W,A,D: move
1/left mouse button: shoot
2/right mouse button: spawn asteroids (in sandbox mode)
3: return to menu


MENU: navigate with A and D, select with 1/left mouse button or W

SURVIVAL MODE: a big asteroid tries to spawn every 10 seconds, 3 lives

SANDBOX MODE: spawn big asteroids manually, dying disabled


Points:
Small asteroid = 5 points
Big asteroid = 10 points
Full speed = 2.5 points/s

- 5 extra points for destroying two asteroids at once
- When there's already one asteroid the same size on screen, the new asteroid that spawns is worth 5 extra points
- Points for going full speed activate after clearing first asteroid
- At 300 points big asteroids spawn faster



Fun technical info:
- Maximum number of asteroids on screen is 5 (2 big, 3 small), this is because implementing a proper dynamic system for handling asteroids was too hard for my dumb little brain, so I did the easy thing and made 5 separate controllers for 5 asteroids
- In survival mode a big asteroid tries to spawn every 10 seconds, after 300 points it's 5 seconds
- A big asteroid will spawn 2 small asteroids only if there is room for 2 small asteroids
- Big asteroids can spawn stationary because they have a 0 velocity option in their randomizer, while small asteroids will always have some velocity in both axis
- Index 2 big asteroid and index 3 small asteroid are hardwired with 5 extra points, so actually it is always those specific asteroids that will give you the extra points, just these asteroids can only spawn if you haven't cleared the screen from other asteroids
- Points for going full speed with your ship was implemented as an incentive to move more, since I found myself sitting still and just shooting quite a lot
- Ship's max speed is 20 pixels/s, bullets travel 40 pixels/s
- Ship only has collision on it's nose, not the tail
- Collision between the ship and asteroids happen with the pixels that you see, so the asteroid collision is hollow, but collision between the bullet and asteroid is solid, also small asteroid bullet hitbox is the size of a big asteroid
- There is only one bullet entity, so fire rate is limited until the previous shot despawns
- The ship physics are *kind of* an illusion, there is no actual math or calculations being made, acceleration has a fixed speed clock that will increase or decrease velocity counter which determines the speed of the clock that increments or decrements ship coordinates
- The ship has air resistance, it doesn't really make sense since it's space but the original game had it too
- This creation should be completely spawn glitch proof, meaning it should be ready to play straight after loading without needing to put it on lift a second time (this was fricking pain to implement lol) edit: might still not be spawn glitch proof for everyone :/
15 Comments
Itz_Bulle 6 Mar @ 11:17am 
how long did it take to make????
anya.valenzuela 2 Mar @ 1:46am 
░░░░▄█▌▀▄▓▓▄▄▄▄▀▀▀▄▓▓▓▓▓▌█ Doge
░░░▄█▀▀▄▓█▓▓▓▓▓▓▓▓▓▓▓▓▀░▓▌█ Can
░░█▀▄▓▓▓███▓▓▓███▓▓▓▄░░▄▓▐█▌ Take
░█▌▓▓▓▀▀▓▓▓▓███▓▓▓▓▓▓▓▄▀▓▓▐█ Over
▐█▐██▐░▄▓▓▓▓▓▀▄░▀▓▓▓▓▓▓▓▓▓▌█▌ Steam
█▌███▓▓▓▓▓▓▓▓▐░░▄▓▓███▓▓▓▄▀▐█ So
█▐█▓▀░░▀▓▓▓▓▓▓▓▓▓██████▓▓▓▓▐█ Do
▌▓▄▌▀░▀░▐▀█▄▓▓██████████▓▓▓▌█▌Copy
▌▓▓▓▄▄▀▀▓▓▓▀▓▓▓▓▓▓▓▓█▓█▓█▓▓▌█▌ And
█▐▓▓▓▓▓▓▄▄▄▓▓▓▓▓▓█▓█▓█▓█▓▓▓
KingSimpson369 6 Feb @ 9:42am 
It must've taken you a million years to make this
FUGU 3 Feb @ 10:12am 
true legend
JJplays07 1 Jan @ 11:42pm 
This man will never stop with these games
angusb0 28 Dec, 2023 @ 11:32pm 
dang it i had the same idea
froggy empire 28 Dec, 2023 @ 4:59pm 
the connections blow my mind
𝕶𝖎𝖗𝖆 27 Dec, 2023 @ 11:26am 
я ахуе с тебя чел кто создал эта чудо
Paprika7x 26 Dec, 2023 @ 9:54pm 
огосебе!!!
FlashofAsh 26 Dec, 2023 @ 8:54am 
the more of these games you make the more impressed i get, and yet you somehow are doing it exponentially instead of linearly