R0J0hound's Forum Posts

  • Hi, I can't test it ATM since I'm on my cell, but take a look in the browser console and you should get a more descriptive error.

  • Edit.

  • PeerJS plugin version 1.1

    Hi,

    I've been sitting on this one for a bit. It allows for networking peers together without needing to write a server.

    Here is the JavaScript libary it's based on:

    http://peerjs.com/

    The plugin:

    https://www.dropbox.com/s/0ueuv9wr4wcmg ... S.zip?dl=1

    /plugins/peerjsPlugin/rojo_PeerJS.zip

    An example:

    https://www.dropbox.com/s/kmh03nxaxn4ry ... .capx?dl=1

    /plugins/peerjsPlugin/peerjs_2player.capx

    To connect to someone else you need to know their id. The capx should help to show how it's done.

    Now for the disclaimer:

    This plugin is based on PeerJS, which in turn is based on webrtc. Webrtc is in an experimental state so it won't work on all browsers.

    It currently only works on Chrome and Firefox, both on Windows and Android. It likely works on Mac and Linux as well but I haven't tested it there. It currently doesn't work on ios.

    Also connections can only be made between the same browser types. AKA chrome with chrome or firefox with firefox. Chrome and firefox can't communicate with each other with peerjs.

    Lastly this plugin doesn't work with the minifier when exporting.

    cheers.R0J0hound2013-11-20 19:14:25

  • You can also use the Paster plugin. It performs better with webgl, although it doesn't have as many features as the Canvas plugin.

    Anyway here are is an example for each plugin:

    https://dl.dropboxusercontent.com/u/5426011/examples19/scratcher_canvas.capx

    https://dl.dropboxusercontent.com/u/5426011/examples19/scratcher_paster.capx

    The trick to erasing is to paste a sprite with the "destination out" blend.

  • Here is the topic that TELLES0808 was talking about. It has a working download.

    http://www.scirra.com/forum/1d-water_topic47386.html

  • I suppose it's possible, but only with a plugin. With a google search I found this javascript library that could give a starting point:

    http://code.google.com/p/midibridge-js/

    From what I can tell it uses java as a backend to access the midi devices as javascript prevents any direct access to the computers hardware.

  • One possible implementation:

    <img src="https://dl.dropboxusercontent.com/u/5426011/pics/tripple_tap.png" border="0" />

    After each touch the user has 1/2 a second to add to the cumulative taps. Event 2 is the place to put your actions.

  • Nothing looks amiss to me, and my tests result in correct results for me. Do you set the size of the ExplosionSprite anywhere else in your events?

  • I believe you're mistaken, it wasn't removed, it never was there.

  • Spritefonts are primarily just mono spaced fonts (aka all the same width) although it is cool you can get it working with variable width fonts as well. For the case you cited of using the Arial font why not just use the text object? It's use is basically the same as adding text in photoshop or any other program you mentioned.

  • zenox98

    Yes, and I recommend it's use in my post, but a instance variable is still needed to save what the scale is set to as there is no expression for Sprite.scale builtin.

  • I didn't address point number one but here is a possible solution to number 2:

    /examples19/wall_crawl3.capx

    https://www.dropbox.com/s/dlsu2ouuih9yv ... .capx?dl=1

    Some more tinkering may be needed to perfect it.

  • Hi,

    I don't mean to step on toes but unfortunately Sprite doesn't have a scale expression. So here are the steps to get the effect you want.

    1. Add an instance variable to your sprite, call it "myscale" and give it an initial value of 0.1.

    2. Add an event with the "compare instance variable" condition and set it up as follows:

    Sprite: myscale<1.0
    ---> Sprite: add 1.0*dt to myscale
    ---> Sprite: set scale to myscale

    Note, the first action is the "add to" action under "instance variables" and the 2nd action is "set scale" under "size & position".

    This will need some tweaking to make it happen in one second. As it is now the expression 1.0*dt can be read as 1 per second, but we're going from 0.1 to 1.0 in a second, or just 0.9 in a second. So it should be like this:

    Sprite: myscale<1.0
    ---> Sprite: add 0.9*dt to myscale
    ---> Sprite: set scale to myscale

    Another thing you can deal with if you like is what I like to call over shooting. With this event the end scale will likely be a bit more than 1.0. You can use the min() expression to limit the highest value to 1.0 and set up your event like this:

    Sprite: myscale<1.0
    ---> Sprite: set myscale to min(self.myscale + 0.9*dt, 1.0)
    ---> Sprite: set scale to myscale

    As a final note you can make the duration longer or shorter by tweaking the dt expression.

    half second:

    2*0.9*dt

    two second:

    0.5*0.9*dt

  • Would something like this work?

    global number bspeed=100

    bullet collides with enemy

    pick all bullet

    ---> add 1 to speed

    ---> set bullet speed to bspeed

    The "pick all" condition can be used so not just the bullet that collided is selected. "bspeed" is a global so when you create new bullets you can set there speed bspeed. Of course that's just an assumption, you could also just omit the global and use bullet.Bullet.Speed +1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can get a screenshot by pressing the "PRTSC" button on the keyboard and pasting into mspaint.

    The image you posted was actually from one of my projects and the cap is in this topic:

    http://www.scirra.com/forum/how-to-make-minecraftlike-lavawater-physics_topic41488_page1.html

    There isn't a direct counterpart of custom attributes in C2 although I think you could do something equivalent with families, Boolean instance variables and some more events. Although I would opt for a different approach.

    For the example of an attribute like "left" you could do something like the following:

    1. Make a family and call it "left_attr" and add any objects that could get that attribute to it.

    2. Add a boolean instance variable to the family and call it "left".

    3. Then in events or the editor you can give the objects the left attribute by setting "left" to true. Also to reproduce and event like "sprite overlaps left" you would do the following:

    left_attr: Is left

    sprite overlapps left_attr

    Oddly enough after I answered your question about growing grass I made a capx to experiment with similar water physics. It's not perfect but it does work better than the CC version. Have a look if you like but be warned I used some math trickery to reduce the number of events.

    https://dl.dropboxusercontent.com/u/5426011/examples19/2dgrid.capx

    Left click to draw walls, right to erase.