lennaert's Forum Posts

  • lennaert

    link updated

    Thanks R0j0.

    I used all three methods to check for image changes pasted into canvas taken from a user media camera object.

    It works ^_^

    Now I can do a variant of motion detection with a simple camera which has no ambient light detection

    Muchos gracias

    I do have a side question relating to canvas, none related to the topic, but related to how I use the compare.

    I tried applying the "toon" effect on either a paster object and on a sprite object... This in order to make simpler images which are easier to check for changes.

    The effect is lost when a sprite with that effect applied is pasted into a canvas object.

    Any way to preserve applied webgl effects when pasted into an object ?

  • Parse number as text: str(NumVariable)

    Parse text as number: int(TextVariable)

  • No, but for real-world games this probably makes no meaningful difference. Also if a sprite is decorative and doesn't move, it never has the overhead of recalculating its collision box, which is much of what bunnymark is profiling.

    Ok so decorative and not moving ... What about collision detection with various other elements which do move, such as bullets being fired, hud elelements, player and npc objects or even other scenery objects (birds, bugs, smoke, rain)

    On a big map, could these detections, noticeably, rack up?

    If so, is it possible, when disabling collision detection, to actually have that bit skipped so it does not share the vertex info to reduce that bit of overhead?

  • Ashley

    Games with many objects are often rich with environment sprite, making the game prettier.

    The option to disable collisions for sprites, does it remove the mentioned overhead of vertex info sharing ?

  • There is an action for objects to move them to a desired layer.

    From what I read .. you need that.

    You can use compare 2 vars from system to check different objects their layer.

  • Perhaps use layers ?

    And use the layer reference numbers.

  • You still have that capx so I can take a peek?

    socialpilgrim

    As rex said you could use the asjson expression to load the image into a array for faster comparison than using rgbAt().

    Here's an example with three examples:

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

    Since it's for a drawing competition I find that just comparing the alpha gives a more meaningful percentage. Just checking all the pixels like with your links gives a 90% similarity to a blank canvas.

    Anyways I implemented three methods in the capx.

    The first follows the examples in your links and gives a percentage and rms number. I guess rms could be used as a way to compare.

    The second only looks at the colored areas of both images and gives a pretty good measurement.

    The last one finds the bounds of both drawings and compares both as if they were the same size. This allows a small box to match a big one.

  • Perhaps make a version without the cocoonjs ....

  • There is nome as far as I can tell.

  • You sure your trying to open the right url or uploaded it to the correct folder or even exported the right version ?

  • Odd ... Should work.

    Did you try an url add to see if it worked at all?

    Just ad ?a=1 or something behind index.html in the url.

    That should definitely work.

  • Use c3 to import your C2 project and export it.

    There is still 4 days to use all the features of C3 for free during the game jam.

    Excellent to test the export options

  • It's browser dependent, each visitor will have his or her own setting and tools before it renews the cache. Generally sites will be newly downloaded to update cache every so often.

    Your suposed to be able to speed things up by pressing ctrl + f5 , which forces a refesh for a new download.

  • Just play around with different approaches to see what looks best.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Event on start of layout

    Action system set layout scale 2