R0J0hound's Forum Posts

  • This could be useful:

  • You could use the angle() expression on both vectors to get their angles, then use the anglediff() expression to find the angle between them. Another way would be to utilize a vector dot product to find the angle.

  • Found this javascript library here:

    http://onakasuita.org/jsgme/

    Got an example working in C2:

    https://www.dropbox.com/s/96184k4okj7vue7/nsf.capx?dl=0

    It's very basic and I've lost interest in extending it further. Also I won't be making a plugin version of it.

    To use the js at the start of layout loads the js libraries needed and the "loaded" function is triggered when it's ready to play something.

    Then to play a file use the execute js action of the browser plugin to run one of these three functions:

    play(file, trackNo)

    ex: "play(viper.js', 1);"

    It loads a file and plays a track. Tracks start at 1.

    playTrack(trackNo)

    ex: "playTrack(3);"

    It changes the playing track of the loaded file.

    stop()

    This unloads the file and stops playback. To play again you need to use the "play" function.

    EDIT:

    I just realized that the library used can play all kinds of video game music.

    https://bitbucket.org/mpyne/game-music-emu/wiki/Home

    eg. nes, sega genisis, gameboy, super nintendo

  • Try Construct 3

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

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

    If it crashes it's a bug, and I think that one is known. I haven't worked on it in a while but the plan was to rework the entire plugin so that's easier to fix. The crash is do to some logic error on my part, but it usually occurs when setting the mass under one of the plugin's trigger or loop events. The reason is under those events the chipmunk library itself won't let you change the mass, collision shape,... etc of an object. To alleviate that the change is just delayed till it's allowed to. In short it introduced too many special cases which made it increasingly hard to debug and fix, so an internal rewrite is needed in order to simplify things. I unfortunately don't have the time or interest to work on plugins to that extent, but at least for the most part this plugin is in a working state.

    Prominent

    Yeah, I never investigated handing layers with different parallax, rotations and such. I just left it as unimplemented. Tilemaps can't rotate as I recall, otherwise I would have let them if I could. That bug seems odd, looks like the tilemap's bounding box is being used.

    Waltuo

    Usually you'd keep the elasticity in the range of 0 to 1. I'd make the ground and the first ball 1, and the second ball 0.2 or something. When two objects collide their elasticities are multiplied together.

  • It probably is just the language the devs were most familiar with.

  • I tried it yesterday and it doesn't look right. Another idea is needed.

  • It may be enough to take the fog sprites and accelerate them to the speed the car is going. Then also have it deccerate over time. It may not look that great without the clouds interacting with each other but you'd have to test and see

  • The closest you can get is to paste the Sprite to a canvas object, read the pixels, calculate the tint then draw it back. This isn't fast at all so maybe you could do it when the game starts and draw by juggling the canvas objects.

    Another way would be to use blend modes to color the objects, however you can't exactly do a tint.

    Anyway to do this it's probably easiest to use the canvas or paster objects, although you may be able to do it with layers instead.

    Basically each Sprite will have a paster object positioned over it so the paster covers the Sprite. Then do these steps

    Fill paster with whatever color you want.

    Set the sprite's blend mode to source in.

    Paste Sprite to paster

    Set the sprite's blend mode to normal

    Then you just adjust the opacity of the paster object to change the strength of the coloring. You could also use the additive blend on the paster object for a different coloring.

    Keep in mind each instance of canvas/paster will use it's own texture.

  • You'll need to do this manually. One simple idea is to use a loop like:

    Number index=-1

    Repeat tokencount(text, ",") times

    Tokenat(text, loopindex, ",") = "fish"

    --- stop loop

    --- set index to loopindex

    Distorting sprites like that weren't in C2 because it's not doable without webgl as I recall.

  • xml is a text format so I don't think you can get excel to load it with images. If you're doing it for your own format you can use something like canvas.asUrl to get a text version of an image that you can load into a sprite or something later, however excel will not understand that.

    You can either figure out how to generate the xls files from the format spec:

    https://msdn.microsoft.com/en-us/librar ... =office.14).aspx

    or maybe use some js library to generate it:

    Maybe this?

    http://excelbuilderjs.com/

  • It's a fluid simulation, but you could possibly fake it like this:

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

  • I usually just use a square sprite. Make it's origin be left center then with events set it's angle toward where you want it to end and the width to the distance and height to 1. Then to pick objects touching it it's just a matter of using the overlap condition.

  • The % operator gives the remained after a division.

    Ex

    12%10 = 2