Jump to content

Search the Community

Showing results for tags 'scrolling terrain'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi everyone. I've been toying around with using perlin and simplex noise to generate height values for a terrain mesh with threejs. My aim is to create something visually similar to Populous. So far I have something that looks like this. At the moment I have custom plane mesh subdivided horizontally and vertically by 10. Each of the mesh's vertices y value is determined by using a noise function. This all works fine enough it seems, though I am running into issues when trying to implement a scrolling effect, again similar to Populous. First I declare and init some variables. //globalvar mesh_width = 10, mesh_height = 10;var tile_width = 1;var xpos = 0, zpos = 0;var x = xpos, z = zpos;//initialize terrain data arrayvar terrain_data = new Array(mesh_height);for(var i = 0; i < terrain_data.length; i++){ terrain_data[i] = new Array(mesh_width);}noise.seed(Math.random());I then define the terrain_data object using the noise functions. for(var j = 0; j < 10; j++){ for(var i = 0; i < 10; i++){ var value = noise.simplex3(x, z, 0); value *= quality; //console.log(Math.abs(noise.simplex2(x, z))); terrain[i][j] = Math.abs(value); x += 1; }z += 1;}EDIT: This was a mis-post. I'm sorry. It can be deleted.
×
×
  • Create New...