Day 24

Published November 07, 2012
Advertisement
Mirrored from my blog (en, pt-br).

Today I started making a change in the look of sync, as I want to focus on the mechanics at the time I did everything a chess texture. I was pleased, because became standardized and acceptable.

tumblr_mbpnphqMEj1rxq0qy.jpg

Then I started to build a level of one of the possible modes of play. The goal will be to put cubes of each color to its respective place (call stand) with the shortest time possible. The count will be progressive with precision of hundredths of seconds.

Here comes one of the main mechanics of the game, stop time.If the player press Shift the time stops, "Freezing" all the movements of the cubes and projectiles in the scene. When the player shoot with the time stopped the projectile will be stopped and will come be to its trajectory when the time starts flowing again.

Using the stop time the player will be able to better analyze and give shots synchronized, which will make, strategy and calculation of the force of the projectile (mass x speed), be a major factor in the total time of the level. When a cube is thrown out the level time will be added to the total time as a penalty.

In this video you can see how this game mode is. (In the video doesn't have the time yet).

[media]
[/media]

Doing the logic of game winning I found two bugs that was difficult to resolve.

The first was more a lack of my attention. After putting a Trigger in the level the cubes began to move in strange ways (video below).

[media]
[/media]

At the end had nothing to do with the Trigger. What happened is that sometime before I added the DontGoThroughThings in the cube for it not pass the walls of the stand, but I ended up using the same layer that the cube is (In the script DontGoThroughThings the object using the script cannot be in the same layer that it will check the collisions). And as I was only testing after I added the Trigger I was thinking that the problem was with it, it was difficult to find the real problem.

To resolve this, as an object cannot have two layers, I had to use a workaround I found on the internet. Duplicated the object, removed the Mesh Renderer and placed as a son of the duplicate. Put a different layer in the duplicate. I didn't like this solution, but for prototype work, so I'll leave to search for a better solution later on.

The second bug, which was easier, but it also took a while was that at certain points the gun was becoming unaligned with the projectile, it happened because of some Triggers that was inside of the stand and took them rayCast. To solve this just use layerMask and pass as argument in the rayCast that it ignores this layer. But I'll leave it to do tomorrow.

[size=2]PS: Sorry for the bad english.
Previous Entry Day 23
Next Entry Day 25
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Day 39

1551 views

Day 38 - Idleness

1171 views

Day 37

1206 views

Day 36

1244 views

Day 34 - College

1024 views

Day 35 - Idleness

1077 views

Day 33 - College

1103 views

Day 32

1277 views

Day 31

1213 views

Day 30

1269 views
Advertisement