Skully Brookes
  • Home
  • Projects
    • Personal >
      • Pizza Toppa
      • The QWERTY collection
      • Search for a Star 2014
      • Wee Paper Planes 2013
    • University >
      • Honours Project
      • Swamp Escape
      • Role
      • Procedural Podracing
      • Snowy
      • PlayStation 2
      • Retro Platformer
      • Anagylph 3D
    • Jams >
      • LowRezJam 2016
      • Splash Jam 2016
      • Global Game Jam 2016
      • ProcJam 2015
      • SSP15 Space Jam
      • Global Game Jam 2015
      • DCA jam 2014
      • Jump jam 2014
      • Experimental games workshop
      • Global Game Jam 2014
      • Tiga Game Hack 2013
      • Global Game Jam 2013
      • Ludum Dare #27
      • Ludum Dare #23
  • Gallery
  • Blog
  • Games
  • About
  • Contact

500 Miles (February 2014)

24/2/2014

0 Comments

 
Another first for me: procedural terrain collision.
As awesome as my procedural planet was last year, collision with it was limited to spherical collision based on it's radius. To actually collide with the planet, I would need to cast a ray to the centre of the planet, then evaluate the generation function at the point along that ray the radius units from the centre. Totally doable, but I just didn't have the time and there's an endless list of features I wanted to add to that application: There's literally the entire universe worth of things I could add and then some.
Fortunately, working with procedural terrain build from a plane makes collision detection that bit more straight forward. All I need to do to find the height at a given position is pass in the 2D coordinates to my wrapper function which returns the height. Although I need to take into account the extra adjustments to the terrain, as the mesh is moved about so that when rendered, it defaults to the centre of the entire terrain being at the origin. The wrapper function takes this into account, as well as accounting for any adjustments to the position of the terrain.
When I got this working, and had the camera (and placeholder character) skating over the hills generated by Perlin noise as can be seen in my dev video, I was excited. It was is so awesome seeing it work exactly as I want it to. The next step is to start implementing my racer. Right now it is locked to the terrain, however I will make it so that it only does that if the position is below the terrain, otherwise it'll leave it be. From there I should be able to make the racer move across the terrain properly.
To make sure my collision is working as I want, I've implemented fractional Brownian motion and it does indeed work. I've also changed the texture to make it look more like sandy rock. The images below show the result as well as highlighting the LOD and how they appear, although you barely notice when actually on the ground. It's all going really well so far.
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Archives

    April 2016
    September 2015
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013

    Categories

    All
    University

    RSS Feed

Skully Brookes
Copyright © 2017
Contact Skully