mattb's Recent Forum Activity

  • drawing a circle with a line width of >1 is apparently something Canvas can't handle too well without making a ton of draw calls

    I've only just started looking into this, but I'm finding my frame rates are higher when drawing lots of circles with thick line widths than with a width of 1.

    Try this capx - with the line width at 10 I'm getting 75% cpu, 60fps in firefox, but with width at 1 it's 85% cpu, 40fps...

    https://dl.dropboxusercontent.com/u/523 ... _test.capx

    edit - sqiddster - I get almost the same results with your capx - low frame rate with 1 pixel width, then 60fps at 10 pixels, & it drops off after that

  • Great work, there's some complex stuff going on here (I like how the tunnel fade-out works). Maybe get a few people from the chatroom if you want testers to join at the same time.

    Btw nice ladder animation

  • the event needs to be:

    Weapon_Family on collision with Boss_Family

    Boss_A, pick instance with UID Boss_Family.UID

    & that will pick the Boss_A family member

  • The typical way would be to set the sprite's position using the system expression lerp(a,b,x), where a & b are your required positions & x is the interpolation factor (which goes from 0-1, & is usually a var that increases with time).

    There's also Rex's MoveTo behavior - http://c2rexplugins.weebly.com/rex_moveto.html - which is what I'd recommend since it has a lot of handy event options.

    Or this is a quite advanced tweening plugin: viewtopic.php?t=70700&start=0

  • One thing I cannot seem to find though, and I`m sure I must be missing something obvious, is the ability to 'weld' objects together

    Rojo mentioned this a couple of pages back:

    [quote:31gww74c]According to the chipmunk forums the way to join two objects together is with two joints. A pivot and a gear joint. I apologize fo the seeminly complicated formula used for the phase of the gear joint. It's the signed angle difference between the two object angles. angle(0,0,cos(a-b),sin(a-b))

    & this is the capx he posted:

  • Impressive work so far Colludium, I'm also having a go at a physics platformer-puzzler in c2.

    [quote:1glbjvxn]It seems that any game using physics puzzles and silhouettes will instantly be compared (with 'clone' accusations abounding) to Limbo

    My approach to visuals is to just forget about them for now, & use simple placeholder art until I get the mechanics & level design working & playtested by as many people i can find. Something will hopefully suggest itself later.

    [quote:1glbjvxn] I'm having a good think about whether or not to invest the next few months of my time trying to make this work as a full-up game, or just put it down to learning

    Playtest it, it's the only way to know if your game has potential. I'm finding irc to be the best place for that, & i'm usually idling in the c2 chatroom if you need testing, plus the ludum dare chat is also great for design & coding feedback.

  • Nevermind, got it to work with a pre-step event...

    ***EDIT - a better way to get the colliding object's position post collision is by using ObjectName.Chipmunk.local2worldXY, which lets you set an offset from the object's CoM, so in this case it would be Rope.Chipmunk.local2worldXY(-Rope.width/2,0) to find the start of the rope.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound - any idea what's happening here? The reason I'm trying this is to see if I can redo my rope wrapping system to use segment collision shapes & contact points. The contact points work perfectly, but I can't get the rope's position post collision.

  • I think your idea of setting velocities separated into components that are along or perpendicular to the rope is the approach i should have taken from the start. Although I did try something like this & didn't like how the player's angle wasn't affected.

    Retraction/extension forces I found too hard to tweak - they always gave too much acceleration, & the damping needed to compensate interferred with the overall feel of swinging (probably my bad coding though).

    Maximum joint force seems to be just the hacky fix I was after though, thanks <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    By the way here's what I've been making: https://dl.dropboxusercontent.com/u/523 ... index.html

  • Wow nice work prominent. I was looking at this on cellular automata cave generation just earlier, might be interesting to combine that with your dynamic fluids & make a unique roguelike:

    http://www.roguebasin.com/index.php?tit ... ike_Levels

    Keeping things on topic, here's a video of a prototype i'm working on:

    https://dl.dropboxusercontent.com/u/523 ... test_1.gif

  • I'm making a game that uses chipmunk's slide constraint for swinging rope segments, adjusting the rope length by setting the joint's max distance value (which is a hacky approach i know). It all works perfectly apart from one thing: if you run the attached capx & press the up arrow key to shorten the rope, you'll see some wild collision as you clip a corner.

    Now if you set Prevent Rotation on the red sprite this doesn't happen - you just get dragged up with a bit of intersection, but no crazy swinging.

    Can anyone think of a workaround where I don't turn off rotations?

    (note: the ropes in my game never intersect with scenery because there's a wrapping system; this is just a quick example)

  • You shouldn't need to use dt anywhere.

    I didn't realize this, & I see the same is also true of c2's native physics which defaults to the same fixed timestep. Time to multiply all my force vars by 1/60...

mattb's avatar

mattb

Member since 21 Nov, 2012

None one is following mattb yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies