Sign in to follow this  

Keep working in C or switch to HTML5?

Recommended Posts

Hello

I'm making a platformer in C with SDL. I really like C, but nowadays any non-AAA game should be playable in a browser, exe are annoying to download and the user usually have to deal with Window's SmartSreen and other software blocking the program execution.


While i like the power of HTML5 (already far more powerful than SDL for the graphical part...) i'm not sure about the future. Will i have to re-develop my game a few years after the release because the browsers will have changed too much ? I wonder about perenity. Even more if i use a framework like Phaser... I don't like working hard then losing everything because the current hyped technology has changed.


I think i have two 'reasonable' choices :
- keep C and release the game as standalone (.exe) and web through emscripten
- go for HTML5 and release the game for the browser and standalone .exe with [forgot the name] some packaging tool


Which choice is better to you ? Does emscripten works well enough to provide an enjoyable experience ?

Share this post


Link to post
Share on other sites
Posted (edited)

Emscripten is certainly the route I would choose. It allows you to keep with the most standard and cross platform programming language whilst also tapping into the web market.

Even better that you had chosen SDL because Emscripten comes with SDL 1.2 built in and it is very easy to use with SDL 2.0. If you do need 3D or hardware acceleration, then just like on the desktop, you can use SDL to create an OpenGL rendering context in a web browser and carry on your project as usual.

Emscripten also has very large companies backing it now (Mozilla but also Epic Games and Unity because UE4 and Unity now depend on it to provide their HTML5 exporters).

It is also pretty future proof in that based on Clang/LLVM, it will be first in line to properly support WebAssembly which is the apparent "future platform of the web".
 

I don't like working hard then losing everything because the current hyped technology has changed.


Yes, I am exactly the same. Stick with C/C++ and "boring" technologies like SDL and OpenGL. These will be the most likely to stay around longer than our lifespan whereas products like Flash and Unity most certainly wont ;)

Edited by Karsten_

Share this post


Link to post
Share on other sites

Have you considered Unity3D? You can code in C# and build for the web. It also supports many more platforms including PC, mobile and consoles. The C# language feels a bit like the old C but it's incredibly powerful.

Share this post


Link to post
Share on other sites

keep C and release the game as standalone (.exe) and web through emscripten

Go with Emscripten.

Which choice is better to you ? Does emscripten works well enough to provide an enjoyable experience ?

In some cases it will have even better performance than standard Javascript, closer to the speed of native software. You surelly will have to adapt a small part of your code to work with Emscripten, but you will have it working on two platforms, native desktop and web :).

 

Like @Karsten_ said, Emscripten is receiving large support from big companies.

The C# language feels a bit like the old C but it's incredibly powerful.

?? C# doesn't feel anything like C.

Share this post


Link to post
Share on other sites

I really like C, but nowadays any non-AAA game should be playable in a browser

That's news to me.  If you're comfortable in C and the tech you're already using, I don't see any reason to switch to being a browser game "just because".  Web games come with their own set of challenges and constraints that may not play well (pun slightly intended) with your existing game design.

Will i have to re-develop my game a few years after the release because the browsers will have changed too much ?

No platform is going to be permanent at this point.  Even consoles rely on some sort of distribution platform that eventually will stop being supported.  I think you'd get more longevity out of native apps though.  Super old natively-running games can still be downloaded on steam or gog, etc., but web-based platforms come and go pretty quickly from what I've seen.

My 2c is to stick with C and SDL.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this