bladedpenguin's Forum Posts

  • I'd start with creating a hallway sprite. Set it's collision mask so that it can be either walked through or not, depending on which frame it is on. This lets you randomly set a hallway to open or closed.

    Next, set up a double loop, one for x and one for y, so that you go through each room on your 32x32 grid. For each room, create two hallways: one to the right and one downward. Your upward and rightward hallways are created by the rooms in that direction. When you create a hallway, randomly decide whether it is to be closed or open. After each shuffle, pick two number 0-31, and use them as the coordinates for the exit room.

    This doesn't cover everything you asked for, but it should get you started, thinking along the right lines.

  • If your target platform is the Samsung S4, you should use the resolution of that device.

    1280 x 720 is a good place to start, but its a good idea to make sure your game will work on a variety of different platforms and devices. Have a look at this: https://www.scirra.com/tutorials/73/sup ... reen-sizes

  • What kind of game are you making? Platformer?

  • Why exactly is it not working for the Main menu? What exactly is going on? There are quite a few things that will stretch themselves to fit when using the Anchor behavior.

  • Glad we could help you ^_^

  • Another thing I find useful is the Anchor behavior, which sticks things to the edge of the window. This is mainly useful if aspect ratio changes or something. It's best to combine Anchor and a UI layer so that you don't get juddering in the UI elements.

  • The original Z indices may not be valid, but thier order may be. You can sort them and then either Move to Top or Move to Bottom, which should recreate the original order, albeit in an inefficient way.

  • Under Application Properties, change Sampling to Point.

  • You can use linear interpolation functions to change the player's size based on thier X. Have a read up on lerp in the manual.

    Player.Width = lerp(30, 5, Player.X/PyramidX)

    Player.Height = lerp(30, 5, Player.X/PyramidX)

    You can also affect the jump height and walking speed with the same function, to add to the illusion.

  • If I understand Persist correctly, it only keeps things on the same layout. I want to take things to a different layout, like Global, but only for specific instances. This would also give me the freedom to lock items away as a string for a while.

  • Awesome! at first glance, this is really close to what I want to do!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem Description

    JSON strings created with Sprite.asJSON

    Attach a Capx

    Yes

    Description of Capx

    The demo allows you to create sprites with C. You can manipulate them by clicking, and destroy them by right clicking. Press S on a sprite to save it, then press L on another sprite to give it the same position, color, and instance variables as the first sprite. Click the button to change layout.

    Steps to Reproduce Bug

    • Press C to create a sprite
    • Click on the sprite to change it's instance variables
    • Press S on the sprite to save it as a JSON string.
    • Click the button to change layouts
    • Press C to create a new sprite
    • Press L on sprite to load JSON data into sprite
    • ???
    • Sprite is Gone?

    Observed Result

    Sprite Disappears instead of loading from JSON

    Expected Result

    I expect the sprite to take the same position, color, and instance variables that it has on the layout where it was saved.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7 SP1

    Construct 2 Version ID

    r199 + r200

  • I've updated my demo so it clearly shows what is going on. You can press C to create a new sprite, and you can click on it to update it's state. You can hover over a sprite and hit S to save it's state, and then L to load. Loading works just fine if you don't switch layouts, and when a sprite gets Set From JSON, it moves to the correct spot and gets it's color and variables set correctly. If you switch layouts though, the sprite is destroyed when you try to load it.

  • I create a sprite on layout1, then save a JSON snapshot of it. When I move to layout2, I create a new sprite and when I try to apply the JSON snapshot, the new sprite is destroyed. It works fine if I don't switch layouts.

  • If there is lots of bouncing etc, you might look into the physics behavior, but that has the potential to add lots of additional complexity.