Provide choice to spawn an avatar for the host
Quite simple and self-explanatory. If the boolean is false, host simply doesn't spawn an avatar for any player. And for clients, MultiplayerSpawner simply doesn't spawn avatar 1 because he never existed.
Since only the example project is modified in this PR, the version bumps for the netfox libraries aren't necessary.
forest brawl is part of netfox.extras
Based on the folder structure and the documentation of Forest Brawl + netfox.extras it seems to be a separate thing from that. Why do you think it is part of netfox.extras?
Because forest-brawl is inside the netfox extras folder
Based on the folder structure
It is inside netfox.extras folder, just like weapons
Edit: I updated all netfox package version numbers (base, internals, noray, extras) because with each update, regardless of which package it touches, they all have the same version number. This makes sense to keep the version number non-confusing
I am extremely confused...
This if from the "Files changed" tab here.
examples folder is at the same levels as addons. Forest Brawl is inside examples, not addons\netfox.extras.
What am I missing here?
You are right. On the fork I was working with netfox (had it as git submodule), I had moved examples folder under netfox.extras, and so I thought it was under netfox.extras on the main branch as well
I will update this PR by removing the version bumps, give me a day because I gotta go afk
Makes sense now. No worries, take your time!
Forgive me being facetious :smile:

My local branch was deviated from this upstream branch and my API token has expired, so I decided to do the version bump from the browser (github) but it only accepted 1 file change per commit
@TheYellowArchitect I mean what's the benefit of this PR? Especially since this concerns Forest Brawl, and Forest Brawl is set up for players to host.
A clear example of how to include or not include the host as a player. "Forest Brawl is set up for players to host" with this, forest brawl also supports a headless server setup.
Also do not look down at forest brawl as just an example. Many games can build off it, I'm sure some users will. My game for example is a top-down shooter, so I simply took forest-brawl as is, and did heavy changes, instead of starting from scratch. After all, netcoding is the foundation of every game, the starting spot (you cannot convert a singleplayer game to a multiplayer game), so forest-brawl is naturally usable this way.
Also do not look down at forest brawl as just an example.
Please refrain from statements like these. They adds nothing to your point, but imply falsehoods.
And, to clarify, Forest Brawl is an example project, not a template. It is meant to give users a general feel on how netfox fits into a game project, and demonstrate some mechanics. It is not geared towards being a starter kit for new projects. I'm glad if it can help people start their projects, but it's still important to keep in mind what Forest Brawl is, and not force it to be something it is not.
I'm open to building template projects, if there's demand and if we can clearly define what a starter kit should be :slightly_smiling_face:
I agree on the use case of people running the game in dedicated server mode. For that to be a feature, we'd need not only a single variable, but also a UI update. I think either a checkbox or dedicated button could work, just make sure that it's present on both LAN and noray tabs. Probably with a label like "Host only".
And, to clarify, Forest Brawl is an example project, not a template
I used it as a template for my game, and it works finely. Because you don't see it as a template, doesn't mean users will not use it as a template.
It is not geared towards being a starter kit for new projects.
It was literally my starter kit for my new project.
and not force it to be something it is not.
I am not forcing anything, I am simply saying I used it as a template, and surely others will too.
I agree on the use case of people running the game in dedicated server mode. For that to be a feature, we'd need not only a single variable, but also a UI update. I think either a checkbox or dedicated button could work, just make sure that it's present on both LAN and noray tabs. Probably with a label like "Host only".
I am unfamiliar with noray. But I can do the UI update as an extension of this PR if you wish. A checkbox which toggles this boolean.
I used it as a template for my game, and it works finely. Because you don't see it as a template, doesn't mean users will not use it as a template.
That still does not make it a template.
It was literally my starter kit for my new project.
That still does not make it a starter kit.
I am not forcing anything, I am simply saying I used it as a template, and surely others will too.
I don't know, insisting on the points above surely feels like it :slightly_smiling_face:
I'm happy if people can use Forest Brawl as a template or as a starter, but it is still neither of those things. This is important because being an example game, it has its own scope. This means that I don't want to add features that would be nice as a template or a starter, I want to add features that make sense in terms of the game itself.
You don't need to be familiar with noray, just expose the variable on the Forest Brawl UI. Thanks!
I think either a checkbox or dedicated button could work, just make sure that it's present on both LAN and noray tabs. Probably with a label like "Host only".
This is the UI of noray tab
This is the UI of
LAN tab
The layout is up to you. I honestly don't know if the checkbox should be top or bottom.
I have even thought of making it a seperate button instead of checkbox, so it has 3 choices in both LAN and noray:
Host Headless Host Join
Anyway, the label name can change as well. By extension of the label name, I'm not a fan of passing a NOT boolean in the code when I can avoid it, could be by default enabled as spawn_avatar_host, but its a small thing nonetheless.
As for connecting the 2 Bootstrapper nodes to the BrawlerSpawner, I made a signal for them, and via Inspector/SceneTree, connected the signal directly to BrawlerSpawner. I cannot think of a cleaner way.
There is also a minor problem though negligent I have to mention it. The initial camera of the headless host shows the player names too big:
Switched to a dedicated "Host only" button. Also updated bootstrappers to lean more into signals instead of hardcoding UI elements.