Page 1 of 1

[DEMO] Noise wave explorer

Posted: Wed Mar 26, 2014 8:54 pm
by chezrom
Hello !

At this post http://love2d.org/forums/viewtopic.php?f=5&t=77506, I have replied a small example of displaying color wave computed with the love.math.noise function.

I have coded more and more and then I post this demo in a separate post.

To avoid "key orgy" syndrom I've coded a small GUI (hard-coded and crapy one, but it works), and so the only mapped key is "TAB" to cycle about display mode.

In main window (displaying the color waves) you can right click to have a menu (click on the selected choice with left button), and left click to select a zone to zoom the display.

To have more features, you can use a bar that displays when the mouse is in the top of the window.
This bar looks like :
bar.png
bar.png (27.32 KiB) Viewed 2515 times
Whith explanation :
  1. octaves selection with left-click : how many noise-octave is used to compute the wave
  2. The display mode : how I display the wave using the dots. Left-click : cycle (like TAB key) right : select one in the list
  3. The color scale used to display the wave. Left-click : generate another random scale right-click : manipulate/select color scale
  4. The number of base colors in the color scale (between 2 and 10) Left click : cycle right : select the number in the list
  5. Pause the animation of the wave
  6. Lock the bar
The code is available on gitHub : https://github.com/chezrom/noisexplorer

And, finally, here is the Löve file :
noisexplorer.love
(8.84 KiB) Downloaded 174 times
Enjoy !

Re: [DEMO] Noise wave explorer

Posted: Wed Mar 26, 2014 10:15 pm
by alberto_lara
Seems interesting, I'll take a look :)
I did it and... wow I feel like acid hit me.

Re: [DEMO] Noise wave explorer

Posted: Wed Mar 26, 2014 11:43 pm
by chezrom
alberto_lara wrote:I did it and... wow I feel like acid hit me.
Oups, sorry. It's in fact a collection of thingsthat I think to reuse for future games.
The GUI is a quick & dirty code, it is only here to avoid a long list of key commands that I must display on the screen.