Ashley's Recent Forum Activity

    • Post link icon

    DuckfaceNinja - I don't think Steam Cloud has much to do with multiplayer. It looks like just a simple way to sync small files between different computers which are logged in to the same Steam account. I'll add support for any extra Steam features I can though.

  • The signalling server's been running fine, I haven't noticed any problems. Its uptime is currently over 13 days, and we generally only have a minute or two's downtime once a month when "patch tuesday" comes around and Windows Update does its stuff. You should also check for signalling errors and display any that occur, since a common mistake is to accidentally flood the server by sending it stuff every tick, and then it kicks you for exceeding the flood limit.

    Connectivity issues like this are basically standard no matter what technology you're using - antivirus, firewall, exotic router configurations, service outages, Internet traffic flow quirks, etc. etc. all means sometimes connections don't work properly. There's not currently any good way to identify the cause of problems. There's not much advice you can offer except telling users to check their firewalls and internet connection.

  • ORTC is basically WebRTC with a slightly different and incompatible API. As I understand it, it should be possible to implement WebRTC in terms of ORTC, since ORTC is actually more customisable. Providing there's a good shim that does that, we should be able to easily support multiplayer with ORTC without even really changing our code. Even if there's no shim we should be able to adapt our code to work with ORTC instead.

    tl;dr - if IE supports ORTC then it should be able to support Multiplayer as well. Good news!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • WebGL effects are programmed using special small programs called shaders. These are not built-in to the browser, they are hand written. If you learn the basics of GLSL (OpenGL shading language), it should be possible to make your own new effects which have new features like those you propose.

  • Was that our anniversary? I didn't know :O When are you counting from? lol

  • We get feature requests and bumps like this daily. There is simply a practical limit on how quickly we can address features, so all I can say is hopefully we will eventually get round to it and I can't provide an ETA. It's already possible to do this with events (or third party plugin? haven't looked at it myself) so I don't see it as urgent, it's just a way to make something already possible a bit easier. Also I don't think this suggestion is as straightforward as you might think: ideally such a feature would be able to apply to any audio parameter, not just volume, allowing you to "fade" anything from the volume to a convolution wet/dry mix over time using a variety of curves (e.g. linear, logarithmic, cosine etc). Then there's the internal complexity of the Audio plugin which currently supports four audio APIs (only two are really relevant today, but we don't want to remove the old ones in case people still rely on them), and this makes changes a little tricky sometimes - it probably needs a rewrite or overhaul.

  • It's still on my todo list. I'm not sure why it would be urgent though, it should be easy to re-do what the behavior does with events, and then you have complete control.

  • Using artwork is no reason not to file a bug - simply blank it out with placeholders and go ahead and file the report.

    However having said that, in our experience bugs which can't be reproduced in a new empty project and involve lots of events (you said 300!) are typically mistakes in the events, not C2 bugs. Also since you use a third party plugin, if the bug is with that plugin we cannot offer support, and this is why we require that all bug reports do not use any third party plugins. I'd recommend first trying to sort it out with lucid and if he determines there is an issue in C2 then we'd be happy to look in to it.

    Moving to 'Closed bugs' for now.

    • Post link icon

    Edit: I had to use the API name. I got it to work. Thanks a bunch for this!!

    Thanks, I edited the parameter description to say it's the API name required. (Not sure when I'll do a plugin update though, seems kind of a small change)

  • My point was the SDK allows you to look in to it without having to wait for us to get round to it. We get requests like this daily, and many of them are non-trivial to implement, and there's simply not the time to do everything immediately. Hopefully we will get round to it eventually, but I can't give an ETA on anything specific.

  • Copying what a mobile browsers does was not our goal because they were not initially designed for gaming.

    It sounds like you are confirming your goal is to diverge from what real browsers do. This then confirms our decision to drop support for Canvas+. We are not prepared to support something which pretends to be a browser, but in reality is incompatible with what browsers do. Your proposed improvements are simply very difficult compatibility problems for us.

    While mobile browsers perhaps used to be terrible for gaming, modern mobile browsers are very good and in my opinion very well designed for gaming. The philosophy that "mobile browsers are not suitable for gaming" is in my opinion now out of date and no longer relevant on today's web, and should not be used as a reason to implement things differently. I could go further in to the details of browser caching and memory eviction heuristics, but I don't see much point - so long as your goals are to deliberately go in a different direction, then I neither want the support burden of having to deal with those differences, nor to become embroiled in technical debates about which is the "right" way. We're going to keep going the way we are which is to design an engine based on a single codebase that runs well in all real browsers.

  • As explained in the above mentioned blogpost, we offer many APIs which give developers even more precise memory control than standard browsers (like the immediate "dispose" method).

    The "dispose" method does not solve the problem by itself. By the time you can call it, the image is already in memory, which means it might already have crashed, and it still unnecessarily loaded it which increases the loading time.

    [quote:l5tfqw08]Construct2 loads all the assets at startup

    No, it only downloads them. It's a web based engine after all and the game needs to be downloaded before starting. CocoonJS is unique in going ahead and decompressing everything in to memory when we only wanted to download. In a local app, since there is nothing to download, it should simply amount to "remember the path".

    [quote:l5tfqw08]Canvas+ just loads an image when the "src" property is set from JavaScript

    This is precisely the problem: in browsers that is the directive to download a resource.

    [quote:l5tfqw08]The entire team agrees that preloaded OpenGL textures make HTML5 games feel more native-like. Reading an image from disk and uploading a texture to the GPU is an expensive operation, which may lead to noticeable glitches or pauses if the process is carried out in the middle of a render animation.

    The key problem is all browsers disagree with you, even mobile browsers. Anyone designing any web-based engine must deal with the fact that all browsers will have precisely that problem with lazy-loading causing jank mid-game. Therefore, anyone with interest in designing an engine that works well on real browsers will have already mitigated that problem. Construct 2 has done exactly this, by some pre-rendering code before start of layout in canvas2d mode, and texture creation in WebGL mode. This brings a smooth, native-like feel to real browsers even though they lazy-load resources. By choosing a different approach, CocoonJS creates two problems:

    1) our approach, designed for real browsers, doesn't work, nor will any other engine which has similarly mitigated the problem for real browsers

    2) anyone designing a game for CocoonJS, then porting it to a real browser, will find it suddenly suffers from mid-game jank due to lazy loading resources the first time they are used.

    So I'd have thought it would actually be favourable to CocoonJS to copy what the browsers do and provide advice on how to work around lazy loading in a portable, cross-platform manner. This solves both problems.

    I think the key problem is that you perceive this change as some kind of performance improvement, whereas really it throws a spanner in the works of any engine that's already designed for real browsers, and will trip up anyone porting their game either to or from CocoonJS.

    [quote:l5tfqw08]That’s why we are going to keep this approach as the default in Canvas+. Do you prefer the other approach? We have added the "cocoonLazyLoad" property to enable it. Just use the one that works better for you.

    At last! I'll add that in as the default for images the next build. But as argued above, I feel this ought to be the default!

    [quote:l5tfqw08]Surprise, Construct2 running with WebGL eats almost twice the memory on WebView than on Canvas+.

    I think all this proves is the WebView has a full browser engine (including features like DOM, web audio API, WebRTC etc), and a full browser engine takes up a bit more memory.

    [quote:l5tfqw08]It seems that Images are not properly released specially on Canvas+ even if the capx uses layout by layout. Inspecting the code with Google Chrome profiler we have found that Image references are strongly retained in the Construct2 engine and are not disposed of (when using canvas2D context). This is bad for the garbage collector.

    It shouldn't matter, because in real browsers holding a Javascript reference to an Image object does not mean the Image is decompressed in memory. We can't drop the reference, because we might need it again if the player comes back to that layout later. If we drop references and re-create them we might invoke downloads in real browsers, wasting bandwidth and causing delays, and a separate codepath also defeats the point of having a portable engine that runs the same everywhere. To me your graph simply identifies the canvas+ bug.

    I'd also point out that it's sometimes difficult to make good sense of garbage-collected memory use graphs, since they can spike high and appear to be using lots of memory, but the next collection is able to release it all. That's an essential point: it is more important that it can release memory when it's high, than how much the highest memory use actually is. This allows the game to continue running as opposed to crash, as evidenced by the larger games which tend to crash when ported to Canvas+ when they run fine in a real browser (even with higher memory use!). The 2nd graph also confirms this: despite peaking higher, the web view finishes with lower memory use than canvas+. So I don't consider the peak memory usage particularly relevant, a more important question is "does it crash?"

Ashley's avatar

Ashley

Online Now
Early Adopter

Member since 21 May, 2007
Last online 27 Oct, 2026

Twitter
Ashley has 1,835,209 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x6
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x44
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs