Offline
This is very ingenious! I really like how this uses up almost no space in the end file size.
Offline
mikebmac wrote:
This is very ingenious! I really like how this uses up almost no space in the end file size.
Yep In theory, it could go on forever. I just didn't add it on this program.
Offline
I was looking over it, I noticed there is a way to change the colour based on the "X" position (of the sprite), but not the "Y" position. I haven't gone too into detail in the website you supplied, but is it even possible to change the colour based on both the "X" and "Y" position of the sprite? If it were we could have colour independence for each pixel in Scratch with a 1x1 sprite.
Offline
mikebmac wrote:
I was looking over it, I noticed there is a way to change the colour based on the "X" position (of the sprite), but not the "Y" position. I haven't gone too into detail in the website you supplied, but is it even possible to change the colour based on both the "X" and "Y" position of the sprite? If it were we could have colour independence for each pixel in Scratch with a 1x1 sprite.
Yes, there is a way to made a 2D perlin noise generator. I know some people like Darthpickley have done it, but I didn't do it on mine. The pseudocode given on the website is quite a bit more complicated for the 2D noise than the 1D noise I have here, and uses a lot more variables, so I didn't want to implement it here. Too many variables on Scratch = confusion
Offline
Interesting,
I would think you would need a mind map or some other way of organizing that much information (I know my brain can't handle that much information). If Scratch was not switching to vector graphics I may have indulged in this a bit more.
I dumbed your project down to create a more bitmap version, maybe someone will find this type of thing practical.
http://scratch.mit.edu/projects/mikebmac/3222286
Offline
mikebmac wrote:
Interesting,
I would think you would need a mind map or some other way of organizing that much information (I know my brain can't handle that much information). If Scratch was not switching to vector graphics I may have indulged in this a bit more.
I dumbed your project down to create a more bitmap version, maybe someone will find this type of thing practical.
http://scratch.mit.edu/projects/mikebmac/3222286
But at that point, it's no longer a perlin noise generator
By the way, there is a shorter way to do the same thing:
when [space v] key pressed set y to (170) repeat (18) set x to (-230) repeat (24) switch to costume (pick random (1) to (3)) stamp change x by (20) end change y by (-20) endMake sure the sprite is showing of course.
Offline
Yes,
You are right about the population setup, which is far more effective the way you put it. The variables are in there for future detection of the "Y" and "X" and changing the custom.
Yes, sadly it is not nearly as complex as a noise generator. I am still very confused as how they (or we) could control the pixels to create functional backgrounds though. Looking at the site they seemed to accomplish that.
Offline
mikebmac wrote:
Yes,
You are right about the population setup, which is far more effective the way you put it. The variables are in there for future detection of the "Y" and "X" and changing the custom.
Yes, sadly it is not nearly as complex as a noise generator. I am still very confused as how they (or we) could control the pixels to create functional backgrounds though. Looking at the site they seemed to accomplish that.
Well, the first step is to make a random number generator that outputs a different pseudorandom number for each number given. An easy (but not perfect) way is this:
X = input^3*[big number]+input*[big number]+[big number]
then X = ((X mod 65536)-32768)/32768.
Where each [big number] is around 1000000. Then for every input, the generator returns a random output between -1 and 1, but doesn't change when you use the same input.
Offline
Ah thanks, for some reason that clears it up a bit. I am going to have to look at this some more. Before I saw something stupid and facepalm it later, lol.
Offline
Bumр!
Offline
This is really cool. Maybe this could be implemented into a platformer terrain where the levels are generated based on seeds.
Offline
I am trying to get this implemented in to my project: http://scratch.mit.edu/projects/kidomat43/3223093 but it takes a lot to do it.
I want to be able to do
Where a is the x position in the map.
set NOISE_INPUT to (a) broadcast [noise_gen v] set MAPG_HEIGHT to (NOISE_OUTPUT)
Last edited by kidomat43 (2013-04-02 08:14:26)
Offline
I have got it implemented, but it produces unrealistic maps, and is very slow.
Offline