@noio@mastodon.gamedev.place avatar

noio

@noio@mastodon.gamedev.place

he makes games. Kingdom, Cloud Gardens, and most recently working on Pizza Possum

This profile is from a federated server and may be incomplete. Browse more on the original instance.

noio, to random
@noio@mastodon.gamedev.place avatar

With Unity's Localization system, it's really easy to display dynamic texts.
And the Input System knows bindings for actions,

so with a bit of plumbing it's easy to turn

this 🪄✨ into this!

image/png

noio,
@noio@mastodon.gamedev.place avatar

I turned it into a Unity package and it's open source:

https://github.com/noio/games.noio.input-hints

noio, to random
@noio@mastodon.gamedev.place avatar
noio, to random
@noio@mastodon.gamedev.place avatar

little reminder that I made a Unity package out of
the Cloud Gardens 🌱 Plant simulation

https://github.com/noio/games.noio.planter

noio, to random
@noio@mastodon.gamedev.place avatar

People don't talk about game architecture enough so!

💫 How do I ID things? 💫

Let's retrace how I reinvented the wheel!

Latest when adding your first 💾 Save Game 💾 system, you will find you need to ID your object types, cuz you can't store a reference to a Prefab

🧵

noio,
@noio@mastodon.gamedev.place avatar

In Kingdom, my first larger game, I just stored the file names of the prefabs (as strings)

This is

1️⃣ not very safe if you move files around
2️⃣ not so efficient in terms of space!

noio,
@noio@mastodon.gamedev.place avatar

For Cloud Gardens, I wizened up, and built a 'Database' of integer IDs for each object type, like:

Seeds DB:
1: Vine Seed
2: Oak Tree Seed
3: .. etc.

and

Props DB
1: Shipping Container
2: Rusty Barrel
3: .. etc

noio,
@noio@mastodon.gamedev.place avatar

This duplicates a lot of functionality, even though they're all
UnityEngine.Object (Components, GameObject, ScriptableObject)

So now I just store ONE database for the whole game, with all types of objects

Database.Get<Enemy>(3) returns an Enemy prefab with ID 3, if it exists

noio,
@noio@mastodon.gamedev.place avatar

Prefabs get a PrefabID component, and SO's have a ScriptableObjectWithID subclass
Both are automatically indexed

This has many advantages 🥳

e.g. Object Pooling! IDs are useful there because you need to know which pool to return an object to

noio,
@noio@mastodon.gamedev.place avatar

PrefabId has an additional "Instance Id" that is incremented when the object is retrieved from a Pool.

This is essential to see if a reference to a Pooled object is still valid (or whether the object was reincarnated in the mean time)

noio,
@noio@mastodon.gamedev.place avatar

Starting from a specific solution deeply integrated into the engine, I now have a handful of scripts that I can copy from project to project.

I imagine many of you ended up with similar systems, let me know!

(I honestly think Unity should have this built in but eh )

noio,
@noio@mastodon.gamedev.place avatar

@ciro yeah I always figured that was the 'real' solution but I bounced off on that restructuring.

➕ and there's the thing where creates duplicate 'instances' of your ScriptableObjects in a build.. (one for each bundle?)

noio,
@noio@mastodon.gamedev.place avatar

@jonasreich totally, but the image you are replying to is the Id shown ON the Prefab that it refers to. It's just to verify that the object has an Id.

Otherwise they're never displayed.

noio,
@noio@mastodon.gamedev.place avatar

@ciro looking at addressables again: yeah I should probably give it another shot! 🤭

Putting everything into one big bundle should give similar behavior.

Because assets in the same bundle can just be direct references and don't need an Async load?

noio,
@noio@mastodon.gamedev.place avatar

@ciro though I've got a question..

How would you go about retrieving the Address (what you call GUID?) for an Instance of a prefab?

(e.g. for finding which Pool to return object to)

Then you still need an additional component that stores the Address on the GameObject, no?

noio,
@noio@mastodon.gamedev.place avatar

@ciro exactly :)

So I'm now thinking even if I were to switch to Addressables, I'd still end up keeping most of my current system for linking to Prefabs/'Templates' as you call it.

noio, to gamedev
@noio@mastodon.gamedev.place avatar

guess i'm doing this in blender..

noio,
@noio@mastodon.gamedev.place avatar

@YinYinFalcon I did make them procedurally! Haha that worked also.

But now I’m using MicroVerse Roads (a Unity plugin) and it seems easier to just bite the bullet and hand build a small set ☺️

Also more maintainable. In 8 months when I forget how all of this works at least I’ll just be able to go in blender and edit models

noio,
@noio@mastodon.gamedev.place avatar

@jalict yeah, what's between them is just roads and those are easy to generate along a spline with fixed tangents at the end points.

I used Dreamteck before, now I'm using MicroVerse.Roads but they achieve the same things of generating a mesh along a spline path

noio, to gamedev
@noio@mastodon.gamedev.place avatar

felt a bit like wasted time when I created these gizmos but really happy I have them now and can tweak them for better and better debugging

I always try to build something like that "80% nice" in the beginning, then tweak it as I use it more..

noio, to random
@noio@mastodon.gamedev.place avatar

If you do anything with Unity Terrains you should check out MicroVerse on the asset store.

it's impossible to ever go back to hand painting terrain once you've experienced a non-destructive workflow 🤯

video/mp4

noio,
@noio@mastodon.gamedev.place avatar

@Robin_Van_Ee i don't know i don't see why not.. it's built on top of Unity Terrains and I don't see them changing that any time soon :)

noio, to gamedev
@noio@mastodon.gamedev.place avatar

working on upgrades

like special tires to drive up steep slopes

video/mp4

noio, to random
@noio@mastodon.gamedev.place avatar

a dead end..

please wishlist GARBAGE COUNTRY:

https://store.steampowered.com/app/2530870/GARBAGE_COUNTRY

video/mp4

noio, to gamedev
@noio@mastodon.gamedev.place avatar

I like URP 😅

it was hard to gather the necessary knowledge to build this (docs, examples)

but once it works it's kind of cool..

built this renderer feature to draw specific objects in low-res buffer, then blit that back, preserving depth and everything!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • everett
  • osvaldo12
  • magazineikmin
  • thenastyranch
  • rosin
  • normalnudes
  • Youngstown
  • Durango
  • slotface
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • tester
  • InstantRegret
  • ethstaker
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • khanakhh
  • cubers
  • cisconetworking
  • megavids
  • provamag3
  • lostlight
  • All magazines