(Solved)How do I get rid of a black screen?

0 favourites
  • 7 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • Currently, I am working on a game that is similar to terraria, I use an array and a tilemap to generate random terrain. But as soon as I preview the project It just shows a black screen for roughly a minute. I am inclined to believe that this is do to high amounts of data usage and performance, Yet as soon as The layout begins after the black screen, it runs just fine. I've also tried making the terrain that it is generating really small, but that didn't help at all. It might have to do with the code, and I honestly don't know what is wrong. Here is the .capx: https://www.dropbox.com/s/uyssrq91hds1m ... .capx?dl=0

    Constrols: WASD, Left click to destroy blocks, Right click to place them, 1 & 2 to switch between dirt and stone.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You created the array fine, but you had the creating the tiles part inside the x loop of the array part in START OF LAYOUT..

    ie.

    for x = 0 to array.width

    .... blah blah

    ..... blah blah..

    for tilex = 0 to array.width

    for tiley = 0 to array height

    tilemap set tile etc

    ^ notice the tilex and tiley loops are inside that X loop.

    Fixed

  • Thank you so much for the feedback, I see now that I created a sub-event on the "For 'X' " condition, instead of it being on the "On Start of layout " condition. I cannot tell you how grateful I am. Thank you

  • No problem. Sometimes a fresh pair of eyes is all something needs

  • Yeah, I can't even recall all the times I get lost just staring at a wall of events

  • procrastinator, I'm sorry to bother you again, but I'm having another problem.I don't want to ask for more than I already have, but this would help me tons in the future. Basically I was wondering if there was a way to change tiles based on what tiles are around them. For example If a grass tile is generated with two erased blocks on either side, I would want the grass block to become erased.

  • I'm assuming you just mean checking the left and right side of a block?

    The straightforward way.. needs optimizing, but it shows you what you need to do.

    + For y = 0 to array.height - 1

    + For x = 1 to array.width-2

    + if array.at( x-1, y ) = 0

    + if array.at( x, y ) = 1

    + if array.at( x+1, y ) = 0

    • set array.at( x, y ) to 0

    The 3 IFs are as one event block.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)