code cartography
One thing definitely need to doOH WAIT, I solved the problem with my scroll view not updating! It was all my fault! I am a buffoon! It was basically that I was updating the text to be just the initial starting string every update/frame. So yeah.... where was I?
Right. One thing I definitely need to do for this game is work on my tile engine. Isometric tiles can be a little tricky to wrap your head around, but I have a working tile engine coded, and it basically works by storing the tiles in an array and then I call an element of the array to place my tile.
The problem is this is all done in code, and I absolutely don’t want to design my world in code, so I need a level editor, but I absolutely don’t want to code a level editor if I don’t have to. And I don’t.
It turns out there’s a pretty neat tool called Tiled and after a quick play, I’m fairly impressed how powerful it is. Import a tile sheet, set up your layers, then just click until you’ve built what you want.
The saved *.tmx Tiled file is basically an XML with CSV, so my task is to work out how to read the tmx and render it with Unity - not a huge leap from where I am at the moment. Of course this is going to get a lot more complicated once map complexity increases. I’ll have multiple layers and heights, understand how and where the player can walk behind/in front of objects, where they might collide or be unable to pass, and probably a bunch of stuff I haven’t thought of yet.
Now some of this I’ve done previously when I was messing around with a tile engine in XNA (before Microsoft decided to axe it), but that was also code-based. It was giving properties to certain type of tile to say, for example, whether it was traversable or not. And that’s fine. I may end up doing that again. But I I may also be able to make this more user friendly for myself with something which Unity calls a “prefab”.
I don’t actually know if this is something that’s possible, but it seems like I should be able to assign a bunch of properties to a gathered set of tiles that make, say, a tree, and have the prefab be like: yo, this is a tree, a player can’t walk into the trunk, but they can walk around it. And then every time I want to place a tree, I use that prefab and it always has those properties.
Maybe? I don’t know. I can do this in code of course, but if I wanted to just code everything from scratch I wouldn’t be using an engine like Unity.
So I guess this is a long winded way of saying I didn’t achieve a whole lot since my last update, and I have heaps of research to do to progress down my current trajectory. Sorry I made you read it.
Hours So Far: 85













