lennaert's Recent Forum Activity

  • Ashley, Hmm, you are right, I just checked the processing performance, it is about the the same.

    I do however notice that with it enabled I consistently get a slightly better frame rate.

    Thanks for the replies

  • Unless you can actually measure a performance impact from 500 collision tests, which isn't many, then does the answer actually matter at all?

    The debugger shows that ....

    In my set up it doesnt matter ... as I optimize everything a lot ...

    For many, this could be a hidden performance waste

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just did a weird discovery today for something I am not sure why it is applied that way.

    I make isometric like levels where upon touching things the player is able to move there.

    (1000+ objects on a layout)

    For the Level I have various elements such as: floorslabs, stairs, etc.

    I generally put these in a "clicklevel" family, and in a loop for player control I have "Is touching object" combined with distance checking from the player to the touch. (compare 2 values, distance(p.x,p.y,touch.x,touch.y) > x) (see image)

    Now, when being in touch, I noticed, the mere ~10 collision check per tick goes up to ~500, causing a bit of performance dent, nothing disturbing, but a huge number in relation to the optimized ~10.

    I was wondering why it goes up to ~500, so I tried some things, one of them was adding a "Is on screen" event in the "is touching" and distance check.

    Suddenly my collision checks dropped from ~500 to ~80 per tick.

    Why is the "Is on screen" influencing the touch event. ?

    Is it because of the distance check ? It should not, because that is in relation to another object.

    I would guess that the "Is touching" is taking ALL Clicklevel family objects in consideration.

    And adding the Is on screen limited that ?

    IF, that is the case, would this not be a weird mechanic, seeing as one would not be able to click outside of the viewport to start with ?

  • I dont know where it was posted, but Ashley mentioned there was a higher percentage incorrect connections then what you would get if you hosted and used your own signalling server. Thought it was roughly 10% ..

  • If you still use GET methods you should be able to use that link:

    "http://myweb.com/myproject/php/login.php?nombreUsuario=" & nombreUsuario & "&passUsuario=" & passUsuario

    as

    http://myweb.com/myproject/php/login.ph ... sUsuario=1

    in the browser and see if you get the results you are expecting. (just replace 10 and 1 with actual numbers)

    You could perhaps enable error reporting in PHP, or add a : echo mysql_error(); below the query.

    But, if you switched from GET methods to POST methods, you should update your PHP to reflect that.

    ie

    the $_GET['meh']

    should become

    $_POST['meh']

  • yeah remove the single qoutes in the data entry.

    Resulting in : "distanceTotal="&distanciaTotal

    To add more

    "distanceTotal="&distanciaTotal&"&playerID="&SomeConstruct2Var

    Result would look like

    "distanceTotal=100&playerID=10"

  • You could remove the waits, and have a extra event:

    Enemy on finished playing hurt animation, set hurt is false

    You set the enemy to attack directly after your hurt thing is over, does that need to be, or is the the attack triggered another way ? (I would assume some click or touch)

    You could add is attacking and invert it for the hurt boolean too.

    The idea of the boolean here is that it checks states before allowing something to happen.

    The for each loop should determine the state of the animations based on the booleans, and the booleans should be set by manual actions or calculations.

    Also, you proably should have some idle animation, which could be triggered in the loop with a:

    event

    not hurt

    not attacking

    actions

    play animation idle

  • Add an event "for each enemy"

    add two sub events and put event 2 and 3 there.

  • My suggestion would be to use booleans for actions.

    player.hurt = false

    player.attack = false

    In the loop determining what to play, where the player is supposed to attack, but is getting hit, which might render him incapable of hitting:

    event

    player.hurt = true

    action

    play animation being hurt

    set player.attack = false

    event

    player.attack = true

    player.hurt = false

    action

    play attack animation

    Remember to keep an eye on the order of things.

  • When I visit the scirra.com I get a timeout and the page wont load, the error states: ERR_TOO_MANY_REDIRECTS

    When I visit the scirra.com/forum it works straight away.

    EDIT: the error is gone now.

  • Sorry it took so long to adjust the capx, I should have been able to do it within 10 minutes..

    https://dl.dropboxusercontent.com/u/485 ... ayers.capx

    I know it isn't perfect, yet..

    oohhh, I tinkered with something alike yesterday, but stopped after an hour ... (weird stuttering)

    Nice one

    *steals*

  • lennaert thanks, but that's really not what I need. I'm looking for a way to dynamically zoom in and out with the character change their distances to each other, the scroll to behavior has nothing to do with that, it's used to tell the game where to center the camera. thanks anyway =)

    edit: sorry, you meant relative .. misread some, my approach with all objects with scroll would center the camera automatically in their midst

lennaert's avatar

lennaert

Early Adopter

Member since 8 Oct, 2013

Twitter
lennaert has 13 followers

Connect with lennaert

Trophy Case

  • 11-Year Club
  • 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
  • x5
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,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
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

25/44
How to earn trophies