keepee's Recent Forum Activity

  • I've updated the original post to have the .capx and a summary

    tulamide i'm not getting that leak? although firefox doesn't really work at all on my computer because i have an ancient graphics card

  • dinofun you should try setting sampling to 'point' in project properties

  • During preview in chrome, I hear constant hard drive activity.. in all projects.

    well it's not exactly 'constant' to be precise it's a short burst repeated every ~half a second or so. It just doesn't ever chill out, even on really basic projects.

    I can't ever remember it not being like this, but I just feel like asking now if it's normal or not.

    so, anyone else have this too?

  • Click to drag walls and light sources

    +multiple sources

    +lights are additive

    +shadow casting objects can have any number of sides

    +shadow quality adjustable

    +background lighting

    here's a screenshot of it working in a platformer i'm making.

    here is the .capx file, requires the canvas plugin

    I use multiple canvas objects, one for each light source.

    Each canvas is only as big as its source's light sprite. Because they are not the same size as the screen, i have to multiply where the shadows should be by a ratio which you see in the events as 'ResMulti'.. The part where the shadows are actually drawn is similar to r0j0hounds original .capx a long time ago where it draws a quad for each pair of corners.

    the additive lighting is done by using the (spoilers!) additive blending mode on each canvas, the layer they are all on has the 'multiply' shader. This combo is a replacement for using the 'destination out' method that only does black n white.

  • Seems to be working now, thanks..!

    I know that feel with adding/subtracting angles..

  • Can you add the 'initial animation' option like with normal sprites?

    Thanks !

    very good plugin, should be in C2 by default

  • Might be cool

  • Set all the layers you don't want to locked or invisible, then Ctrl+A

  • Yep, but it's a bit ugly.

    For the listener object, create a child object on a layer with 0 parallax/scale rate (and also does not rotate in events) I just use my HUD/Interface layer.

    Do the same for each sound emitting object.. you'll have to link them however you want.. either use containers, or store the UID of the child in the parent (which i prefer)

    so to clarify, each sound emitting object, and the listener object all have child objects that represent them on a layer that does not scroll, rotate or zoom.

    <strike>then position these objects so they appear pinned to their parents 1:1 using LayerToCanvas and CanvasToLayer   (Translate coords from the 'main' layer, to the canvas, and then from the canvas to the 'interface' layer.. I should probably figure out the maths to simply make a LayerToLayer function, but this whole thing is just a temporary solution for now) </strike>

    edit (simpler way): set each childs X,Y to their parents X,Y. They won't visually line up because of the parallax being different , but the relative distance between emitters/listener is what's important. Make them spin around the 0,0 coordinate with sin/cos so that they match your layout/layer rotation.

    so for example, if the parent family is 'SoundEmitter' and the child object is 'Emit':

    +For each SoundEmitter

    +pick Emit by UID SoundEmitter.EmitID

    +var Dist

    +var Ang

            >set Dist to distance(0,0,SoundEmitter.X,SoundEmitter.Y)

            >set Ang to Angle(0,0,SoundEmitter.X,SoundEmitter.Y)

            >set Emit x to Dist*cos(Ang-LayoutAngle)

            >set Emit y to Dist*sin(Ang-LayoutAngle)

    The vars aren't necessary but I like it cos it feels cleaner

    I do exactly the same for the listener parent and child, except without the for each, because of course there is only one listener.

    so anyway, then everything else is the same.. just set the listener object to the listeners child instead, and play each sound at each sound emitters child object.

    So basically this workaround works by sorting out the rotation so the sound engine doesn't have to. Doppler effect and Distance model still work fine

    The downside is that it creates an extra object for every sound emitter.

    Ashley, this might be naive, but does this workaround give you any ideas for fixing it? ofc you won't have to <img src="smileys/smiley35.gif" border="0"> around with additional objects.. I would have simply used 'play at position' and updated the position each tick, but there's no action for doing that.

    If this doesn't help, could we still get actions for manually setting the panning + position using tags, like you can with effects?

  • if you still want to use physics

    leave events completely.. just give both elasticity of somewhere between 0.5 and 1

    also, linear damping is normally for the effects of air resistance... but for a top down game you should treat this like it's the character acceleration/deaccel. So set it relatively high.

    it lets you have a reasonably fast player without feeling slidey

  • Xionor

    I meant something like this:

    https://dl.dropboxusercontent.com/u/53374990/Pics/bottomheavycollisionpolygon.png

    I tested it and it works.. you can jump on top of it and you don't fall through or anything, it acts just like a bottom heavy box

    also it's a vending machine.. so it suits :D

    only problem is it's >8 polygon points, so the image editor will understandably nag you every point you add above 8

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • blackhornet

    it needs to be set to collision polygon.. bounding box just puts COM back in middle

keepee's avatar

keepee

Member since 6 Jan, 2012

None one is following keepee yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies