Inactive [FUN] GolfCraft v1.5.3 - Play golf with a bow and golf(snow)balls! [1.2.5-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by Musaddict, Apr 10, 2012.

  1. Offline

    Musaddict

    I will be adding sign-selecting capabilities so that players can right click them to start that hole. That wont be till 1.4.0, which will probably be released saturday night. Tonight, im releasing 1.3.1, which contains some minor additions.

    Updated to 1.3.1 :) fixed hazards and their penalty points, added configuration with a few options, included distance of shots in broadcast messages, and fixed some aesthetic errors.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  2. Offline

    jvps3

    Nice plug-in.

    Been running it on a server I play on, and it's really fun. I'd also like to request a drop function. One of the holes on the server I play on is pretty high up and if someone misses the shot, they have to walk all the way back down. We'd rather this be a penalty for missing the green anyways. Maybe have a third item spawn with the player, and right clicking it would drop the ball at your previous ball location.
     
  3. Offline

    orange451

    Your video doesn't keep score accurately. I don't know if it's been fixed yet, but a water hazard is one in, two out (and you're supposed to drop along/near the bank on a line form where it went in, to where you initially hit it, unless you're hitting from the tee box).
    :)
     
  4. Offline

    liralmogadi

    Hey, Like I requested before, Please add the feature to add regions. I don't want this getting out of hand and going everywhere around my server, that would simply be annoying. I need the most basic region possible, please, and I'll get this plugin =]
     
  5. Offline

    jeffro1001

    If a ball is found in a water hazard or if it is known or virtually certain that a ball that has not been found is in the water hazard (whether the ball lies in water or not), the player may under penalty of one stroke:
    a. Proceed under the stroke and distance provision of Rule 27-1 by playing a ball as nearly as possible at the spot from which the original ball was last played (see Rule 20-5); or
    b. Drop a ball behind the water hazard, keeping the point at which the original ball last crossed the margin of the water hazard directly between the hole and the spot on which the ball is dropped, with no limit to how far behind the water hazard the ball may be dropped; or
    c. As additional options available only if the ball last crossed the margin of a lateral water hazard, drop a ball outside the water hazard within two club-lengths of and not nearer the hole than (i) the point where the original ball last crossed the margin of the water hazard or (ii) a point on the opposite margin of the water hazard equidistant from the hole.


    The penalty looks like 1 in, and 1 to drop.
     
  6. Offline

    orange451

    regardless, there is no penalty in the plugin :p!
    Thank you for the info however.
     
  7. Offline

    Niff

    Ah, that would work just as well, since they have to be at one of the holes to teleport then.

    thanks :D
     
  8. Offline

    jeffro1001

    awesome job
    Just grabbed 1.3.1 and I'll let you know what I find.
     
  9. Offline

    orange451

    You've inspired me to try to make a golf plugin :)
     
  10. Offline

    Musaddict

    I've made holes savable locations. The only way you can generate signs is if you're playing a hole. Once you're done golfing, or the server reloads, all of the signs magically disappear :) Keep in mind that each player can only have 1 sign at a time. They cant spam new signs.

    1.3.1 fixes the hazard scoring. Im going to be working on a "take a drop" command soon, but for now, the player stays where he last shot the ball.

    Turns out I'm free today. I'll be working on 1.4.0 (Signs to begin holes as an alternative to teleporting to each hole, different clubs (still theoretical)).

    Edit: I have proven my theory :) so 1.4.0 WILL include clubs. If you dont want clubs, you will be able to disable them in the config.

    Edit 2: would anyone be so kind as to give me a list of basic clubs, and their estimated velocity variances? I'm having a hard time really finding anything online. While I wait for an answer, I'll begin working on signs starting holes.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  11. Offline

    jeffro1001

    The rules of golf allow for a maximum of 14 clubs.
    Not everyone actually carries 14 clubs around, but that is the most you can have.



    The Clubs listed are longest hitting to shortest hitting.

    The ones I carry are:

    Driver ( 1 wood )
    Longest hitting club in the bag. Used off the tee. Very seldom used on the fairway unless your lie is perfect.

    3 wood : Used for very long shots from the fairway. Sometimes used off the tee.
    5 wood : Used for long shots on the fairway. its also a good utility club from the rough as long as your ball has a good lie.


    4 iron : Long shot club that goes about as far as a 5 wood, but used if your lie is bad ( rough )
    5 Iron :
    6 Iron :
    7 Iron :
    8 Iron :
    9 Iron :

    Pitching Wedge: Used for chipping onto the green ( when very close ) and getting out of sand traps.

    Sand wedge : used for getting out of a trap. Goes almost as far as a pitching wedge

    Putter: Used only on the green

    As far as giving a velocity goes, it's a little tricky.
    Theoretically, every time you swing a club it should be the same speed. The club length, and angle of the striking surface ( loft ) determine how far the ball will actually go.


    I think the best thing to do in the GolfCraft world would be to evenly stagger the arrow velocitys ( giving the driver the highest and putter the lowest.

    arrow distance is always going to be a changing variable since we can modify our clubs ' loft' by the angle in which we aim the bow.

    On a side note, looks like im going to have to build a practice range now to get a feel of how far each club will go. and then I'll have to hit the course and place some 200 150 and 100 yard markers.

    EDIT:
    I found a nice chart here:
    http://www.vaughns-1-pagers.com/sports/golf-club-data.htm
     
  12. Offline

    Musaddict

    Awesome thanks :)
     
  13. Offline

    orange451

    What you could always do, is check when a player fires an arrow, and only use the Yaw of the camera for the Vector of the arrow. You can then completely change the y-vector of the Arrow depending on the loft of the "club" :)
     
  14. Offline

    jeffro1001

    That is an interesting idea.

    Keep in mind that clubhead speed ( arrow velocity ) will be lower though as you progress through the clubs.
    A driver will have a faster club head speed than your wedge will have, with the same swing, since the club length is different.
    It wouldn't be a good idea to have your pitching wedge shoot the arrow as fast as your driver does.

    Also, we should definitely keep the ability to 'hit softly' by having the club selection set only the maximum velocity the arrow will go with a fully charged bow.

    I don't want to lose the ability to do ' tap shots '
     
  15. Offline

    Musaddict

    I agree, plus I only discovered changing velocities by accident :p I dont really know much about vectors and such.

    On a side note, play-signs are up to par (no pun intended). I made sure that players cant spam chat with "<player> has begun <hole>", instead it just sends the player "You have restarted <hole>." Due to the mechanics of everything, I had to reorganize permissions.

    Code:
    golf.play - allows players to use play signs, and enter golf mode
     
    golf.tp.play - allows players to use "/golf play [hole]" (teleport to the hole)
     
    golf.tp.sign - allows players to TP to their ball
     
    golf.tp.sign.others - allows players to TP other players to their ball
    I then added a new one for creating and destroying play signs "golf.sign". Keep in mind that play signs still teleport the player, so you can place them at spawn, or on the teeing ground, and they will be ported to the exact starting block.

    Now to work on clubs :)
     
  16. Offline

    jeffro1001

    I just had an idea, but I have no idea if it's even possible.

    It is possible to change the projectile type to a snowball while in golf mode?

    Meaning it would behave just like an arrow, but have the sprite of a snowball.
     
  17. Offline

    Musaddict

    I thought of this too, but have no idea how. I can ask my friend if he knows. I think that you can, but it's quite the work-around.

    jeffro1001 i got clubs to work, but it seems that if I use the exact estimates from that chart you gave me, then arrows from 1 wood - 7 iron at full strength despawn before they hit the ground (not registering a hit). I know for sure that arrows can be launhed 135m and still register a hit. You want me to set the driver to that and move the other speed accordingly?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  18. Offline

    Freakdk

    Musaddict

    If you make so that everything is configurable, like how much decrease / boost in power the bow would get when ladning on the fairway, rough, sand-trap and from the tee-spot, it would be REALLY awesome.

    As it is now, you would have to create gigantic golf courses if you wanted players to be unable just to "cheat" and shoot the arrow over mountains and stuff. I would really love you for adding this, because if you don't I'll the course will be way too big for players to walk to distance, if I wanted it to feel like real golf where you follow a specific "line".

    I hope you get what I mean, not natively english speaking ;)
     
  19. Offline

    Musaddict

    I'm in the middle of upgrading the speed boost system. The overall speed of the ball will be configurable in the next update :)

    I think I fully understand what you're sayin' now. Do you mean the pitch? Cause I try setting the pitch of the arrows and it's not working. Mind if you take a look at this thread I posted, see if you can spot the issue?

    http://forums.bukkit.org/threads/setting-the-pitch-of-an-arrow.70513/#post-1073217

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  20. Offline

    jeffro1001

    I realized that the distances in minecraft golf are a bit smaller than real life.

    I hit my course today to set up some distance markers 100 yard, 150 yard 200 yard and quickly realized that what looks like a par 4 hole actually measures out to what a par 3 would be.

    I think that the best thing to do at this point would be have the maximum shot you can take with your driver equal what the maximum distance you can shoot normally.

    Not only would a distance increase make the arrow despawn before it hit, ( like you found out ) it would force me to complete re-design my course, to take into account the increased distances.
    Thats the last thing I want to do, since most of my course are already in place and the current design wouldnt allow for me to expand.

    I say, tone down the velocity to what it was at the beginning, taking the maximum ( non modified ) bow shot as the top end benchmark for the driver and work down from there.
     
  21. Offline

    Musaddict

    Will do! just need to figure out the pitch problem im having, then I can release 1.4.0 :) but first, dinner!
     
  22. Offline

    hammale

    wow got to give u points for originality :D
     
  23. Offline

    Musaddict

    Solved my issue! Just about done with 1.4.0 :)

    Updated to 1.4.0! This update adds a lot more realism to the game.

    Added clubs! These clubs work mainly like they would in real life. The all have set angles that they WILL hit the ball in. This means you can't aim you ball like a gun anymore :p

    Also added hole-start signs for any golfer with "golfcraft.play" to use!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  24. Offline

    jeffro1001

    sweet! I've got some RL work to take care of this morn but I'll dl 1.4.0 and give it a go
     
  25. Offline

    Newpoman

    whats this. I get it quiet often
    2012-04-14 11:39:19 [SEVERE] Could not pass event ProjectileHitEvent to Golfcraft
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
    at net.minecraft.server.EntityArrow.F_(EntityArrow.java:195)
    at net.minecraft.server.World.entityJoinedWorld(World.java:1264)
    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:106)
    at net.minecraft.server.World.playerJoinedWorld(World.java:1246)
    at net.minecraft.server.World.tickEntities(World.java:1153)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:542)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.NullPointerException
    at musaddict.golfcraft.GcEntityListener.onProjectileHit_Func(GcEntityListener.java:189)
    at musaddict.golfcraft.GcEntityListener.onProjectileHit(GcEntityListener.java:52)
    at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    ... 10 more
     
  26. Offline

    jeffro1001

    Clubs are working great.
    There is one thing I think that needs tweaking though, and that's the putter.

    The 'fixed loft' setting needs to be removed for that club, allowing you to aim the angle yourself. ( like before )
    The max velocity that's set on it should remain though.


    All the other clubs should remain just how they are.

    Awesome job!!!
     
  27. Offline

    Musaddict

    Looks like you're running an out of date version. If you download 1.4.0 (or 1.4.1 here in a little bit), that error should no longer persist.

    Fixed :) Uploading now.
     
  28. Offline

    jeffro1001

    Awesome!

    Grabbin it now.

    I'm loving it Musaddict.

    Awesome job.

    The putter seems a little on the weak side, but it isn't anything that can't be worked around by using the wedge.

    I got the signs working now too, with 12 holes completed.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  29. Offline

    Musaddict

    Glad to hear it :) I can up the putter a lil. Also, Feed_Dante (contributor) is working HARD to figure out realistic mechanics, and getting snowballs to shoot out of bows. When we're done, snowballs should fire out of golfers' bows, AND they should bounce around before they create their sign.

    Never thought this much math would be involved :confused:
     
  30. Offline

    jeffro1001

    lol sweet. I cant wait to see it in action.
     

Share This Page