Detect device

0 favourites
  • 10 posts
From the Asset Store
A futuristic device, can be used as radarscreen, optionscreen, infodisplay, research device, ...
  • HI

    Can I somehow detect device in order to set other value for actions

    MMy probllem is that on a HTC desire this works fine with the impulse value

    ( Apply Physics impulse 30 toward (Touc.,X, Touch.Y )

    BUT on a ipad it run exstrem fast

    So is there a way to avoid that

    Cheers

    flemmig

  • You can check the fps rate ... in the expression bar as fps !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks ..

    Yes I know .. but thats not what I �m looking for

    Its a way to set different values in the action

    since there is a huge difference in processors

    this is nice on a HTC desire

    ( Apply Physics impulse 30 toward (Touc.,X, Touch.Y )

    this is nice on a ipad2

    ( Apply Physics impulse 8 toward (Touc.,X, Touch.Y )

    Regards

  • hmm. This is an extremly important question for me as well.. well will be.

    The CPU cycles are less important that the effect of deterministic physics. If C2 uses deterministic physics then the CPU should make no difference. Unfortunatly Box2d is not natively built as deterministic.

    The current solution is to run the physics step independently of the main gameloop and instead run the step based on timestamps. However, it seems to me that in C2 there isn't a way to turn on or off the physics(I could be wrong I haven't delved into c2 physics that much).

    In the mean time you might have to do Whiteclaws suggestion. Get the difference in FPS. Determine a base value for impulse. Then figure the percentage of change based on the FPS difference. I suspect the physics simulation won't be the same. There is consideration for friction, density and mass for the fixture where impulse has different effects :|

  • jayderyu THANKS

    Yes I guess that I have to sone how figure out some FPS difference

    Could you please help me with an sample, rather new to C2

    R/flemmig

  • The solution is really easy ... I'll give you an example ... imagine that you get 30 fps on the HTC Desire and 40 on Ipad 2

    System | Compare two values : fps = 30

    Apply Physics impulse 30 toward (Touch.X , Touch.Y )

    System | Compare two values : fps = 40

    Apply Physics impulse 8 toward (Touch.X , Touch.Y )

    No need for an Mathematical Physics Conundrum !

    Cheers !

    Edit : If you need a .capx , just reply "@Whiteclaws"

  • Just great ....

    works fine :-)

    THANKS !!

  • No problem , You know who to ask when you have a problem :D

    Edit : jayderyu , Here is the answer for your important question ...

  • Hi again

    I have some issues ..is there some ease parameters so the sprite dosnt rotate so wild .. maybe so easeing in rotate

    Ive posted a simple capx here:

    dl.dropbox.com/u/22406377/HappyFrog_v01.capx

    Regards

    Flemming

  • Flemming - one of the physics options in an event is called 'Stepping Mode'. It is by default on 'Fixed' which will give you the exact same movements every time, but is not framerate independent. However if you switch it to 'Framerate Independent' it will work at the same speed regardless of framerate. It will then, however, give slightly different results (which can be a good or a bad thing depending on the type of game).

    So if your game isn't counting on having exactly predictable physics results, just switch the stepping mode and that should fix your problems.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)