Libgodc
github.comKey Features
Tech Stack
Key Features
Tech Stack
You can write games in Go with goroutines, channels, garbage collection, and all the language features you'd expect. It compiles using gccgo and runs on real hardware or emulators.
The project includes 3 game examples Pong, Breakout and Platformer, input handling, audio support, and integrates with KallistiOS (the Dreamcast homebrew SDK).
* Star Here: https://github.com/drpaneas/godc * Documentation: https://drpaneas.github.io/libgodc/ * Video Tutorial: https://youtu.be/ahMl0fUvzVA
Happy to answer any questions about the implementation!
I also dig the documentation / book styling.
I looked at gccgo when porting the runtime to n64, but at the time it wasn't updated since go1.18. Can we use Go Generics on the Dreamcast? I see that gccgo is obviously needed to support SH4.
24 total megabytes, with an M, of memory between system and video (another 8 there), single core 200mhz CPU, graphics chip runs at 100mhz. Shenmue runs on it.
Glares at Teams.
Like, if a multitrillion dollar company were to create a car, or a house, or a building, it would be a billion times more advanced, complex and capable then what I could create with some volunteers in a garage over the same time period.
Yet, somehow software just doesn't scale this way. (In fact, it seems to scale inversely - it's the small guys making the cool stuff, while the big players continue to pump out boring garbage because they're risk-averse.)
This does not fare well for Go though.
There was a period of time towards the beginning of Go when you could get some small performance advantages for certain tasks by locking the runtime to one goroutine at a time. They've long since addressed that, but there was a time when there were people writing Go code and deliberately limiting it to one execution context at a time.
I mucked about with Microsoft Graph a bit before, didn't seem too bad.
Maybe eventually the same can be tried with TinyGo, just as an idea.
Remembering what a powerhouse the Dreamcast was when it came out, and how amazing games like Soul Caliber and Shenmue looked, it's hard to think of the Dreamcast hardware as "severely contained".
You have to use golang from source (see the stackoverflow page https://stackoverflow.com/questions/76087007/golang-to-wasm-... )
go install golang.org/dl/gotip@latest gotip download GOOS=wasip1 GOARCH=wasm gotip build -o main.wasm
Although the way I did it is going into the gotip folder and then the binary folder which would contain the go compiler binary and then just use that path with
GOOS=wasip1 GOARCH=wasm ~/sdk/gotip/bin/go build -o main.wasm
Note that I forgot the exact path but it was similar to this but the point being that its super easy and simple :)
I tried to do it and I can tell you that it works and it works for even the most latest versions of golang, all you need is a wasmengine which I suppose can be ubiquitous.
I have built a solution where golang code gets converted to wasm and then we run a ssh server which then runs that wasm all in sandbox to create sandboxed mini golang servers :p I really love it although its a more so prototype than anything
GOOS=wasip1 GOARCH=wasm go build -o main.wasm main.go
wasmtime main.wasm
If you're interested in wasm/wasi and niche hardware with Go, you should check out TinyGo [1] if you haven't already.Tinygo is really awesome but I have heard that it has its differences so software written for golang won't really work ootb on tinygo and tinygo is really fascinating project too!
I have a question but is it possible to create golang compiler itself within wasm itself. I tried doing it but it didn't really work out but I am curious if someone has thought of doing something like this or has already done it?
>The 16MB limit is absolute. There is no virtual memory, no swap, no second chance. Every byte matters.
A paragraph later:
>semispace collector
Doesn't a semi-space collector waste a lot of memory?
Not affiliated with Hacker News or Y Combinator. We simply enrich the public API with analytics.