jggiles's Recent Forum Activity

  • It's an effect, not a frame - I figured the computing cost for enabling/disabling an effect would be small, or at least not much more than changing a frame.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a grid like this:

    I want to add a behavior so that when i mouse over a square, it blurs like this:

    The way I am doing it now is basically:

    "If mouse is over square -> Set Blur enabled"

    "if mouse is not over square-> set blur disabled"

    I'm fairly certain I understand why this algorithm is inefficient, but I can't think of a better way to do it. I would really appreciate some suggestions on this specific issue and general tips for algorithm efficiency and maybe some pitfalls to look out for (like not continuously enumerating over long lists )

  • If you calculate the signed difference of the angle of the objects every tick and add that to a variable you can get the total degrees moved around the center object.

    signed angle difference of b to a = angle(0,0,cos(b-a),sin(b-a))

    Example showing the total degrees moved around the center object.

    https://dl.dropboxusercontent.com/u/5426011/examples21/signed_anglediff_sum.capx

    This worked perfectly! Thanks a million.

  • -below-

  • This is somewhat hard to explain, but I'm trying to figure out how I can trigger an event after the player has traveled a full 360 degrees around a stationary object. Illustration below:

    gyazo.com/9066f4d8442160063ce8a3efa591558c

    Any ideas?

  • I figured out one reason for the crazyness - I accidentally created two "brown_ghost" objects at the game start. because this is the location of the very first spawn point for a new object, the fact that there were two meant everything after was double spawning.

    That alone doesn't explain the exponential increase, but it doesn't matter because the method suggested by is infinitely less cpu / memory intensive.

    Thanks all!

  • Actually, I don't entirely understand why this is happening. My event sheet seems to plainly instruct the engine to spawn the green object, then destroy the yellow object (and I assume the yellow object timer by estension). Why, then, is it spawning hundreds of green objects on top of each other?

    I'll probably take KazaaMafia's advice, but I'd still like to understand what is going wrong here.

  • I'll build that approach too. Thanks!

  • Woah, I didn't know about that debug feature at all! Thanks so much, I see exactly what is going wrong.

  • I have a very simple prototype of a farmville-style mechanic that hits a wall pretty quickly on the performance side. The user clicks on the canvas to create a small plot of dirt which will wait 5 seconds, turn yellow, wait 5 seconds, and turn green. The problem is that after adding about 14 of the plots, the frame-rate will just plummet and the game becomes unplayable.

    The brown, yellow and green plots are each a separate object. The brown and yellow objects each have a timer, the green does not. When a timer is triggered, the next object is spawned and the previous object destroys itself (brown spawns yellow, yellow spawns green, green has no timer - spawns nothing).

    Which part of my design is leading to this performance "crash"?

    The game:

    gregorygiles.com/dustbowl/index.html

    picture of the event sheet:

    imgur.com/a/piriy

    project:

    sendspace.com/file/o26nkf

  • I need some help with this - I understand everything except how to cast shadows on the ground. Is there a certain color map value I need to use on the floor in order to cast shadows?

jggiles's avatar

jggiles

Member since 16 Sep, 2013

None one is following jggiles yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies