Feluga's Forum Posts

  • 7 posts
  • I have a 2D world generation system and I want to add tree generation every 20 tiles, how can this be implemented? loopindex%20...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • My project - https://drive.google.com/file/d/17OQLIuJSWCvUbeZqJMcTm0_08MJCVi4o/view?usp=sharing

    I needed that when I clicked on a sprite, the sprite would be deleted and its value in the array would change to 0.

    Example: the ground sprite in the array has two values, and I need that when I click on the ground sprite, it is removed and in the array I have the entire value at 0

    Tagged:

  • how to get a list of files in a specific folder using NW.JS

  • How can I implement a mod system for the game? like in minecraft, etc. I searched on flowerum, but didn’t find anything similar...( thank you in advance

  • >

    I have a 2D project with world generation on an array, I figured out how to generate the top layer (grass) and bottom layer (dirt) and I want to add water generation.. but I don’t know how to implement it... I need water to appear with sand, that is, to begin with, one layer of sand is generated and on top of the sand there is water, and after that there is earth again... I hope I was able to explain.

    >

    > https://drive.google.com/file/d/1TxkYZGoSq_gLlgBeZxO0mgISQOI4HyZK/view?usp=sharing

    I can't open your prj because I don't have seed plugin,

    But you could just randomly spawn water at x, y-1 or more. This will randomly produce a cube above sand. Make sure that you only create tiles if array cell is 0 or less.

    but to have a lot of water,

    waterSpawn = 0

    set waterspawn to choose(0,1)

    for 0 to waterSpawn

    loopindex = 0 create tile sand at xy

    loopindex = 1 create water tile at x, y-1

    Hoe you can figure out other things from this example. you can add more loops.

    If you want water pool you probably need to first make a random choice, then repeat maxWater times for y - loopindex("maxwater")

    For sand above same logic, just more coding.

    How can you make ore generation on the rise?) As I understand it, I need to check the height ( Y ) in the array and create an ore sprite in place of the stone, but when I implement it, nothing happens...

  • thanks 😊

  • I have a 2D project with world generation on an array, I figured out how to generate the top layer (grass) and bottom layer (dirt) and I want to add water generation.. but I don’t know how to implement it... I need water to appear with sand, that is, to begin with, one layer of sand is generated and on top of the sand there is water, and after that there is earth again... I hope I was able to explain.

    https://drive.google.com/file/d/1TxkYZGoSq_gLlgBeZxO0mgISQOI4HyZK/view?usp=sharing

  • 7 posts