Mort's Recent Forum Activity

  • At this rate, you're going to be one of the forum math people!

    (I'm still working out how you did this - haven't had much time lately, but I think I'm getting the idea.)

    By the way, I'm trying to work out if objects are shadowed in the game I'm making (for a situation where a swarm of small objects have to hide from light). I was using instant-hit bullets or LOS objects to detect whether they're shadowed, but there should be a way to adapt this method to work it out, right? I might try it sometime this week.

    (Unfortunately, 'Object is overlapping shadow' doesn't work - I guess distorted objects don't count for collision purposes!)

  • It really puzzled me that, even though the mask had no semitransparent areas, the edge of the masking was kind of fuzzy (3 pixels of progressively stronger alpha before it becomes fully opaque).

    Finally worked it out: the mask image is smaller than the mask sprite, and Construct blurs the edges when it resizes. Which is perfect, for a scrolling text mask.

  • Looking good! Containers and functions make that really easy to use.

    I'll definitely be switching to your distort map method - with 5 circles, the box ring method drops to ~45 FPS, while yours is running 260.

    I wonder if this is how Ashley implemented the shadowcaster behaviour, using something similar to distort maps? I have a rough idea of how we could make box shadows (like in the behaviour) this way. Not that that there would be much point, as behaviours are inherently more efficient, but it's an interesting thought.

  • A shadow without the shadowcaster behaviour? Ingenious.

    I don't understand your maths yet, but I'm reading up on it!

  • Thanks, I had been wondering!

  • Broo: This creates 36 square objects, sizes them proportional to the parent object, and puts them in a ring right next to the edge, on the inside of the object. Like... making a crude circle out of boxes, and using that to cast the shadow. (Sorry, I made them invisible - change the attribute 'invisible on start' and you should get an idea.)

    Making a crude ellipse out of boxes is possible, I'm sure of it. I suppose you'd just need more, smaller box objects to prevent them from being seen, proportional to how elongated the ellipse is. But you'd also need different maths to actually get the boxes in the right elliptical shape. At the moment I'm just moving the boxes towards angles in every direction, proportional to the size of the circle. For an ellipse, I think trigonometry might be involved. I guess they were right and I should've paid attention in maths class.

    (I hear the shadowcaster object is planned to support non-rectangular shapes eventually, like Mipey says. But I'm not sure what the priority is; probably after 1.0.)

  • Currently, the shadowcaster object only supports rectangular objects. Here's a way to make circular objects cast realistic-looking shadows, by generating a ring of rectangular shadowcasters around the edge of the circle.

    You can do something similar by putting a single narrow box in the middle of the circle: - but it's not accurate if the light source is close or the object is large, both of which I need at the moment.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, okay - the low FPS does explain it. Thanks!

  • That's weird. Half the time it looks really cool, but then it flickers and there's a sheet of low-res black noise over the top of the slimefall.

    Maybe it was broken by a Construct update. Could I get you to have a look, and see if it works for you (on this new version?) If not, I might try and pin down something for the bugtracker.

  • That particle object is beautiful. Seriously, I'm tempted to put it on a black backdrop and export to screensaver.

  • I wondered if that might be intentional! But it doesn't look quite right to me; shadows are usually soft on planets which have an atmosphere:

    http://antwrp.gsfc.nasa.gov/apod/image/ ... esa_c1.jpg

    ...and the dividing line isn't totally clean even on airless bodies (because of variations in terrain height):

    http://www.astromax.org/planets/images/ ... -Moon5.jpg

    You could replicate the former effect by putting a sprite over each planet (with a gradient sphere, filled black and white, and an effect like Lighten). Then you could adjust opacity of the lighting effect with distance from sun.

    Or you could keep the clean and simple art style. I'll butt out.

  • That's looking good!

    I'd recommend moving the shadows layer below the objects layer, though - that way the shadows trail after the object instead of starting in the middle.

Mort's avatar

Mort

Member since 30 Dec, 2008

None one is following Mort yet!

Trophy Case

  • 15-Year Club
  • Email Verified

Progress

16/44
How to earn trophies