You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

14h 56m 6s logged

Thanks for Mining That!

Devlog #1

(Technically #2, but the first one doesn’t really count.)

(Game made in Unity)

It’s been over a week since my last devlog, and I’ve made a lot of changes. I changed my original game idea where you had a wrecking ball in space, because it didn’t feel fun.


My New Idea

Still space mining, but you can’t actually mine anything.
And to make it even better, hundreds of enemies are flying straight toward you, and all the resources you want are inside asteroids.

Fortunately, these enemies have ‘volunteered’ to help.
All you have to do is ‘convince’ enemies to crash into asteroids.
Enemies destroy themselves, asteroids break apart, resources are released, and everyone except you is doing the work. You’ll collect the resources and use it to craft tools, to help manipulate the environment.

Use coins you get to unlock more tools after you die.


What I’ve Done So Far

Here’s what I already have so far:

  • Player Controller
  • Enemy Controller
  • Asteroids
  • Main Menu & Death Screen
  • Mini Map
  • Enemy Spawner
  • Asteroid Spawner
  • Object Pooling System

More detailed explanation below


Player Controller

The player can use either Keyboard or Mouse to move. The game detects which one you are using and automatically switches.

Keyboard Controls

  • A / D - Rotate left and right
  • W / S - Move forward and backward

Mouse Controls

The ship rotates toward the mouse cursor with speed calculated using distance from cursor to player.

  • Cursor close = slow
  • Cursor far = fast (limited range)

Enemy Controller

The enemy behaviour uses:

  • Max Speed
  • Turn Speed
  • Thrust

Enemies rotate toward player using turning speed.
Low-thrust enemies make wide turns, while high-thrust enemies make more accurate turns.

Enemy velocity is capped with max speed.


Asteroids

Health scales with mass and ore. Mass also affects movement speed.

Asteroids are assigned a direction when they spawn. Slowly corrects direction if pushed off course.


Game Loop

The current game loop:

  • Main Menu
  • Gameplay
  • Death Screen

Game Manager handles main logic.


Mini Map

Added after realizing asteroids are hard to find.

Created using a secondary camera with a larger view. Camera follows the player and renders to a texture, displayed in UI.


Asteroid Spawning

Asteroids spawn from a list of spawn points spread across the map.
Every ~25 seconds, chance to spawn at each point.

Each asteroid has:

  • A randomized size
  • Random asteroid sprite

Enemy Spawning

Spawn points are attached to the player.
Every ~5 seconds, a random spawn point is selected and an enemy bunch is spawned.


Object Pooling

Initially, every enemy and asteroid was created using Instantiate(), which caused lag.

To solve this, I switched to object pooling.

The object pool creates a collection of enemies and asteroids. When an object is needed, it is activated and moved into position.

This improved overall performace.


What’s Next?

There’s still a lot left to make:

  • Radiation Barrier
  • Tools & Upgrades
  • Ore Types
  • More Spaceships
  • Enemy Variants
  • Pixel art
  • Better UI
  • Other stuff which I can’t think of

This was a much larger devlog than usual, but since I have changed so much, I didn’t want to skip anything.

Personally, I think the game is more fun than the earlier wrecking ball idea, and though the game is not finished, it still feels good to play.

If you have any feedback or suggestions, I would really appreciate them.

Thanks!

(Note: Some parts might feel a bit weird since I had to shorten it to fit it in the character limit)

0
90

Comments 4

@Falling10fruit

Based on your description of the enemy movement. It sounds like the enemy might have a bit of trouble hitting the player, opting to orbit instead. Did that happen?

@StarCoder

Yes, that is the intended effect for the enemy script. i wanted the enemy to have a hard time accurately tracking the player because the player needs to be able to dodge the enemies so they will crash into asteroids. Later on, there will be more difficult enemies, but those will only appear when certain tools have been unlocked so players do not need to only rely on dodging.

@Chrissy

This reminds me of an old arcade game known as Sinistar. Was it inspired by it?

@StarCoder

I’ve actually never heard of the game, so no, it was actually inspired from this old Scratch game I had played several years ago, which I don’t remember the name of.