Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Gong from C code to Web Assembly

A topic by PibeCaverna created 21 days ago Views: 115 Replies: 2
Viewing posts 1 to 3

Soo I'm trying to choose between the low level librarys in order to start experimenting with gamedev. My first guess is that compiling to web assembly is the best way to make it  run directly on itch?

soo, does anyone know if opengl or sdl have any trouble with web assembly compilation?

(1 edit)

OpenGL itself isn’t supported on the web at all, so you can’t use it if you wish to run there. According to Emscripten, they support a “WebGL-friendly subset of OpenGL ES”, and they also try to emulate the unsupported features at a performance cost.

I don’t know anything about SDL3, but I know SDL2 supports Emscripten just fine, including its native 2D graphics engine. If it’s enough for you, then you can entirely ignore any OpenGL and let SDL handle it for you.

welp, that works for me, Thanks!