Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guilledipa/cheguordel
Che Guordel!
https://github.com/guilledipa/cheguordel
Last synced: about 2 months ago
JSON representation
Che Guordel!
- Host: GitHub
- URL: https://github.com/guilledipa/cheguordel
- Owner: guilledipa
- Created: 2024-09-15T12:26:14.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-12T08:16:00.000Z (3 months ago)
- Last Synced: 2024-10-17T09:16:58.028Z (3 months ago)
- Language: JavaScript
- Size: 10.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Che Guordel
"Che Guordel!" es una implementacion del juego Wordle, en Go, para un publico
Argentino.Sera desarrollado usando https://ebitengine.org
## Build
### Linux
```shell
env GOOS=js GOARCH=wasm go build -o yourgame.wasm github.com/guilledipa/cheguordel
``````shell
cp $(go env GOROOT)/misc/wasm/wasm_exec.js .
```### Windows
```shell
$Env:GOOS = 'js'
$Env:GOARCH = 'wasm'
go build -o cheguordel.wasm github.com/guilledipa/cheguordel
Remove-Item Env:GOOS
Remove-Item Env:GOARCH
``````shell
$goroot = go env GOROOT
cp $goroot\misc\wasm\wasm_exec.js .
```## HTML
Create this HTML:
```html
// Polyfill
if (!WebAssembly.instantiateStreaming) {
WebAssembly.instantiateStreaming = async (resp, importObject) => {
const source = await (await resp).arrayBuffer();
return await WebAssembly.instantiate(source, importObject);
};
}const go = new Go();
WebAssembly.instantiateStreaming(fetch("cheguordel.wasm"), go.importObject).then(result => {
go.run(result.instance);
});```
Luego abrir el HTML en tu navegador.
Para embeber el juego en una pagina web se recomienda usar un iframe.
Si el HTML visto mas arriba se llama `main.html` el HTML host deberia ser:
```html
```
Si ves este mensaje en Chrome:
```none
The AudioContext was not allowed to start. It must be resume (or created) after a user gesture on the page. https://goo.gl/7K7WLu
```Se resuelve agregando `allow="autoplay"` en el iframe.