eli0s's Forum Posts

  • newt , you are right, I forgot about Somebody's the Drop Shadow shader, thanks for pointing this out! I've added the links for the Canvas Plugin and the Drop Shadow shader on my post above, next to the capx's link.

    jobel , thanks! It's Interesting that Canary manages that much of performance gain over regular Chrome, that means that there is still room for improvement in HTML5 performance.

  • rozpustelnik , thank you! There are 7 layers for the trees and 4 layers for the clouds. For some reason, full-screen in browser improves performance and stability, this has been mentioned on other topics.

    The whole effect is made with layer scaling (I've seen the method here) which looks like the best way to put together objects that should look like they are on the same place but on a different z-depth. I'm not sure about efficiency though. Is offseting layers by scaling more, less or equally efficient as parallaxing them with the parallax settings...?

    Perhaps Ashley can tell us about this.

    Ashley , thank you! Yes, the export is done with r198, exactly for testing the rendering improvements! Scheduling the rendering calculations at the beginning of the tick rather than at the end (to put it in layman terms, as I understand it) seems to make a difference! I'm posting the capx for you and anyone interested to have a closer look, please mind that my code couldn't be messier and it might have deficiencies. Also, the Canvas Plugin is needed (I am using it to render the graph).

    Forest.capx (C2 version 198 or higher & R0J0's Canvas plugin & Somebody's Drop Shadow webGL Shader are needed!!!)

  • KaMiZoTo , this is a great looking game you are making, and I loved the storytelling aspect of it! Bravo!

    There is definitely something wrong with the advance audio, your example illustrates that very clearly!

  • ,

    TiAm ,

    Thanks guys! I think the most crucial aspect is not having dt fluctuations. When I was making the capx, I was previewing on a second monitor (this has been mentioned to cause problems) and for no apparent reasons I was experiencing recurring dt fluctuations that caused massive fps drops. From 60 to 30 and so on. However, other than minor spikes here and there, now everything seems to run smoothly on my machine. Perhaps a restart was needed in my case.

    Gianmichele ,

    Aphrodite ,

    I guess this kind of visual approach is out of the question for mobile devices then. I wonder if a full 3d implementation with Q3D will prove to be more sufficient. I've bought it but I haven't had the courage to dive into it yet, it looks too complicated to me and not having a proper manual and workflow tutorials is not helping at all.

    Anyway, thanks for posting!

  • Hello all,

    Here is a Fancy Benchmark I put together in a day or so. I wanted to test the recent improvements in jerkiness on both C2 and on the browsers. It's a bit heavy with many sprites.

    Try it out here: http://www.eli0s.com/Tests/ForestScroller/

    Hold the mouse button to move the Ship (or use a touch device) .

    On my desktop I get constant 60 fps/ 0.016 dt most of the time (using Chrome). Sometimes there are some strange fps/dt irregularities for no obvious reasons. I tried this on a Samsung S2 and it's too heavy, I get ~15 fps.

    EDIT- For anyone interested, here is the capx file !!!the code is a mighty mess!!! You'll need R0J0's Canvas Plugin & Sombody's Drop Shadow webGL shader in order to open the capx.

  • vijayrajesh , you are welcome!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Parallaxing layers can be very frustrating with the current workflow. Since there isn't a "look trough camera" option and no 2.5 z depth, the only thing you can do in order to set up your scene is the following;

    1) In the editor, make sure that the zoom level is at 100% (this option can be found on the view tab).

    2) Then, click on the layers in order to access their properties and on the editor properties field set "Parallax in editor" to Yes.

    After that you should be able to align your sprites in the editor and their relative positions should be the same upon run-time.

  • You can also use clamp to restrict a value "x" between two other values "a" and "b". The expression would be:

    clamp(x, a, b,)

    In your case:

    clamp(self.X , 0+ Sprite.Width/2, 480-Sprite.Width/2)

    Check the attached example.

  • I am not sure how to follow your 1,2,3,4 steps but what I did is to load the page on Firefox, Chrome and IE11 and I got the following results:

    -On Firefox the game doesn't load, unless I hit reload page. After that everything works ok. BUT, if I reload again, I get a black screen. The music plays and if I click inside the black screen, the music stops but nothing else happen.

    -On Chrome everything works fine.

    -On IE I get exactly the thing as with Firefox...

    I hope that helps in anyway.

  • Works great when previewing on a Samsung S2 with the Chrome app. Nice game idea by the way!

  • allanblopes , what is it that you are trying to do? What do you want to make? Perhaps there is a simple way to achieve it, if you tell us what you're after maybe we can help with a practical example.

  • Hello Allan,

    This is probably happening because the Platform Object moves too fast and some times, between two ticks, it travels more than the width of the solid objects, so it never collides and it looks like it passes trough.

    This is most likely to happen on Firefox, because it has some terrible performance spikes lately, that seems to affect collision detection (among other things). Try previewing the layout in Chrome or NW.js, I believe that you'll get different, more as expected, results there.

    You could also try to slow down the platform speed a bit, or use the clamp expression to limit the Sprite's position on the X axis. The event for doing this should look like this:

    System|Every tick-----> s1 | Set X to clamp(self.X, "lowX", "highX")

    where "lowX" and "highX" should be the number values that define the furthest to the left/right that you want your Sprite to be able to move.

  • nabster023 , you are most welcome, I'm glad I could help!

  • I am attaching an example based on what I interpreted from your post and the Subway Surfer game I saw on Youtube...

    In order to open the capx, download and install the moveto and LiteTween Behaviors. These are very useful to have anyway.