RafaelMatos's Recent Forum Activity

  • When you say you made a new project with more objects and it ran smoothly, are you talking about normal physics objects, or were you using r0j0hound's plugin?

    About normal physics objects.

    After all changes it's running way better, I think I can stick with it. However, It's far from what we usually call a good performance . I don't know yet how to export so, in order to do a decisive test, I think first I'll backup my original project and test Chipmunk Physics by R0J0hound.

  • Using construct 2 to do it was very creative for sure. Nicely done.

  • R0J0hound

    Is it possible to make a physics behavior based game for mobile using your plugin? I'm asking you that because Box2D has a poor performance for mobiles and I just discovered that now :/

  • Physics are pretty brutal on mobile, any way you slice it.

    I don't know how much code you've already done, but you might take a look at this amazing plugin by r0j0hound:

    To me, it seems to run smoother than box2d. It also has some amazing features that box2d doesn't, like collision groups (these objects only collide with each other).

    Also, spawning/destroying objects is hard on the engine if you handle too many in one tick, even if the action only happens occasionally.

    I've already done all the basics mechanics, so it would take a while. It worth all the work to change my entire project?(no disrespect to r0j0hound)

    Also I don't know if building my entire game using a beta plugin would be the best choice.

    What do you think?

    Anyway, the physics behavior's performance really let me down right now =/. I thought I was doing something terribly wrong.

    Edit: I've quickly made a new project with a lot more objects (with physics) and it ran smoothly. So I don't know anything anymore ... Don't know what to do

  • I've done so many changes to increase performance and still a pain in the ass to run smoothly. The game run with lots of lag spikes and slowdowns but sometimes, in a short period of time, run smoothly. I'm starting to think that a game based on physics behavior is not possible for mobiles.

    Alright here it is all the data about the game's performance running on my Xperia L. Also I've tested in a Samsung S3 as well and it's a little bit worse, which is weird because it has a better cpu.

    All tested using wifi and chrome browser.

    FPS: 30~55

    CPU: 45~80% (mostly around 70%)

    Object count: Around 85

    Image memory usage: Around 20mb

    Colision Checks/sec: 150~500 (mostly around 350)

    Poly checks/sec: 0~150

    ---

    Settings:

    Pixel rounding: off

    WebGL enable

    Sampling: Point

    Physics engine: Box2d web

    Construct 2 version r192

    Clear Background: No

    ---

    I'm using tiled images instead of sprites when it's possible. Actually, after doing this, my object count went from ~700 to less then 100 and still had a small effect on performance.

    I have less then 30 objects with physics behavior at the same time.

    Only one event is using 2 particle effects at the moment, which is the fire when I shoot. Their rate is 10 and 20 and last less then a second or two.

    PLEASE, if I forgot any information let me know. I really don't want to leave this project just because apparently it seems impracticable, which I don't believe.

    I appreciate a lot any help.

    Thank you.

  • I own a Construct 2 personal license for almost a year and I've never earned a medal on my avatar. I bought using steam so I don't know if it has something related.

  • If you set gravity to 0 after applying force I think the object will keep it's movement. Try to stop the object's movement where it is and then set gravity to 0. However I don't know if it will work and also I don't know what's the goal.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Need a lot more info.

    What version of C2 are you using?

    What export wrappers have you used?

    How are you testing - export or over wifi?

    Are you mixing the physics behavior with other behaviors ( such as platform, etc - not really designed to be used together)?

    What does debug say? (no. of collision per tick, etc)

    What version of C2 are you using?

    • r192

    What export wrappers have you used?

    -I didn't export anything yet. I've tested with wifi

    Are you mixing the physics behavior with other behaviors ( such as platform, etc - not really designed to be used together)?

    -Physics and scroll to are the only behaviors they have. I do have platform behavior but not in the same object with physics.

    What does debug say? (no. of collision per tick, etc)

    • 556 Object count (But they are all almost the same object only repeated), 40~50fps, 20~25%CPU 38.8mb of images.

    -Collision checks per sec = Around 600~900 (15/tick)

    -Poly checks/sec = Around 130~240 (3/thick)

    -Cell Count = 20

    Edit: zenox98

    Can't do anything until solve this. I also have 88 object right now. I'm using tiled images to get rid of all those sprites. Didn't help much though.

    i dont know if this would help but have you read some of these:

    https://www.scirra.com/tutorials/search ... erformance

    Maybe it will help you <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I have read all but I'll read everything again just in case. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • On my phone it's really laggy. Specially right after loading the layout. Sometimes It runs smoothly and sometimes the game has such a slowdown in the travelling object that makes It unreallistic and ugly. Looks like it's "decelerating" and "accelerating".

    The game is yet in beta stage. I only have 5 layouts. The memory use is around 167mb and the download size is 8mb and 230 events. I don't have any large image in my project as well. I also tested in two other phones and It lags too but less.

    Phones tested: Xperia L and Samsung Galaxy s4

    Could someone explain me why?

  • or use conditions like "pick nearest/furthest" or "pick by comparison" or "pick by unique ID"

    Or line of sight behavior....

  • This is the tutorial I used and is the method I continue to use to ensure every device is covered. It's not failed me yet. There may be better methods out there, I'm just sharing the one I use.

    https://www.scirra.com/tutorials/1126/multiple-screen-sizing-for-all-mobile-devices

    It's pretty easy to follow, just make sure you read it all properly and don't just skim over it looking for what you think you need.

    But It wont work if I use different layout sizes since we center the safe zone using the layout size, right?

    Maybe cheking what layout is running everytime?

  • I've read this manual https://www.scirra.com/tutorials/73/sup ... zes/page-1

    However (maybe because my english is not that great) I think I didn't understand.

    The manual is saying that, in order to support all mobile resolutions I need to focus the aspect ratio, right?So if I use 1280,720 and on start of layout set layout scale to 1 I would have the same view of the game If I had used 1920,1080? I'm quite confused

RafaelMatos's avatar

RafaelMatos

Member since 8 Mar, 2014

Twitter
RafaelMatos has 1 followers

Connect with RafaelMatos

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • 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
  • Email Verified

Progress

18/44
How to earn trophies