Handmade Hero » Forums » Game » Preferred language for web development
CJ Nelson
8 posts
#7389 Preferred language for web development
1 year, 8 months ago


I currently use HTML canvas and JavaScript to develop web based but I'm not really loving that method. Do any of you have any preferred languages for web development that you find better then mine. If not I'd also be interested in knowing why you like what web programming you do for developing web games.

I don't hate, I just don't love it personally. It feels more like I'm learning the quirks of HTML and JavaScript as opposed to learning how to be a better game programmer.

Any response is appreciated majorly!

Bill Strong
47 posts
#7392 Preferred language for web development
1 year, 8 months ago

It might help to know what your focus is. I am assuming games at this point.

If you like c/c++, you might be interested in emscripten, which allows you to compile you c/c++ code to web/javascript.

You might try Dart, which also compiles to Javascript. While Dart is OOP, just like (almost) any language you can write imperative style. There are some that are writing functional style.

You still have to learn enough of the environment to use it, which is true of almost any option. Emscripten hides the web part from you, you just treat it like you are writing regular applications. But emscripten now becomes your environment, so you will have to learn those quirks.

BTW, web development is broken, so you are not alone. Programmers need different levels of abstractions when creating performant applications. The web api is designed to give the highest level of abstraction, for security purposes in the early days, and now as a historical anomaly. There are some heros trying to push for finer grained abstractions, but it is slow going.
CJ Nelson
8 posts
#7414 Preferred language for web development
1 year, 8 months ago

Thank you for replying.

I'll check out emscripten sometime but I'm also glad that I'm not alone in finding flaws in web development.

hugo schmitt
7 posts

from brazil!

more used to write python/golang/lua/js and want to try something lower level / more complex for a change

#7416 Preferred language for web development
1 year, 8 months ago

But IF hypothetically Casey was doing web development the same way he does Handmade Hero, he would say that you should use what is native to the platform - in this case, Javascript...

Of he would skip Javascript when possible and just generate static HTML server side :P

Bill Strong
47 posts
#7419 Preferred language for web development
1 year, 8 months ago

Yes, but which platform? The mobile web platform? The Firefox SIMD.js platform? The Chrome --webkit-*-*-*-* platform? The Microsoft Edge platform, with Windows 10 UWP platform? The cordova app platform?

Or the new standard that is being ratified to provide a slightly lower level javascript to browsers. And if it is the last, then emscripten is the platform for that.

(I understand what you are saying, and while that is a great approach for a hardware platform, the web is no such thing, and needs to be looked at for its own (de)merits.
39 posts
2 projects

A budding game developer and programmer

#7557 Preferred language for web development
1 year, 7 months ago Edited by Oliver on July 11, 2016, 11:47 a.m.

i found processing to be a pretty good way. https://processing.org/
You write the program with java and it compiles it into javascript to be used with the html canvas by including a script in the html.

Although its not handmade style, I found it easier than using the html canvas directly.
39 posts
#7596 Preferred language for web development
1 year, 7 months ago

I have the same question, but mine is more like: what is the most reasonable way to produce a website that is performant yet robust(no expiring-trendy code), in a way that most browser will support it, even if the end result will be more limited in features? But maybe there's no way that this is even possible.
Jochen Heizmann
1 posts

Indie Game Developer

#7693 Preferred language for web development
1 year, 7 months ago

I'd like to recommend Monkey-X to you (http://monkey-x.com).

It's basically a language that compiles to a variety of other languages (similar concept to Haxe). It has a simple api for 2D Games as well as access to webGL/openGL APIs. It offers various targets like glfw (osx/win), html5, ios, android, winphone, PSVita. The cool thing is that you can access the native code of each target and wrap libraries or write native code on your own.

The creator Mark Sibly (he's also the one who did BlitzBasic on the Amiga back then) also works on a successor language Monkey2, which is available here which improves on a lot of flaws on the original language and uses SDL2 under the hood: http://monkey2.monkey-x.com/monkey2-files

The language itself is garbage collected (on C++ Targets a mark and sweep gc is implemented) but of course you can get your hands dirty if you write critical parts natively. In Monkey 2 you finally have also direct access to pointers.

It has it flaws but programming/working with it is mostly a joy and it's one of the most simplest and best cross-platform-solutions I know of.