Fullmetal Building - Material Design Dev Diary #2

This dev diary will cover how we made our weapon and the game for Full Metal Barber. It will cover materials, technology and software we used in order to get everything to work.

Product

The game in its current state is a toy, where you have to cut a persons hair using a minigun. The minigun is a controller you hold and aim with, in order to fire at a screen where you'll see the crosshair.  Originally the game featured a shotgun, but we switched to a minigun after thinking about the experience. 

The experience we are looking for, is a controller that feels good to use. We want a fair bit of heaviness to the weapon along with screenshake when firing in order to purposefully make the weapon imprecise to use. What we want from this game is for people to be able to cut weird hairstyles, and then upload an image of the hair on twitter.

Creating The Game

The Shooting

First of all we needed to make the shooting mechanic work, before working on everything else. While my teammates were off planning the build of the minigun itself, I sat down to create the game. First of all, I used a mix of scripts I already had and google to create a simple script that shoots using Raycasts. Raycasts are essentially invisible rays that can detect where they hit and provide a ton of information and uses doing so. Once this was ready, I had to make sure that when you fired the script would only react if you hit hair. This was done using Unity tags, and tagging a test object with the tag "Hair". 

Lightgun Stuff.gif

As you can see in the GIF above, there isn't a particle effect firing when I click anything else than the red ball. This was the basis for how we made the hair in the game.

Michael

We knew we needed a model to hold all the hair we wanted, and there was only really one place we knew where to get it. The Makehuman application. Makehuman is a program that let's you get a realistic looking human model for games or animations, fully rigged and entirely customizable. We made a simple, bald character in that program and imported him into Unity, where we started working on the hair to place on his scalp.

Hair

We weren't sure how we wanted the hair to work. We had long been brainstorming different ideas of using either shaders or a terrain hidden beneath his head, using grass as the actual hair and coding some sort of brush that would remove the grass in real time. We also had an idea for using a model of hair and looking into removing one vertex at a time. What we eventually settled for is having a small prefab (made from a sphere) that was called hair. 

Whenever hair was hit by the raycast, it would burst into a particle effect, and fly off the head. This was created using the Rigidbody component on the hair prefab. When the prefab got hit, we immediately disable the kinematic option and enable gravity, as well as giving it a force push in the up direction of he object itself.

When it comes to placement of the hair we had multiple methods. The first one was to hand place each ball of hair (which in the picture below, you can see that it would take some time). Finally, our lecturer suggested using Polybrush. Polybrush is an addon to Unity that allows you to paint on models. The special thing with this is that you can paint prefabs onto models, as if you were paining trees onto a terrain. This worked fantastically for us since we only had to draw a hair and beard onto him, cutting time massively.

Michael.PNG

JUICE

We then decided to add some juice/polish to the game by implementing screenshake and particles. The main effect of the screenshake is both to make it feel like your actually firing a minigun and trying to aim with it. We also decided to make hair fly everywhere to really emphasize that you're shooting off hair. 

The Minigun

Planning

For planning we used the program TinkerCAD in order to create an idea of what the materials were and what it would look like. Granted, it looked nothing like it in the end but it was good for us to start thinking about materials early on.

gun.jpg

Material Gathering

When it came to material gathering, my Teammate Paul found a place called "Reverse Garbage" here in Brisbane, where you can find a ton of stuff for a low price. We decided to take a daytrip there, and see what we could find

29920499_10215894746705805_1019288954_n.jpg
29955591_10215894747025813_932445534_o.jpg

We ended up finding almost everything we needed for our build here, and it only cost us a total of $10. We found some plastic pipes for the barrel, some pool filter, a box with a really nice handle that could hold the arduino board and an old vacuum cleaner handle for... the handle.

The Build Part 1

As soon as we got home from Reverse Garbage, we started to put it all together. First of all, we laid everything out on the ground so that we could sort of see how to assemble everything.

29856057_10215894746425798_1278471077_n.jpg

First of all we decided to work on the barrel of the gun. We weren't entirely sure how to attach the barrels to the filter, but we decided to just duct tape it for this first iteration of it.

29855637_10215894745785782_640436168_n.jpg

We also very crudely taped the vacuum cleaner to the main component box, as well as moving its handle so that you could hold it. At this point we were very pleased with how it was looking and how it felt. Our only problem at this stage was connecting the heavy barrel to the very light component box.

29942608_10215894745545776_271348277_o.jpg

The Build Part 2

After assessing our materials and what we had, we decided to remake the body of the minigun. We had access to an empty speaker, which looked really good and also could fit some sliding door rollers so that we could have the barrel spin inside it.

newgun.jpeg

All we really needed at this point was a motor. We had been experimenting with an arduino board and a small motor, but we needed to transfer it to a bigger one and build it all into the gun for it all to work properly. Thanks to Paul spending many hours with the barrel, we managed to put it together and make it more sturdy.

30074363_10215894745105765_2011679119_o.jpg

After having tested with a few small motors, we managed to find the motor from a drill, which was quite powerful and heavy enough to provide some weight to the minigun. Below you can see the current state of the minigun after most parts have been attached.

30826243_10216057241488073_2075339681_o.jpg

So let me explain how it is all hooked up. the handle is screwed to the body of the minigun. Inside the handle are two alligator clips attached to the arcade button that acts as a mouse click. Inside the body is the Arduino Leonardo. This is also connected to the drill motor and the MPU6050 (Gyroscope/accelerator) that acts as the mouse movement. What isn't pictured above is the new barrel's that we are in the process of attaching. We are currently attaching lighter plastic barrels to make it easier on the motor to spin.

That is all for now! we will showcase this game at events in the future, so keep a close look at my twitter for more information. Two of them are Synergy at SAE Brisbane next wednesday, and Squiggly River Artscade at Netherworld in the near future.

Take care, and thanks for reading!

Material Design Research Process

This post will go over how I have been going about my research when creating a custom controller. This is more specifically tied to studio 3 and the brief that we've been following for that class. The specific tasks on which this post is based on, was that we had to come up with a small game that used a custom controller.

Research

First of all I had to look for inspiration. I had no specific idea so I decided to look online on different electronics retailers for different types of fun stuff. Problem was I wasn't exactly sure what I wanted, so I decided to search for "Sensors" and see what comes up. After some browsing I found a flame sensor and a proximity sensor, that I started to spawn some ideas for.

Brainstorming

Once I found the sensor I started to come up with different ideas for these sensors. The flame sensor idea was that you had to light a persons cigarette perfectly by moving the lighter closer or further away from the sensor. The player would know if they did good or bad by the eyes of a giant mannequin (that would hold the sensor in a fake cigarette) that would light up if you did well.

The idea from the proximity sensor was that you would have a parallel parking simulator where the controller would be a cardboard car, with the proximity sensor attached to the back part. With it you would have a game which would have a car that would drive forward and backwards depending on the proximity of your hand to the sensor. You would also have two arcade buttons on the car roof in order to be able to turn right and left in the game. All you have to do is manage to park between the two cars in the game.

Materials

For the final step I had to consider materials. Of course a cardboard head would start to burn so I would have to use some form of thin metal sheet for the cigarette game, and a casing for the sensor. For the parallel parking game I wanted to use a cardboard car, as I felt like it would feel really good to both create and use. Cardboard has a kind of "crafty" feeling to it which I really like.

And that is practically it! Research what you can use, brainstorm and make sketches of your ideas and then find out what materials to use in order to get the cool controller you want. 

That is all for now, thanks for reading

To Connect a Wiimote - Material Design Dev Diary #1

The other 1/3 of Studio 3 is material design. That is creating some type of controller for a game that is custom, or used in an unconventional way, or doesn't use any digital products what so ever. It's pretty fun and I must say it really makes me feel smart to sit and toy with electrical parts and making stuff light up and so on.

For the material design project, me, Paul Frame, and Nicholas Duxbury are working on a game called... FULL METAL BARBER. You are a barber that uses a shotgun in order to cut peoples hair. Sounds awesome right?

Well, in order to get this working we had to decide how we wanted the game to work. We quickly came up with the idea of making some form of light-gun that you aim at a mannequin in order to make things happen in the game. Paul had the idea of using a Wiimote as the main "pointer" for the weapon. He also built an amazing cardboard-scissor-gun that we could place the wiimote and nunchuck inside.

28696112_1568849113164645_1773472293_o.jpg

Here comes all the challenges we had to go through in order to get it to work. First of all, connecting a Wiimote was easier than we thought, even though it was hard. All we had to do was connect the wiimote through bluetooth and that's it. The only issue we encountered with this was where we connected it (apparently there's two different places to connect bluetooth devices).

Next issue was that the Wiimote didn't react to movement or button presses at all. Of course, we had to have some form of App to recognize the Wiimote as a form of valid input device. We figured that since we were only going to make the game in Unity, that we use some form of API for the wiimote. Luckily, there is one, made by Flafla. All we had to do was press a button, and the button input was being shown!

Blog_Controller.gif

There was however, no reaction of the actual movement of the controller. So it couldn't be used for what we wanted it to be used for. However, after some conferring with our lecturers, we came to the obvious conclusion that we needed IR lights in order to sense the position. Luckily, one of our lecturers had a spare one for PC lying around in his office that we were allowed to use for this test, and voila, there was movement recognition. 

And now we get to the issue that plagues us to this day. The API. Flafla is amazing for having created this API, but as a user with no advanced experience in coding, I would have prefered some form of manual on how to use aspects of the code. Something as simple as "How to make shit happen on button presses" or "how to get the position of the pointer in world space and not in canvas space" would've been extremely helpful. This is still to be figured out, but it seems like Paul has a solution to it, so it remains to be seen what works and what doesn't.

Until that update comes out, take care and thanks for reading this post.