Month: July 2015

Coin collection! Particle Systems and rotation/collection scripts!

So I spent some time today trying to make something look pretty! I realize at this point its a bit wasted effort, but I had a blast. I was able to make a somewhat satisfying coin collection animation using unity’s animator, as well as simply adding a basic counter to the UI canvas.

EDIT: https://www.youtube.com/watch?v=Geb-HwBExdQ

Particle Systemsssss

So I am slowly starting to understand how particle systems work finally! I was able to create the star animation quite easily! This is what it looks like up close.

Gif of particle animation!.

So basically all I had to do to create this was a few settings in the particle system of unity.

Particle Emitter settings.

Particle Emitter settings.

The biggest thing was just setting the renderer to the mesh that I made in blender! Once you do that, the particles take on the shape of the renderer, and it’s easy to play with the settings from there. Sadly, this took me quite awhile to realize so I was pretty happy I figured that out today.

Also, I’m not controlling the particle system at all in terms of the code! It just plays on loop until the disabling of the game object.

Rotation and Collection!

So the rotation was quite simple. Just one line of code.

Stream Image 2

Basically all this is doing is rotation around itself, on the y axis (vector3.up) by 1 degree. This fires in update so you can adjust that value, I found leaving it at 1.0f was a nice rotation. Next thing I plan to do is find a random number at a suitable speed range and use that so they don’t all rotate at the same pace.

Collection Script

This was pretty standard straight forward. I haven’t written my object pooling system yet, so this is just using destroy, but I am aware of this being bad practice! All I’m doing for collection is quite simple:

Stream Image 3

So what I’m doing here is just getting the animator component. I’m using it to then call the animation I want. And after that is kicked off I’m starting a co-routine. I changed it to this method as it makes it so the animation plays out nicely before the game object disappears. I had it inside the same method before, and the animation wasn’t even playing.

In the co-routine I’m just:

  1. Setting a bool to ensure I only ever call the coroutine once.
  2. Setting the coin count in my data manager class.
  3. Setting the GUI update for coin collection
  4. Destroying the object.

And for #4, that will be replaced with my object pooling functionality.

Animation

Still trying to get a hang of this animator. What I ended up having to do for this animation was create an empty game object, and make it the parent of the coin mesh itself. I applied all the animations to that core game object, moving the coin and recording the parent’s transform. This allows the animation to remain the same no matter where you put the object (Just ensure you are using root motion!).

Some good model progress today!

Well it was a long night modelling! But I finally came up with a sweet first landing spot after my tutorial level! This will be the beginning platform for the “overworld” type areas; for the forest area anyways. I think I kinda messed up on the lighting though haha ๐Ÿ™‚

Gif of my asset in funky light!

So I modeled the ruin looking things, the platform, the sign, and the island and water. Not the fastest at blender but starting to come along nicely. This is what it looks like with normal lighting.

Gif of my asset in normal light!

Still need to adjust the lighting and a few things in the game to make my assets shine! They are looking pretty good for what i’m after, so overall i’m happy.

hohooo! It has been a long time! New game progress!

Harrrr, been away with my head tucked into blender and art programs and learnninnnngs! Working on a new simple project trying to learn unity ๐Ÿ™‚ It might just turn into a game if I like it enough. So far working away, I made a little progress video of what he tutorial level is going to look like. Still missing quite a bit but slowly implementing features as I go.

Features Complete:

  • ย Respawn System
  • Camera Orbit
  • Relative to Camera Movement
  • Shard collection & GUI display
  • Door Logic — Need enough shards to pass, just need graphic to display amount required.
  • Level Loading

So many things to do and so many models to make! I’m slowly piecing together the set of tiles I’ll need for my next level. It will be the hub world! Excited to start piecing my idea together ๐Ÿ™‚

If you have any questions just give me a shout on my twitter @jayohhgames. I check that pretty often! I’ll be keeping up with regular posts now I swear!!