another one for monkey bananas?

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.

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #8099

    Jesse
    Participant

    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.

    #8100

    therevills
    Participant

    Top 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! 🙂

    #8102

    Jesse
    Participant

    Thanks 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.

    #8104

    abakobo
    Participant

    I’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 W7

    #8106

    Jesse
    Participant

    Thats weird. are you using the latest monkey2 from the repository’s development section?

    Is anybody else getting that error?

    #8107

    abakobo
    Participant

    Yep latest develop + updatemx2cc

    Will rebuildall once again just to be shure..

    #8108

    Jesse
    Participant

    Recently 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.

    #8113

    degac
    Participant

    I 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’

    #8117

    Jesse
    Participant

    You are welcome degac. Glad you like it.

    #8128

    abakobo
    Participant

    re-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!

    #8130

    Jesse
    Participant

    I thing you need to add those two lines that I mentioned in the first post.

    #8132

    TomToad
    Participant

    Had 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 🙂

    #8135

    Jesse
    Participant

    at 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.

    #8138

    Mark Sibly
    Keymaster

    Looking 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!

    #8139

    Mark Sibly
    Keymaster

    Ok, found the 2 line fix above and it seems to have helped!

Viewing 15 posts - 1 through 15 (of 27 total)

You must be logged in to reply to this topic.