Steerpike's Recent Forum Activity

  • Excuse the possibly naive question - I've never tried doing anything on the iPad before.

    In Safari on the iPad the on-screen keyboard pops up when the user touches a text box, as you'd expect.

    But the keyboard doesn't close when the user hits Enter - is there any way to make this happen in Construct 2?

  • Thanks everyone for the help so far - that defnitely looks like the way to avoid getting stale Ajax data when I re-run.

    However, I think now that the problem may be database-side rather than client-side -I'm having similar problems on machines that have never run the program before.

    My question is: why would you read a value without updating first?

    I'm not sure I understand your question. Mostly I'm doing repeated reads on the database to see if any new plays have been made. Sometimes that will be after I've made a play myself, but often it's just waiting for a new entry in the Play table. The trouble is that I can go into myPHPAdmin and delete plays, and they still show up in my Ajax requests minutes or even hours later...)

  • Ah. I've just had the problem occur on someone else's machine the first time they ran the program.

    Which I guess means it must be a server-side database caching problem rather than a client-side Ajax problem?

    I'd still really appreciate some help if anyone has any ideas how to solve this...

  • I already do a similar thing by adding tickcount to the request.

    The trouble is that when you restart the application (something I'm doing every few minutes when I'm developing) then I'm picking up data from previous runs - and the incrementing variable/tickcount doesn't fix this.

  • I'm making a multiplayer card game.

    It uses Ajax to make PHP/SQL calls to a database.

    It all works perfectly except for one BIG thing:

    Ajax is caching results - so sometimes I get the state of the database as it was 5 or 10 minutes ago.

    I've tried making the Request call unique by adding the time or tickcount to it. But every so often that time or tickcount matches one that's been seen on a previous run, I get the cached result and it all falls apart.

    I could try adding more random numbers to the Request, but there's always the chance that it'll match one already seen.

    There has to be a less hacky way of stopping Ajax caching results (I've seen there's an ajaxSetup command to turn off the cache, but I have no idea where that would go in the files that Construct 2 creates)

    It's driving me mad - I'm at my wit's end...

    Please can someone help?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem was in Firefox - sorry that I didn't specify this.

    I think that you're right that it's only happening because the objects are scaled.

    I'll try messing around with the sampling and pixel rounding to see if that helps.

    Thanks for your help.

  • It looks like my original question was unclear.

    I don't want to override the browsers security settings.

    What I don't understand is why Construct2 wants to store data for offline use at all. I can understand why some games might want to do this, but it seems odd to have it on by default with no obvious way to turn it off...

  • If I open my Construct2 game webpage using Firefox, it always comes up with a prompt asking if I want to allow this website to store data on my computer for offline use.

    This happens regardless of what the program is actually doing.

    Is there any way to prevent this? I think it would quite offputting for people using the game as it looks like the website is trying to do something dodgy...

  • This is a strange one - not sure whether it counts as a bug...

    Here's a link to my .capx file: cardtest.capx

    This effect *only* happens when game is exported - if you do Run Layout the graphics are perfect.

    Press Up & Down Arrow to alter the angle of the cards (the angle is cumulative, so only card next to the central card is at the angle shown)

    See how at 8 degrees rotation the number 8 card suddnly goes really fuzzy/blurry. Keep rotating and you'll see that at 30 degrees it becomes clear again. I know that rotating graphics will have an effect on quality, but this is much worse than you'd expect. Why does it only happen at certain angles, and why only on the exported version? (graphics are exported as highest quality pngs).

  • Thank you so much - I didn't even know that condition existed!

    I knew there had to be an easy way of doing it :)

  • Hi,

    I'm making a card game and want to show the player's hand as a fan of overlapping cards.

    The problem I have is that if I click on a card any card(s) that it's overlapping also pick up the click.

    Is there any easy way in Construct2 of getting the higher level Z-Order object to 'soak up' the click? I know that I could get a list of all the affected objects, compare Z-orders and only act on the top one, but that feels a bit clunky. I'm hoping there's any easy built-in way of accomplishing the same thing...

  • In case anyone else is suffering from similar problems, I've found a hacky workaround:

    I've changed the URL of the Ajax request from "http://MYDOMAIN.COM/getmessages.php" to "http://MYDOMAIN.COM/getmessages.php?randNum=" &tickcount - adding this radom(ish) number on the end seems to persuade Ajax that this is a genuine new request

    I'd still like to know the proper answers to my questions though if anyone knows them ;)

Steerpike's avatar

Steerpike

Member since 30 Aug, 2012

None one is following Steerpike yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies