Unity Development Part 3
- kw4u19
- May 23, 2021
- 4 min read
This development session took place during week 6.
My goals for this session of development are to implement the jump and running animations now that I have the sprite sheets, work out how parallax scrolling works and put in a placeholder sky for this until the finished background design has been finished. I can also start putting finished assets into the game (just the islands for today).
I began this session by importing the island asset sheet, created by Charisma, into unity and using the sprite editor to automatically splice the individual assets. I then just dragged and dropped these in and placed them over where I had already grey boxed where the islands are supposed to go. I realised that the automatic splice tool in unity is not perfect and some parts of the islands had been cut off so I will need to delete what has been broken and go in and manually splice the sheet myself.

I spent some time experimenting with the different shaped islands and where to put them, adding box colliders to each type and storing them outside of the frame for easier use. The colliders were placed halfway on the top green part of the island as we are aiming for top-down oblique view because it brings more dimension the game scene, faking that three-dimensional look.
Next I began working on the Shaman movement animations. I watched a tutorial video by Muddy Wolf Games to learn how to take a sprite sheet and put the animation into unity. First I had to take the sprite sheet into photoshop to clean up the sketch notes such as numbers and there were white spaces between the arms and body of the Shaman.
This was then added as a sprite into unity. Next I opened the sprite editor and thankfully there is an option to cut out the individual frames automatically, though I did have to edit some of the selections for these by cropping the margins.
The first time I imported the sprite sheet, I didn't clean up the written notes on top and of course this caused some problems when it came to splicing and some of the frames were not perfect in the scene - were not cut to form.
Applying the walk animation and changing the speeds was simple enough. I first dragged the finished animation into the scene and then applied them to the player I had already set up (the pink square). However, once I refit the box collider on the player, I have a problem where it can no longer jump and I can't work out why. I also realised after applying the animations, that it would look a lot better if the Shaman had an idle animation as him just standing still made him look fat and without character.
So at this point, both the walk and jump animations are successfully in unity and working but I haven't yet worked out how to use the animator so the animations actually change from walk to jump when the player will press jump.
The last thing I worked on during this session was the sky which was incredibly frustrating. In hindsight, I should have just asked James or somebody else with Unity experience how to overcome the issues I was having but I was too stubborn and determined to work it out myself.
I first added the temporary sky as a sprite and just assigned it to the layer furthest back. So then I just had a 2D image that didn't move and eventually the player would just move past it. After watching tutorials online, it seemed that I was supposed to assign a new camera to this background and that camera would only see the background, nothing else. And then I would un-assign the background from the main camera. So supposedly the second camera which is non-moving would focus only on the background which would be still for all of gameplay. And the main camera, of course, follows the player as they move about the level. I spent approximately two hours trying to work out how this works with no progress so it's another thing I need to have a discussion about with James.

Here's how the sky looked in the scene. It's an experiment from my work for the background designs where I was familiarising myself with procreate. It is definitely too dark for our vision of Anima Mundi but was a helpful process to create it and use as a placeholder.
Personal reflection:
I need to stop being so stubborn and when I have a problem, seek expertise rather than scrolling through the internet and watching videos that turn out not be so helpful.
Next steps:
Book a session with James to fix the problems I faced during this session (broken jump) and work out how to implement the parallax scrolling sky.
Finish implementing the animations by learning how to use the animator.
Discuss production of Idle animation for the Shaman.
Comments