dop2000's Recent Forum Activity

  • Without seeing your code it's difficult to tell what you are doing wrong. "For each" is a safe method to process each instance separately. But updating targets on every tick may not be a good idea.

    You might need a state machine (a set of instance variables on players and enemies). Use Timer/LOS/Pathfinding behaviors to change their state. For example, when a player is in "find_target" state, find the nearest enemy. Then change the state to "chasing" for 2 seconds. On "chasing" timer check if the target is in firing range, if not - re-enter "chasing" again. If yes - change state to "attacking". And so on.

    Look for examples and tutorials on how games like these are made.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here are a few examples, they are old but may still be useful:

    howtoconstructdemos.com/category/virtual-joystick

  • But, I have several sets of bases. All spawning in their own torso. Will I need to make several bodies to corilate to their own group?

    For containers - yes.

    For hierarchies - not necessary, you can combine any objects.

  • for each torso, base.count=torso.count

    What condition are you using? You need conditions which pick instances. For example "Base -> Compare Instance Variable".

    If you are using System conditions like "Compare two values" - they don't pick instances.

    Also, linking with Pin and instance variables is an old method. In C3 you can use hierarchy - it will be much easier. Add Body as a child to the Base sprite. You can select which properties will be synced automatically, for example the angle. And you can use "Base Pick Children" condition to pick the Body sprite.

    EDIT: Container is another option. Or use both the container+hierarchy for maximum automation.

  • Impressive in what sense - too many or too few?

    We use JS for things which are now possible with events and to speed up processing of some big arrays.

  • Are you certain that the parallax is causing poor performance? It's unlikely.

    Have you tried disabling the parallax or removing these backgrounds completely, with fullscreen quality set to High?

  • The game

  • I use Adjust HSL to make them light up if the player is in that room, would this be worth finding another way to do it?

    500 sprites with an effect may explain poor performance. Make sure you disable the effect on sprites that don't need it, not just set the default HSL values.

  • Where do you get the value from JSON and set the scale to the body? Is it in "On Start of layout" event? Then change the scale of baby arms/legs in the same event.

    You are either doing this before the hierarchy is created, or on every tick, it's not clear from your screenshots. There is no point in updating the scale on every tick.

    Also, like I said, use "Pick children" instead of picking by Member variable. It's possible that the variable is not yet set or set incorrectly, that's why it's not working.

    Try "Body pick children" and if this doesn't work, please post a screenshot of the event sheet showing all relevant events.

  • 500 instances isn't too bad, but if they are animated or have effects or behaviors on them, this may be the cause of poor performance.

    An obvious solution is to use a tilemap. Or perhaps you can paste the tiles on a single DrawingCanvas and then destroy them.

  • Your map is made of tiles and each tile is a sprite? How many instances of these tiles are there?

  • Looks like you are not using hierarchies properly. You can set "transform width/height" for all children in a hierarchy. Then when you change the scale of the parent object, all children will be scaled automatically with it.

    You also don't need to link parts of the hierarchy with instance variables. If collider_char is the parent object, to pick its head you simply use "collider_char Pick Children Head" condition.

    You can create a family called Limbs for all arms/legs sprites. Then the code may look like this:

    if Body Scale=0.5
    Body pick children Limbs : Limbs set scale to 0.7
    
    
dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 249 followers

Connect with dop2000

Trophy Case

  • 8-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
  • x4
    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
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies