reveal-it the game
donderdag 25 augustus 2016
Time and time again
Well...as we know, humanity has defined 24 hours (being a division into 24x 60 minutes per hour, 60 seconds per minute, which is based on the 'revolution' of the earth around its axis) for a day. That is great, however, when looking at the equivalent in time to live, we get to quite a limitation:
1. Work approximately 8 hours
2. Sleep approximately 6-7 hours
3. Eat, drink, poop and other things: 2 hours.
24-(8+7+2)= 24-17 = 7 hours left.
Then of course those 7 hours and its filler depend on the rest of one's life decisions earlier. Having a wife and kids, or sports, or both, or social implications of friends and family...or all of the above. This means on average you have between -3 to 2 hours left for actual development....unless you have a problem in discipline. You might actually...use that time for playing a game, rather than making one. As I did a couple of days back. It resulted into using up sleep time, which eventually also meant that brain activity the next few days are screwed, causing little development. But...that doesn't mean nothing happened. Today more development will follow and tonight (CET+2 20.00h) I will set the first layers for the eventual game. Until then, some graphics will appear here.
zaterdag 20 augustus 2016
Step by step
Okay, so what are we trying to fix up now?
I want to know exactly the positioning of the device. So, I have already created a Unity3D project, where the position of device transforms the position of a gameobject that represents the device.
Now, I want it to show exactly on screen the position of the device.
I know that using the clear line:
{axis} = Input.acceleration.{axis};
Is not going to work, because of the way the accelerometer works. It will never be 0 exactly, so it will keep the object moving and moving.
But with a normalization or rounding it might work.
Well, look at that...As I expected, I should use the Gyroscope (as I have done in libGDX), but Unity's documentation seems a bit obscure on this part.
I now use:
transform.rotation = Input.gyro.attitude;
It works, but for some reason the device is already not flat.....weird...ah...wait...
It is because of the axis are transformed to the gameObject, which then works with different axis....
I have now put it 'north', causing the Z axis to be 0 and the object is 'laying flat'. I already noticed this exact same issue when using the acceleration method. Z and X are inversed.
So, now how to get the right stuff from the gyroscope...which is a ...quaterion..
okay, fixed it:
transform.Rotate (-Input.gyro.rotationRate.x, -Input.gyro.rotationRate.z, -Input.gyro.rotationRate.y);
The - signs are used to counter the fact that the device is moving in negative angles.
Gonna use:
https://www.youtube.com/watch?v=tCnuwkmC7BU
https://youtu.be/tCnuwkmC7BU
https://ralphbarbagallo.com/2013/02/19/displaying-maps-in-unity3d/
http://staticmapmaker.com/mapbox/
https://www.mapbox.com/studio/
https://github.com/jderrough/UnitySlippyMap/pulls
http://forum.unity3d.com/threads/how-do-i-get-my-enemies-to-target-a-random-or-nearby-player-in-an-array.425595/
https://github.com/vvoovv/blender-geo/wiki/Import-OpenStreetMap-%28.osm%29
http://barankahyaoglu.com/dev/openstreetmap-in-unity3d/
http://barankahyaoglu.com/dev/pokemongo-clone-using-mapzen-api-unity3d/
http://barankahyaoglu.com/dev/category/unity3d/
...
I want to know exactly the positioning of the device. So, I have already created a Unity3D project, where the position of device transforms the position of a gameobject that represents the device.
Now, I want it to show exactly on screen the position of the device.
I know that using the clear line:
{axis} = Input.acceleration.{axis};
Is not going to work, because of the way the accelerometer works. It will never be 0 exactly, so it will keep the object moving and moving.
But with a normalization or rounding it might work.
Well, look at that...As I expected, I should use the Gyroscope (as I have done in libGDX), but Unity's documentation seems a bit obscure on this part.
I now use:
transform.rotation = Input.gyro.attitude;
It works, but for some reason the device is already not flat.....weird...ah...wait...
It is because of the axis are transformed to the gameObject, which then works with different axis....
I have now put it 'north', causing the Z axis to be 0 and the object is 'laying flat'. I already noticed this exact same issue when using the acceleration method. Z and X are inversed.
So, now how to get the right stuff from the gyroscope...which is a ...quaterion..
okay, fixed it:
transform.Rotate (-Input.gyro.rotationRate.x, -Input.gyro.rotationRate.z, -Input.gyro.rotationRate.y);
The - signs are used to counter the fact that the device is moving in negative angles.
Gonna use:
https://www.youtube.com/watch?v=tCnuwkmC7BU
https://youtu.be/tCnuwkmC7BU
https://ralphbarbagallo.com/2013/02/19/displaying-maps-in-unity3d/
http://staticmapmaker.com/mapbox/
https://www.mapbox.com/studio/
https://github.com/jderrough/UnitySlippyMap/pulls
http://forum.unity3d.com/threads/how-do-i-get-my-enemies-to-target-a-random-or-nearby-player-in-an-array.425595/
https://github.com/vvoovv/blender-geo/wiki/Import-OpenStreetMap-%28.osm%29
http://barankahyaoglu.com/dev/openstreetmap-in-unity3d/
http://barankahyaoglu.com/dev/pokemongo-clone-using-mapzen-api-unity3d/
http://barankahyaoglu.com/dev/category/unity3d/
...
vrijdag 19 augustus 2016
Round and round
Alright, new test. simple script for rotation an object to the accelerometer:
float x = Input.acceleration.x;
float y = Input.acceleration.y;
float z = Input.acceleration.z;
transform.Rotate(x,y,z);
This will likely fail miserably, but it is just a first test.
(Rumble rumble....)
Actually it works.... But the plate will start spinning and not stop. That is a weird thing. But still it works. Translating position works...to extend.
float x = Input.acceleration.x;
float y = Input.acceleration.y;
float z = Input.acceleration.z;
transform.Rotate(x,y,z);
This will likely fail miserably, but it is just a first test.
(Rumble rumble....)
Actually it works.... But the plate will start spinning and not stop. That is a weird thing. But still it works. Translating position works...to extend.
donderdag 18 augustus 2016
Reboot after reboot continued
If you got through the crap I wrote in the other part, you will most likely make it through this one.
I am currently working on getting the hang of x and z axis. Why x and z and not x and y? Because I don't want to move up, but to the left and right and forward and back. Though I agree the translation of these vectors can be arbitrary, I like to keep it straight forward.
So, what was the deal? Well, the default code in the 'Rollerball' prefab object script, was not intended to get the accelerometer info from an Android machine.
I added:
(h and v were the originally created variables, which I left unchanged)
It works, but now I needed to adjust the cam, because everytime the stuff rolled of the screen (though this might have been because I replaced the original code for actually moving the ball, by:
I am currently working on getting the hang of x and z axis. Why x and z and not x and y? Because I don't want to move up, but to the left and right and forward and back. Though I agree the translation of these vectors can be arbitrary, I like to keep it straight forward.
So, what was the deal? Well, the default code in the 'Rollerball' prefab object script, was not intended to get the accelerometer info from an Android machine.
I added:
(h and v were the originally created variables, which I left unchanged)
float h = Input.Acceleration.x;float v = Input.Acceleration.z;(Bear with me, I have no clue yet, which axis will be more correct for which direction).
It works, but now I needed to adjust the cam, because everytime the stuff rolled of the screen (though this might have been because I replaced the original code for actually moving the ball, by:
Transform.Translate(v,0,h);
Reboot after reboot
Hey,
When you read this, I will be ....
Wait, again. This blog will be about my journey, getting to the actual game. The game that has been on my mind for several years now, which has been stopped, halted and restarted over and over....to sheer frustration.
Currently my developer is 'incapacitated' due to personal reasons (again). I don't blame him for this, but it is yet another run into the wall.
What am I babbling about? About http://www.reveal-it.net.
.Reveal is the game that should have been out pretty much over a year ago. The work has been done on servers, client side, but still no game to show. This has had several reasons, among which not the least my own lack of commitment. Why? I have no clue. I have a 36 hour a week job, I have an attention disorder, I got alot of stuff, but basically I can account it to myself (the best place to start improvement at any moment, right?)
So...What is the approach to get this thing to an end?
I have started building in Unity3d (eventually I want to move back to libGDX). Why? Because it is visual and easy. Though the start takes a bit of learning, but I feel I am on a start.
I started building a scene, which takes a bit of understanding how to create a 'world' in Unity. Creating a terrain, adding a character, light, textures, etc. Eventually the biggest problem was of course: control.
I wanted to immediately add the most influential change in mobile gaming: motion control, in other words accelerometer. This seemed easy enough, if you believe the Unity documentation. However, when adding (for instance) a rollerball character, with its own contoller, it will not work out of the box. While I was on my way importing the project into Android Studio, I thought to check the Update function, where I found it tested for Platformspecific input. I changed this to Input.accelleration.x and .z. This worked, though I still need to adjust the sensibility. But I am on my way.
My test game is Android Accelerometer Game. Which is a ball on a terrain plate. It works, but the ball rolls out of view immediately as the values are off, it seems.
When you read this, I will be ....
Wait, again. This blog will be about my journey, getting to the actual game. The game that has been on my mind for several years now, which has been stopped, halted and restarted over and over....to sheer frustration.
Currently my developer is 'incapacitated' due to personal reasons (again). I don't blame him for this, but it is yet another run into the wall.
What am I babbling about? About http://www.reveal-it.net.
.Reveal is the game that should have been out pretty much over a year ago. The work has been done on servers, client side, but still no game to show. This has had several reasons, among which not the least my own lack of commitment. Why? I have no clue. I have a 36 hour a week job, I have an attention disorder, I got alot of stuff, but basically I can account it to myself (the best place to start improvement at any moment, right?)
So...What is the approach to get this thing to an end?
I have started building in Unity3d (eventually I want to move back to libGDX). Why? Because it is visual and easy. Though the start takes a bit of learning, but I feel I am on a start.
I started building a scene, which takes a bit of understanding how to create a 'world' in Unity. Creating a terrain, adding a character, light, textures, etc. Eventually the biggest problem was of course: control.
I wanted to immediately add the most influential change in mobile gaming: motion control, in other words accelerometer. This seemed easy enough, if you believe the Unity documentation. However, when adding (for instance) a rollerball character, with its own contoller, it will not work out of the box. While I was on my way importing the project into Android Studio, I thought to check the Update function, where I found it tested for Platformspecific input. I changed this to Input.accelleration.x and .z. This worked, though I still need to adjust the sensibility. But I am on my way.
My test game is Android Accelerometer Game. Which is a ball on a terrain plate. It works, but the ball rolls out of view immediately as the values are off, it seems.
Abonneren op:
Reacties (Atom)
