R0J0hound's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Had a tinker with the idea and it does end up with an optimal move path. I also tested out some ideas i had for implementing turned based mechanics. It may have some use to give someone some ideas...

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

    r139, 43 events

    I agree moving your units one space at a time would give the player more control and could be a better control mechanic.

  • Ah, the "g" flag does help. Why use RegexMatchAt() and then rebuild the string when you can just use RegexReplace() where everything is done in one call?

    This now removes all numbers and not just the first number.

    RegexReplace("Hello123", "\d", "g", "")

  • I haven't opened the capx but you should be able to get it to work without any path finding at all. I mean when you highlight all the possible moves for a piece you already have a number for how many spaces away it is from the piece.

    So if you select a spot four spaces away you can select a spot three spaces away next to that. The process can be repeated to find all the grid positions in the path. So you end up with a list of positions that you could move to in sequence with the move to behavior.

    At least that's a thought. I don't have access to c2 ATM to implement it.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound