RafaelMatos's Forum Posts

  • 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.

  • 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

  • That's great!

    Sorry my internet went offline for some reason and could not respond earlier :/

    One thing

    +Dictionary: For each key

    ++Dictionary: Is not empty

    +++BTLevelSelect: LayoutName = Dictionary.CurrentKey

    this do not need to be a sub-events

    You can make only one event with this 3 conditions - works the same but takes 2 events less

    Thanks, I'll change it

    Now I need some sleep. XD

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This makes it even simpler.

    Instead of this Dictionary: Add key "[episode] & "level" & [level]" with value [score]

    use Dictionary: Add key "Layoutname" with value [score]

    Thats what I'm doing now. I save with webstorage (set local key LayoutName to ScoreTemp)

    and for the dictionary (add key LayoutName with value ScoreTemp) but when I refresh the game, the data is gone

    Edit: shinkan that's how I did it. So far It's working and saved me tons of unnecessary events. So cool. Thanks for the patience.

  • let's make it simpler. Imagine you have 3 variables:

    1. Number variable [episode] = 1 - this will keep track of current episode you are playing

    2. Number variable [level] = 1 - this will keep track of current level you are playing

    3. Number variable [score] = 0 - to keep track of current player score

    When player finish any level you make an event:

    Dictionary: Add key "[episode] & "level" & [level]" with value [score]

    So when player finish level 2 of the episode 1 and his score is 1234 it will add a key [ "1level2": 1234 ]

    when he finish level 5 of episode 3 with score 5432 it will add a key [ "3level5": 5432 ]

    so key name is made of a combination of: variable [episode] a string "level" and a variable [level] - which gives for example "3level1". And value of that key will be a variable [score].

    Thats the point. The only thing that say what episode and level I am is my layout name. I have only one Event Sheet for all levels and 2 more (for now) that will handle the first screen and the level select screen. So the only way to know where I am is using Layout's name.

    Edit: Is there a way to break the characters of layout's name?

  • shinkan

    I'm sorry but I'm too stupid to understand it =´[ I don't know dictionary very well. I'll try to explain where i'm stuck. For example, when the player accomplish the level 2 of the episode 1 I'll save it with webstoreage => "Set Local Key LayoutName (which is 1Level2) to ScoreTemp (which is a global variable that holds scores until it get saved) Ok, then I get lost. When do I need to add keys to episode and levels?I mean, the value will be the string episode and the key will be my "value"? and...Sorry I would add more questions but i'm too lost to even know what is it LOL

  • shinkan

    Thanks man. I'll try it.

    shinkan

    Do I need to create all the keys for all episodes and levels before and manually?And how will I create more than one Episode key without overwrite it

  • It doesn't look like will be a good option because I'll have hundreds of levels.

    1Level2 => "1" is the epsode and "Level 2" is it's respective level.

  • I'm having a hard time to understand all the steps using the dictionary, webstorage and AsJSON. I've already read the manuals and I didn't get much.

    My save game will be the same as the angry bird game style.

    So I've created a couple variables that will temporarily store all the values that I need to calculate the player's score, then I save it to a dictionary. After that I have no clue how to save the game using dictionary information using webstorage and load it when needed, in order to unlock the touchable buttons of it level of the game.

    Edit: Also I don't want to save all the state of the game, only the dictionary content, which will unlock all the levels by asking, if level name is stored, them unlock it and show it's score.

  • jeffige

    I've already test it and can't manage to scroll smoothly. The camera moves too fast. So i'm using an invisible object with platform and scroll to behavior. This way work nicely, only for moving to left and right though.

  • check if sprite.count = 0?

    I can't use it because I don't know how many instances of this object will have. I mean, I know but there will be so many layouts with different counts that wouldn't be good idea.

    Edit: Nevermind. I though I'd have to put the numbers everytime. I've tested it and works. Thanks!