rivet-gg / plugin-godot Goto Github PK
View Code? Open in Web Editor NEWPlugin for Rivet + Godot 4
Home Page: https://rivet.gg/learn/godot
License: Apache License 2.0
Plugin for Rivet + Godot 4
Home Page: https://rivet.gg/learn/godot
License: Apache License 2.0
`OS.get_environment("HOME")` won't return anything on Windows, so it won't search for the binary in the right location
Add a food scene, make it collidable with the player, and spawn them around the world. When a player runs into them, feed that player.
cli error when you want to deploy the game from godot: [Rivet] Invalid response from the command line tool: 43
to get around the problem, I have to do this line, but it's quite annoying C:\Users\name\bin\rivet.exe sidekick --show-terminal deploy --namespace dev
many people using this branch are running into issues
This is an extension from #31
Currently, when you hit cancel when linking your project to Rivet, the thread that is running the Rivet CLI will stay open. It will close when Godot closes, but until then, it's effectively a leak that is endlessly polling for login.
This can be resolved by moving the linking logic into Godot, and allowing it to do the polling instead. If it does it with a n-second timeout, then in between it can check if it should be shut down.
When linked to a game, it's hard to know which game on your profile it's linked to.
This should be represented by a primitive in Godot. Allow the player size to grow and shrink, and add a feed()
function that is called when the player interacts with food in the game.
We should make a clone of Agar.io in Godot. It doesn't need to be perfect, but it would be a good test to how quickly we can iterate while using Rivet in Godot. This tracking issue will include several sub-tasks to complete, with what I imagine an MVP for Agar.io should include. We might not implement every mechanic, since only a few are really required to get the gist of being able to play with others.
Sometimes changing items in playtest doesn't properly change the config when the game is launched. Hard to know what this comes from.
The only issues should be in the areas where you're calling some GDScript code from C#. Would be worth checking how other plugins manage this.
Also I think there might be a version of dodge the creeps that is C#, so that could be good to test with?
Screen Recording 2024-06-24 at 11.35.43 AM.mov
This happens when the plugin tries to look for new versions after a deploy. It also doesn't wait long enough for the new version to be deployed, so it doesn't know that it exists.
Currently, websockets need some extra items passed in to properly work when connecting to a server provided by find_lobby
. This might include adding ws
or wss
, as well as some other items.
Something with the powershell command isn't working properly
Godot really doesn't work nicely with editing yml file, since on save, the indentation changes to spaces, which yml isn't compatible with. It would be better to change docs to suggest using JSON, and have that be the default.
From the Godot repo's issues: godotengine/godot-proposals#6250
Regarding rivet_response.gd:
The class _RivetResponse
is widely used by the API, including as a return value of functions mentioned in the examples.
I recommend exposing it to the "public namespace" by adding a class_name
declaration at the beginning of the file:
class_name RivetResponse
Which allows users to access it directly without having to type on every file:
const RivetResponse = preload("res://addons/rivet/api/rivet_response.gd")
This approach also prevents path changes from breaking user projects (like moving/renaming the rivet_response.gd file)
@forest said:
Just came across an interesting issue in our Godot plugin repo, where Godot stores the current selected value in scene files, which means that it leaks some information about the previously-selected namespace. Will look into this.
plugin-godot/addons/rivet/devtools/dock/deploy_tab.tscn
Lines 25 to 39 in 572cf36
<https://github.com/rivet-gg/plugin-godot/blob/572cf36c1a1cffc44bd81535ca15b8aedf2a9b9c/addons/rivet/devtools/dock/deploy_tab.tscn | deploy_tab.tscn>
Currently, release-please doesn't update the version in plugin.cfg with releases.
The link to the Version Dashboard in the terminal doesn't lead to the correct link on the hub. Instead it goes to a 404.
The first problem is a token problem, when building the game I noticed that you duplicate the rivet config in the res:// but it doesn't work in 4. 3, which means that the token is not found by the game, so it crashes. To get around this problem, I've forced the return of tokens in rivet_api.gd, but this is rather annoying when I want to build the game on a branch other than prod.
When players collide, allow the larger one to eat the smaller one. It would be nice if they could run into each other a bit further before one is eaten. This might be possible in a few different ways:
So usually (for me). When I'm deploying my Rivet game, it'll build a Docker image, This process do take quite some time. Especially with first time build.
I find myself using Rivet CLI instead of Godot Plugin, just because when using the plugin. It doesn't show the progress and the logs. And I do find logs and status indication essential in deployment process, especially when building a Docker image.
P.S. Also Godot 4.3 just introduced OS.execute_with_pipe function. Which does execute program without blocking the main thread. It might be a great start for this feature. (Which also means it could be a Godot 4.3 only thing, unless there's some modification with the toolchain or CLI)
(not really an issue, but rather a suggestion. sorry for bad english)
It would be good to have a button that takes you right to the logs/lobbies for the current game/namespace.
change to just addon folder
On rivet_packages.gd, lines 10~11:
func find(body: Dictionary = {}):
return await Rivet.POST("matchmaker/lobbies/find", body).wait_completed()
The function find
is the only one that doesn't have a return type annotation, despite returning a _RivetResponse
just like the others
When something goes wrong with the CLI, it prints an ugly error to the Godot terminal that is hard to parse. A good chunk of problems will come from parsing the Rivet config file, so figuring out how to make that work better will likely resolve a lot of the issue.
If the rivet-cli binary is changed while the plugin is running (say from Godot settings), it should bring the plugin back to the login screen. This will reverify that the plugin is compatible with the version that is installed.
Some items to clarify:
Upon extracting .zip plugin into /addons folder in godot, it errors saying "Contact software vendor for 64 bit version".
Running on Windows 10 64-bit machine.
Same error pops up upon clicking "Sign in to Rivet" in the FileSystem window
Currently, it's possible to click the play button several times without anything happening. Need to look into what code paths could cause this, or propagate errors to the user better.
The new version of the plugin doesn't include buttons to start a local Godot server. This means you would need to run a command from the command line, which adds more overhead to the user.
This tracking issue will be up until this feature is implemented.
Some tool issues are coming up in the browser. More docs around this and websockets is important.
Would be good if there was a way to automate this, probably with Godot plug.
We need our plugin to be updated in the asset store when new versions are released. This should be automated.
It would be good to get details of things that are going wrong with the plugin, either with Posthog or Sentry, or both.
If there isn't a preset, the docker build will fail silently.
The example Godot Ball (https://app.graphite.dev/github/pr/rivet-gg/examples/17/Add-godot-ball-example) can be used as a starting place. The example includes basic code to create a scene for each player, and automatically connect to a server. For the Agario clone, we should probably leave it at auto-joining a server so that lobbies aren't the focus of too much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.