Hey folks,
Lot's of under the hood fixes over the last week. Making long lists of menu items scroll nicely, making enemies drop money after defeat and fixing an issue with sprite offsets.
That last thing has been something I've been meaning to do since I created my own tile slicing editor. Unity's own tile slicer is a bit of a pain, to give a sprite an offset you have to specify it in values between 0 and 1, which is not ideal, as you have to manually calculate that when dealing with pixel art. So originally I had just not bothered with setting exact offsets in the tile slicer and instead made a quick component that I attached to all the battle characters that would calculate their positions using an offset.
The yellow line at the bottom of the sprite shows the offset.
So, to cut a long story short. Using my own tile slicer that I added the ability to set offsets using pixels, I had to go and reslice all my actors spritesheets and set their offset correctly. As well as removing the offset component from all their prefabs. Not hard work, but certainly boring.
Lastly this week I've been working on a new environment. This one is a bit different though. In the game you will be able o "dive in" to a software construct, so I wanted it to look kinda like the matrix, cyberspacey, circuitry kinda thing. I wasn't sure if what I had in my head was going to work, but I think I'm getting somewhere close to it.
Here's my first attempt at a shader to get that effect. (Also, I learnt how to put stickers on my gifs haha)
The floor looks kinda cool, but I only wanted the sinewavey highlight to appear on the grid in the background. The floor is just a grid and then transparent pixels.
I wanted something more like this...
The problem here is that the rest of the background has been cutout. After lots of banging my head I consulted a friend (Tom @ Big Robot) about how they would approach it, he suggested using multiple textures and other things that were a bit tricky for me to do easily.
Unity works with sprites in a bit of an odd way, if you're set up like me (well not odd, but a bit of a hassle). If you use the standard shader to render your sprites, and you use multiple textures, the second texture needs to match the tiles of the first. So I would have to have another tilemap that would overlay on to my existing one. The pipeline for creating this would be a pain, so I wanted to do this all in-shader.
So Tom suggested that as my construct world would be all green, I could use another colour channel to denote where I wanted the effect to occur. This worked great!
I need to work on the textures and the blend of how much effect to show, but I'm happy for this first experiment.
Lastly, I've been working on hooking up some reworked maps in to the game. Here's the new hideout. There was a lot of wasted space in the original, I wanted to make it feel smaller and more cluttered.
Going to the EGX show in Birmingham, UK on thursday to show a build to some folks there, so will be preparing for that most of the week