Ocean Village - A dev blog

Morning bite - Boat, bridges, resources

January 08, 2020 - Wednesday morning

I added some stuff! 🤓

  • Load buildings from resources folder
  • Construction boat!
  • Platforms only have bridges to other platforms
  • Clicked a button to enable Portrait orientation

I had all the building models in inactive game objects in the platform prefab 😅. I'd place them on a triangle (or over two or three depending on the building size) manually, and just instantiate a clone and rotate as necessary. I've cleaned this up a bit and moved all the buildings to their own prefabs that are loaded from Resources at runtime.

This should reduce memory usage and decrease instantiation cost of platforms (and speed up world loading, once I circle back on serialization 😬).

The "construction boat" is in! It's a big green cube. It's a post-modernist boat. It doesn't do anything useful other than wander towards the latest construction site you plopped down. I'll be adding the boat actually doing work soon, instead of construction sites just absorbing energy from the ether.

Platforms used to just have dangling half-bridges towards all sides, which would just connect with that of bordering platforms once they pop into existence. I felt like they made the visuals very noisy, and I needed to change them anyways since the boat didn't fit underneath. Now they arch, and only exist if there's a platform towards that direction. I cleaned up the coordinate and platform side code along the way.

The UI elements are very sparse so far, and I hope to keep the UI overall as minimal as possible. What I do have works fine in both landscape and portrait, so I enabled rotation. Playing the game in portrait feels a little more zoomed in, which I liked as you can see the residents much easier. The game is unplayable with one hand though, and I may need to add double-tap as zoom (or toggle-able zoom slider).

What I'll need to add for player boat construction is:

  • Logical sim awareness of the boat
  • Boat go and arrive messages
  • Construction queue and limit
    • Inform players about limit

And for the rest of the day (likely the next):

  • Parks - the first 'massive' size, entire-platform building
    • Residents should go every now and then
    • Residents wander around in parks

Say hi! Enable JS to see my email (or send to this domain)