top of page

First Week Of Production

CritterFlux is an idea me and my teammates had during a late night pokemonGO walk during the road to GGC. We were discussing our previous game which also was an android based but much bigger in scope. After a while of conversation we decided to pitch our new game concept and test the water and see how many would be interested. This was a hit and almost a couple of days after the pitch we had potential recruters and teammembers already on board. We decided then and there that we would put our other game concept on hold and persue this new one.

The first week of developing we individually created a personal website and scrum-dokument with all our sprint goals and assets that needed to be done. I started working on the menue and the different phone applications that would affect the monster, or critter as we call it. The menu was a hard nut to code so I shelved it and started working on the accelerometer and the leaning effekt the critter would get when tipping the phone to the side.

The accelerometer was the easiest part due to the extensive dokumentations in the unity community. I declared two floats called speed and tilt and made them publc so that I could debug and optimize in the editor. In the accelerometer script I created a fixed update and declared two vector3 variables called acceleration and movement. In the update I called on unitys own input function called acceleration and assigned it to the newly created vector variable called acceleration. At the same time I assigned the accelerations x-value to the movement vector and set all its other properties to zero. To contain the tilt effekt I set out a condition that looked att the magnitude of the acceleration and only let it tilt if the x-value is between four and five. Inside the condition, if the condition is met, the movement vector s assigned to the objects velocity times the speed variable earlier mentioned. I later update the object coordinates In the x-axis and with a function called clamp, retrived from unitys mathf class, I set the amount of change in the x-axis so that it maches the width of the game area. After that I call on unitys Euler function via the Quaterion class and calculate a new angle so that the object rotates on its z-axis, imitating a visual lean effekt.


Utvalda inlägg
Titta in snart igen
När inlägg har publicerats hittar du dem här.
Senaste inlägg
Arkiv
Sök efter taggar
Inga taggar än.
Följ oss
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page