JohnnySix's Forum Posts

  • Lesson learned - don't try adding animation of physics objects!

    [TUBE]-cRDkkf7DI4[/TUBE]

  • I just added an event to test if a block is immediately below the block and make it fall. It mostly works.

    http://www.johnnysix.net/games/UFB.capx

  • I'm still working on many elements, but am curious to know how the performance is on various machines with all the physics stuff going on.

    Click to play.

    Video :

    [TUBE]rQgchV0F9A0[/TUBE]JohnnySix2013-01-15 11:13:06

    Subscribe to Construct videos now
  • Use colliding at offset, using the physics objects movement vector as the offset and test for collision before they collide, as it were. :)

    That way you can turn off collision on the one you want destroyed.

  • It seems fairly linear - I guess just calculating a parabola would be enough from a quick test.

    Click image to try - this is just the gun from the game isolated.

  • Yeah, that could work too - it's just as the game would get more complex, it'd need to have no collision with anything, and I think that's only possible by turning off collision with everything that is physics per item.

    I found this - which makes things a little easier to understand.

    yaldex.com/games-programming/0672323699_ch13lev1sec3.html

    <img src="http://www.yaldex.com/games-programming/FILES/13fig15.gif" border="0" />

  • Haha, thanks - will check it out.

    I started on the Wiki page, and then lost it when I got to the formulas at the bottom.

    en.wikipedia.org/wiki/Trajectories

    I need a derivative as I'm working backwards from the mouse x/y to then calculate the appropriate velocity and angle of launch to arrive at that spot.

    A Parabola would work if I turned off all friction, but it'd be less realistic.

    en.wikipedia.org/wiki/Parabola

    I'm thinking I'll just take the midpoint between the mouse x and the cannon for now and calculate a parabola for now, until I can get my head around the maths. Argh.

  • Ashley - for those of us that fail at maths - any chance of a feature like the following in construct? :)

    Click the image to go to the page - it's about box2D.

    I can't find any current examples in Construct2, not for lack of searching the manual, tutorials , forums and google.

  • Wow, that's amazing. I'd been making a whole slew of actions to add zeros, didn't know there was a function to do it haha.

    Excellent stuff. <img src="smileys/smiley32.gif" border="0" align="middle" />

  • Before construct switched to system generated spritesheet/texture atlas style, you could easily swap stuff out on the server itself.

    I'm not sure if there's an option to revert back to how it worked before, as the output now would be rather difficult to update, because of the way the images are organised.

    In my follow the leader game - I had a blue barrier thing that's 16 frames long, my original spite strip is 1x16, but when saved out and published, ends up as two .png files, one for the first 9 frames, another for the second 7 frames, both in 3x3 grids.

    It's not impossible though - just depends on how complex the game is - if there's not much in the way of frame-based animation going on, then it's feasible.

  • I had a similar problem with a tank game, if you ran over the bullets, they would get stuck in your wheels. :D

    You can selectively turn off collisions between certain physics objects, but they'd need to be different sprites.

    So if your blue disc is turning into a red disc, you'd need to swap them out and get the newly spawned red disc to inherit the velocity / rotation of the blue disc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Haha, this band have been busy - didn't know there was a video competition too! I did a remix of this same track in another competition over IndabaMusic.com haha

    I don't have a webcam, but the video of it looks cool. <img src="smileys/smiley4.gif" border="0" align="middle" />

    Good luck in the competition!

  • So am making a tank game - the general gist is mostly working, the issues that remain are accurately predicting the arc of the shell, and getting the shell turning in the air as it goes through the arc.

    I had a search of the forums and turned up a few interesting things for top-down shadows on arrows and such, or solutions using canvas plugin to render an arc, but was hoping to avoid 3rd party plugins.

    Here's a basic idea of how it'd look.

    <img src="http://www.johnnysix.net/games/Recoil/Preview01.png" border="0">

    Test Game here -

    www.johnnysix.net/games/Recoil

    [ Artwork is just placeholder for now, I'll do something better once the mechanics are ironed out! ]

  • Not really a 'game' as yet, dunno if there are plans to do more with sound - like grabbing frequencies/volume etc from the audio realtime - it sure would make for some interesting possibilities.

    At the moment each 'stem' of the track is preloaded and played at -100dB from the outset, and the volume scaled depending on which loop you trigger.

    Timing is okay on the first pass, but gets iffy on the second.

    Suggestions for walk-cycle templates welcome, my animation is pretty ropy on the main sprite.