@Samarium
I have one more idea about how the title screen could be improved:
Background:
I implemented the character select plugin, but I struggled with displaying the new GUI after being authorized, so the intuitive place would be onAuthSuccess
hook.
But onAuthSuccess
is triggered just after this code:
if (!user.data) {
player.name = user.nickname
if (start) {
if (start.hitbox) player.setHitbox(...(start.hitbox as [number, number]))
if (start.graphic) player.setGraphic(start.graphic)
if (start.map) await player.changeMap(start.map)
}
}
else {
player.load(user.data)
player.canMove = true
}
so if the player is authorized first time in the game then it will set the graphic of a player and teleport him to the map, so this player is put to the RAM of a server and is visible to other players.
But I would want to not start the game after authorization, but display another GUI to select a character (and maybe in the future another one after selecting a character).
I solved this using the canAuth
hook to prevent the teleporting player to the map.
But it has one flaw I have to trigger onAuthSuccess
inside my plugin to provide support for the title-screen
plugin.
If you are eager, check here
I have also one side question to you:
Do you know how to develop a plugin and test it live without needs for publishing it every time you change something?
Here I have an example game for just testing implemented plugin purposes.
And there I use imports from my plugin like:
import ClassGraphics from 'rpgjs-character-select'
but if I want to test it live I have to publish the plugin.
If you can point me somewhere to dig deeper I would appreciate this. If not, I will try to figure it out somehow.