Circle object

This forum is currently in read-only mode.
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Nothing said has been dumb. As you gain experience, you start learning tricks that just sorta "click." That little bit of math that makes the size smoothly transition? Learned that in high school. The "additive value rotation" I learned from Clickteam software (don't know why I didn't mention this method when we had that "change button color" thread). The use of layers to create a composite sprite is brand new, and something I learned offhand from one of Ashley's tutorials.

    When trying to do something outside the bounds of current objects and functions, it's not a 100% creative process. You don't dive in with a box of Wheaties and hope the answers just come to you. Most of your problem solving will likely be in a reverse order, starting with the idea of what you want something to do or look like in the end. Like this: I want a circle object with these features. How can I make the circle? How can I then give it a border? Maintaining that border, how can I animate it using only the math I understand? How can I make it as expandable as possible?

    Once you have your plan, then it's a matter of steps. From the bottom of your list on upward, you build your program until it resembles the thesis at the top of your list.

    This has been a longer reply than I intended. I think I've made my point, so I'll leave you to decide whether or not I'm full of myself.

    Hahaha, not at all. That's great advice. Now I know what I need to brush up on and a little bit of the kind of thought process involved in solving things. Math has always been a weak point for me, so that's probably why I don't realize these kinds of things unless someone actually shows me. Maybe if I get better at math, the rest will come to me naturally. I also need to try to be more patient and not give up so easily, but I guess that comes with experience. Anyway, thanks for the advice. What you just posted is very helpful and I assure you that you aren't being full of yourself.

  • I know the problem seems to be solved and all, but does the radius of an explosion HAVE to be defined by a circle? could you not test the distance from the point of impact and any objects within that distance are affected?

    I could be wrong since I haven't used construct in a while but if it's right then it would save making a sprite or having a whole separate sheet to make a circle

    I guess it would look something like,

    for each [family]

    distance between point 1 and point 2 < certain number

    etc

    I dunno

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh of course the math would work better/faster than defining the collision by the sprite. It would also allow you to vary the amount of damage based on distance, among other things.

    The circle object itself would be 90% a visual thing. Consider a selection window, or the actual animation for an explosion - which my way allows for. It CAN be used as the collision box for an action, but like you correctly observe it doesn't have to be.

  • Oh of course the math would work better/faster than defining the collision by the sprite. It would also allow you to vary the amount of damage based on distance, among other things.

    The explosion in Physbox Reversion uses this method.

    If it overlaps the explosion sprite, then it gets the distance between the sprites center and the objects center and uses that distance to calculate force applied and damage. On top of that the explosion has a private variable, 'force' which is defined on creation (force is 4 from the explosive barrels) which also factors into both of these calculations. A force of 1200 in an explosion right on a barrel dealt around 2 million damage and blew the gibs so far out that it crashed several seconds later.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)