David Flook's Forum Posts

  • If you're using CocoonJS 1.3, the latest build of Construct 2, and physics objects, you need to turn accelerated physics off in the CocoonJS properties. It's defaulted to on but only works in CocoonJS 1.4.

  • When you say "program the custom behaviour", do you mean using the Javascript SDK? or staying withing the confines of the Construct 2 IDE.

  • Correct me if I'm wrong but I think the biggest problem would be the inability to control the number of draw calls. Which doesn't matter for any game type except this one.

    Let's say for example; You have a map with 100,000 tiles. Since you're at the very top of the map, only 50 tiles are showing. No problem, Construct only draws the 50 tiles that are showing but doesn't draw the remaining 99,950 tiles that are outside the visible screen.

    The problem is, Construct has to loop through all 100,000 tiles to determine if they're in the visible screen and looping through 100,000 tiles each tick is expensive.

    Being able to control the draw calls mean you can limit the check loop to only loop through the maximum number of instances visibly possible on the screen at any given time.

    Is my thinking correct here?

  • You can use the Fade behavior or you can simply use the "Set Visible" action.

    Every object that can be displayed on the screen will have this action available to it.

  • Let's say I'm building a square room (top view).

    This room has a floor and 4 walls.

    The sprite version of this room is 256x256 (65536 pixels).

    The tiled version of this room could use 2 tiles (each 32x32)

    1 for the floor texture and 1 for the wall texture.

    It would take a total of 5 tiles to build the room by drawing 4 walls and a floor with the tiles.

    Is tiling "free" and would the tiled version be roughly the equivalent of displaying a sprite containing 5120 pixels? (5 32x32 tiles).

    Thanks.

  • I don't believe you can alter the Layout size in real time. It would be best to create a Layout of maximum size in the editor and limit how far you can scroll.

  • Just to continue the trend of making life easier;

    For the "DestroyOutsideLayout" behavior;

    Add a parameter that can be checked call "After Show" giving you the ability to start an object off-screen but can automatically be destroyed on exit.

    For the "Wrap" behavior;

    Add the trigger "On Wrap" giving people the option to perform actions when an object wraps.

    Thanks,

    Dave

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try putting that code into a function.

    Then, when ever you create a platform, you can call the function to generate stars.

  • You need to do the above as a sub-event in "On Start of Layout" so it only happens once when the layout begins.

    [Event] On Start of Layout

       [Subevent] System.Repeat Platform.Width / 100

       [Action] System.Create Star at (Platform.X - Platform.Width / 2 + loopindex * 100)

  • Something like;

    [Event] System.Repeat Platform.Width / 100

    [Action] System.Create Star at (Platform.X - Platform.Width / 2 + loopindex * 100)

  • Use this principle;

    Give your bullet the following behaviors;

    a) Drag & Drop

    b) Pin

    c) Bullet (initial speed of 0)

    1) Pin the bullet to the character using rope-style.

    Combined with the Drag&Drop behavior, you will be able to move the bullet around like in angry birds by dragging.

    2) On Drag&Drop (when the player drops the bullet);

    a) Unpin the bullet

    b) Disable Drag&Drop

    c) Set bullet speed to a value (can be based on distance to character)

    d) Set bullet angle of motion (based on angle to character)

    The sling part of the system is just a visual trick. It doesn't actually serve any mechanical function.

  • How about System Pick nth Instance?

    Where the nth instance is Chapter.

    The first instance of your Text object would be 0 and increase in the order you created them.

  • Can you do something like?

    On start of layout

    (subevent)If LayoutName = Sprite.LayoutName then (actions)

    where Sprite.LayoutName is an instanced text variable.

  • Use Platform behavior and try something like this;

    This assumes you have a side-view character facing right by default.

    a) Simulate press left if Player is mirrored

    b) Simulate press right if Player is not mirrored

    c) When the Player hits a wall switch between mirrored and not mirrored.

  • Don't make the edgeMarkers solid objects. Simply make them invisible sprites that enemies can collide with in order to make them turn around.