My second Game Jam! (Mini Jam 190)

I had a sudden urge to join a Game Jam.
This was my second attempt, and I had forgotten how stressful Game Jams can be. But if you manage to complete something on time, it’s also incredibly rewarding.
I had less than 72 hours to come up with a game idea and brainstorm the process.

I had no planning whatsoever because I found and joined this Jam after it had already started.
That could have been my excuse for not finishing, but I actually managed to complete and submit my game.

Out of 52 entries, my overall score was #16, and in the “Enjoyment” category I ranked #8, so I’m pretty happy with the outcome.
Like my first Jam nearly two years ago, I learned a lot—and it was totally worth the stress.
I might tackle another Jam in a year or so.

Note to self: The pixel art challenge was rough; try to work with someone next time.

The game is playable in PC browsers (Chrome, Firefox, Edge—unsure about others).

https://lazy-onigiri.itch.io/mini-miner

Destroy(gameObject);

Today, I learned about Destroy(gameObject)
Destroy isn’t ran immediately, but at the end of the frame.
I was testing the below code and noticed that the stump and treeTop would spawn twice instead of a single time. Turns out that when my Player hits the Tree via Collider detection, the Collider would hit the gameObject twice before the Destroy takes place.

I read there’s another option of using Destroy Immediate, but absolutely not recommended (many posts on the why’s if you google it)

I had a few quick fixes on the table, but ultimately decided to shorten the Player hit collider’s enabled time from 0.5f to 0.2f.

[Rpc(SendTo.Everyone)]
private void SpawnVisualsClientRpc(float randomYRotation)
{
	// Destroy the original tree
	Destroy(gameObject);

	// Spawn stump
	var stump = Instantiate(treeStumpPrefab, transform.position, transform.rotation);
	stump.transform.localScale = transform.localScale;
	Destroy(stump, 5f);

	// Spawn top
	var treeTop = Instantiate(treeTopPrefab, transform.position,
		Quaternion.Euler(0f, randomYRotation, 0f));
	treeTop.transform.localScale = transform.localScale;
	Destroy(treeTop, 5f);
}

Diving into Netcode for GameObjects

Reading all these posts about “Starting with Multiplayer compatibility is crucial to your game if you ever plan on having multiplayer”, was enough to get me started on testing out Netcode for GameObjects.
My recent practice project I started will be called “DevSlice”.

The goal of this project is to have mini implementations of game features.
Ideally having a scalable and decoupled code for reusability in my future “commercial” projects (if any). A verticle slice. Not too spend much time on art, although I totally get the projects are more fun with they nice on the eyes too.

Third day of testing netcode, a lot of reading, and asking Claude for help, I now understand that coding a multiplayer game is way more challenging.
Not just challenging, but time consuming, and having to be aware of each logic more thoroughly than a Single player only project. I am sure coding will become smoother once you get in the workflow.

Chopping trees, spawning resoureces

Today I tested how to simulate chopping a tree down, and spawn resources with a random rotation, random count.
Also noticed with the default behavior, the Player was hitting the spawned cut down tree and resoureces.
I learned how to create a dedicated layer for collisions to mask specified layers.