[RESOURCE] [FREE] MiniGame Framework (not intended for live servers)

Discussion in 'Resources' started by unenergizer, Mar 16, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    unenergizer

    Hello BukkitDev!

    My name is Andrew, and I am a "new" programmer. I have been learning programming for the last 15 months now. I am not a pro. I am very much a noob and I know I make noob mistakes. That being said, I am releasing the code I worked on for a few days. This is my first plugin, and because I don't know enough about Bukkit, I don't want to use this in a production environment. However, it does work and does run bug free(mostly). I hope someone can use this code to make something worth wile.

    Source code:
    https://github.com/unenergizer/MPMiniGames

    Note* All the "magic" happens in util\GameManager.java

    Video Demonstration (2:32):
    HTML:
    https://www.youtube.com/watch?v=7fecPDGCMOk


    This plugin currently supports:
    0:01 Spawning player in a lobby.
    0:01 Player added to team.
    0:16 Random lobby tips
    0:17 Countdown (with scoreboard support)
    0:37 Timed countdown.
    0:47 Plugin spawns players in arena world based on their team. Then shows game info.
    0:48 - 1:00 Player spawns in arena but cannot move off block.
    1:01 I try to move from the block and get (stuck)
    2:08 This handles player respawns, but does not show "Death screen"
    2:17 game is over, announce who won, then send them back to lobby and put them in a team
    and much more.


    I hope this code helps people. It may show you things to do, it may show you things Not to do. I will leave this thread open to discussion. Please don't bash me for my coding mistakes. I am new. Most people release little plugins as their "first plugin." I tried to make a minigame as my first. So be nice, I'm new and I do try. :D

    I plan on rebuilding the framework, and my advice, even though I'm new, would be to use a design pattern that fits what you need. There is no design pattern here.
     
    jusjus112, KingFaris11, TryB4 and 4 others like this.
  2. Offline

    The Fancy Whale

    unenergizer Nice work you should make a lib out of this :)
     
  3. Offline

    macguy8

    TigerHix likes this.
  4. Offline

    xTrollxDudex

    unenergizer
    This isn't exactly "minigame" depending on who you talk to. Correct me if i am wrong, but this looks to me like a server wide 2 team gamemode, not neccessarily a "minigame" ( if you talk to me, I'd refer to it as a world based arena gameplay ).
     
  5. Offline

    unenergizer

    I do not wish to continue working on this build. I am going to start something fresh and new with the things I have learned from making this.

    Technically I guess you could call it that. It's just some free code you can use or look at. I won't use that exact copy in my server, but other people might find it useful. Might as well give it away instead of just deleting it.

    http://en.wikipedia.org/wiki/Mini-game

    Technically this is a mini-game. But who cares really. Call it what you want. I call it "unfinishable." There is a better structure to follow when creating this type of game, I will figure that out in next version. Yes this was designed to function as a server wide game. While the programming doesn't exist in it currently, it was being built to dynamically load maps, kits, and more. However I am not satisfied with the way it is going. I feel like it is to complex requiring you to search over a few java files to figure out what is going on. I want to take a more MVC approach. Build a utility set that is dynamically called based on events. Thats the idea anyway.

    -une
     
  6. Offline

    Ultimate_n00b

    Nice format.. looks a tad like Mineplex's. Not that I can criticize though.
     
  7. Offline

    TryB4

  8. Offline

    unenergizer

    It's okay I did copy them. I am not ashamed to say it. They are the absolute best Minigame experience I have ever played on. They have done really well for themselves.

    When a car designer wants to make a Porsche, he may look at other sports cars of similar shape and size. He will not however look at a Volkswagen Beetle. Coders are the same I believe. If I want to create something, I will find the best idea out there to get inspiration from. That includes finding the best coded and most popular service.

    I plan on making minigame structure based on the idea that mineplex used and thesurvivalgames network used. These aren't new ideas, just Mineplex did them better. What I make will not be "Mineplex," it will have original games and some that have been around for a long time. Deathmatch, spleef, capture the flag, all those old ones. Will change them up a bit and I have some plans that no server has done yet. I would rather not talk about those though. :D

    "Learn from the best, or die like the rest." Is the saying I believe.


    Thank you!
     
    bobacadodl likes this.
  9. Offline

    Phasesaber

    Couldn't put it any better myself.
     
  10. Offline

    AoH_Ruthless

    Phasesaber
    Necropost .., even if it is a resource :p
     
  11. Offline

    XgXXSnipz

    unenergizer ok Im confused on how to make maps, does it automatically give you a map? because it teleported me to a forest and my server is a test server so im only one on it, cant test sadly also please please please add an ability to create arenas and somthing you may or may not of thought about, what if the server owner is running 1 server then that means when ever someone joins the server they are put into a game, thats why you should add an ability to create arenas and then make lobbys for that arena, I saw your code from what I could tell... shouldnt be hard for you but please do it I would greatly appreciate it :D thanks
     
  12. Offline

    unenergizer

    First understand this code is just available for people to learn from. I do not intend on updateing this code base because it is highly inefficient. This code assumes you have programmed what map is going to be loaded next. Also this code is intended to run on a multi-server setup (with bungeecord). That is why it is a "server wide" mini-game.

    Currently I have been developing a custom mini-game framework. This code is private. It is over 10k lines long. The code in that version is based of some of the methods in this code that I released for free here.
     
    TigerHix likes this.
  13. Offline

    TigerHix

    Nice work. I'm currently writing one on my own, and I'm sure I can learn some from your experiences.

    Though, I'm thinking instead of using a fixed GameManager, maybe create another Game class which has methods like join(Player player) --> and then run codes that run when players join, start() --> and then run codes when the game started, etc, which is the most basic parts of a minigame. Then let's say I want to make a Spleef game. I just have to override the start() method, and super.start(), and teleport players to arenas & give tools. Maybe that will be more likely a framework, I guess? :p
     
  14. Offline

    DuskFireHD

    Wow nice work dude that didn't just teach me how to make a minigame it also teached me how to make a arcade type minigame that's switches between games :) Love Your Work!
     
Thread Status:
Not open for further replies.

Share This Page