{"id":20832879,"url":"https://github.com/udhos/fugo","last_synced_at":"2025-05-08T01:40:31.122Z","repository":{"id":57503186,"uuid":"82970694","full_name":"udhos/fugo","owner":"udhos","description":"fugo - fun with Go. gomobile OpenGL game","archived":false,"fork":false,"pushed_at":"2019-09-18T20:12:18.000Z","size":1995,"stargazers_count":34,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T16:13:54.912Z","etag":null,"topics":["android","android-native","game","gamedev","golang","gomobile","native","opengl"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/udhos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-23T20:56:15.000Z","updated_at":"2025-02-11T15:49:10.000Z","dependencies_parsed_at":"2022-09-02T01:52:11.033Z","dependency_job_id":null,"html_url":"https://github.com/udhos/fugo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Ffugo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Ffugo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Ffugo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Ffugo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/udhos","download_url":"https://codeload.github.com/udhos/fugo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252983762,"owners_count":21835758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-native","game","gamedev","golang","gomobile","native","opengl"],"created_at":"2024-11-18T00:13:31.897Z","updated_at":"2025-05-08T01:40:31.099Z","avatar_url":"https://github.com/udhos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/udhos/fugo/blob/master/LICENSE)\n[![Go Report Card - invader](https://goreportcard.com/badge/github.com/udhos/fugo/invader)](https://goreportcard.com/report/github.com/udhos/fugo/invader)\n\n# fugo\nfugo - fun with Go. gomobile OpenGL game\n\nTable of Contents\n=================\n\n  * [QUICK START](#quick-start)\n  * [Requirements](#requirements)\n  * [Building the INVADER application](#building-the-invader-application)\n  * [Building the ARENA server](#building-the-arena-server)\n  * [How does the INVADER application locate the ARENA server?](#how-does-the-invader-application-locate-the-arena-server)\n  * [INVADER runtime flags](#invader-runtime-flags)\n  * [KNOWN ISSUES](#known-issues)\n\nCreated by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc.go)\n\n## QUICK START\n\nRecipe:\n\n    go get github.com/udhos/fugo\n    cd ~/go/src/github.com/udhos/fugo\n    ./build.sh\n\n## Requirements\n\n1\\. Install latest Go\n\nThere are many other ways, this is a quick recipe:\n\n    git clone github.com/udhos/update-golang\n    cd update-golang\n    sudo ./update-golang.sh\n\n2\\. Install Android NDK\n\nDownload Android Studio - https://developer.android.com/studio\n\nUnzip Android Studio:\n\n    $ tar xf /tmp/android-studio-ide-191.5791312-linux.tar.gz\n\nRun Android Studio:\n\n    $ ~/android-studio/bin/studio.sh \u0026\n\nSelect: Configure -\u003e SDK Manager -\u003e SDK Tools -\u003e NDK\n\nClick the Apply button.\n\nDefine SDK env vars. For example:\n\n    export ANDROID_HOME=~/Android/Sdk\n    export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/20.0.5594570 ;# watch out the version\n\n3\\. Install gomobile\n\nRecipe:\n\n    go get golang.org/x/mobile/cmd/gomobile\n    gomobile version\n    #gomobile init -ndk $NDK ;# no longer used?\n\n4\\. Install OpenGL dev libs\n\nOn Ubuntu you will need these:\n\n    sudo apt install libegl1-mesa-dev libgles2-mesa-dev libx11-dev\n\n5\\. Install alsa sound dev libs\n\nOn Ubuntu you will need this:\n\n    sudo apt install libasound2-dev\n\n6\\. Get fugo\n\nRecipe:\n\n    go get github.com/udhos/fugo\n\n## Building the INVADER application\n\n7\\. Build for desktop\n\nRecipe:\n\n    go install -tags gldebug github.com/udhos/fugo/demo/invader\n\nHint: You can test the desktop version by running 'invader':\n\n    $ (cd demo/invader \u0026\u0026 invader slow)\n\nThe parameter 'slow' sets a very low frame rate, useful for test/debugging.\nIf you want smooth rendering, remove the parameter 'slow'.\n\nThe subshell is used to temporarily enter the demo/invader dir in order to load assets from demo/invader/assets.\n\n8\\. Build for Android\n\nRecipe:\n\n    gomobile build -target=android github.com/udhos/fugo/demo/invader\n\nHint: Use 'gomobile build -x' to see what the build is doing.\n\n    $ gomobile build -x github.com/udhos/fugo/demo/invader\n\n9\\. Push into Android device\n\nRecipe:\n\n    gomobile install github.com/udhos/fugo/demo/invader\n\n## Building the ARENA server\n\n10\\. Build the server\n\nRecipe:\n\n    $ go install github.com/udhos/fugo/arena\n\n10\\. Run the server\n\n    $ (cd demo/invader \u0026\u0026 arena)\n\nThe arena server needs to load image information from demo/invader/assets.\n\n## How does the INVADER application locate the ARENA server?\n\nThe Invader application will continously try two methods to reach the server:\n\na) The Invader application will send a discovery request to UDP 239.1.1.1:8888. If there is an Arena server in the LAN, it will respond reporting its TCP endpoint. This local discovery is useful for quickly deploying a local Arena server. It depends on multicasting on the local network.\n\nb) The Invader application will try to connect to the Arena server specified in the file server.txt:\n\n    $ more demo/invader/assets/server.txt \n    localhost:8080\n\nThe TCP endpoint hard-coded in the file server.txt is included in the APK file. You will need to rebuild and redeploy the application to change it. This option is useful for deploying public Arena server on the Internet.\n\n## INVADER runtime flags\n\nYou can tweak the app behavior by changing these files before gomobile build:\n\n    demo/invader/assets/box.txt    - bool (file_exists=true)\n    demo/invader/assets/server.txt - string host:port (TCP endpoint for server)\n    demo/invader/assets/slow.txt   - bool (file_exists=true)\n    demo/invader/assets/trace.txt  - string host:port (UDP endpoint for logs)\n\n## KNOWN ISSUES\n\n### x/mobile: build failing when using go modules\n\nhttps://github.com/golang/go/issues/27234\n\n### Need way to hide Android status bar. Fixed: add the theme below to AndroidManifest.xml\n\nAdd this to AndroidManifest.xml:\n\n    \u003cactivity android:name=\"org.golang.app.GoNativeActivity\"\n        android:theme=\"@android:style/Theme.NoTitleBar.Fullscreen\"\n    \u003c/activity\u003e\n\nhttps://github.com/golang/go/issues/12766\n\nhttps://github.com/golang/go/issues/21396\n\n### Need way to set Android app icon. Fixed: add assets/icon.png\n\nhttps://github.com/golang/go/issues/9985\n\nhttps://golang.org/cl/30019\n\n### Need way to call Android API from Go.\n\nReverse Binding https://www.slideshare.net/takuyaueda967/mobile-apps-by-pure-go-with-reverse-binding\n\nslides 65-67 from https://pt.slideshare.net/takuyaueda967/go-for-mobile-games\n\n#### RunOnJVM\n\nRunOnJVM added to gomobile:\n\n- https://github.com/golang/go/issues/26815 \n\n- https://golang.org/cl/127758\n\nOld info on RunOnJVM: https://gist.github.com/tenntenn/aae3d14d0df4884ac4e7\n\n## References\n\n### Just port a Golang game to Android\n\nhttps://dev.to/ntoooop/just-port-a-golang-game-to-android--3a9f\n\n### Korok Game Engine\n\nhttps://korok.io/\n\nhttps://github.com/KorokEngine/Korok\n\n--xx--\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudhos%2Ffugo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fudhos%2Ffugo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudhos%2Ffugo/lists"}