hi, welcome to mix and jam a channel about game development. Experimentation today’s. Project is inspired by the pigment franchise in the game. You command an army of these tiny creatures called Pikmin that help you on your journey by carrying objects.

Back to your ship and fighting a variety of dangerous enemies, I have always admired this game, so I wanted to try to do a simple recreation of the basic gameplay of managing the pigment and carrying objects using the Unity engine.

So here are the steps I needed to follow for this recreation, implement the logic for the navigation for both the Pikmin and interactable objects at the behavior to allow the player to command the Pikmin actions and polish the project with assets, particles and animations.

I’ve started by importing Jamo the official 2d character from a channel into the scene and as a base for the level I’ve made its arraign for the player to explore. Then I added capsules as placeholders for the Pikmin.

In order to make the Pikmin find the most optimal path to follow the player, I added a nav mesh agent component to it an object with the nav mesh agent is able to use pathfinding in order to reach its destination.

These nav mesh agents need a surface that they can walk on and i implemented that by making a nav mesh area in the level. In order for the Pikmin to follow the player, I made it so that the destination of the agents was an empty game object behind the player.

Then I tweaked some of the parameters on the agent to make the Pikmin fall the player at a certain speed and stopped at a specific distance. I added some simple logic to determine states that define whether the Pikmin are following the player or just waiting around next.

I needed to interact with all of the Pikmin in the scene by ray casting from the mouse position to the terrain. We can find out where the player is pointing at so I created a controller that follows the mouse position and checks within an area to find any idle Pikmin.

Since I made a manager that keeps track of all the Pikmin in the scene, I can loop through all of them and check for things like distance and state in order to activate their nav mesh agent to create more visual feedback of the player’S cursor, I’ve added a line renderer between the player and the mouse position.

I’ve, also added a projector that works with the Universal render pipeline made by calling loom to properly place the projection. I made its transform rotate together with its arranged normal direction.

Next, I added something for the pigment to interact with, so I added a sphere to represent a fruit in the game to implement the Pikmin throwing logic. I use the cursor position information and then the do tween plugin to tween the Pikmin from their origin position to the mouse position.

Do tween has a built-in function to animate things in an arc called do gem. Additionally, I’ve, downloaded a throw animation from mixing mo, and I’ve, also made the Pikmin rotate during the throw once the pigment is thrown.

It checks in an area around it for an interactive object, getting in position if they find one or stain idle if they don’t in case of an interaction, the Pikmin position themselves in a circle around the interactable object, based on the number of Pikmin needed to carry that object once there are enough pigment in position, they need to carry the object to its final destination.

In order to do that, we can use the same navmesh logic present in the pigment for the interactable object. So then, all I needed to do was to parent all the pigment to that object while it travels towards its destination.

One of the reasons why pigment is so charming it’s because of its beautiful art, sound and animation, and for this very reason I’ve collaborated with scruffy. Scruffy is a talented musician and 3d artists that also creates content in YouTube.

Not only that, but he’s, a big fan of the Pikmin series, so this was a perfect combination. Scruffy’s. Does amazing videos on video game, music and 3d modeling. So please go check out his videos for this project.

Scruffy has prepared several things: a model of a Pikmin based on gmos, design, models for two types of fruit, the space capsule model and even the sound effects. I started replacing the previous placeholders with all these great models to get a better sense of the final result.

The cool thing about having the Pikmin look robotic was that I was able to add procedural animation to them using the animation rigging package. I’ve used this package before in the Luigi’s, Mansion episode.

The difference here is that I’ve, downloaded an extra constraint for the package called jiggle check that keeps every pivot in place, but physically animates, the rotations at runtime. A big thanks to Dave Hunt from the animation ringing package team for making me aware of this extra constraint.

Since I was using animation rigging, I’ve, also prepared a runtime rig that poses Jamo when the player uses the whistle while in that state. I’ve, also made the characters y-scale shake a little bit. Then I created a little animation that expands a cylinder to show the area of the whistle, and I’ve, also added particle systems at the top and bottom of it.

Just like in the game, another area I polished was the fruit capture with animations for movement. Emission color and particle systems have also filled the pigment prefab with tons of particle systems such as the little light at leaf when they’re idle.

The shiny bursts when they notice you and the trailer emission when they’re jumping with all of that complete. I added the sound effects that scruffy provided and also made a little UI to create more similarity to the game and, as a final touch added some post-processing to enhance the prototypes visual and after a bit of adjustments.

This is how it turned out [ Music ]. If you’re interested in downloading and checking out the code behind this, there’s, a link for the project’s. Repository on the description of this video mixing jam is really only possible because of these amazing people helping out on patreon, and I want to highlight these top-tier supporters if you want to see more videos like this consider, subscribing and sharing this video with friends.

Thank you. So much for watching [, Music, ], [, Music, ]

Source : Youtube

Related Posts

LEAVE A REPLY

Please enter your comment!
Please enter your name here