dop2000's Recent Forum Activity

  • Why so complicated? Remove Drag&Drop from Canvas, enable Drag&Drop on the Sprite.

    Pin each pair Canvas+Sprite together:

    On Start of Layout:

    For each Sprite

    ....Canvas overlapping Sprite: Canvas pin to Sprite

    That's it, you should now be able to drag & drop canvases.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can save all arrays in one text file - one line per array.

    The arrays can be in JSON format or simply a list of values separated by comma or any other symbol.

    Use tokencount and tokenat expressions to parse the file, for example:

    tokenat(AJAX.lastdata, 0, newline) will give you the first line from the file.

    Or you can use CSV plugin:

  • Or pin your image to invisible draggable sprite.

    Or simple change the collision polygon on your sprite - make it smaller.

  • Physics angle of motion:

    angle(0, 0, Sprite.Physics.VelocityX, Sprite.Physics.VelocityY)

    To compare two angles you can use anglediff() expression.

  • Even if you are using lots of sprites, there are still ways to optimize them.

    First, read these tutorials:

    https://www.construct.net/au/blogs/cons ... memory-796

    https://www.scirra.com/manual/134/performance-tips

    https://www.construct.net/au/blogs/ashl ... -works-917

    Try to make images (in sprites) as small as possible. Don't create big sprites and then scale them down on the layout.

    Don't create sprites with many animations.

    If you only need pine trees on this layout, a sprite containing 20 different animations for all kinds of trees will consume a lot of memory.

    If you have huge layouts with thousands of background sprites, try to build a system where sprites are created as you progress through the level and destroyed when they are no longer needed.

    Or at least disable animations/events/behaviors for sprites that are off-screen.

    Avoid using effects and behaviors on too many sprites.

    Regarding the issue with the TargetScale - you can do something like this:

    Every 1 second:
    Tree compare instance variable TargetScale<1   -> Add 0.1 to TargetScale
                                                   -> Tree set scale to TargetScale[/code:vut6cbur]
    
    Trees that have reached scale 1 will no longer be picked by this event.
  • You didn't provide any information - what behaviors you are using? Is this Physics/Platform game? Are these objects Solid?

    If B should not collide with anything, you can simply disable collisions for this object.

    Otherwise you need to handle collisions with events - create events for different combinations:

    A on collision with C -> do this

    B on collision with C -> do that

    etc.

  • Your question is about C2, why are you posting in C3 forum?

    You can generate a big random number, save it to local storage and use it as a unique user ID.

  • You do not have permission to view this post

  • It's hard to tell what your are doing wrong without seeing your project.

    Please share your capx file.

  • Why do you need to protect save files like this?

    As a player I would be pissed if I couldn't load my old saves after replacing some hardware on my PC (say, motherboard or HDD).

  • YoHoho

    Of course you can change it for a bigger grid, just need to modify the values throughout the code - for example for 10x10 grid in event #2 change condition to newX<10, in event #4 change the formula to min(9, x+1) etc.

    Did you watch the video from the first comment? This algorithm is used for dungeon generation.

  • If you have three "Open" functions and all three are called at the same time - that's poor project design, not a C2 issue.

    Construct does many things differently from "real" programming languages, but personally I like how flexible functions in C2/C3 are.

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