Mort's Recent Forum Activity

  • It's on!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't know how to do that using trigonometry like yours, but here's a pretty simple way - you put the circle in the center, then move it towards the end and top of the box, all within the same tick.

    PS: Deadeye is right, I think - it might be simplest to just place image points at all four corners and use those.

  • The ending is really fun.

  • Really? That ran okay for me, and this PC scarcely has more processing power than a pizza box - it struggles with a lot of caps. Odd.

  • Interesting concept! I'm curious to see where you go with it.

    I put in the unit count total for you (two events, at the top of your main event sheet.) It includes both units in transit and units stored in the bases. The important thing is to remember that Construct processes the event sheet from top to bottom, so you can use stuff like 'add to variable', 'set text to variable', and 'set variable to 0' in the same tick. If you use a loop as well, then you can do something like 'add each private variable to global variable', 'set text to global variable', and 'set global variable to 0', resetting it so it'll add up again in the next tick.

    The best thing about Construct is that implementing that concept is almost as easy as explaining how it works. Have a look at the events, and let me know if you have any trouble.

  • Wow, that's really useful! Maybe we should make an 'Obscure tips' page on the wiki, for facts like this.

  • Fun game in 3 events! Impressive.

    Best: 34

  • It jerks around probably too much to play on my old PC (even without motion blur). PC is an AMD Athlon 3200+, NVIDIA GeForce FX 5200, 1 gig RAM.

    Maybe you should make a fullscreen demo, though - that often makes a lot of difference. Windows treats fullscreen apps so much better.

  • For optimisation... I suppose you could check whether the target is anywhere near the shadow area, and thus avoid firing instant-hit bullets unnecessarily. I'm not sure of the maths for that, though; you'd have to check if they're in an arc, perhaps? (I wouldn't go to too much effort in optimising - on this old computer, even disabling *all* the LOS code doesn't change the framerate; I think the graphics will remain the bottleneck.)

    I'm going to need similar LOS finding for the other obstacles - boxes and more irregularly shaped objects. I suppose it'll adapt pretty well, though, I can just fire detectors past the corners instead of the circle's shadow-edges.

    This is all going well. I might have a working level done by the end of the weekend, at this rate.

  • Okay, here's a line-of-light system that works. Good speed, good accuracy, both large and small objects work okay, narrow rays work okay, scales well. Uses instant-hit bullets for the shadow edges and LOS behaviour for elsewhere.

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

    Hopefully, case closed.

  • I stayed up last night and made something with instant-hit bullets that was ~260 FPS, pixel-perfect, and couldn't properly calculate the blocking effect of multiple circles! Oops. I'll figure out what the problem is on the weekend - the events look like they should work, but the collisions are acting strangely.

    Before this, I had a method that attached 1px wide, 500px long sprites to the circle and checked collisions, but it wasn't accurate enough. And before THAT, a similar method with thin sprites attached to shadows, but collisions with other circles didn't work well.

    There's probably a really elegant solution that I'm missing, but it's good experience to be messing around with different areas of Construct this way. I learned a bit of circle-related maths, too.

    The game I'm working on is the one from this thread:

    I'm planning one section of the game set in a sequence of spinning reactors - the light from the reactor will quickly burn the cells of your swarm, and you need to make your way through without leaving the shadows. The levels should vary - in some chambers, I'll set up spinning, orbiting spheres; some blocks travelling around a central star; some with the light source moving around other objects. Nothing too complex, hopefully the kind of puzzles that make you stop and think a moment, then quickly move on.

    I'm setting up an abilities system for the rest of the game, but not sure if it should apply to this area. It would be interesting have some puzzles where you need to slow down or stop time while still being able to move.

  • Here we go!

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

    I had in mind something where if the object isn't completely shadowed, it's considered to be in sun. And after two clever-seeming ideas that turned out to be completely unworkable, I swallowed my pride and just used instant-hit bullets. It turned out to be pretty efficient, since I only fire them along the shadow's edge.

    Still not totally accurate (doesn't notice if there's only a few pixels of object showing), but I'll straighten that out - I just need to event the bullets not to notice the circle they originate from, and then I can cut much closer without unwanted collisions.

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