Danijerry's Recent Forum Activity

  • I am making a new post with an issue I was already talking about here, because I don't think it a browser specific issue anymore.

    Alright, so the problem I am facing is: I am trying to make an erase effect or fog of war effect using the canvas object and a sprite with destination out effect. Here is the capx. What I am noticing is that with WebGL on, there is a huge increase in the use of memory. Memory keeps accumulating to a point where the game would stop briefly and then the memory is flushed out and the game resumes to do the same again.

    What I have tried is to disable all actions on the canvas but as long as the canvas is visible the same trend is observed. And this is going to worsen with increasing canvas size.

    Also the erase effect works very well with just canvas2D rendering.

    I am wondering if this is a bug or if there could be room for some kind of optimization in webGL.

    I am planning to make a plugin/a behavior for this effect. So if this is issue can be fixed, it would help greatly. Thanks.

  • This plugin works great for me. I have several objects often swapping positions, this works seamlessly. Thanks for sharing.

  • One way I could imagine is to use an invisible sprite which is less than the height of the gem and extending to the desired length and then checking if it overlaps with the gem you want to find. Probably you should store the "UID" of the gem that meets the conditions and if a "UID" is retrieved you could swap it with the one clicked. If there is none in the immediate left or right you should extend the sprite further to reach for the next gems. Still checking to the right first or the left may be a choice to make.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That was nice to play. The level of difficulty is a little high but that makes it challenging so the gamer would try to get better control by playing again. The graphics look cool. The swaying motion of the turtles and the acceleration of dropping bomb all look appealing. The player can be animated, I feel. Are you planning for some level ups, probably you can make them drop too. The turtles blue turtles that reach the ground and explode does not affect the life, is it meant to be that way!

  • Well, I figured out that webgl is not enabled in Firefox in my case. Also my graphics drive was not updated. So I updated my graphics driver and webgl was enabled in Firefox. Now I see equivalent use of memory usage by both Chrome 17 and Firefox 10.

    I see that manipulating the canvas object very often something like every tick costs a lot a memory when using webgl. The memory usage accumulates before it is released leading to a point when the game is irresponsive.

    Is there any optimization for this!

  • I have noticed this before. But today it got into my way. Apprently Chrome seem to occupy a lot of memory but Firefox is using very little.

    Here is an example, I am trying to create a fog of war effect using a canvas and the compositing methods available.

    There is a great difference in performance between Chrome and Firefox. With Chrome the memory usage increase sharply when I move around while there is no increase in memory usage in Firefox.

    When I disalble webgl, the performace was as smooth as in Firefox. Is it that Firefox is not using webgl? From chrome://gpu I got the same result as cacotigon. I tried enabling hardware accelaration for 2D canvas but didnot help.

    I am actually creating a plugin for fog of war, I see similar performance issues there.

    Is this a propblem with chrome or webGL?

Danijerry's avatar

Danijerry

Member since 6 Jan, 2012

None one is following Danijerry yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies