matpow2's Recent Forum Activity

  • Macbee

    I see! I'm always fascinated by people doing their games in Construct Classic. You're a very rare breed by now, haha.

    InvaderXYZ

    I think you misunderstood! I was pointing out how you could estimate a budget if you were to do ports from scratch. Maybe your estimate would be accurate if you were doing just that, but of course, the point of Chowdren is to reduce both time & cost needed for Construct ports.

  • Macbee

    The speedup when using Chowdren with Clickteam Fusion is about 7.7x (where the standard runtimes are also written in C++). Admittedly, I don't actually have any data for this, but I would expect the speedup when using Chowdren with Construct Classic to be similar. Do you happen to have a game made for Construct Classic? :)

    InvaderXYZ

    Hey! Sorry, it looks like your mail got lost in the noise. I remember you had a very small budget for ports, and I'd like to point out that porting is a serious endeavour, requiring many work-hours and time on my part.

    I think I need to spend some time to explain, just to set reasonable expectations for smaller developers.

    If you were to do the port yourself, you can estimate a ballpark cost. In the most ideal situation, a port would take about one or two months to do. You would likely need to hire a senior engineer that has some knowledge of cross-platform development. If you look at the average salary of a senior engineer in your area, you could start approximating the budget for a port.

    I get at lot of emails a day about Chowdren, both regarding Fusion and Construct. Ideally, I would be able to respond to everyone, but usually, I need to prioritize publishers or developers that have at least considered the above.

    For developers who do not have a budget for ports, there is still the possibility of revenue share or recoup, of course. In that case, you need to have a strong case for your game, and why revenue would be able to cover the cost of porting instead.

    I do not want to discourage anyone from contacting me, since if your game is excellent, I will definitely be in touch! However, I will have infinitely more time to spend on someone who have researched what porting entails, who have already had their game approved for release on consoles, and so on.

  • I was referring to the community Discord server, which skymen linked to above :)

    Cryptwalker

    I'm busy with gamescom at the moment (we're showing off Baba Is You on Switch!), but I will see if I have some more time once I get back.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another update: on some platforms, we can get rid of temporary framebuffers entirely for effects that do not use cross-sampling. Most effects do not use cross-sampling, so this significantly improves the performance of effects, especially popular ones like Overlay and Screen.

    This is achieved by using memory barriers on platforms that support it (such as console platforms, and Direct3D 11/OpenGL with glTextureBarrier). This allows us to read a texture while writing to it at the same time, so a temporary framebuffer isn't necessary. WebGL does not support memory barriers, which may be a reason why the regular Construct runtimes do not perform this optimization.

    As described in the effect compositor writeup from Ashley, objects sometime require predrawing in the standard runtimes, such as when objects are rotated. By using the right texture coordinates for the background texture, we can also skip this step, removing another case where temporary framebuffers are used.

    In Chowdren, there are now only a few situations where a temporary framebuffer is required:

    • When a layer has 'force own texture', is not fully opaque, or uses an effect, a temporary framebuffer is needed to render the intermediate result.
    • When an object uses a cross-sampling effect (such as WarpMask, WaterBg), a partial copy of the background is made.

    Headbang Games

    Please check your inbox :)

  • I have some news: Chowdren can now automatically merge effects together. This means that most of the time, Chowdren does not need an intermediate framebuffer to render objects with effects, which the standard runtime will have to do in many cases. If you use a lot of effects, you can expect this to yield some large performance gains.

    With the effects merging feature, there is also support for most Construct effects now.

    Technical details

    Consider two GLSL fragment shaders as follows:

    // shader 1, constant multiply
    void main() {
     gl_FragColor = texture2D(texture, texture_coordinate);
     gl_FragColor.rgb *= 2.0;
    }
    
    // shader 2, monochrome
    void main() {
     vec4 col = texture2D(texture, texture_coordinate);
     col *= vec4(0.299, 0.587, 0.114, 1.0);
     col.rgb = vec3(col.r+col.g+col.b);
     gl_FragColor = col;
    }
    

    Now, consider the result of applying shader 1, followed by applying shader 2. When shader 2 calls texture2D on texture, this is actually the result produced by shader 1. Therefore, if we wanted to merge these shaders together, we could do it as follows:

    vec4 temp_color_1;
    vec2 temp_coord_1;
    
    void main_1() {
     temp_color_1 = texture2D(texture, temp_coord_1);
     temp_color_1 *= 2.0;
    }
    
    vec4 sample_1(vec2 tc)
    { temp_coord_1 = tc; main_1(); return temp_color_1; }
    
    void main_2() {
     vec4 col = sample_1(texture_coordinate);
     col *= vec4(0.299, 0.587, 0.114, 1.0);
     col.rgb = vec3(col.r+col.g+col.b);
     gl_FragColor = col;
    }
    
    void main() { main_2(); }
    

    When running this through glsl-optimizer, we get the following result:

    void main ()
    {
     vec4 col_1;
     col_1 = vec4(0.598, 1.174, 0.228, 2.0) *
     texture2D(texture, texture_coordinate);
     col_1.xyz = vec3(col_1.x + col_1.y + col_1.z);
     gl_FragColor = col_1;
    }
    

    As you can see, the merged result is quite optimized, and we would expect this to be much faster than using temporary framebuffers.

    There are still some cases where we will need temporary framebuffers. For example, for large effect chains using complicated shaders, most shader compilers will choke on the merged result. For the games I've looked at, this has only been a problem with the following effect chain:

    noisemask, lottes, blurhorizontal, separatechannel, separatechannel, hsladjust

    The culprit here is Lotte's CRT shader, which is a large shader.

    To be fair to the standard C2/C3 runtimes, even though this optimization would be nice to have in them, I can see why it wouldn't be feasible to implement. For example, some users may depend on some very specific behavior from the renderer, and this could be a non-backwards compatible change. Also, dealing with large effect chains (like the one above) may not be straightforward.

    InvaderXYZ

    Please check your inbox, you should have received a reply!

    Cryptwalker

    Thanks a lot! I will take a look when time allows :)

    NetOne

    Nice! I feel Iconoclasts definitely deserves all the praise it has received.

  • In related news, our port of Iconoclasts (made in Construct 1) is releasing on Nintendo Switch on August 2!

    I hope we can announce some of the Construct 2 games we are working on soon as well.

    elliot

    For now, I won't make benchmarks available here. You can contact me by mail or on the Discord server if you'd like more info.

    In general, Chowdren is significantly faster than the standard runtimes. However, making specific numbers available would undermine the fact that the standard runtimes are viable for the majority of users. Ashley & team are doing a great job of identifying performance hotspots, as can be seen in their work on the expression compiler.

    Cryptwalker

    You can send me your project on e.g. the Discord server. Hopefully, I'll have time to take a look soon!

  • FYI, Chowdren does support Nintendo 3DS. There is also some support for C3, but only when using the C2 runtime.

  • NetOne

    It's an interesting idea, but if Chowdren were an official product, people would also assume full and official support for their games. Right now, Chowdren is extended whenever a game we are porting requires it, and that has worked well for us. It allows us to get real games running on Chowdren and to produce real results, and it is clear how our work will be funded.

    For now, Chowdren will remain its own runtime. However, I will try to keep Scirra in the loop about Chowdren, in case there is something to learn from the Chowdren approach and vice-versa.

  • Since some developers have asked me about it, I've looked at what it would take to support C3 under Chowdren. Luckily, it turns out that supporting C3 when used with the C2 runtime is trivial. Here is Bunnymark, exported from C3 using the C2 runtime, and running under Chowdren:

    (video)

    Supporting the C3 runtime is a different matter, but it should still be doable. The C3 runtime uses a very nice and exciting expression compiler, but this will require some extra work for Chowdren to support. If someone has a use for Chowdren using the C3 runtime, please let me know!

  • NotionGames Thanks! I'll be in touch.

    I've updated the main post after the recent forum move.

    Also, a bit of news: I have 3 major Construct 2 games running on the Nintendo Switch using Chowdren. If you'd like more details, you can get in touch :)

  • I forgot to include the WebGL effects that are supported, thanks for reminding me!

    Right now, these are supported:

    • Warp
    • Adjust HSL
    • Overlay
    • SetColor
    • WarpMask
    • Additive
    • Brightness
    • Destination Out
    • Source Atop
    • Water Background
  • Nice, I hope you get a publisher on board! Keep us updated

    Like Ashley said, there are definitely some things that can be improved in the Fake3D project.

    If you're being careful, I think you can achieve good performance with the standard Construct runtime by just changing the events.

matpow2's avatar

matpow2

Member since 6 Mar, 2017

Twitter
matpow2 has 10 followers

Trophy Case

  • 7-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies