Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mini Golf Starter Kit

Discussion in 'Assets and Asset Store' started by Aiursrage2k, Apr 20, 2012.

  1. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    For the sky you should try changing the texture compression try putting it 16 or 32 bit. I will check to see if the fire button is not working.


    For the windmill basically the spinner is not centered. Add a triggerbox to the spinner, then add the script spinblade


    http://inanegames.ca/SpinBlade.zip


    Okay also download and replaced golfEditor script. Now all you should have to do is open up the scene then just hit createAllScenes, it will auto-regenerate all the scenes. The problem is nested prefabs, hopefully unity will fix this soon.
    http://inanegames.ca/GolfEditor.zip
     

    Attached Files:

    Last edited: Dec 6, 2013
  2. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    I am having two problems still.

    -When I make a build and have all the holes I want like say for example 9 different holes. http://www.kongregate.com/games/CodyG81/awesome-mini-golf
    When the hole is finished the only options I see is replay or main menu. How do I make it show the score and then go to the next hole.

    -I'm also having difficulties following your instructions about golf editor. Well I did copy and replace the new golf editor. But when I go to like window, then golf editor. But when I hit it just says "shows progress" and never really moves. I've waited like 20 mins one time. Am I doing this process correctly.



    Thanks again for your help.
     
  3. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    No it should happen almost instantly what scene are you building it from? Should be the parent scene not any of the created scenes.

    When you are building the scenes you need to actually add them, it looks to me you only added 1 scene (or its set to practice mode).
     
    Last edited: Dec 9, 2013
  4. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    If I can't figure it out, is there any chance of an update anytime soon on the asset store so I could just go back to making levels? Thanks and you're about to see one cool golf course soon :)
     
  5. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Hi, can you explain to me how to find the "parent scene". I'm almost done with all the holes, but still can't get it to work on android.

    Also, if you have time could you explain how I get to name all the holes, like for example I want to add a little bit of information about each hole, like in this picture.

    $fdafdasfdfads.png
     
  6. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    I seem to have discovered another problem. When I change the song from the jazz music to something I pick it distorts the sound when the camera or ball moves.

     
  7. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Can you help me out with a little problem I'm having. I'm trying to have spinners like you have in your game, but I can't get mine to work. I make the sphere, flatten it out. Remove the sphere collider and add a mesh collider, then use the material "grass" for it to have interaction. But it still doesn't interact with the ball.

     
  8. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Yeah it seems to me you are using a 3d music track try changing the import settings to 2D
     
  9. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    For the spinner I am not sure what you are doing with it or what its supposed to do. If you are infact moving or rotating a mesh collider make sure to use "convex" shape otherwise it wont work. Also if you want it to interact with the ball you should instead use torque to spin it rather then rotating the object via transform.
     
    Last edited: Dec 23, 2013
  10. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    To name the hole all you have to do is fill out the arrays in gamescriptReg or gameScriptMobile gameobjects. Once you are done modifying it just hit apply.

    If you look at the folders you can see there the scene called hole05. Then there is a directory called hole05, all the children will get created in the child folder "hole05", the parent is hole05.
     

    Attached Files:

    Last edited: Dec 23, 2013
  11. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Thanks for all the responses.

    Can you tell me how to change the import settings to 2d for the song.

    Could you also explain torque for the spinner. What I'm trying to do is if the ball were to hit the spinner it would make the ball shoot off in that direction.
    So I made a sphere, Game Object, Create other, and clicked Sphere. If I make it convex it makes the game run really slow.
    Again could you explain torque to me, please.

    I'm also don't understand the parent scene, golf editor thing for Android. I actually got something to load up and thought I got it working but did a test and it still wasn't working.
     
  12. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    I figured out the import settings, for the song. YES!

    But I'm still having trouble getting the power/swing mechanic to work on Android. Could you please explain what to do.
     
    Last edited: Jan 6, 2014
  13. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Is there any chance of a quick update to fix it because it's not working on android.
     
  14. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Last edited: Jan 17, 2014
  15. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Alright, so I copied and pasted the ball script and deleted the other one. But I'm getting this error now:

    NullReferenceException: Object reference not set to an instance of an object
    GameScript.onEnterState (System.String state) (at Assets/miniGolf/Scripts/GameCode/GolfScripts/GameStates/GameScript.cs:83)
    GameManager.enterState (System.String stateID) (at Assets/miniGolf/Scripts/GameCode/GolfScripts/GameManager.cs:15)
    InitState.onGUI () (at Assets/miniGolf/Scripts/GameCode/GolfScripts/GameStates/InitState.cs:117)
    BaseMenuState.OnGUI () (at Assets/miniGolf/Scripts/MainMenu/BaseMenuState.cs:108)

    Basically what I see, is that after you hit play from the menu, and go to hole one it's not circling the hole like it was before, it's just over some random spot over the water.
     
  16. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Well I will make an update in a few days it will use new GUI, GUI textures rather then unity GUI as well as a cartoon skybox and water to give a consistent theme.
     
  17. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    This is awesome news. Can't wait to test :)
     
  18. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Okay its updated so that should be the last update for a while hopefully unless something goes wrong.

    $golf2.png
    $golf3.png
    $golf4.png
    $golf5.png
     
    Last edited: Jan 21, 2014
  19. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    $minigolf error.png $minigolf error.png

    I really, really love the new art. I'm still getting the same error though. Like before I updated it's not spinning around the ball anymore since I updated the ball script. Also can you tell me what font you used in Photoshop so I can change it for mine :) Should I change out the ball script? Thanks again.
     
  20. BBRome

    BBRome

    Joined:
    Jul 3, 2012
    Posts:
    373
    hello,

    for a long time I observe your updates, you are always among the first in the asset list, they are real updates or are a cunning?
     
  21. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    If the version changes then its an update. If you dont have 2.0 then its an update. :confused:

    Asset store doesnt treat a price change any differently then an update -- unlike the app store where you can change whenever you want without it counting as an update. So if you want to "simulate" a sale you need to change the "price" 2 times -- each time its going to count as an "update" -- maybe they should change the way it works so only AN UPDATE modifies the newest list -- but its not my system.
     
    Last edited: Jan 22, 2014
  22. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    $golf2.png

    I tried to update the hole prefab in golf editor under window and got this message.
     
  23. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Its missing the ball game object
     
  24. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    But I have a ball in there, is there anyway I can send you my file project?
     
  25. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Hey were you able to download the new file yet?
     
  26. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Hey I know you're probably really busy, but if you could help me out man that would really help me out so much. I'm in a bind, frustrated out of my mind because of a lot of things and really could use your help. If you could get back up with me some time that would put me at ease so much.
     
  27. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Please message me soon
     
  28. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Good News

    I got everything working with new updated look! Now I just have one question, how do I change the camera view to like where it was on the old build where it was way closer. Now it's so far back.

    $minigolfquestion.png


    What do I have to change to make it like before :)
     
    Last edited: Feb 11, 2014
  29. adamh1

    adamh1

    Joined:
    Apr 10, 2012
    Posts:
    124
    hello just brought it looks great, is there any support or help guides available now? the readme thats included just links to 2 redundant videos
     
  30. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835

     
    Last edited: Mar 29, 2014
  31. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Okay next update I am going to add in 2 player multiplayer using photon networking (since I finally have some experience with that -- and its not that hard after all) and I will bump the price to $35, but when that happens I am not sure since it will take a while and I have a job right now.
     
    Last edited: Mar 27, 2014
  32. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Okay already got the 2 player multiplayer version working waiting for some new art (just a few new menu things) and I will add some cases for example what happens when a player leaves, added a win, loss or tie system and might add a levelling system to keep them coming back. I will add some kind of timer incase the other player is taking "too long"
     
    Last edited: Mar 28, 2014
  33. Sh4d0w1021

    Sh4d0w1021

    Joined:
    May 6, 2014
    Posts:
    1
    I am very new at unity but I purchased your golf kit and I am wondering how you implemt a course selection? also I am Modeling my own courses but when the ball hits a wall there is no sound. What script determines the sound? i cannot find a script attached to any of the premade scenes attached to the wall?
     
  34. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    You can pick up Photon networking PUN for only $45 today, normally $90. Save $45 that means you wont need to buy all the pro licensee to make a multiplayer game.

    I am planning to add a multiplayer bowling kit this month as well to asset store for $25. Next month I want to add a croquet one etc
    https://www.assetstore.unity3d.com/#/content/12080
     
    Last edited: May 8, 2014
  35. RedTofu

    RedTofu

    Joined:
    May 9, 2014
    Posts:
    25
    Hi, I had purchased your kit, good job there! :D
    As I see in the demo there is only one course with 18 holes and when you press START it only runs through that course.
    May I ask how do I add other courses?
     
  36. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Okay so you would have to create 18 more scenes, add them to the build settings after the current course.

    Then you would have to add another button somewhere in the main menu, in the command field call it command2.

    In the network event class add the following to onButtonPress function

    In connectmanager add the following function.
    In the gamescript class change the function getHoleNomUsingCourse to the following.
    $newcourse.png
     
    Last edited: May 9, 2014
  37. RedTofu

    RedTofu

    Joined:
    May 9, 2014
    Posts:
    25
    Thanks for the quick reply! :D
    So I understand this as "only if two players had chosen the same course they will be paired to form a match"?
     
  38. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    That was for adding a multiple course for single player, its either going to start at scene1 or scene 19, 37 (whatever).

    If you wanted to do it for multiplayer you need make sure each player is loading hte right scene. So you could allow the master client to choose the course somewhere else, then you would need to send an RPC call to the client(s) and tell them which course to load. So you would just have to set the clients m_levelToLoad before calling handleMultiplayerStartRPC in the connect manager.
     
  39. RedTofu

    RedTofu

    Joined:
    May 9, 2014
    Posts:
    25
    OK got it. Thanks.
    and so they should be

    public void setCourseIndex(int courseIndex)
    {
    m_levelToLoad = (1 + HOLES_PER_COURSE*courseIndex);
    }

    AND

    public int getHoleNomUsingCourse()
    {
    int holeIndex = Application.loadedLevel %HOLES_PER_COURSE;
    return holeIndex;
    }

    if I set the holes per course to be another number right?
     
  40. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Yeah basically, but you would have to modify score state because its set to work with 18 holes a course.
     
  41. RedTofu

    RedTofu

    Joined:
    May 9, 2014
    Posts:
    25
    yeah I saw many loops with i<19...Thanks.
    And I found that I can't edit maxNomStrokes = 8
    Even I set it to other numbers it is still taking big 8. And I cannot find in the codes where else I have to set it.
    Would you tell me where should I edit?
    And one more... is shotClock = 60; also somewhere to edit beside Connectmanager?
    Thanks very much and sorry for the lengthy question! :)
     
  42. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    If you wanted both clients to be able to decide which course to use you could do something like this. I didnt try it but something like that should work. So if you had 2 multiplayer buttons then it would simply

    NetworkEvents

    ConnectManager

    ####
    The shotclock is set to 60 seconds in the connectmanager. Its a public variable which means you have to modify the prefabs in order to get it. So there is one in the mani menu scene and the other one is in the resources folder.

    The same thing for the maxNomStrokes found in the GameScript class, its a public variable which means you have ot edit the prefab in order to get it. There are two one for mobile and the other for non mobile, they are in the prefabs folder gameScriptReg, and gameScriptMobile.
     
    Last edited: May 9, 2014
  43. RedTofu

    RedTofu

    Joined:
    May 9, 2014
    Posts:
    25
    Wow thanks very much! That saves a lot of time! Thank you!
     
  44. RedTofu

    RedTofu

    Joined:
    May 9, 2014
    Posts:
    25
    Hi, other than score state, where should I edit if I want other numbers of holes per course?
    I tried editing but it generates some errors sometimes. Would you list them all?
    And where should I remove the scores for other holes while I have say, only 6 holes per course? It is showing some random scores for hole number>6.
    Thanks!
     
  45. alvinlim

    alvinlim

    Joined:
    Jun 18, 2013
    Posts:
    4
    Hi. I am newbie in Unity. I had purchased your golf kit but don't know how to disable multiplayer. Please help me. I can't run the scene because it keep connecting to photon. I don't want to use photon.

    I try to run your oldproject but there are many bugs in the project such as ball gravity is unrealistic and button event not functioning. Please guide me. Thanks.
     
  46. RedTofu

    RedTofu

    Joined:
    May 9, 2014
    Posts:
    25
    Hi, thanks for your previous help. They had been very helpful.
    My project was finished and I am testing it on devices now.
    I found that the sensitivity goes up a lot than when it is played on Mac.
    Would you show me how should I adjust the sensitivity in the game? (as if when the players scrolling on the screen to change angles)
    Thanks very much!
     
  47. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441

    Attached Files:

    Last edited: May 30, 2014
  48. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Hey I got to try the online part and it technically works, but you can't see the other player play. The timer works as well, but the other player can just go and play the other hole ahead of you and it just feels like single player with a timer. I was kind of hoping we could at least see like a ghost ball or perhaps they could take turns or something. Please get back up with me. Thanks
     
  49. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    Also there needs to be a "cancel stroke" button. Some of my stuff is timed based and if you mess it up initially it's almost impossible to get it corrected.
     
  50. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Okay im going to make this free because i think i will make more money off the ads then selling it.