KirkLindsay's Forum Posts

  • OK. I think I might look into seeded generation and do it that way. Thank you!

  • I have objects I want to spread evenly across a layout. I can generate the objects with some code, but how can I then have those same objects in those same positions back in the layout so I don't have to generate them again?

    Graphical representation of what I want to do:

  • Bump.

  • I'm working on a game for desktop and using NWjs. When the window is resized, there is a black background I want to change the color of.

    (It's the black border around the game.)

    Is this possible to change?

  • I figured out a solution that worked well for me. I created a text file that contains every room layout, back to back. It is referenced using AJAX. Each room layout consists of 120 characters, so I'm using "mid" to reference a random level layout like so:

    mid ( ajax.LastData, ( whichLevel*120 ), 120 ), where "whichLevel" is a random number from 0 to [total number of layouts I make minus one.]

    I am using a spreadsheet to make sure I don't lose levels in the giant text file.

  • I would put every number 0 and 1 in it's own x,y place in the array so the array would look like your first code..

    Wouldn't I then need to input each 0 and 1 manually whenever I want to load a new level layout... ?

  • Wouldn't putting it into array be the best option?

    Using a dictionary object would work too, but these kind of things scream array..

    How would you do this?

    I tried placing the value into an array but the array also jumbles the number.

  • Hello! I want to insert objects into a room by having a local variable store a number that instructs what objects to place, and using that in conjunction with a loop to place objects in the level. The issue I am having is that apparently the number is too large to store in a local variable. The loop to place objects works fine, it's the local variable that is giving me the problem.

    Example:

    This is a room, where each "0" is an empty space, and each "1" is a wall.

    000000000000
    011100001110
    010000000010
    010110011010
    000100001000
    000100001000
    010110011010
    010000000010
    011100001110
    000000000000
    [/code:h8v6gkr1]
    
    When the line breaks are removed, it becomes:
    [code:h8v6gkr1]000000000000011100001110010000000010010110011010000100001000000100001000010110011010010000000010011100001110000000000000[/code:h8v6gkr1]
    
    That's a pretty long number, and Construct2 jumbles it when it is placed into a local variable:
    [code:h8v6gkr1]11100001110010002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[/code:h8v6gkr1]
    
    Where and how can I store a lot of these large numbers? Is there a way to compress these numbers without having to program in a way to de-compress them? Thank you in advance.
  • Hello. I'm working on a game I wanted to be played as an application, not in a browser. How does exporting a game like this affect audio? Do I still need to preload audio on the first play if I want zero-latency sound? Or do I need to preload every time the game starts up?

  • Even the sounds are not solid for HTML5. I don't think it is a good idea to have that much musics in an HTML5 Game, right now.

    I might switch over to another engine for this project, then. Construct2 is a great engine, but I need something that can handle lots of music for this project in particular.

  • for PC or Android/iOS?

    Both.

  • I'm going to be making a game that will have many, many music pieces (at least 30-40), with each piece having an alternate version that will play during certain scenarios. Is this too much for Construct2 to handle? Will the game take forever to load, every time someone goes to play it? Will the music lag behind?

  • In my game, I have an object that creates skid mark objects when it moves that I want to stay permanent. I don't want the objects to stick around though, as having tons of sprites on the screen will bog down the game. How can I have a layout "take a picture" of the trail of sprites every tick, so I can have the skidmarks appear to stay but remove the sprite?

  • Oh, yeah! INT! I forgot about that. Thank you so much, I appreciate the help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to compare values "Blahh1" and "Blarg2", to see which number is higher.

    However, trying to compare them doesn't work, because I cannot "cut off" the word part of the variable.

    Is there a way to fix this?