troublesum's Recent Forum Activity

  • Whiteclaws After running some tests your definitely correct (though the cpu difference as you said was negligible) i ran 500 sprites moving across a blank screen which uses est 9-10% cpu using set pos and uses est 9.5-10.5% using simulate... Not sure why I though it was faster.. just seemed like my game runs smoother with simulate.. optical illusion i guess.

  • Based on what your doing there I may have giving wrong advice on using move to.. (if it works the you want then i would keep it) I would suggest for sprite6 (for smoother movement) that you give it the 8 direction behavior (since its not a platform object) and in the behavior properties for that sprite turn off default controls (this way the keyboard wont trigger the move)... then when touching sprite8 or sprite7 simulate moving left or right as desired... That should give smoother movement and better control. But cpu usage should be about the same i think as using moveto since they basically work the same way.

  • One thing I would change is how often you update the text3 field. I notice on mobile devices there is a considerable slow down if I update a text field every tick which is what your code shows its doing. I would instead suggest to update the text field every 1 second or so to help performance. also I believe set position on the green sprite is also more cpu consuming than just simulating pressing left/right. Same goes for the black sprite/camera... I would look into a plugin called "moveto" (created by rexrainbow) to move it across the screen... Based on the the code you've shown i would change those things first and try again

  • DUTOIT Thank you for this.

    I hadn't even considered creating my own... I think for now I'm just going to keep it as is and if the time it would take to create a nice looking key board becomes worth it, ill circle back.

    I did how ever find hack that seems to work most of the time (at least on my galaxy s4) its not a 100% but its enough for now. I just added wait of 0.1 sec before triggering the focus event for the text box after I show it. Oddly enough if I set the time to short or too long it doesn't work but there appears to be a Goldilocks time frame that if focus is called at just the right time it seems to work. Go figure

    Thank you again for taking the time to help

  • Nothing short of paying for your server to be hosted (co-located) at a professionally run data center where you own the server outright and its just located on the rack in their server room will give you 100% up time. And that's not cheap.

  • I'm working on a multi-player game and have in game chat that is working but the user experience isn't quite what i want. When The text box pops up I am able to focus on the box just fine but that doesn't seem to be enough to trigger the keyboard on the mobile device to show. I still have to wait for the user to touch the text box before the keyboard will pop up.

    I have tried various methods including inserting some JavaScript to simulate clicking but that doesn't seem to be working. Does anyone have any suggestions or know of how to handle this.

  • As I'm not a math wiz I usually like to work with predefined lists for stuff like this (I assume there is a better way than what I'm going to suggest but it will probably work). Why not create a dictionary and load the possible variables (2,4,8 etc..) on start of layout and then at runtime when checking just iterate over the list until to see if the number you have matches any in the list. If match return true. depending on how large a number you expect to get you could init the list with a while loop to generate a very large of possible numbers

  • I'm pretty sure your only solution is to have a host logged all the time. Even if he is not playing the host has to be there for communication to and from all peers to work. Maybe just have a server/computer/VM what ever running that is connected to the game always as a host?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe random produces a floating point number? 1.23, 3.65 etc... try it with floor/round in front of it "floor(random(0,6))" (keeping mind random the 6 is not included in the selection range) or you could do "choose(0,1,2,3,4,5)"

  • [attachment=0:10h14phs][/attachment:10h14phs]

    I modified your file and used the panning example. It looks like your problem was you had scrolling enabled on your red sprite and that was causing scrolling on your background not to work properly. Is this what you wanted it to do?

  • Assuming these sprites are not supposed to be movable by the user (they are HUD sprites) you don't need to anchor or do any math for centering... just place your sprites on a layer with parallax set to 0,0 and they center them selves to the point you placed them.

  • In C2 open example project "Touch - Panning.capx". Copy/Modify as needed

troublesum's avatar

troublesum

Member since 4 Dec, 2013

Twitter
troublesum has 2 followers

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies