Latest Posts
-
CommonTilemap.cs
CommonTilemap
-
Common Static Classes
Common Helper Functions
-
Creating Tile Prefabs in Unity
Working with the Unity Tilemap
Working with Tiles in the Unity system can be a little frustrating. Unity is not a 2D engine, no matter what they try to tell new developers. Going into “2D” mode in the scene view is essentially just flattening the camera, it does nothing to your gameplay. The only 2D thing they really did was implement a seperate physics system for 2D objects, but everything still lives in 3D whenspace you do that, they just ignore the z-value. I am pretty sure you could get the same behaviour if you just locked the z-axis on all your 3D rigid bodies. Rant aside, this can get a little confusing when you are trying to work in 2d. When working with Tilemaps, they create a “Grid” that your tiles can live on for the Tilemap object, and this is a 2D space that lives on a 3D gameObject. When adjusting layering it can be tempting to adjust the position of the object, rather than setting the “Order in Layer” attribute on the Tilemap Renderer, and when you put in a character that probably doesn’t live on the tilemap, you need to figure out how to have them sort properly in the layer itself.
-
Modifying Unity SpriteLibrary sprites with code.
Sprite Library Assets
When I started on my Bartender game project, I was working with sprite sheets for the first time in 5+ years, and so was exploring some of the (relatively) newer options for integrating sprite sheets and sprite animations into Unity. After making a sprite animation, and then realizing that I would have to make totally new custom animations for each different character sprite sheet I wanted to use, I went searching for a less tedious solution.
After some searching I found out about the SpriteLibrary and SpriteResolver classes in the Unity 2D Animation package, and was excited to find that I could make one animation and and have that be used for all my sprites that shared the same sprite sheet layout.
Then I started working with ManaSeed sprites, and while the naked one worked just fine, I realized as I was adding in all the different layers that this was going to be almost as tedious as making new animations for everything because in order to make a new Sprite Library Asset with override textures, I would need to drag and drop each and every sprite into the library for each override. After doing three of them I decided I would find a way to automate this.
After lots of forum searching, I found that the develoeprs of the package had not provided an API into the SpriteLibrary asset class that I could use to edit sprite overrides with a script. I was bummed, but determined to find a solution. I solved this in a couple different ways, implementing the same tasks in different ways as my needs evolved and I wanted to make a more portable solution.
-
Creating my jekyll post files with emacs
Easing the path into blogging
I have started so many blog sites over the years where I post for like a week and then totally lose track of it. The biggest blog I have ever made was -maybe- 5 posts. I’d really rather not fall into that pattern again. In order to facilitate that, I want to give myself the path of least resistence when it comes to making new posts.
-
About me
Hello! My name is Michael and I am a game developer. I have been a professional game developer for the past 10 years. I have worked at a large mobile game company for a number of years, and then tried to work off some of that karma by working at an educational kid’s game company. Eventually I decided to start my own indie studio (just me for now) and try to flex my creative muscles and make the games I really want to make.