Java-Gaming.org Hi !
 Featured games (83) games approved by the League of Dukes Games in Showcase (581) Games in Android Showcase (162) games submitted by our members Games in WIP (632) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
JavaGaming.org - Pastebin

Author: Longarmx (posted 2014-05-10 20:11:37, viewed 116 times)

 1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50   51   52   53   54   55   56   57   58   59   60   61   62   63   64   65   66   67   68   69   70   71   72   73   74   75 ```package com.longarmx.smplx.noise; import java.util.Random; public class SimplexNoise { SimplexNoise_octave[] octaves; double[] frequencys; double[] amplitudes; int largestFeature; double persistence; int seed; public SimplexNoise(int largestFeature, double persistence) { this(largestFeature, persistence, new Random().nextInt()); } public SimplexNoise(int largestFeature,double persistence, int seed){ this.largestFeature=largestFeature; this.persistence=persistence; this.seed=seed; //recieves a number (eg 128) and calculates what power of 2 it is (eg 2^7) int numberOfOctaves=(int)Math.ceil(Math.log10(largestFeature)/Math.log10(2)); octaves=new SimplexNoise_octave[numberOfOctaves]; frequencys=new double[numberOfOctaves]; amplitudes=new double[numberOfOctaves]; Random rnd=new Random(seed); for(int i=0;i

Special syntax:
• To highlight a line (yellow background), prefix it with '@@'
• To indicate that a line should be removed (red background), prefix it with '-'
• To indicate that a line should be added (green background), prefix it with '+'
• To post multiple snippets, seperate them by '~~~~'
EOF
 MrMapcom (16 views) 2015-05-23 20:26:16 MrMapcom (22 views) 2015-05-23 20:23:34 Waterwolf (29 views) 2015-05-20 15:01:45 chrislo27 (35 views) 2015-05-20 03:42:21 BurntPizza (71 views) 2015-05-10 15:53:18 FrozenShade (56 views) 2015-05-07 09:11:21 TheLopais (218 views) 2015-05-06 13:36:48 TheLopais (202 views) 2015-05-06 13:35:14 TheLopais (207 views) 2015-05-06 13:33:39 TheLopais (227 views) 2015-05-06 13:32:48
 Spasi 32x Riven 16x BurntPizza 16x ra4king 12x theagentd 11x Drenius 11x DavidBVal 11x Husk 11x EgonOlsen 11x princec 10x KevinWorkman 9x scanevaro 8x opiop65 7x Slyth2727 6x revers 6x KaiHH 6x
 List of Learning Resources2015-05-05 10:20:32How to: JGO Wikiby Mac702015-02-17 20:56:162D Dynamic Lighting2015-01-01 20:25:42How do I start Java Game Development?by gouessej2014-12-27 19:41:21Resources for WIP gamesby kpars2014-12-18 10:26:14Understanding relations between setOrigin, setScale and setPosition in libGdx2014-10-09 22:35:00Definite guide to supporting multiple device resolutions on Android (2014)2014-10-02 22:36:02List of Learning Resources2014-08-16 10:40:00
 java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org