R0J0hound's Forum Posts

  • To do that you have to manually handle collisions and how the sprite responds. In other words you can't use the solid behavior.

    You can look here for a way to do wall sliding:

  • If the layer is invisible it won't affect rendering performance at all.

  • The xml plugin only reads xml, it doesn't write.

    To write you'll need to either make your own writer or try to utilize some javascript library to do it.

    You can look here for the xml file format:

    https://en.wikipedia.org/wiki/XML

    So basically the best way to append data to an xml file is to load it with ajax or with nwjs, store it in a variable, then just add text to the end.

    As an example, if you have a file called "animal.xml" added to your project you can load it, append data to it, and finally download it with this:

    start of layout

    --- ajax: request animal.xml

    global text xml=""

    ajax: on loaded

    --- set xml to ajax.lastdata

    --- add "<fish>tuna</fish>" to xml

    --- browser: invoke download of xml

  • Each instance has it's own texture, whereas sprites share the same texture. It just depends on what you want to do.

  • Not really, the purpose of the paster object is to have something you can draw to. I guess you could use paster instances instead of sprites.

  • The animation frames of a sprite are shared between all the instances, so if you replace one they all change. You could just use paster instances instead of sprites i guess.

  • It works but when you load a frame it replaces the frame that is shared between sprites so they all change.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's more to it than that. When you create physics objects you need to let them settle a frame before adding joints to them.

    https://dl.dropboxusercontent.com/u/542 ... gdoll.capx

    The example first saves the offsets of the limbs from the body. Next it has a function to create the ragdoll at any location. The "wait 0" and "new" boolean are used as picking tricks to pick the container objects from a family. The "wait 0.1" is used to wait a few frames before adding joints.

  • Look at the paster object, it can probably do what you want, or you can see how it does it.

    It's roughly based on how C2's runtime uses effects, because unfortunately I couldn't find a way to use it directly.

  • Look at the third party paster object, with it you can draw another object with an effect onto itself using the "paste object" action.

    If you want to do it yourself you'll have to dig through C2's runtime source in the exporters directory and learn some webgl. The paster object works by having a texture that can be rendered to and then calling the drawgl() function of the object to draw. It becomes more complicated when drawing effects because the runtime wasn't designed to let effects be used by anything but itself. So you'll need to use the runtime as an example and make custom versions for your own use.

  • Depending on how your hard drive crashed it may still be possible to get your files off of it.

    A common one is some key files of the operating system get corrupted or even a key part of the the filesystem structure gets corrupted. In some cases it's possible to fix and the computer can be used as normal, but even in the cases it's not, the remainder of the files are intact. Usually you get to them by booting into a livecd os and inspecting the harddrive. Even if you can't browse the file system you can have it scan the entire harddrive and find files that way.

    The main thing to note is the failure probably only corrupted a tiny portion of the hard drive. Even in cases where I couldn't fix it, I was able to extract all the files I needed and was able to re-format the harddrive and re-use it without issue. Any computer tech guy worth his salt should be able to do any of this.

    In very rare cases you can get a mechanical hard drive failure, which is basically unrecoverable. My sister had an external hard drive that overheated under a blanket and stopped working. That said if you really really want to get those files there are companies that can still get the files off of it if you're willing to pay.

  • The snapshot action only captures the canvas. The textbox or other forum controls aren't drawn on the canvas, rather they float above it so can't be captured in the snapshot.

    However if you want to print it you can use the browser object to run the javascript "print()" and the textbox will be included.

  • It's a collision issue of sorts, probably has to do with how the platform behavior resolves collisions.

    Disabling most of the events only set the max speed and simulate pressing right. The top right slime still gets stuck on that seam. Then changing the collision polygon of the slime to a box resulted in it passing the seam but turning corners often fails due to the floating point position issues.

    I've made examples for this before. Here is one possible example:

    help-with-retro-enemy-behavior-move-along-solids_p713155?#p713155

    It seems to jump a bit so instead I tried making it again.

    https://dl.dropboxusercontent.com/u/542 ... rawl4.capx

    The logic is:

    move forward

    if overlapping wall then back up till it's not overlapping and turn

    if there isn't a wall to it's side then back up till just before there's a wall to the side and turn the other way.

    In that example I back up by one pixel but it can be closer by moving by smaller steps:

    https://dl.dropboxusercontent.com/u/542 ... rawl5.capx

    The examples only handle clockwise motion, but it can be made to go clockwise by changing the 90's to -90 and vise versa. Also it requires the sprite to start overlapping the wall.

    Anyways I hope some of that may help.

  • There is this bug here that has a similar issue:

    I didn't find others but I recall there being some reported elsewhere. That particular one had no response but the fix as I recall was the behavior was updated with a bigger TOTAL_MEMORY, which just delays the error till more memory is used.

    If it helps the non-asm.js version of box2d doesn't have this issue, and you can change it in the project properties.

    Best I understand it is asm.js requires the amount of memory needed to be reserved beforehand, and it can't change. Based on ashley's last blog, webassembly would be an improvement on asm.js in that it lets the amount of memory needed to change while the program runs.

    Anyway things like changing animation frame, changing size, or adding/removing tiles on the tilemap all cause the physics objects to be updated and I guess that fills up the memory with asm.js?

  • [quote:3v3d4yoq]That's a bit frustrating and feels somewhat misleading of them to call it native performance if that's true, but regardless getting the event system up to asm.js levels of speed would still be fantastic, even if it's not truly native speed.

    Not really, like asm.js it's setup in a way that can be more directly translated to machine language by the javascript engine. So that's where the native performance statement comes from. Who knows, it may allow for more efficient machine language to be generated. But I don't imagine significant speed improvements in most cases, because generating machine code is nothing new for a javascript engine.