Liblast on Nostr: CVars. How to implement #CVars in #Godot in a way that won't suck..? I thought: make ...
CVars. How to implement #CVars in #Godot in a way that won't suck..?
I thought: make a CVar class that takes a value (like 100) and an arbitrary unique string(like "balance.player.health") in constructor and it stores that in a project-wide database. If the db has the cvar already, it's read from there instead.
When user uses UI, dev console or a config file to alter the cvar value in db, the CVar object in our script is notified to update at runtime...
Does this make any sense?
- unfa
Published at
2024-08-26 23:53:35Event JSON
{
"id": "4d70e60cf5505dab6483de42f59a2b769487c1fb8c6859f68313d0b4dbb5adee",
"pubkey": "51164ff3fbf459746b179974cc027143edac8b037ccebf56c9ed9fb24c24ad1c",
"created_at": 1724716415,
"kind": 1,
"tags": [
[
"t",
"cvars"
],
[
"t",
"godot"
],
[
"proxy",
"https://mastodon.gamedev.place/users/liblast/statuses/113031015004905432",
"activitypub"
]
],
"content": "CVars. How to implement #CVars in #Godot in a way that won't suck..?\n\nI thought: make a CVar class that takes a value (like 100) and an arbitrary unique string(like \"balance.player.health\") in constructor and it stores that in a project-wide database. If the db has the cvar already, it's read from there instead.\n\nWhen user uses UI, dev console or a config file to alter the cvar value in db, the CVar object in our script is notified to update at runtime...\n\nDoes this make any sense?\n- unfa",
"sig": "e4c6c8d0e8941577cc9133998b2b73fce0707397bdf412f743d6e9fab5f48d2cdac50269be9238d020fffc32cf77a484b515462d4fc8362df234ef0b03457a5c"
}