Toby R's Recent Forum Activity

  • triggerChance = 30 (this is some variable)

    System-> Compare two values (floor(random(101)) <= triggerChance) -> (do whatever you need)

    In this example you have 30% to trigger actions under this condition. By manipulatin "triggerChance" you can affect the chance in %.

  • All you need here is the Browser object. Browser object has "close" action which will terminate Crosswalk app. Also you can program back button with this object. More you can find in the manual https://www.scirra.com/manual/110/browser

  • Glad you found it useful . I've extended it a little bit, and added example screen shot of how I use it in my projects and made a tutorial of it: https://www.scirra.com/tutorials/4832/how-to-smoothly-switch-between-layouts. I think others might find it useful as well since it is pretty common problem.

  • IMO it's not really a big issue (surely not a top prio critical one), in fact I don't find it as an issue at all. I guess it all depends on the project. Right now the layer's "initial visibility" property is literally initial - it's a setting for the first time the layer is being loaded. It is stil worth to set it, because C2 engine doesn't render invisible layers. In my project I find it usefull that it remembers the visibility state, but as I said it depends on the project needs. Anyway it can surely be confusing especially that it is not mentioned in the manual (at least I haven't found it in layers chapter nor layouts chapter.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I played your game some days ago already.

    Regarding the game itself: it is not a dynamic game imo cause there is no constant move. It is very simple yet oryginal and nice game. One thing I would definitely change is the jump control. It would be much more comfortable to tap left and right side of the screen at once in order to jump then to do the slide move.

    Regarding the performance. Even that it is such a simple game you can clearly notice the little fps drops in moments like jumping or bullet (arrow) explosion. Also sounds effects have some delay. You can clearly see that while tapping on the level selection screen. However this can be fixed by moving sound files to the music directory in C2.

    So to wrap up. Nice game, good job . I played several levels and had some fun. Furter levels were annoying for me cause of hard jump control - but that might be just my feeling. But the performance of such simple game should be perfect on device like SGS4, and it's unfortunately not.

    I really hope that they will release some boosted Crosswalk soon. When this happen C2 will be a tool that all mobile developers always dreamed of. For now I find C2 as an amazing tool for HTML5 apps which runs on computers and a bit less attractive when you need to build a mobile app.

  • can you post some google play link of game which is a dynamic game made in C2/Intel XDK and runs smoothly on devices like SGS4? By dynamic I mean even a running/jumping games.

    I checked a lot of games from this forum, but unfortunately haven't found any good example yet.

  • Crosswalk is simply not as fast as you would expect. This is really surprising that normal mobile Chrome browser (full of various features) is faster then Crosswalk which has basically the same engine but without all those extra features around.

    I really hope they will release the fast Crosswalk version very soon. Before that happen, I suggest to read all performance optimisation tutorials and probably do some refactoring of your game in order to make it works smooth.

  • Revilo you are asking exactly the same things in third topic in a row, when you already got answers in both previous:

    https://www.scirra.com/forum/viewtopic.php?f=147&t=153608

    https://www.scirra.com/forum/viewtopic.php?f=147&t=153653

    Check your old posts before you start new one. Also if you don't get satisfied answer in previous one, then keep on asking in the same post - it will bump it up so people will see you still need help.

  • Where exactly have you stucked? You can load data for example using AJAX if it is a PHP output. Then parse output to string without "new line" characters and set it as a value of your text type instance variable.

  • There were several topics regarding this issue, but no perfect solution. What work best for me is:

    1. create a global layer "Layout Loader" as a top layer (it can be a blank layer or layer with pretty sprite saying "loading in progress" - whatever suits your app)

    2. set its "initial visibility" to "visible" by default

    3. just before jumping to the next layout set its "initial visibility" to "visible" (no it's not a mistake, yes I know I just wrote that in point 2, but just keep on reading)

    4. On start of layout (every layout) loading screen is still visible because "Layout Loader" is visible by default. Thanks to this user won't even notice when the layout switches. At this time C2 engine loads everything what's below the loading screen (so it basically loads a layout).

    Now the good question is "when should I hide the loader screen?". Well you can set some static time with wait function and hide it after - let's say - 6 seconds.

    OR

    You can be a bit smarter and check when the loading process is done. There is no built in solution to check that (at least I am not aware of it), but you may use the "fps" value. On start of every layout FPS drops drastically because of loading and rendering initial objects.

    So you can do something like:

    Every 0.3 seconds -> add 1 to "timesChecked" (this is some local static variable)

    if FPS >= 30 (let's assume 30 FPS as a minimum fine framerate)

    OR

    timesChecked >= 20 -> hide "Layout Loader"

    So the "Layout Loader" will be hidden as soon as the FPS will get high enough to play game smothly OR after 6 seconds (timesChecked*0.3s). Second condition is important because some devices (older mobiles for instance) might never get 30 FPS even if everything gets loaded and would be stucked with loading screen forever.

    This is ofcourse a short example and you can upgade it a bit in a various ways, but I believe you get the point now.

  • There is a workaround solution. Just go in and read.

Toby R's avatar

Toby R

Member since 23 Mar, 2015

Twitter
Toby R has 18 followers

Connect with Toby R

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies