R0J0hound's Forum Posts

  • tulamide

    Hmm... The memory usage stays stable for me on my vista computer. I'll have to try it out on the xp one and get back to you.

  • Ok, a quick update. Updated download on first post.

    *Fixed the issue with the minifier.

    *A optimization was added for webgl. A texture won't be created every frame if nothing has changed on the canvas. Now only after stuff was drawn to the canvas will it update. This will make it faster for projects that draw occasionally or just once. If stuff is to be drawn every frame then there will be no benefit.

  • Sigmag

    1) The minifying bug isn't the cause of the performance hit. The hit is from using canvas2d internally and copying it to a webgl texture every frame. A proper fix would be to only use webgl when it's enabled.

    2) I test on a 10+ year old laptop with winxp/sp3 and a 5+ year old laptop with vista. Due to their age and a lack of updated drivers I only get a marginal speedup from using webgl. I have both android and ios devices but I haven't tested on them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • newt

    I'd rather not remove features if I can.

    clrammer

    Opps, re-download the plugin to eliminate the javascript error.

    And yeah, the performance issue is related to webgl and this plugin.

  • keepee

    I don't have access to c2 ATM but my thought on how to handle scrolling and such would be to have the canvas' on a fixed layer and just translate the image point positions to the fixed layer. I believe there are some system expressions that can do the conversion. Everything else could be on other layers that scroll and shouldn't need repositioning to paste... I may be wrong as I haven't tried pasting to another layer that has a differing offset. If it doesn't then the falloffs and such will have to be moved before pasting and then moved back after.

  • Fixed the memory leak with the canvas plugin. I updated the download in it's topic.

  • Just did an update to fix to eliminate the memory leak when using webgl. Download on first post.

    I also isolated the reason the minifier fails down to the floodfill function, but beyond that I don't know what needs to be changed. So still no fix other than possibly removing that feature.

    Ashley is there a way to display an error log of the closure compiler if it fails? I could not find any laying around the c2 folder.

    SirSpunky

    It is slow with webgl on because it copies the canvas to a texture every frame. It's faster with webgl off as it avoids doing that.

  • keepee tulamide

    Is webgl enabled in the project properties? The canvas plugin has issues with webgl. Namely a performance drop from copying the canvas to a texture for drawing and a memory leak on some systems because the texture isn't freed despite the code telling it to do so. At any rate, disabling webgl should remove the issue at least until I manage a better solution.

    So unfortunately this is a known issue that is long overdue for me to fix.

  • https://dl.dropboxusercontent.com/u/5426011/examples18/shadow_cast_2.capxr142

    Yet another shadow caster example but this one is has a capx to dissect. It's probably very similar to what keepee did in his example. The shape of the objects is defined by imagepoints.

    Features:

    * Colored additive lights.

    * Changeable shadow color.

    * Adjustable resolution to get a balance between look and performance.

  • You could just sort all the pieces at once. It's not as concise as only sorting the relevant pieces but it sure is simpler to implement and debug.

    For each seekerPart ordered by seekerPart.x*10000+seekerPart.y

    --- seekerpart send to front

    The 10000 is just an arbitrary number larger than the layout height.

  • One way to do it would be to add a "wait array.curX*1.0 seconds" action right above the set position action. Just change the 1.0 to how many seconds each position should have.

  • No need to use an array just use two for loops. In fact the array wouldn't help in the case of the triangle.

    For a 3x3 square whose top left is at x,y do this:

    Global number x=100

    Global number y=30

    Start of layout

    For "row" from 0 to 2

    For "col" from 0 to 2

    --- create sprite at 32*loopindex("col")+x, 32*loopindex("row")+y

    And for a triangle do this:

    Start of layout

    For "row" from 0 to 2

    For "col" from 0 to loopindex("row")

    --- create sprite at 32*loopindex("col")+x, 32*loopindex("row")+y

  • I made an astar capx a bit ago that was decently fast.

    http://www.scirra.com/forum/a-star-algorithm_topic47626.html

    Just tweaked it a bit so it would run continually or once per frame.

    https://dl.dropboxusercontent.com/u/5426011/examples18/astar3.capx

    All the events could be thrown into a function for ease of use if needed. Also all the actions that change the nodes frame and opacity could be removed since they only provide for visualization.

    The one thing that comes to mind to make it quicker would be to use an array for node lookup to eliminate overlap checks.

    I neglected to provide for the case of not being able to find a path, so you may need to add that. Hint: it's when the open set is empty.

  • These are bad game ideas? More like undeveloped game ideas! You just need to some twist added to make it interesting or amusing.

    nickkname

    1. If it was operated by ai and pieces fell as you collected stuff it could serve as a kind of rube-Goldberg style level up system/eye candy. Although I don't know what should be done if the ai looses...

    2. This idea is amusing enough to be played at least once. However the technical problem of setting up the control system to play it would make it not be played. Just change the control method to moving the mouse in a circle or something and you might just get a game as enjoyable as qwop.

    3. Most smart phone games do something like this anyway where you can dish out real money to bypass much of the grinding for points or coins. The bad idea here is you actually pay to end the game.

    Let's tweak the story a bit. You are in line with a massive crowd to get a limited number of tickets to a movie that everyone wants to see but it's only being showed once. You can feel the tension in the crowd as you push and shove to the front of the line along with everyone else. Tempers are short so fighting is inevitable, but the police is there to supervise the event and if anyone creates too much disturbance they will then have the law to deal with. You have to get to the front of the line, buy the ticket and get out of there without having your ticket stolen. The twist is you don't have any money to buy it so you'll have to steal from the crowd. All this while everyone else in the crowd is doing the same to varying degrees.

    Paying the $5 will bribe the cops to help you but the crowd's civility will plummet when they see the injustice! And how long can the cops fend off an angry mob?

    4. Could be an interesting opportunity to explore the other senses. The gui would present visualizations of all the senses which would provide the player with glimpses through the storm. You would need some kind of goal or motivation. A few ideas: Find shelter before you freeze, avoid falling to your death off some glacier cliffs, avoid the half-starved furry raptors, or find your lost cub.

    Joannesalfa

    At face value that's not very interesting, but slap it into a gta style city who's designer took inspiration from MC Escher and you start having something. May I add that it's under constant construction so upgrades such as maps and gps' have temporary value. Can you get to the house before the competition or even coworkers seeking the commission? Can you manage keep your job, find the house and win brawls on the lawn so you can fix that sink first? All while staying under the radar of the law which just so happens to handle violators with lots of bullets.

  • You mean if you had a family called 'pets' which contains 'cat' and 'dog' objects. And you want to know if the currently picked pets is a cat or dog?

    You could do it with an event like this:

    pick cat by uid pets.uid

    It will only run if pets is a cat.