Minecraft Game Framework

Discussion in 'Spigot Plugin Development' started by SubSide, Jun 3, 2015.

  1. So as I have mentioned already in a couple of threads, I made a GameFramework for minecraft.
    Now my goal with this is to make it for plugin developers as easy as possible to make minigames.

    I am currently using this to make various minigames for a couple of customers.

    My question is, would you use it?
    And/or what would you like to see in it?

    It is opensource here: https://github.com/SubSide/GameFramework
    An (unfinished) example: https://github.com/SubSide/Spleef
     
    • Like Like x 1
    • Winner Winner x 1
    • Friendly Friendly x 1
  2. Yes, I would use it if it's going to have proper documentation.
     
  3. Looks intresting to. Maybe I gonna use this if there are docs
     
  4. This would be a possibly I make would use, but I like to make the "core" of a plugin, so I think I would create my own ;) this will I find really much fun in doing ;) but I'm sure someone will use it, specially if you make it so easy to use so new plugin devs can use it ;) many of them will make mini games ;)
     
  5. Well, it still requires quite some experience.
    It's not Gamemaker what I got here xP
     
  6. Don't get it.. :p
     
  7. Yeah I know :p but there are long from using your framework to make one by them self ;)
     
  8. You should learn how to use generics instead of unbounded wildcards, it will make your code far easier to use.
     
  9. In my minigames I always use an ArenaManager class for registering all the arenas on startup and disabling and ending them on disable and an Arena class that has all the files per arena in it and handles player joining, leaving, the game itself, timers, listing stuff that needs to be stored and so on. I personally find it extremely good to use.
     
  10. Could you explain? I mean, I am using generics:
    class RunningGame <T extends GamePlayer<?>, U extends Game<?, ?>>

    I can't make it more indepth, it will just be infintely long, as gameplayer contains runninggame xP
     
  11. So I do want to give you guys some indepth information what my gameframework has to offer:

    multiple games at once!
    Every RunningGame object is a different game. They are ran appart from each other.
    And since you are just doing stuff in the RunningGame object, you don't have to actually handle that by yourself.

    Compatibility with other games!
    No worries that the player might be in another game, my framework takes care of it.

    Hiding players, private chat.
    You can make it so all players will be hidden, and the chat is private. It almost looks like you are in a separate server!

    Easy functions!
    onPlayerJoin, onPlayerLeave, onTick, onStart, just very easy function you can just override to make them work.

    Lobby system.
    I built in a lobby system, with signs and everything. It's very easy to use, and allows you to give additional data so for example, for different maps, levels. or different gamemodes!
     
  12. Unbound wildcards are question mark generics. You shouldn't use then unless you absolutely have no idea what someone is going to use. If you're supposed to expect instances of your framework in certain places, then you should be using T, S, U, V.

    Like, in GamePlayer<?>, what is the ? supposed to be, since it's unbound (meaning its not a T extends Type or ? extends Type), you can literally pass anything you want and thus incorrect functionality may be introduced.

    You should set it up like this (I know this will probably be wrong, but I'm just showing an example of bound generics):
    Code (Java):
    class RunningGame <T extends GamePlayer<S extends GameProfile>, U extends Game<U extends ScoreManager, V extends SomethingElse>>
    This way the methods don't return a bunch of ? types and instead take on the information from T, S, U and V.
     
  13. The problem is, that it will propably end up with another wildcard issue. as the GamePlayer has the RunningGame as generic.
    So I would end up with RunningGame<A extends GamePlayer<B extends RunningGame<C extends GamePlayer<D extends RunningGame

    Somewhere, I need to end up with a global generic (<?>)

    And I don't need any more information, since the generics I have are already used to create games and such.

    I basically don't need more information.
     
  14. you wink alot

    Anyway... I may use it one day to try it out.
     
    • Funny Funny x 3
  15. He's got something in his eye ;). You could possibly add hand handing but then again you could use scoreboards teams.
     
  16. few things. one why are you writing it for java 6 still? java 7 is already on EOL, which means people should be on 7 already if not on 8.
    also TAB CHARS NONONONONO. those are death.
    also there are way more nested scopes than necessary.

    haven't looked at the code, so cant comment on that
     

  17. I think there is no reason to upgrade to Java 7 for this plugin, right? Also, old macs can't upgrade, so if someone has one Java 6 is better. I think Tab Chars are ok, but that's just taste I guess.
     
    • Like Like x 1
  18. Why can't old macs upgrade? Why should you even run a minecraft server on mac?
     
  19. If you can't make your own framework/api as a core for mini games, you shouldn't really be making them.