Feel free to respond to this thread with any: questions you have about utilizing the template, feedback you might have about how it’s working or issues you are running into. We’re excited to chat about it more!
Potentially can further improve the template by replacing some extension methods with a simpler syntax. This will make it more accessible for beginners.
One of the things we tried to do was to show different ways to do things in this template. Hopefully it doesn’t add too much confusion. If so, it’s a good indicator for us to improve learning materials around that area.
I’m a veteran developer and I was confused with the syntax. I never used extension methods in other programming languages that I worked with so I was in a situation where I didn’t understand the Verse syntax neither knew what concept to search for. The class page doesn’t have an example of the syntax showing what is an extension methods and I was only able to find them here.
The concept is pretty clear, but I found hard to find documentation on the syntax. Since extending methods for the agent class should be a common pattern in most games, I believe this should be easier to find in the official documentation, instead of the forum.
I didn’t understand this method on round_timer.verse. Why do I need to check if there is a player in game to end the round? If GetPlayspace().GetPlayers() returns an empty array, won’t the game just close automatically?
# Stops the timer and ends the round.
Stop():void =
Logger.Print("Ending the round timer.")
# We get a player from the players remaining in the scene to end the round.
Players:[]player = GetPlayspace().GetPlayers()
if (Instigator := Players[0]):
RoundEndedEvent.Signal()
That’s a great catch. Getting the instigator isn’t necessary. It was in there because I used to end the round from there. I did that with a Round Settings device. Calling that function required an instigator. I’ll get that fixed for a future release.
I’ve an update regarding this matter. I’m reading the documentation sequentially and I finally stumbled upon the step by step tutorial on the website. It even explains what is an extension method in this page: 3. Playing Effects on Idle Players
So my suggestion is just link this tutorial in a README file or as a top comment in the base_team file in the next version of the project.
the tutorial doesnt work anymore, is there an updated one for the current version of Verse? cant use ‘set’ in an ‘if’ statement and have to separate the fail-able stuff from ‘set’. still trying to debug all the errors that it throws now but those are ones I have identified