Mort's Recent Forum Activity

  • Hot damn, that's a good solution.

    Shadows are semitransparent already, yes. But it's at an object level, so if two shadows overlap, the effect adds. (Note: probably abusing terminology).

    David's saying that instead of making the shadows semitransparent, you can put the shadowcasters on a new layer and make the whole layer semitransparent.

    Because layer transparency is done at a whole-layer level, the shadows won't add to each other.

  • That is... troublesome. Difficult to avoid.

    I tried to make a counter-example, but failed - truly, impractically perfect detection is required. Absolute shadows would not add, but only due to maximum values already obtained. Realistic shadows incorporate ambient light, and usually cannot be represented by total darkness. No solution presents itself; an inbuilt event to the shadowcaster plugin is required.

    I find no solutions.

    So very drunk. Flatmate held large gathering, and for the first time in well nigh a year, I need not drive home. Apologies for unhelpful conclusion.

  • Thanks for the timeline example! I think I get how it works now.

  • Yes, I could definitely use a 'rotate around position' action! But now that you've mentioned it, I'm pretty sure one of the math guys on the forum will quote a one-line expression involving sins, coses, and maybe lerps, and it'll somehow work perfectly.

    Anyway, here's a pretty good line-of-sight detector based on instant-hit bullets (which are effectively lines, because they just keep stepping in the same tick until they hit something). The light fires a stream of detectors at the moon that are interrupted if they hit the planet. See code comments for more detail.

    http://www.mediafire.com/?ra3xadhepzb

    Current accuracy looks pretty good to me, but might break down over long range. If you want better accuracy, reduce the size of the detector sprite, reduce the speed of the bullet behaviour, and increase the number of bullets produced per round. It causes slowdown if you scale it up a lot (eg, currently makes I think 40 bullets; 400 is too many).

  • As far as I know, there's no equivalent to an 'object is shadowed' event.

    You can use the Line of Sight object to *sort of* do this, but it detects Line of Sight to the hotspot instead of any edge that's in sight, so it's not exactly what you want.

    (Also, it doesn't work for your cap, I think because your hotspots are in odd places; they're being used for the rotation.)

    http://www.mediafire.com/?z2m43y9rdv7

    So you probably need to make something relatively inefficient, like shooting lots of sprites in the direction of the object you want detected (with a random component to make them spread out), destroying any that strike stuff that's in the way, and seeing if anything actually hits the target.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's interesting! When the thread's done, I guess I'll add something about particles to that optimization article in the wiki.

  • Hmm, you're right; it works just as well with half the particles at double the size! That's much better.

    Is there an inbuilt reason that particles are more efficient than sprites to render? I've also been making a similar waterfall that's entirely event-based, using sprites.

    http://www.mediafire.com/?wu4j5dtttub

    (Not a very efficient waterfall, but I do need objects to interact with the particles. I'm eventually planning to have a swarm of objects chased through it, encountering some resistance and pushing the blobs of water aside.)

  • Nothing profound - just a simple particle waterfall, in case someone wants a waterfall in their game.

    (Anyone else have any waterfalls to share? I've been trying to make a plasma-based waterfall, but at best it looks like a slow-moving stream trickling down a flat surface.)

    http://www.mediafire.com/?ljiopddy3jn

  • There is an option nobody's mentioned yet - if you're lucky, you might be able to find someone with experience who can do the music specifically for your game. I guess the problem with doing games solo is that there's no way to do top-notch work on everything at once, unless you spend a few years learning about music, a few years on art, and then make the thing.

    The Spirit Engine 2 has some of the best music I've heard in a game, and that was a one-man project - well, one guy working in MMF, and someone else doing the soundtrack.

    (Some of those songs are online - check out 'A lost dream': http://www.syntesis.org/node/65)

  • Thanks for the standard deviation! It'll definitely be useful.

    It's interesting working on ideas for a game with a distributed main character. If most of you makes it to the exit, do you continue, or play the few particles stuck or left behind? What if part of you gets split off and starts to develop as a separate entity? Maybe the character you're playing is part of a larger organism that wants you back. This is fun.

  • So that's how it works! I started out trying to do that, but kept getting anomalous results (eg, when something fell into the water, all of the water sprites would gain height, instead of just the relevant one). Judging by your example, I must have been putting the loop condition in the wrong order.

  • I've made water that can combine with physics objects for buoyancy and displacement. Nothing very complicated - objects are pushed upwards based on their individual buoyancy, and the water level rises based on the number and size of objects in the water. Both of these scale for how much of the object is submerged.

    Anyone who wants to use this is most welcome. I just added the water as a part of my game - though if I'd realised how annoying it would be to implement, I probably wouldn't have done it. Construct is bound to get inbuilt physics water sooner or later!

    Still to do:

    • Make scaling more accurate for ellipses (if motivated enough).
    • Slow down objects to simulate water drag (when Get Force is added).

    http://dl.dropbox.com/u/906550/Construct/water.cap

    EDIT: Updated link

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