Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
can you use variables as a x y z (infiniminer clone)

9095maple
Guest
Quote
2024-04-05 21:15:03

hello everybody, i am working on a infiniminer clone but there is an issue, how do i use a variable as a x y z, I'm doing it because i want to make "random" terrain but there is little documentation for Perlin noise especially without JS.


Thanks!
9095maple


new object
Guest
Quote
2024-04-05 21:24:16

So you don't want to use JS, right?


9095maple
Guest
Quote
2024-04-05 21:37:10

new object wrote:
So you don't want to use JS, right?

yeah no js


new object
Guest
Quote
2024-04-05 21:48:29

Hm, without JS you can't use variable for vector.


okeoke
Registered User
Quote
2024-04-05 21:56:50

I'm doing it because i want to make "random" terrain but there is little documentation for Perlin noise especially without JS.


So in what format you want noise to be generated, data structure or image? If you require image you can use an external tool like https://github.com/sbrl/noisebox?tab=readme-ov-file and run it using "system" function. There is not much you can do with the image on run time anyway, since it's not possible to generate terrain dynamically.


9095maple
Guest
Quote
2024-04-05 22:05:16

So in what format you want noise to be generated, data structure or image? If you require image you can use an external tool like https://github.com/sbrl/noisebox?tab=readme-ov-file and run it using "system" function. There is not much you can do with the image on run time anyway, since it's not possible to generate terrain dynamically.[/quote]


well i want to incorporate perlin noise into the game so people can get randomly generated worlds. (using blocks) because right now im manually placing blocks


okeoke
Registered User
Quote
2024-04-05 22:22:11

So you got the Perlin noise into the game. How you generate a random world now?

What is Perlin noise in your world, is it an image?


9095maple
Guest
Quote
2024-04-05 22:42:39

wrote:
So you got the Perlin noise into the game. How you generate a random world now?

What is Perlin noise in your world, is it an image?



its supposed to create terrain out of the (randomly generated image) kind of like a heightmap.

this is why i didnt use it so i could try to use a variable for each coordinate so i can say random y from 1 to 3 for example.


okeoke
Registered User
Quote
2024-04-05 23:30:49

Perlin noise doesn't create anything. It's simply a greyscale texture, each pixel has value from 0 to 255. Then you use it for terrain generation it gets transformed into the height map. X and y coordinate of pixel become horizontal coordinates, it's value from 0 to 255 defines height. That way you define height map verticies position in 3d space. Then you create edges and faces, and apply textures, shaders and all other stuff you like. Perlin noise is used for such generators simply because all pixel values relate to their neighbours, so heightmap doesn't have extreme height differences and looks smooth.
It can't generate cubes for you. It's not magic - you need to read each pixel values, and write a generator which will create the geometry for you.


9095maple
Guest
Quote
2024-04-05 23:54:40

i researched a bit on it and i think Marching Cubes is what games like infiniminer and minecraft uses.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "In?ernational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact