Advice for building cores with Emscripten?


#1

I’m looking for some advice, documentation, or reference material on getting started with building cores with Emscripten. For other platforms, a core can be built as a shared object file and dropped into the “cores” directory for Retro Arch to load at runtime. I know this is different with Emscripten, and that the cores need to be linked directly against Retro Arch in some way, but I have yet to figure out how that is done.

Hoping to figure this out for game development jams like Ludum Dare, where having a web version of an entry greatly increases exposure.

Thanks!


#2

Hi,

There is some documentation.

Interesting please keep us updated about the game development jam :wink:

Thank you.


#3

Thanks for the link!

WIth some additional help from #libretro IRC, I’ve got building with Emscripten mostly figured out. I didn’t know about dist-cores.sh, and there’s a bit of a file renaming dance required. Here’s some (admittedly terse) notes for anyone interested.

It’s a little rough around the edges, but I successfully submitted a Ludum Dare Jam entry! I missed the Compo deadline by half a day, mostly getting back up to speed on building games with C. I’ll admit that I’m a little rusty. :smile:

https://ldjam.com/events/ludum-dare/42/please-dont-step-on-my-hat

please-dont-step-on-my-hat

Feedback on how I’m hosting the game / using Retro Arch is welcome. I did some tweaking to the HTML / JS to make the game easy to load for somebody who isn’t familiar with Retro Arch, but I suspect it’s less than ideal.

There are also a few gotchas / things that aren’t quite working right with trying to upload the games to either http://itch.io/ or a self-hosted site. When I get a chance, I’ll try to document my findings there too.

It’s really exciting being able to build this kind of game in a single weekend. I’m definitely going to use Libretro again for the next game development jam and encourage others to try as well.


#4

That’s awesome! Let us know of any cool stuff you crank out. I’m always impressed by the quality of what people can come up with in these 1-2 day game jams.