About Monkey 2 › Forums › Monkey 2 Projects › another one for monkey bananas?
This topic contains 26 replies, has 6 voices, and was last updated by
Jesse
1 year, 6 months ago.
-
AuthorPosts
-
May 2, 2017 at 11:31 pm #8099
here is the source code to my pool game I made for Monkey1 converted to Monkey2:
https://www.dropbox.com/s/8qz1qozigqq8ytn/billiardMX2.zip?dl=0
currently only works with the recent update to the development branch.
it might not work on windows machines with a problem discovered on a previous game where the Pi variable was not initialized. in that case replace line 3 and line 4 of Common.monkey2 with this:
Const RTA:Float = 180.0/3.1415926535897931
Const ATR:Float = 3.1415926535897931/180.0@Mark, You can add it to Monkey2 bananas if you want.
May 3, 2017 at 9:14 am #8100Top stuff Jesse! I’ve always wondered how you did your ball rolling animation! Some pretty full on calculations there, how did you come up with all that!? I think I would have cheated and used heaps of images!
May 3, 2017 at 3:42 pm #8102Thanks therevills,
That is a collection of some of my life skills. I have been doing 3D in 2D since old-school days.
one of my first books on computer programming was a tutorial on how to do 3d animation before hardware 3d acceleration was available. It thought me how to do a 3d CAD program from scratch and that’s where I learned how to do 3d on 2d. I did several demos for the old DarkBitFactory website several years back using a 3d rotating ball. Although, the application of the 3d rolling ball was from a tutorial by Sol that codes with SDL in C. The vector math is something I recently learned from a couple of flash tutorials, some which are no longer available. The ball collision and response is something I combined from several different tutorials available in the web.I have tried to keep everything in object format so the objects can easily be ripped from the game and used in other projects. hope It’s useful to others.
May 4, 2017 at 6:13 am #8104I’m getting a “Unable to load poolatlasb.png” error and I could not find the file in the products/assets directory (found in poolmod/data though).
Tested on W7May 4, 2017 at 11:46 am #8106Thats weird. are you using the latest monkey2 from the repository’s development section?
Is anybody else getting that error?
May 4, 2017 at 5:01 pm #8107Yep latest develop + updatemx2cc
Will rebuildall once again just to be shure..
May 4, 2017 at 11:02 pm #8108Recently there have been problems specifically with windows. Sad part is, I don’t have a Windows machine so I really can’t figure out what is going on.
May 5, 2017 at 11:13 am #8113I needed to use updatemx2cc.bat to have something to play with.
BTW, nice examples! it’s quite a full game itself! Very good (and thanks for sharing the code)
surely to add to ‘bananas’
May 6, 2017 at 12:49 am #8117You are welcome degac. Glad you like it.
May 7, 2017 at 8:44 pm #8128re-downloaded the dropbox link and now runs!
In debug it sometimes crashes after the balls take some kind of accelerations.
AND I could not put a ball in a hole! Is it normal?
Looks quite good!
May 7, 2017 at 11:30 pm #8130I thing you need to add those two lines that I mentioned in the first post.
May 8, 2017 at 9:26 am #8132Had the same issue as abakobo, changing the lines fixed the issue. Didn’t see the issue submitted on GitHub, so I submitted one.
As for the game, cant seem to figure out the controls. I would aim the cue, then press “Power” button, but that would just move the cue stick, so I preposition and try again. After about 4 or 5 tries, when I try to re-aim the cue stick, it shoots instead. I seem to get it to work correctly in about 1 of 4 shots. Is there something I’m doing wrong?
Otherwise, great game
May 8, 2017 at 11:20 am #8135at the beginning of the game you can move the ball to where you want to break from. then press the shoot button so it can let you select the angle and shooting power. You need to press the button and pull back away from the ball in the direction of the stick then release the mouse button so it can shoot.
May 9, 2017 at 12:11 am #8138Looking very good, but acting a bit weird here…
In a vs computer game, sometimes when its the computer’s turn it just seems to go nuts! Balls appear to warp to random places on the table and it soon crashes. Not sure, but it may be running the game at ‘full speed’ without rendering for some reason.
Also, can’t seem to sink a ball either!
May 9, 2017 at 12:15 am #8139Ok, found the 2 line fix above and it seems to have helped!
-
AuthorPosts
You must be logged in to reply to this topic.