R0J0hound's Forum Posts

  • When you click on those parameters in the editor there is a description at the bottom of the property bar that tells what it does. The speeds are in pixels/second and the accelerations are in pixels/second^2, and sustain is in milliseconds as I recall.

    Anyway you'll have to look in the source to see exactly what it does. It also has some other things it handles such as being on a moving platform and such.

    Roughly off the top of my head the motion is done like this. On top of that you'll need to detect collisions and resolve them someway.

    not on ground

    --- add gravity*dt to velocityY

    global number upPressTime=0

    on up pressed

    --- set upPressTime to time

    up is pressed

    time < pressTime+sustain

    --- set velocityY to -jumpStrength

    left is down

    --- subtract acceleration*dt from velocityX

    left is not down

    velocityX < 0

    --- add deceleration*dt to velocityX

    right is down

    --- add acceleration*dt to velocityX

    right is not down

    velocityX > 0

    --- subtract deceleration*dt from velocityX

    every tick

    --- set velocityY to min(velocityY, maxFallSpeed)

    --- set velocityX to clamp(velocityX, -maxSpeed, maxSpeed)

    --- set x to self.x+velocityX*dt

    --- set y to self.y+velocityY*dt

  • I updated the plugin link with the fix. Using effects like distortion shouldn't cause an error but they may not work correctly. The issue is I never found a way to convert the coordinate parameters, used the distort effects, to be in relation to the paster object.

  • Kat Editor

    I didn't see your link till today. Like zenox98 said the file is deleted from the link. If you re-upload and tag me R0J0hound I will take a look.

  • Quicksand

    Known issues are in C2's beta release notes. Nw.js is correcting most of the issues rather quickly though.

    Solomon

    The size of that dll likely would be different every time nw.js gets an update but it should stay around the same. It is possible to compress the dll with compressor like upx, which sounds like it can almost half the file size on the disk.

    Anyways a 600 Mb project is possible. The events and layouts of the project only add kilobytes to the size whereas assets like images, sounds and videos will be what makes your project that big.

  • The file size doesn't effect performance, so whether the runtime is 5 Mb or 500 Mb, it won't affect how things perform. As always your events, behaviors used and what is drawn is what affects the performance.

    Now presumably nw.dll is the entire browser compiled with everything needed to display any webpage. Construct 2 probably only uses a small percentage of that but that would vary depending on what a project uses. I imagine it's possible to reduce the file size of nw.dll by re-compiling it from it's source code without some features. This is something independent from C2 so presumably someone on the internet has at least tried this before. I couldn't find any specific to nw.js but I have seen topics on other sites about doing this for Chrome.

    I know little about it other than it takes hours to compile google chrome. I'm also assuming disabling a feature is a simple thing to do, which it probably isn't since the Chrome developers have no reason to disable most features once it's added. Anyway the short of it is it's probably possible to reduce file size if you go back to chrome's source, though it's probably not worth the time to create and maintain something like that as Chrome constantly gets updates. At least that's my 2c.

  • Sorry I can't open the capx you sent me. I don't have the moveto behavior installed.

    Edit: I did look at the event sheet xml and it appears you're using a different approach, so I probably won't be much help.

  • This has been requested before. Another solution would be to use the system->"compare" or "pick by comparison" with one expression like:

    (x=z) & (x=b) | (x=c)[/code:11qwzyad]

    There's this chat that's been around for ages:

    http://widget.mibbit.com/?settings=&ser ... rMotd=true

    There's a few topics about it, and I hear a few members here regular it.

  • It's not so much a curve, it's just perspective. The simplest kind is x/z and y/z, where z if how far into the screen the ball is.

    Give the Ball sprite some instance variables called "z", "startX" and "startY". Also you presumably you have the two sprites horizontalSlider and verticalSlider. The events below assume the ball is launched as soon as the layout is run and the sliders are already in place. All the numbers are tweakable.

    global number t=0

    ball: on created

    --- set startX to self.x

    --- set startY to self.y

    every tick

    --- set t to min(t+dt, 1)

    --- ball: set z to lerp(1, 10, t)

    --- ball: set x to (lerp(self.startX, horizontalSlider.x, t)-screenwidth/2)/self.z + screenwidth/2

    --- ball: set y to (lerp(self.startY, verticalSlider.y, t)-screenheight/2)/self.z + screenheight/2

    --- ball: set size to (64/self.z, 64/self.z)

  • spongehammer

    It does have a bounding box so you can collide with that. This can be shrunk in a later update to be exactly the size of what's drawn. The api also has an interesting function to see if a point is colliding with a bone. Outside of that it's probably not desirable to check for an overlap with the thousands of triangles used for drawing. So yeah, dummy objects would be best.

  • I'm not super clear about what you're doing but here's the formula to

    https://www.siggraph.org/education/mate ... 2drota.htm

    then you could do this to rotate the offsets by the angle:

    vec2(tex.x+ cos(radians(angle))*offsetX - sin(radians(angle))*offsetY, tex.y + sin(radians(angle))*offsetX + cos(radians(angle))*offsetY)

  • How many layers, and do you use "force own texture"? But really, seeing the capx instead of screenshots would yield a faster diagnosis.

  • It probably has to do with using the "any" type. The sdk has number type params too that probably works. With "any" I'd assume you'd have to convert it to a number or something.

  • Try Construct 3

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

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

    I'm not one of the developers, just an enthusiast.

  • Solomon

    Only Construct has this because it follows a different pattern to other programming languages. Namely Construct uses object lists that you filter with events, so if you want to pick one particular instance you'll have to filter the list down. Other programming languages only deal with only one instance at a time so you'd end up using lots of loops to compare instances with instances.

    Personally I like using families to pick a different instance of the same type and I wouldn't mind seeing a way to do it in events without the need to setup a family beforehand. In my mind I'd like an overhaul of the event system so it's easier to learn and more powerful, but the exact details of such a proposal will have to wait till I've ironed out all the details, but in such a design I'd make something like this situation more trivial.