lod
New Member
I feel like a true programmer being a BASIC beginner
Posts: 16
|
Post by lod on Apr 16, 2018 11:38:13 GMT -5
Hi, I've found Gorilla, a classic for earlier BASIC programmer. I tried to open the bas (gorilla.bas) with Libery BASIC but the code looks quite diffenrent from the BASIC instructions I am used to. I can't launch it due to syntax error. I must use VMWare Workstation with Win98 and Qbasic to play it. What's so different between Qbasic and our dear Liberty BASIC? Actually I would like to make a gorilla game with sprites but I can't read nor understand the instructions I see in this bas.
|
|
|
Post by Janet on Apr 16, 2018 12:09:46 GMT -5
Can you provide the QBasic source? Is it in public domain?
|
|
|
Post by Chris Iverson on Apr 16, 2018 12:13:40 GMT -5
There are quite a few differences between QBASIC and LB. The biggest, and most impacting one, is variable types. LB indicates variable types with one suffix - a dollar sign($) - with one meaning: "string". If a variable has a $-suffix, it's a string. Otherwise, it's a number. The underlying type of number variables is not made explicit to the programmer, LB handles typing of those automatically. QBASIC, on the other hand, requires variables to be declared with specific types, and can use different suffixes to stand in for those types. INTEGER (%), LONG(&) integer, SINGLE(!) float, DOUBLE(#), STRING($) - or INTEGER if none. EDIT: Janet: According to en.wikipedia.org/wiki/Gorillas_(video_game), it looks like it was distributed along with QBASIC itself. That page provides a link to an archive of an IBM page that also hosted the code. web.archive.org/web/19990202113028/http://hem.passagen.se/hedsen/prg/games/gorilla.basLooks like there'd be quite a bit to do to update it for LB. At the very least, most of the graphics code would have to be changed/updated, I think.
|
|
|
Post by Rod on Apr 16, 2018 12:17:29 GMT -5
Ahh, it is Mayhem by any other name. The gorilla tosses bananas that explode in a city landscape. One gorilla tries to knock out the other gorilla. I would have a look at Mayhem.bas that ships with Liberty BASIC and just change the graphics.
|
|
|
Post by Alyce Watson on Apr 16, 2018 12:27:58 GMT -5
It was, indeed, distributed along with QBasic, as was a snake game. Both were fun to play and the code was fun to play with. It would be interesting to port Gorillas to Liberty BASIC. I don't know that sprites would be necessary, since it is a game very like Mayhem, as Rod mentioned.
|
|
|
Post by tsh73 on Apr 16, 2018 16:35:14 GMT -5
It is real challenge I would say. Good fun too - running programs in QB and LB side-by-side grokking how it goes (and why it doesn't).
|
|
|
Post by Alyce Watson on Apr 16, 2018 17:54:34 GMT -5
It is real challenge I would say. Good fun too - running programs in QB and LB side-by-side grokking how it goes (and why it doesn't). Anatoly, you have referred to my husband's favorite book. Grok on Wikipedia
|
|
|
Post by Rod on Apr 17, 2018 14:02:50 GMT -5
I am out of time, I pulled together a gorilla and a banana, the rest is up to you. I'm off for a one night break with Janette and computers are not allowed. I need to try to be "interesting company". Gorillas and flying bananas don't cut it for candle lit dinner conversation. But I'll be back! Gorilla
|
|
|
Post by Alyce Watson on Apr 18, 2018 6:26:32 GMT -5
Rod, very nice graphics! It looks like you are going for more of a "Jungle Hunt" type game. Love it!
I found a Youtube video of the original "Gorillas" game play, for anybody who is unfamiliar with it. If you look at this video, then load Mayhem that ships with Liberty BASIC, as Rod mentioned above, you'll see that they are very similar.
|
|
|
Post by Rod on Apr 19, 2018 10:49:24 GMT -5
|
|