dop2000's Recent Forum Activity

  • Create AsJSON string for an array and dictionary with the same number of values, and compare which string is shorter. I think the array will the shorter, but if you use short key names in the dictionary, the difference may be small.

    The shortest option would be comma-separated values.

  • No, afaik this addon was not ported to C3. So you'll have to invent your own method of breaking the text into pages.

  • If you are using C2, you can try this addon:

    scirra.com/forum/behavior-scrolling-for-text-plugin_topic52557.html

    It allows to scroll long text page by page.

  • I can't tell you how to fix it without seeing your project file. But I am almost certain the problem is with polygons or origin image points in animation frames. Using a separate object for player movement should resolve it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use an instance variable "curIndex" on the array.

    On Left key -> Array set curIndex to max(curIndex-1, 0)
    On Right key -> Array set curIndex to min(curIndex+1, Array.width-1)
    

    Then simply display the element from the Array.At(self.curIndex)

  • Did you delete you previous post? I've already written a long reply, so I'll post it here :)

    1. If you are using Platform behavior, move player only with Platform actions. "Move forward 1px" is not a Platform action, it will cause problems! Use "Simulate controls" action, check out the official Platformer template to see how to do it.

    2. I'm guessing that frames in your player animations have different collision polygons, or different size, or different origin point position, or maybe all of the above. This will mess with Platform events, because as animation is playing, your character will be constantly falling/landing/colliding with walls. To avoid this problem, use a separate invisible rectangular sprite "PlayerObject" for movement and pin your sprite with animations to it. Again, see "Kiwi store" template, how the Kiwi character is made there.

    3. Here is an example of how to manage animations in a platformer game:

  • You need to loop through all tiles, but it will be difficult to pick a random tile in a loop. So the easiest way is to put invisible "spawner" sprites. Then pick a random Spawner using "System pick random instance" action and spawn your object.

    To create spawner sprites:

    On start of the layout
    For "x" from 0 to Tilemap.Width/tile_width
    For "y" from 0 to Tilemap.height/tile_height
    ..Tilemap compare tile at (loopindex("x"), loopindex("y")) = 32
    ....Create Spawner at Tilemap.TileToPositionX(loopindex("x"), loopindex("y")), Tilemap.TileToPositionY(loopindex("x"), loopindex("y"))
    
  • ormus Could you post a demo project? I made a quick test and with 200 rays cast on every tick, the difference in performance between 10 wall objects and 200 objects is not that big.

  • You are using a wrong action - "set animation" instead of "Set animation frame".

    And remove the quotation marks.

    Set animation frame to self.AnimationFrame+1

  • When the character stops, you should snap its position to the grid, for example:

    Set x to round(self.x/50)*50, set y to round(self.y/50)*50

    Or use TileMovement behavior.

  • Thanks for the link - I now see that I misunderstood your issue completely..

    You just need to make the polygons a bit smaller, 1-2 pixels from all sides.

    TileMovement behavior should also work nicely here.

  • Local variable are reset after a wait. Try setting Damage variable as Static.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies