dop2000's Recent Forum Activity

  • If you want to duplicate the dragged sprite, you can just create a copy of the sprite in the slot.

    Another option is to use an invisible sprite for dragging, and you can attach anything to it with hierarchy or Pin behavior.

  • You can multiply the score by 1000 before submitting. And then divide by 1000 when displaying.

  • That seems like a poor data organization to me - why do you have so many instance variables on the array? Why don't you store these values in the same or a in different array, or in a dictionary?

    Anyway, you can copy these values to a dictionary and save the dictionary in Local Storage. When loading - copy them back from the dictionary to instance variables.

  • In the last condition you want to pick the Turrets instance.

  • Could it be a type mismatch? Say, the instance variable is a number, and the "id" in JSON is a string?

  • If you see memory usage increasing over time while the game is idle - it's a memory leak.

    But 100 MB for images should not crash a phone. I’ve made many mobile games in the past that used 300–500 MB for images, back when most budget phones only had 1–2 GB of RAM, and they ran just fine.

    Collect the LogCat log of the crash, you should be able to see what caused it.

  • You do not have permission to view this post

  • Do you see that images only use 100 MB in the debugger? That's very modest memory usage, it should not crash a phone with 4GB of RAM. The issue must be with something else. Try collecting LogCat logs.

    If you need all cards (20 animations with 180 frames each) to be available on the same layout, then you’re right: splitting them into separate sprites won’t help.

    The only real option (if the art style allows it) is to break each card into smaller pieces — for example, a shared border/background sprite used by all cards, plus a smaller unique image for each card.

  • Each animation contains 100-200 frames, and these are the same 105x131 images.

    Just to clarify - the size is the same, but the images are different in each animation, right?

    A quick test shows that 1000 frames with that resolution use about 80-85 MB in memory. So your game should probably run fine, even on mobile. But I would try to reduce the number of frames in animations, 200 frames feels like a lot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add a Priority instance variable to the family, say, from 1 (lowest) to 5 (highest). Then you can use the Pick lowest condition:

    For each Enemy
    Enemy has LineOfSight to Object
    Object pick instance with lowest (distance(Object.x, Object.y, Enemy.X, Enemy.Y)/Object.Priority)
    ... Enemy Move to Object
    

    Say, object A has priority 2 and is 100px away, object B has priority 5 and is 300px away. Object A will be picked.

    You can tweak the formula if needed.

  • The easiest solution is to store the puzzle number in a variable. Then, to move to the next layout use "Go to layout by name" action:

    Add 1 to puzzleNumber
    Go to layout "Z1-P"&puzzleNumber
    

    Alternatively, you can extract the current puzzle number from the current layout name:

    Set puzzleNumber to int(tokenat(LayoutName, 1, "P"))
    Go to layout "Z1-P"&(puzzleNumber+1)
    

    To avoid duplicating this logic in every layout, use a shared event sheet for all layouts, or place it in a separate sheet and include it in each layout’s event sheet.

  • First of all - never use "Trigger once" condition with objects that have multiple instances.

    You need to make sure that your ghosts can actually find a path. The easiest way is to add some visual feedback. For example:

    Ghost On path found → Ghost set opacity to 100
    Ghost On failed to find path → Ghost set opacity to 30
    

    If you see that them turning semi-transparent, try tweaking the pathfinding settings, such as cell size or padding.

    Once you fix that problem, I suggest you use MoveTo behavior for movement, it's more accurate. And it has "Move along pathfinding path" action.

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