One technique I quite like is making the GameState an interface instead of an enum. In this way you don't have to have lots of switches over your gamestate, since the gamestate itself will handle everything inside it's own class. This helps keeping the codebase more organised when it gets bigger. I'll also automatically register events for that GameState class when it gets active (and deregister them when the state is done ofcourse) to move some of the branching in seperate event classes to the GameState class itself. Again to make sure that all the logic for a certain gamestate is all at the same place and not scattered around your codebase.
I’ll have to try this one out... do you have an example repo with these techniques in detail? I’m curious exactly how you’ve implemented this pattern :]
I haven't got a public repo with such a system implemented. I do however have a pastebin which should get the idea across. Note that I called them phases instead of states and that the PregamePhase, which I included as an example phase, is far from being implemented well pastebin.com/9RCQZ770
Even 2 years later, your comment still helped me in finding a cleaner and more efficient of writing phases. Thank you for this crucial piece I had doubts about
I've been watching these tutorials, and this is by far the best one I've encountered so far. Really to the point, not trying to explain the basics of programming like variables and stuff (if you don't know how to use variables, try some basic programming tutorials first), or spend 15 minutes of a 20 minute video setting up a git repository or the color scheme of your IDE. Also props for the very clean code and structure. Keeping classes small and simple, each one with a specific task will make it much easier to maintain.
I'm not sure if he's going to make a tutorial on this but all you would have to do to make this is track the amount of zombies/skeletons/whatever mob the player has killed in a hashmap and once the player has reached a certain amount of kills, it spawns a custom boss. If you want custom AI, that's a different story. Hope this helped
Because you didn't really mention the other code in the program I thought it was unimportant... boy was I wrong lol. Anyways this video is great do you have other videos that add to this one?
Hello Jordan! i was following the tutorial and i stumbled upon a problem when i can break anything like its as if the blockbreakevent does nothinfg can you help?
And, Ik most of what will be shown is probably easily translatable to php but idk some methods just aren’t in php and php overall is kinda slow so idk the best way to optimize my code so the server doesn’t lag to fuck all when a game is running
I'm actually not at all familiar with Bedrock's server plugin API... I'll have to look into that :] Join our community Discord and please feel free to ask questions there along with suggest more ideas for the future!
One technique I quite like is making the GameState an interface instead of an enum. In this way you don't have to have lots of switches over your gamestate, since the gamestate itself will handle everything inside it's own class. This helps keeping the codebase more organised when it gets bigger. I'll also automatically register events for that GameState class when it gets active (and deregister them when the state is done ofcourse) to move some of the branching in seperate event classes to the GameState class itself. Again to make sure that all the logic for a certain gamestate is all at the same place and not scattered around your codebase.
I’ll have to try this one out... do you have an example repo with these techniques in detail? I’m curious exactly how you’ve implemented this pattern :]
I haven't got a public repo with such a system implemented. I do however have a pastebin which should get the idea across. Note that I called them phases instead of states and that the PregamePhase, which I included as an example phase, is far from being implemented well pastebin.com/9RCQZ770
This is actually genius.. will be using this style tomorrow on our Spleef stream!
Even 2 years later, your comment still helped me in finding a cleaner and more efficient of writing phases. Thank you for this crucial piece I had doubts about
you made some mix of the patterns State, Chain of Responsability and Mediator, I think
Straight to the point, not trying to explain programming basics, clean coding with a simple structure, amazing tutorial!
I've been watching these tutorials, and this is by far the best one I've encountered so far. Really to the point, not trying to explain the basics of programming like variables and stuff (if you don't know how to use variables, try some basic programming tutorials first), or spend 15 minutes of a 20 minute video setting up a git repository or the color scheme of your IDE.
Also props for the very clean code and structure. Keeping classes small and simple, each one with a specific task will make it much easier to maintain.
Thank you! :]
So underrated, keep it up!
Pretty nice! Please do more
Dude it's so useful. Thanks for it :)
thank you so much I always watch this video this helped me a lot on understanding more about the classes and functions excellent video!
I'm not gonna lie, you have a similar voice to Dream plus the same mannerisms in his vocab
No he doesnt
Lets get to 1mill without vids ur not gettin to 1 mil subs
If he spoke with a more excited voice he would’ve sounded like dream
Insane tutorial, thanks!
This was really helpful thanks!
Well made vid!
you don't have more videos explaning how to make a minigames in minecraft? i really need to learn
Really good video, like
Can you make a tutorial on how to recreate the slayer bosses from hypixel skyblock?
I'm not sure if he's going to make a tutorial on this but all you would have to do to make this is track the amount of zombies/skeletons/whatever mob the player has killed in a hashmap and once the player has reached a certain amount of kills, it spawns a custom boss. If you want custom AI, that's a different story. Hope this helped
how to make an update system so that we don't have to reload everytime or restart the console when we export the game
How do you get the files and stuff?
Because you didn't really mention the other code in the program I thought it was unimportant... boy was I wrong lol. Anyways this video is great do you have other videos that add to this one?
How can i manage game events with an arenas system?
Hello Jordan! i was following the tutorial and i stumbled upon a problem when i can break anything like its as if the blockbreakevent does nothinfg can you help?
Check if you registered the listener
So are all minecraft minigames plugins?
after all, someone who knows things and does not create a pig's code
More, please!
Any tips on how to make mini game plugins on the Minecraft bedrock edition? Specifically for the php server wrapper ?
And, Ik most of what will be shown is probably easily translatable to php but idk some methods just aren’t in php and php overall is kinda slow so idk the best way to optimize my code so the server doesn’t lag to fuck all when a game is running
I'm actually not at all familiar with Bedrock's server plugin API... I'll have to look into that :] Join our community Discord and please feel free to ask questions there along with suggest more ideas for the future!
Hi i recomend cloudburst its bassicaly bukkit for bedrock its written in java and the API is very similar
@@hungerfan552 ah, I only heard of pocketmine and nukkit. I’ll look into cloudburst
@@lack_of_awareness cloudburst is the new name of nukkit xd
Whats The program?
IntelliJ IDEA :]
@@JordanOsterberg thanks
01:47 just for me :)
Can you send the source code, please?
He literally sounds like Dream no cap
"enoom"
I don't want youtube premium thanks
Tutorial hasn't ability to have multiple parallel games at one. I can do it, but the usefullness of video is gonna sad :(
You usually have multiple servers if you want to run multiple instances at the same time
I can't hear u good get a micerphone
Bro you should get a speaker