I am learning PHP and PocketMine API, I know create normal plugin for example Auth Plugin ,but what if I want to create minigame I already tried ,but everytime there is any problem because i dont know how to correctly do it If anyone know about any good wrtitten minigame you can give me link here to help me with minigame development Thanks
Don't start making mini games right away, if you're beginning to learn php / & the basic. Start with something more easy, don't jump from A to Z... Go through all them, one-by-one.
If you're having problem designing the logic and the map of the code, try to draft a mind-map on a paper first before coding. It could help yourself know what you're doing.
Making a minigame isn't hard. Making a good minigame plugin is hard. You need a graceful system for managing what players are in which minigame, whether the minigame comes in cycles of Matches (e.g. a survival games match), and if yes, how to manage the cycles, how to let players queue for matches, etc. It's possible to make one with minimum knowledge, but if you want to make one that you can easily, for example, change some mechanism for it after you completed most of the code, you need better planning. Good planning always comes with experience, and even experienced developers need multiple attempts to rewrite a large plugin. Maybe not really need to rewrite the plugin, but every time they rewrite it gets a bit better. Here is part of a very large plugin. It should be able to work as an independent module, but if you aren't experienced in development enough, you may not understand it well enough. But if you have enough experience in object-oriented programming, this match-based plugin (for spleef) is a good model to start with.
I started creating minigame which name is TeamSkyWars you can see here: https://github.com/ImKyd/TeamSkyWars---PocketMine/ Is that good for starting new minigame? And can I use var_dump to get number of spectators from array?
I would recommend starting with a smaller minigame, but it works if you think it does. If you want to find out how var_dump works, why not try it out yourself?