Saturday 25 October 2014

Prehistoric Game [Dev Chapter 3]

[Update]


I began development of the game, first off I started by creating the terrain. For the terrain I created a mountain filled terrain with a valley in the centre which would server as a pathway for the dinosaur and player to be running along.



With the terrain created I then started scripting a way to make the terrain move away from the camera but loop back to a certain position to make the illusion that the terrain was infinite in length.

I achieved this by creating two terrain which meant duplicating the original and position the two objects in a row. I then coded the movement of the terrain to move away from the camera by 0.3 units every frame and upon reaching the unit position of 499.9 it would reposition itself to the unit position -499.9. Each time one of the terrains reached the end return point the one that reached it would be returned to the start point of the terrain.

No comments:

Post a Comment