Skip to content

Narwhal Simulator 17: New Map

Hi everyone! I know that last time I said this installment of the Narwhal Simulator series would be boring, but as it turns out, I have some interesting stuff to share! Let’s get right into it.

This week’s main objective was to be able to attach scripts to blocks. I’ve done quite a bit of research and this isn’t feasible, at least not without getting creative. A tile cannot have individual data that isn’t shared with other tiles of the same type. This is very efficient, but means that I can’t store local data, like scripts. Instead, I’ll have to implement a sort of Entity-Component-System design, but not in its entirety. An Entity-Component-System model is a design where there are 3 things:

  • Entities, which represent individual objects
  • Components, which are attached to entities and contain data for the 
  • Systems, which execute code on every entity with a certain component

Unity has a built-in ECS system, but it isn’t what I’m looking for. In my Entity Component System design, the entities will be tiles. Every tile will technically be its own entity. Tiles won’t have components, their type will act as their component. For example, if a tile is of the type SpawnerTile, the Spawner system will operate on it. This still means I can’t store individual data. I’ll leave this up to the systems, which will be their own Unity MonoBehaviours (scripts). This isn’t a real ECS implementation because of how the tiles aren’t actually entities and can’t hold their own data. That’s ok because I don’t really care, since it works anyway.

I’ll go more in-depth into how I did tiles later, maybe in a separate post. There aren’t very many advanced Unity Tilemap tutorials and I don’t want anyone who finds my blog when searching for tilemap information to have to read a bunch about Narwhal Simulator. If I get around to writing it, I’ll link it here.

Now for the fun stuff. I decided to spice up the map a bit, since I had done so much boring stuff throughout the week. It’s quite big and interesting now. I’ll go through the different areas.

This isn’t nearly as big as I intend to make things. I plan on making each area at 4x-16x the size of this current map. I think I might use the map as a sort of insurance in the future. If there’s a week where I haven’t done much or have been working on something boring, I’ll make some quick map updates to make the posts at least a bit interesting.

Oh also, I added a screenshot feature, mostly to make my job easier, but it should be cool for you too. You can hit F2 to take a screenshot. On Windows it will be saved in the “%userprofile%\appdata\locallow\DefaultCompany\NarwhalSimulator\Screenshots” folder. Sorry about DefaultCompany, I’ll probably change this to Jaboc or something when I get around to it.

Alright, that’s all I have for you. Upcoming is something very exciting, creatures! I’ll work hard on some creature designs and figuring out how to make creature AI properly. Leave any ideas you have in the comments, and as always, leave any other feedback you have in the comments or email me at [email protected]. See you next week!

Links recap:



1 thought on “Narwhal Simulator 17: New Map”

Leave a Reply