• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 2 of 2
    1. #1
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      kaz's Avatar
      Join Date
      Apr 2013
      Posts
      166
      Thanks (-->)
      41
      Thanks (<--)
      49

      Difficult programming/logic question

      John Kittz
      So I'm trying to develop a randomly generated terrain using vertices and then making a surface out of them connecting triangles(2) to make a solid 4 cornered piece of land.
      My logic is confusing me and then derailing my train of thought.
      I'm looking for a less complicated way of approaching this.

      Here's my style

      size = 30
      name[500]

      For(x=0;x<size;x++){
      For(z=0;z<size;x++){
      y=y-(rand(-1,1))
      addvertex(name[x+z],x,y,z)
      }
      }

      The result is not what I want nor what I can work with to create bigger lands if the y value for the x(1) goes down and the x(2) goes upwards.

      I thought of another way but this would require an array inside an array so I could grab each any every point/vertex then comparing it to the one that will be next to it to keep the ground within a -1 through 1 point of the last; leaving the code a mess.
      I drew a image to make it clear in my head. result;
      Difficult programming/logic question
      coding this would be a pain in the ass and be hard to work with if I wanted to modify.



      Anyone have a better way of doing this, I have all the coding down and drawings already set up.
      I just want to know how I would randomize the Y axis but still create a realistic texture, similar to minecraft style of generation.


      Thanks for reading!

    2. #2
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      kaz's Avatar
      Join Date
      Apr 2013
      Posts
      166
      Thanks (-->)
      41
      Thanks (<--)
      49
      Cheats'n'Trainers
      solved it,


      perlin noise:
      2d perlin noise
      Difficult programming/logic question

      The white pixels are height and black are lower.

      3d perlin noise requires pasting perlin noises on others, this will allow overhangs and caves underneath the terrain.

    Similar Game Hacker Threads

    1. [Help] Logic For Drawing ESP
      By Ashesh in forum ESP - WorldToScreen - ViewMatrix
      Replies: 2
      Last Post: 05-22-2016, 09:28 AM
    2. [Help] How to bypass Overwatch aimbot for CSGO
      By cantalg in forum AntiCheat - AntiDebug
      Replies: 7
      Last Post: 01-17-2016, 07:55 PM
    3. Targeting Logic
      By Obsta in forum Hacking Help
      Replies: 11
      Last Post: 06-08-2015, 04:12 PM
    4. [Help] Cheat logic
      By dmo in forum C/C++
      Replies: 2
      Last Post: 01-08-2015, 06:39 AM
    5. [Help] Programming / hacking
      By strandd in forum C/C++
      Replies: 4
      Last Post: 07-16-2014, 10:59 AM

    Tags for this Thread