Nepeo's Recent Forum Activity

  • Could you file the bug on GitHub please? It's easier for us to track on there.

  • Colludium Sounds like you had a productive weekend!

    I wouldn't worry too much about being an amateur, working with WebAssembly is a huge knowledge space. Mainly because it involves the interactions between 2 languages, as well as the quirky code and tools you have to use to glue the stuff together. Depending on what language/tool your using that's going to change as well. So realistically the best you can hope for is to understand the bits your using well!

    You've managed to work through a number of hard to do things here, so you should give yourself a pat on the back.

    Working with existing libraries can be particularly painful... But if your looking to write some new code and experimenting then webassembly.studio is quite useful. I also hear Rust is becoming a good platform for creating WASM projects. Having learnt Rust myself in the last year I can say it's a fairly serious undertaking compared to most languages. Once you've got it down it's generally pleasant to work with though.

  • Yeah I'll take a look at it DavidA13, and follow up on GitHub.

  • Salman_Shh Looks pretty cool, the ball/character has some nice weight to it's movements. It made me think of the "Golf with friends" worms update. Saw a video of it over the weekend. They added in things like a jetpack on the golfball, and landmines on the course.

  • AdvancedRandom.Gradient is lower level than your expecting. It doesn't operate at Sprite level. You give it a value and it returns the output of the mathematical linear gradient function, which you have defined by adding color stops.

    You have specified that at 0 the gradient is red and at 1 the color is green. So the result for various values would be:

    • 0 = rgb(100%, 0%, 0%)
    • 0.25 = rgb(75%, 25%, 0%)
    • 0.5 = rgb(50%, 50%, 0%)
    • 0.75 = rgb(25%, 75%, 0%)
    • 1 = rgb(0%, 100%, 0%)

    The range is dependent on the position of the color stop, if you set the second stop at a position of 2 then the range would be 0 to 2 instead.

    The easiest way to convert this function into a colour is to use DrawingCanvas. The getting started with advanced random shows some examples towards the end of converting the output of a noise function into a colour using the gradient function. If you change the input expression to something like AdvancedRandom.Gradient(y / DrawingCanvas.SnapshotHeight) it would give you a gradient like shown in the pictures.

  • Yeah a static index for each particle would have worked much better for your situation. You could keep a buffer of handles in cpp land and use your own static id scheme when communicating with JS perhaps?

    Sending anything other than numbers between JS and WASM is still pretty hard at the moment. There's some talk about adding a more advanced interface layer, but it's still quite early. The interfaces would probably be specific to the language and module. Also it would likely be initially limited to basically TypedArrays and Strings.

    I know there's a tool for rust called wasm_bindgen that makes this stuff magically work, I thought there was one for C as well but I can't find any information about it. Although I'm a little questioning of these magic interop layers. If your using emscriptem you can go more basic by using malloc from JS, then pass the pointer and length to wasm via function calls.

    Anyway, the plugin looks really cool. Nice work!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The particle handle reference is interesting. As far as I can tell the handle holds the particle index, and then the system updates the index held by the handle whenever it needs to change. Changes being things like the particle being destroyed, cloned or moved in the list. Initially I assumed the index would be static, but it looks like they swap the particles into a new buffer during the deletion phase so living particles would have their index values change. So quite a lot of book keeping to keep the handle valid.

    I spent a bit of time recently looking at generational indexes, and I think they probably solve this problem a little better. Depending on the data layout though it might mess with cache coherency, which would be bad.

    For anyone interested generational indexing basically involves putting a generation field on each entity, then when something wants to hold reference to it you return a value that combines the index and the generation. When that reference needs to be resolved you compare the generations of the entity and the reference, if they match it's still the same entity.

  • This is effectively a shadow light dithered to 1 bit color. I don't think we have a dither style effect at the moment, but I'm fairly sure a custom effect could be created.

    An alternative is to use a tilemap as a mask and some style of flood fill to update the tile type depending on the light level.

    EDIT: Having watched the youtube clip I think it's basically a tilemap, with 3 or 4 "light" levels per tile type. They swap between the light levels depending on how close the player is to the tile using taxicab distance ( distance = dx + dy )

  • They are expressions, so you will probably want to use the system condition "Compare 2 values" then compare

    MySprite.Orbit.TotalRotation with MAX_ROTATIONS * 360.

  • Glad I could help!

  • atlantis_fb some Android devices will backup local application files to the cloud, it might be that when you reinstall the app those files are being downloaded as well.

    Save files are saved to indexedDB via the webview, I'm not sure where the device saves them. But the files will likely have "leveldb" in the name ( thats the name of the indexeddb implementation in Chromium ).

  • lilacsg Are you using the stable or beta release? There are some changes to the MobileIAP in the current beta release.

Nepeo's avatar

Nepeo

Member since 8 Mar, 2016

Twitter
Nepeo has 583,792 followers

Trophy Case

  • 8-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x3
    Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

13/44
How to earn trophies

Blogs