Project wont load with noise function


#1

Hi…

pls, help me.
When I remove the “set noise seed to ?” the project loads fine.
But when its added, and I load the project, nothing happens. Blank screen.


#2

is the scene loaded? do you use a black scene background?

but i would expect this result always and cannot see the connection to the seed,
because of the range of perlin? -1, 1
so the missing ExtendedMath::Map would explain why its black (opacity almost none)


#3

That’s what I initially thought, so I changed the background.
The scene doesn’t seem to load at all.:confused:

I’m trying to follow the “implementing-procedural-generation” tutorial.
Here - http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation


#4

How it looks right now, but still no change

I’m sure this has to do with the “Set noise seed ?”, because it would not load even if a made the opacity a random value from 1 to 255
But, did when the set noise seed was removed


#5

you could try this:
ExtendedMath::Map(Noise::perlin2(Variable(x) / Variable(s),Variable(y) / Variable(s)),-1, 1, 0, 255)

and maybe use different numbers as seed or random, just to check.
but no clue why it should crash because of the seed.


#6

It gives me this when I use your suggestion as well as my attempt at it as shown in my previous screenshot.

Do the functions get updated?
If so, it might be faulty, because I added the noise function yesterday.


#7

What would the difference be if I used simplex instead of perlin?


#8

If you don’t know, that’s fine. Thank You for helping. :sparkles:


#9

idk simplex , but perlin “keeps together”, picks neighbors so to say.

maybe it got updated, would explain why seed crashes your game. it runs fine on my end (like a week old)


#10

Might be, since one of the related pages to the tutorial is currently being updated.
Oh well.
I’ll try again in a week or so, and report back.
Ty

:joy::grin::wink:
Ty for the like, my first one.:joy:


#11

you can try it with my project file, there is propably a problem with the extensions


#12

I think my problem lies with my laptop. I don’t think it likes noise generation very much.
I tried your project. Same result. :frowning_face::disappointed:
Is there possibly anything that I need to download outside of Gdevelop 5 for Noise generation to work? Like a windows thing?

I download the Extend Math function, and that fixed the one problem with the unrecognized code, but the sound Noise function still doesn’t like me.


#13

i was about to say that you may have missed to put the seed behavior on an object inside the scene, like described in the funtion.

but when it doesnt run, even if you used my project, then this cant be the reason.
i was looking through the code, and try to find something that accesses your device for some data, but couldnt find anything that might be related to your laptop :frowning:


#14

Then Idk. But THANKS!!!

Another question.
How would I go about loading and unloading chunks, as the game starts to lag if there are
80x80 tiles or more at a time.


#15

you could split it into different areas.
have 1 loop the topright side 2nd loop topleft 3rd bottom left 4th bottom right.
that should speed up the process, but would also create no fluid transitions on the edges (because the perlin noise functions stays whithin its loop)


#16

okay but how can I save a chunk and then load and unload it?


#17

use external layouts.


#18

I’m sorry, but you’ll have to explain a little more to a half-brainer like me pls.:yum::crazy_face:
what is an external layout and how would I go about doing that?


#19


when you add a layout, choose the scene, where its a part of.
you can copy/paste you current scene in the layout, or parts of it.
you can load/unload those via events:

and thats about it already.


#20

huh… Ok… But would that result in lots of External layouts?
But thanks!!! :grin: You have been an excellent help.:1st_place_medal: Great day :sunny: further or Night :full_moon_with_face:, :thinking: Idk your region…
Later.:raised_hand_with_fingers_splayed: