Tuesday, March 31, 2015

Blob Game Physics Project


This project was built off a previous physics project discussed here. So I already had some of the basics of a physics engine such as a physics object. The goal of this project was to create some sort of game using contacts, rods, cables, bungees, springs and mass aggregates. The first step was to create the contact system. This allows for contact generators to generate contacts and then a contact system to go through and resolve all of the contacts. For this game I went with a simple implementation of resolving the most important contact until all contacts were resolved or the loop went over the initial amount of contacts times two. From here it was time to create actual contact generators. The first one being the ground contact generator. This simply created a contact if the physics object went past a certain y value. With the ground contact it was important that our contact system handled something called a resting contact. We determine this by checking if velocity has changed. Once we determine it is resting we cancel out the velocity effects of the contact preventing the physics object from vibrating. That is pretty much all there is to the basics of contacts.

The next step was implementing the rods, cables, springs and bungees. This was pretty simple because we went over this in detail in class and had code examples in the book and the slides. From here we used rods to setup our mass aggregates. This was interesting because you had to be careful how you connected your rods or the object would not do what you expected. For this project I created a cube, a pyramid, and a tetrahedron.

Now that all of our physics was setup it was time to make the game. The first thing I did was add simple player movement to the player adding force in 4 directions based on WASD. Next I added a bungee cord to the camera and the player. I was able to get a pretty clean effect using a bungee cord over a spring and a significant amount of dampening. Without these tweaks a spring attached camera does not work very well at all. After the camera was working I decided to add collectibles and make them data driven. I made it so when you got into a certain range of a collectible it would attach a cable between you and one of the physics objects that was part of the collectible  shape. When a lot of objects are attached to the player it can be tricky to move around the game but that is just part of it.

Finally I decided to create a simple enemy AI. Once the player gets into a certain range of this AI it starts to follow the player. If it gets close enough it attaches a spring between the player and the AI. It then runs away from the player until it reaches the edge of the map. This makes it harder for the player to collect the objects needed to win the game.

Thursday, February 19, 2015

Two Brothers Iteration 6

The first thing I worked on this week was a node graph generator. This creates a node graph with all of the connections that our AI needs to path-find effectively. The first step in this was creating the nodes.


The above image shows my first generation attempt. Here I displayed cubes on the nodes for viability. Basically what I did was given a start point, size, and distance between nodes create nodes in all directions based on that distance until we've reached the size. The next step from here was creating the connections.



The way I created connections this week was to check each possible adjacent position and check if there could be a valid connection. This method works but after doing some testing I think it would be good next week to try to connect to all other nodes rather then just the adjacent ones. In order to determine if a connection was valid I did a ray-cast from node to node to make sure there wasn't any collisions in between the two nodes.  This still wasn't enough to assume all nodes were valid.



I cut down on the nodes and connections even more. On creation I added collision box to the nodes and destroyed them if they collided with anything. And after all the connections were made I took the node closest to the start and checked if every other node could path to it. If the pathing failed I destroyed the node because it was invalid. This ended up creating the picture above of a much more reasonable node graph.

You might be wondering at this point how it would be possible to do all of these calculations during the game. Well you can't; it took up-to 30 minutes to generate some of these graphs. Fortunately after the graph is generated I can just pause the game and save the graph as a prefab. This way we can generate the graph for each level before hand and not have to worry about any creation time processing.

Now that I had my node graph created it was time to write the AI to follow it. I added path following to my AI control and created a wonder AI. The wonder AI just choose a random node and pathed to it. At first this caused lag issues on pathing but I optimized the path finding function a bit and limited the path length because there was no need to wonder to a specific point 100 nodes away. This fixed all of the lag issues. The AI still was running into everything and dying constantly because it did not do anything to avoid the trails or smaller obstacles.

So then as intended I knew I had to create some avoidance AI. I created rays in-front, above, to the left, and right of the player to check where obstacles were. In the event that an obstacle was in-front of me I checked for an open direction. I then avoided in that open direction. Once the opposite of the direction I avoided in was open I went back to what ever I was doing before. After a lot of tweaking of numbers and playing around with I got something I was happy with, for a start.

Finally I played around with actually being able to get the flag. The way this worked was I would path find to the flag until I was within a certain distance. Once I was within this distance I would just go strait for the flag. Once I got the flag I would just wonder. This worked well enough for getting the flag once but the AI was not able to pickup the flag again because his trail was in the same spot that he was aiming for making it impossible to avoid. This is something to workout in the future but overall I was happy with this weeks progress.



Tuesday, February 17, 2015

Solar System Simulation

My first game physics project was to create a solar system. This is a simulation of our solar system including the sun, 8 planets and the earths moon. Here is a video of the finished product.


In order to create this the first step was to create a physics system. The first part of this is just a basic physics object. I used euler physics for moving objects to make the calculations simpler. This works but it does leave inaccuracy that can affect the simulation. After adding the physics object it was important to add forces. The way I did this was have force generators, in this case a gravity force generator, that would be registered with each object pair. In this system each planet is registered with all the other planets. This allows gravity to affect everything the way we would expect. Once this system was done I needed to figure out the actual values I would use to setup my planets.

I used the precise orbital speed equation to figure out the planets initial velocity at the perihelion. I also looked up the values for each of the planets perihelion and placed the planets at those distances in AU. These calculations worked reasonably well for the sun and 8 planets but unfortunately this was not the case for the moon.

At first I thought that looking up the initial velocity of the moon would work. Later I figured out that it would need to be the combination of the velocity of the moon and the earth because the value I had looked up was relative to the earth and not the sun. Even this value did not work as expected, the moon would constantly get further away from the earth. This could be due to various inconsistencies within the system that were not easy to fix. Because of this I just played with the numbers until I got a moon that orbited reasonably around the earth. The values I have now allow it to orbit around the earth for a good amount of time but eventually it will still leave orbit.

Another challenge was choosing the sizes for all of the planets. What I ended up doing was having the sun be way smaller then it would be and have all of the other planets be relative to an arbitrary size for the earth. This was the only way the planets could be viewed in relative sizes and still us AU for distance. This allowed me to setup my camera to view all of the planets while still keeping some relativity. There is an issues with the moon, however, because it is so close to the earth it appears to be inside the earth because of the scale I used. This scale was not a perfect solution but I think it was ideal in showing off what I wanted to show off.


Friday, February 13, 2015

Two Brothers Iteration 5

This week I got the start of the AI working. I got a ship simply able to move to a point. I do this by finding the direction between the ship and the desired point and rotation towards it. I make sure to take the ship mobility into account so that it moves within the same constraints as a real player. I also started writing my A* path finding algorithm which will allow me to navigate the node graph.

Friday, February 6, 2015

Two Brothers Iteration 4

This week I spent primary on researching the AI. What I am thinking right now is using a node graph to allow the ships to navigate the map. This way they will intelligently move around big structures and obstacles before even getting close to them. On top of this I want to add a avoidance algorithm that allows the ship to avoid things that are right in front of him. The combination of these will hopefully leave to a ship that is able to navigate the map without instantly dying.

Friday, January 30, 2015

Two Brothers Iteration 3

Last week I spent a good amount of time working on the networking systems for the game. I integrated networking into the split screen selection system. This way players could join and see each other choose different colors and y-axis inverted over the network. I also spent some time working on the network initialization of players, sending inputs over and working on the movement of the player ships. I was getting close to a point to start showing the basic networking aspects but during yesterdays class we decided networking would not be worth it given our resources. As much as I enjoy networking I agreed with the reasons not to do it. Instead I will start to look into creating AI for the ships in the upcoming weeks.

Thursday, January 22, 2015

Two Brothers Iteration 2

This week I started working on the networking aspects. At first I had some trouble just testing the build because I do not have a controller and there are no keyboard controls. Paul said that he was going to work on adding them this week. Because of that I spent the first week getting a feel for the code base and creating the background systems for networking such as the lobby system. Given this start it seams reasonable that I will have prototype networking up and ready two weeks from now.

Friday, January 16, 2015

Two Brothers Iteration 1

This is the first week I will be working with my new team, Two Brothers. Here is a video of what they had at the end of last semester.

The first thing my team asked me to do was look into weather or not networking is reasonable. There are some definite challenges given the nature of this game. Such as important twitch movement and having trails work over the network. I'll talk with lawson and keep these things in mind to see if it is reasonable.

Thursday, November 13, 2014

Screams From The West Iteration 7

This week the main thing we wanted to focus on was getting rid of the gun without getting rid of the gun. We felt that the gun was taking over the game in a way we did not want. When someone saw our game they saw it as a shooter more than anything else. We wanted the gun originally to be a side mechanic but there were a few things preventing this from happening.

When you first started the game the first thing you saw was an aiming reticle and the ability to shoot. This instantly told our players, hey you should be shooting things. Another thing was that we punished our players for having the lantern out. The lantern provided more light so we said it should burn fuel constantly. This lead to forcing players to have the gun mode out 90% of the time. This, along with spiders roaming around, made it very clear to the player that they should be using the gun as their primary mechanic.

In order to make our game not a shooter we made a few changes this week. We increased the crowd control abilities the player could use on the spiders. We also removed the constant drain of the lantern so that players could keep it out as their primary weapon. We added an investigation state where the spiders stop attacking players to investigate sounds they have heard. We also made the game start with the lantern out so the players would feel that it is more about the lantern then the gun.


The above video shows the increased crowd control I made for the spiders. When the player uses the lantern the spiders now get dazed and then stunned. While dazed they move in random directions for a random increments of time giving a very confused look. It took a while to get these values to look good but in the end I thought it came out nice. The other thing we added is the torches and flares now also stun the spiders. When the torch first gets planted any spiders near it will get stunned. When the flare hits the ground all spiders close to the flare will get stunned. This will give the player more options when trying to escape the spider.

The video also shows briefly the throwing of a glass bottle. We did not have an art asset for this yet so it is just a small rectangle. What it does is that all spiders within a certain distance go towards where it landed. Once they get close enough they resume normal action. We also made a similar thing happen when the player shoots. This will give players more options on how to manipulate spiders out of the way of their objectives.

We felt this was a good step forward but at the end of the week, after our presentation we decided more still could be done. As it is currently the gun still kills the spider. We decided that this was not the feel we wanted so we are planning on changing it so that the gun also just stops the spider briefly like many of or other effects.

Thursday, November 6, 2014

Screams From The West Iteration 6

This week the first thing I wanted to do was stabilize the networking. Last week I got basic functionality working, which was great but there was still a lot to be done to get the complete network experience. Kyle was able to quickly get it into testing and get me feedback on what wasn't working. I already knew most of these things were not done but it was nice to get a list of things that did not work.

So I spent most of the week fixing these bugs. This included things like making replay ability. In order to do this I had to make sure that anything that was created or could be destroyed during game play was destroyed at the end of the game. I also had to make sure things that needed to be there that could be destroyed such as pick ups and egg sacs were created at the beginning of a match. This was the most challenging part, the rest of it was just bugs that took some debugging.

After this I wanted to add another goal to show off what we wanted to do with procedural generation. What we decided would be good to add was collecting gold because this would be simple and still show our intentions. There are a bunch of empty game objects around the map where the gold can spawn. The amount of gold that spawns and the amount required are dependent on the number of players. I also made it so the egg sacs spawn at random preset locations and the number of them dependent on the number of players. Later both of these will also depend on difficulty settings.

Thursday, October 30, 2014

Screams From The West Iteration 5

As said in the previous post the big challenge for this week was adding networking. I started out by researching and re-factoring the code. I wanted the code to be in the best state it could before starting to add networking aspects to make the process easier. Once I had cleaned up the code it was time to think about how I was going to network the game.

I continued researching on what would be the best way to network my game. In the past I have done peer to peer in both Pew and my Game Networking class. I could have done that here but synchronizing the state of possibly a large amount of spiders could be dangerous using this method. If I were to have the host do this, the easiest way, then it would be way too much upload bandwidth for one person to handle. I later figured that I may have been able to split this work on multiple machines but this could be tricky. I decided that I would try to go with an authoritative server based setup. This way all of the spiders action would be handled on the server and sent to the players. The way an authoritative server works is the players send only their inputs to the server and the server sends the game-state to the players. This is also good because it prevents the possibility of cheating. In peer to peer you are often sending information such as position and damage and health, that all can be hacked into and changed, causing cheating to be realistically easy. With the server, however, sense the only thing being sent is inputs that means they can only change what our inputs allow them to change. This makes cheating much less severe and problematic. Another reason I wanted to do a server based system was that I never explored that way of networking before and wanted to do something new.

So great I figured out I wanted to do server and had all the right reasons to do it. Of coarse now I had to actually implement it. I started out by getting the basic connection working looking what I had done in production 2. I got this working after spending some time trouble shooting. Once I got that working I started implementing a menu system that is essential for a networked game. I decided sense there were going to be many things shared over these screens that I would create a base screen class for all the other menu screens to inherit from. This base class had information such as the back ground texture, various font/style information and positions for constant aspects such as the back button. This allowed me to create a menu manger that switched through these screens easily.

The next thing to do was to get the players in the game spawned and moving. I created a spawner class that had the server use Network.Instantiate on all of the players. That way the server owned all the players and was the one to synchronize their state. I created a class inside the player that held a string id that was unique to each player. This way it was easy to tell still which player was local on the client machines. I created a player input manager that held a dictionary of all player inputs on the server. The clients would send their input on change to the server and the server would save the most recent inputs. This way when I wanted to use inputs in other classes I would reference the most recent inputs from the input manager for that player. On Saturday I worked on this and the player movement so I could see the inputs doing something. I spent a while debugging it but I could not figure out why the inputs were not being correctly sent over. After a spending maybe an hour of debugging without results I decided to stop for the day and continue tomorrow. At this point I was not sure if I had been pragmatic about what I could do; was it really possible for me to network this in just one week?

The next morning I woke up early and decided that regardless of weather or not I can get it all working I wanted to keep trying. I figured out the bug that was haunting me the day earlier in like 30 minutes. From here I gained a huge amount of excitement. I was starting to believe that I could do this, which motivated me to work hard and stay focused for most of the day. After I got the player movements working I worked on networking the spiders. To do this I had the server sent over the position and rotation values of the spiders. On the client I used lerping to make it the values look smooth. I also just had to make sure all of the AI still worked as expected. The next challenging part was getting the projectiles to work.

I ended up doing a bunch of prediction to make the bullets work right. The first form of prediction I did was when I first got the input there was an amount of time it took to get that input. I predict where the bullet would be if it fired when he did the click. I then use a raycast to see if it would have already hit a spider. If it would then I don't fire it and just destroy the first spider hit. Otherwise I fire the bullet and send information to the clients about its initial position and velocity. Then on the client side I predict where the bullet should be given the amount of time given that information and set the velocity to the given velocity. From here I let the clients do the rest of the physics calculations because the velocity is constant. There is very little possibility for the projectiles to become not synchronized here but it is possible. As with almost all networking perfection is not a the goal, its getting as close as you can.

From here it was just making sure to handle all the little networking aspects I needed to handled. There is a long list of those things so I won't bore you with the details. All in all I got the basic functionality down and I was happy. We presented yesterday and everything worked as expected. Kyle also brought the game to testing last night and from what I heard about it there were no bugs that I wasn't aware of. This was a pretty big accomplishment for me to do in a week. I worked hard and it definitely payed off.

Wednesday, October 22, 2014

Screams From The West Iteration 4



This weeks main goal was to get the game and the rest of the team ready to present for stage 2. We had previously discussed having a melee mechanic and jumping spiders but had never fleshed them out. This week we decided that it was important to our game so we decided to add them.



The first mechanic I worked on was the melee mechanic. As you can see in the video above, I create a cylinder in  front of the player and swing it. When it collides with the spider, it pushes the spider away from the player. This seamed to work pretty well for what we wanted.


The next thing I worked on was the jumping spiders. I have it so when a spider gets in range of the player he jumps at him. After that he just chases the player as before until he gets far enough away to jump. This made it harder to get around spiders in buildings making the game more challenging and fun.



I also made a full game play video to show off the current state of the game. In this video I already knew where the egg sacs were so I ran through it quickly. This was just so I could show all of the game play in a reasonable amount of time. We used this along with a video of each mechanic during our presentation.



Our presentation went really well. They said that we passed as long as all the documentation is in order. Because of this we decided to proceed with this next week as if we passed. One thing brought up during the presentation though was the fact that we wanted to do multiplayer. Professor Ferguson questioned the need for multiplayer at all so during our meeting we discussed it. Ryan played the devils advocate but we decided that the journey we went through with our previous games was really about the cooperation aspects. Because of this we felt that we would not be doing our team justice to ignore this aspect. So we decided we wanted to do it but with time running out the team asked if I could get it basically working this week. At first I was caught pretty off guard, even though I knew it was coming to a close, I wasn't fully aware how much time we had left. I told the group that I wasn't sure if I could do it. The response was for me to try my best this week and if I was unsuccessful then we would just do single player. I am already starting to reformat my code and research what networking practices would be best for our game so I will let you know in next weeks blog how I do. 




Wednesday, October 15, 2014

Screams From The West Iteration 3

This week I added secondary mechanics such as torches and flares, and looked into more AI elements. We now have a flare that allows the player shoot something and see further then he ever could before. We also have a torch that the player can place to have a place permanently lit.

I improved the wandering AI. There was a bug in the AI that was causing the spiders to mass in the center causing distress for the players. I looked into this and now it seams that the spiders wander all over the map equally making the mass of spiders much less likely.

I looked into how I could do walking on walls/ceilings with the current AI system I was using. It turned out not to be possible with unity's navmesh system. There is a strict limit on the slope for navigation meshes so it is impossible to go strait up walls. I talked to Lawson about this during my discipline review. He suggested just to involve simple iterations with walls if we want to do stuff with walls, such as going strait up to a window rather then path-finding around the wall. Based on the feedback of my group though, this is not a huge thing and can be looked more into later in development.

I also started working on a jumping attack. I am currently doing all of my spider movement using unity navmeshagent. This does not allow me to tell the spider to jump. Because of this I will attach a rigidbody temporarily to do my jump physics and remove it to go back to AI after the jump is complete. When I was working on this yesterday I was unsure of how the jump sequence should happen so I talked about it in our team meeting. We decided that we would have the spider jump towards the player a a certain distance, and when it hit something it would stop moving in the horizontal direction and just fall strait down. If the something it hit was the player it would do damage. We also discussed having an animation for the initial jumping off the ground, in the air, hitting the player, and landing.

We were originally planning on presenting for stage 2. At the end of the week we all agreed, however, that it would be better to give ourselves some more time. For stage to we are supposed to demonstrate our core experience and I did not feel we were there yet.

We had talked about definitely wanting some sort of melee system but we have yet to jump into what that exactly entails. We talked about having it not do damage but just knock enemies back. Regardless of what we decide to do with it, I think it is a core part of our player experience.

Wednesday, October 8, 2014

Screams From The West Iteration 2

So this week we decided that we wanted a complete game flow. That meant having a start screen, a win state and a lose state. I decided to just take the egg sacs that we currently had in the game and make them destructible for the player.

Another thing I looked into was adding an aimer for the player. The way this works is I put an image in the center of the screen to let the player know where he is aiming. From here I do a raycast from the camera point out 300 units into the world. If it doesn't hit anything then the bullet travels in the direction from the player to that end point. If it gets interrupted by ground or spider it goes in the direction of the player to what ever the ray hit. This allows for the player to aim reasonably in a 3rd person view point.

At the end of the week we were able to implement sound. There is a sound for the player shooting that has a reloading sound in it. Because of this I decided to add a delay on how often you can shoot to better match the sound. There is also sound for when you are out of ammo and  take damage. The spiders make a walking noise as well as an aggressive noise when they detect you. This allows the player to be more aware of when things are going after him/her.

Overall I felt we made good progress this week. The sound added a lot of feeling to the game.

Wednesday, October 1, 2014

Screams From The West Iteration 1

So as discussed earlier we decided that the asymmetric multiplayer wasn't really going to work for this project. So what we are thinking now is 4 networked players working together to complete goals in a town overrun with spiders. These goals would be procedurally generated so that the game play would be different every time. Some examples of goals would be saving towns people, destroying the egg sacks, and collecting a certain amount of gold. The player would do this with limited resources starting out only with a few bullets in a gun and a lantern that requires oil to work.

In our current prototype we showed off some of the basic mechanics. This includes having a weapon, a lantern and enemy spiders seen in the last prototype. It has been changed to feel darker and more vast and the lantern also now gives the ability to stun.


Here the spider gets stunned and turns red to let the player know.  This will soon be changed to an animation that lets the player know but this was easiest for now. The stun has diminishing returns that last up to 5 seconds and max out at three stuns. The collisions for the stun is not ideal at the moment because I am using a series of ray-cast so that it only hits the first spider rather then all of them. I will improve on this in the upcoming week.


This is a screenshot of the player shooting. As you can see the radius of the circle around the player is larger here then it is when the player is using his lantern. The thought behind this is that the players eyes would adjust to be able to see around himself more than when the lantern was out. The bullet is also lit so the player knows where their bullet goes.

Right now I am using the unity navigation system for the spider AI. This works fine for the prototype but if we want to go further with the AI I will probably need to make my own system. We are thinking of having different spiders that climb on walls and drop from the ceiling. These sort of systems probably won't work using the unity navigation system. This AI would add a lot to the game and is of a decently high risk. Because of this after adding a few more systems to make the game flow complete I will probably be prioritizing the AI.

Wednesday, September 24, 2014

Asymmetric Survival Game

This week we decided to explore an asymmetric networked multiplayer game with a horror theme. I enjoy playing competitive games and have experience making asymmetric multiplayer games with pew. Ryan and I were both on that team so we are slightly hesitant towards this idea because it is close to something we had already done before but at the same time it could still be different enough to be fun to make. In the prototype I made you can switch between both sides of controlling a giant spider and controlling a human. In the full game there would be multiple humans fighting against a giant spider player.


This is a screen shot of the giant spider laying an egg sack. Egg sacks spawn a smaller spider every ten seconds. The only mechanic currently worked out for this character is to lay these egg sacks. We have other ideas such as setting up webs as traps but those are not fully thought out yet.


This is a screenshot of the human fighting off the horde of spiders that the giant spider just created. It is night time for this player so he has a lantern. He also has a gun with limited ammo at the moment.

Though we had fun with the conception of this idea I think we are starting to lean away from asymmetric multiplayer. One of the major issues with this idea is that it would rely heavily on the spider player knowing what he is doing for the game to play correctly. In the setting that this would be played the most, the QA labs, the players will be new to the game. It may take 3 games or so for the spider player to get it and during that time the other players aren't enjoying or truly testing the game. And by that time he will have to switch to a different game or role. Because of this and a few other reasons we have decided to take the game as a multiplayer coop against spider AI that I will get more into next week.

Wednesday, September 17, 2014

Magnetx Prototype 2

This week we decided to further explore Magnetx. The two main things I added to the prototype is having the magnet powers lock onto magnetized objects and adding basic blocks to push and pull.


This is a very simple mechanic of being able to pull and push blocks within the environment. This would later be used to solve puzzles.

The way this locking on mechanic works by using what we had before and adding a lock on target effect. Once you hit a magnetized object the magnetized rays point towards the point that they hit regardless of where the player goes. This gives sort of a grappling feel. 

This grappling feel was definitely very fun and could work in our platform puzzle environment but the problem is that it starts go away from the realism of magnetization. Mechanics such as this could be fun in a platform puzzle but don't represent how magnets really work. So we have to ask ourselves if we were interested in the mechanics or the realism of magnets.

Tuesday, September 9, 2014

Stealth Kids Game

This week my team decided to explore a co-op stealth game. The setting of this game takes place in a 1950's house. The main characters are two kids that are trying to sneak cookies without their parents knowing. This week I made a basic game play prototype to show off the kind of mechanics we would have in our game.



An interesting part of what I did this week was my detection implementation. The initial goal was to create an accurate cone of vision for the parent. I decided that an easy way to do detection that would not see through walls would be to use Unity's line-cast or ray-cast systems. So I created an object that would take a start point, an angle, and a distance for line casting. It also had a line render attached to it so that the detection could be displayed. From here I wrote a generator script that took in an angle range and a transform and then created these line renders around the given transform. In the picture above I have a parent with a range from 0-70 degrees creating a cone like shape of vision.


In this second picture the kid is in range of the parent but is not detected because the line-cast does not go past other objects.

Wednesday, September 3, 2014

Magnetx Prototype 1




The first game we're looking into doing for senior team is a game called Magnetix. In this game you play as an electromagnet in a puzzle platform environment. We have ideas of exploring magnets and different things that magnets can do too add to the fun of this puzzle game.

For this first week though I created a prototype that shows off the base mechanic. This prototype has attracting and repulsing abilities for the player. In order to do this I first had arms that rotate around a single axis. From here the player could left/right click and shoot out attraction/repulsion lines in the direction the arms are facing. This was done by simply adding force relative to the direction the arms are facing.
As you can see in the image above the attraction lines can be used to move the player towards objects. This can be useful to get to higher platforms.


The other option is to use repulsion. In the image above it is used on an object directly below the player to shoot him strait up. This could be used to get over areas that maybe have traps in a pit but there is a magnetized area to push off of. 

Overall this prototype was successful in showing that these sort of physics can be fun. As soon as you jump in and play around it is kinda fun, even though there isn't much of a game yet. Based on that reaction alone it seams this game could have some good potential. 

Saturday, May 10, 2014

Pew

This is a game I developed for my production 2 course with Matt Struble, Matt Therrien, Matt Cerasoli, Ryan Atkinson, John Cotto and Dan Thomas. Pew is a networked multiplier game. There are three teams, an ogre team and two archer teams. The objective of the game is to be the last team standing. 


Matt Struble and I were the programmers on this project. In general we liked to work together in the labs, so we often had our hands in the same parts of the projects. There were a few things that got more separated towards the end such as I did more of the level/weapon select, loading, arrow homing, and UI/HUD elements while he worked more on the ogre weapon attacks, animations, and power ups. 


One of the more challenging aspects of this game was to get the arrows to look good over the network. Initially we implemented prediction and smoothing techniques for the arrows. This made the arrows look like they hit when they hit more but caused the arrows to curve in unexpected ways. At the same time we were having a design issue where an archer on archer fight would go on for too long without any hits. In order to solve both of these problems we decided to add arrow homing to give a reason for arrows to curve and make hitting enemies easier. 

In this project we tackled a challenge of creating a networked game, with three teams and asynchronous multiplier. Given how little experience the programmers had with unity at the start of the project, it did seam that this might be a bit of a stretch. In the end the game came out pretty good. There are still some bugs though that it would have been nice to have more time to polish out. We ended up still adding important things even in the last week that gave us little time to make sure that everything new ran smoothly. Even still this game was a great accomplishment.

Click the Pew link to play the game.