Danijerry's Forum Posts

  • You could do it in a couple a ways:

    1. you could do a nested loop,

    Pick one ship and compare if it is within the distance of another ship of different faction.

    2. You could use an invisible object,

    I prefer this, use a sprite for example a circle of a certain radius.

    You could set to invisible

    Pick a ship and set the position of this sprite to the position of that ship.

    Check if other ships overlap with the sprite used

    For each of those ships check for the faction and the distance

    If the distance is lesser store the UID.

    I am also wondering if Pick nearest System event would work for you.

  • The problem is with the last condition in the destory shadow event.

    "Shadow --> casterID = ShadowCaster.casterID"

    disable it and it works fine.

    I guess the other instance is and this condition fails.

    If you want it to be specific you could store the IID of shadow to an instance variable in the ShadowCaster, and pick Shadow using it.

  • Oh.. I am getting it, all the events will be run every tick if the conditions are met. That's good to know. Thanks.

  • Simply replace "On start of layout" with "For each Enemy"

    System --> For each Enemy

  • In the Projects bar right click on Event Sheets folder and add new event sheet.

  • Nice work, thanks for sharing.

    I was just experimenting to create a projectile motion with mouse click using Physics. It seems to be tricky, if I want it to behave the way I want. I am thinking to create a behavior for projectile motion. Your work may help.

    But what is "VelocityMax"?, looks like a constant!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm.. that should be useful.

  • Ashley Thanks for the reply and suggestions.

    R0J0hound Thanks for the fix, it works. And thanks for the plugin it is an essential addition.

    I understand how it works now and I shall follow your suggestions.

  • Did you take a look at the Lemmings Engine by Ize!

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

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