Basic programming

Discussion in 'General Mac Discussion' started by Stormyguy, Jun 14, 2002.

  1. Stormyguy macrumors regular

    Joined:
    Apr 15, 2002
    Location:
    UK (Sussex)
    #1
    Hi all

    I am wanting to create a text-based game, rather like the old 'adventure' text-based games that I used to play on my Commodore VIC20 years ago (eeks - that was a long time ago).

    I used to be able to program these machines in BASIC language which was exactly what it sounds but perfectly adequate for what I want to do - user inputs, random numbers for different situations, subroutines etc etc etc.....

    Can anybody recommend a suitable program or is it perhaps something I could do with Applescript?? If it can cross-platforms to Peecee to (so that I can share it with pals) then that would be much better (guess that rules out Applescript)??

    If there is the option to have any graphics or 'buttons' to click on that maybe an enhancement I could build in but my programming skills may not stretch that far!!!!!!

    Thanks
    Danny
     
  2. OSeXy! macrumors regular

    Joined:
    Jan 17, 2002
    Location:
    London (or virtually here)
    #2
    If you want it to be cross-platform, do it in VB (Visual BASIC) or VBA (Visual BASIC for Applications). With VBA You could do the whole thing via a macro in Word or Excel, and anyone on a PC should be able to run it, too. It's fairly easy to pick up if you've done anything Object-Oriented before. Yes, it's M$, so it has it's built in drawbacks, but it does give you the tools to make your own GUI dialogs, etc. and if you're comfortable with BASIC syntax, the learning curve isn't too steep...

    There are some good mac-only freeware/shareware BASIC compilers around, if you don't care about using your game on a PC...

    Good luck with the project!
     
  3. firewire2001 macrumors 6502a

    Joined:
    Apr 2, 2002
    Location:
    Hong Kong
    #3
    what osexy said is right.. however theres a basic compiler called "chipmunk BASIC" that will run on both pcs and macs..

    http://www.nicholson.com/rhn/basic/

    if you look around for a minute youll see that theres a pc version..

    good luck!
     
  4. ftaok macrumors 601

    ftaok

    Joined:
    Jan 23, 2002
    Location:
    East Coast
    #4
    Compilers for BASIC?????

    Holy smokes! What's this world coming to? They have compilers for BASIC now. Has BASIC become so advanced that they need compiling?

    I'm from the old-school. This is the sort of stuff that used to amuse me.

    10 LET A=0
    20 PRINT A
    30 LET A=A+1
    40 GOTO 20

    RUN

    (and watch the fun for hours)
     
  5. Stormyguy thread starter macrumors regular

    Joined:
    Apr 15, 2002
    Location:
    UK (Sussex)
    #5
    Chortle!

    Yes - that's the sort of thing I need to do!! Back to the grass-roots!

    Thanks for the above suggestions - I'm going to initially have a crack at the Chipmunk thing - let you know how it goes!!

    Danny:D
     
  6. Beej macrumors 68020

    Beej

    Joined:
    Jan 6, 2002
    Location:
    Buffy's bedroom
    #6
    Re: Compilers for BASIC?????

    LOL :D I'm sure that would be very exciting. Like the C program

    int main()
    {
    while(1) exit(1);
    }
     
  7. ftaok macrumors 601

    ftaok

    Joined:
    Jan 23, 2002
    Location:
    East Coast
    #7
    Re: Re: Compilers for BASIC?????

    Someone's gonna have to explain this one to me. My programming skills are limited to BASIC, Logo ('member this one), simple HTML, and my VCR.
     
  8. Beej macrumors 68020

    Beej

    Joined:
    Jan 6, 2002
    Location:
    Buffy's bedroom
    #8
    Re: Re: Re: Compilers for BASIC?????

    It goes like this...
    start program
    exit program

    Fun, hey? :D
     
  9. barkmonster macrumors 68020

    barkmonster

    Joined:
    Dec 3, 2001
    Location:
    Lancashire
    #9
    Realbasic is okay apart from the slow as hell blitting routines

    It's not strictly basic as such, it's got way more commands than a sinclair spectrum or GFA basic on the Atari ST had but it seems okay for some things like making the text game you're on about.
     
  10. Stormyguy thread starter macrumors regular

    Joined:
    Apr 15, 2002
    Location:
    UK (Sussex)
    #10
    Yes, it (Chipmunk) seems to have pretty much all the stuff I was looking for and all the old commands I recognise - it's all starting to come back into place - quite nostalgic really, LOL!

    Thanks for the pointer firewire.....
     
  11. OSeXy! macrumors regular

    Joined:
    Jan 17, 2002
    Location:
    London (or virtually here)
    #11
    Yeah, Chipmunk is great, a real blast from the past. Didn't realise there was a PC version! I used to use it with BBEdit - Chipmunk has a plugin which lets you compile and debug from there. I think it also allows you to choose whether to use line numbers or not... Good for those who like "GOSUB 10053" rather than "CALL MyGreatSub()"... Have fun!
     
  12. evildead macrumors 65816

    evildead

    Joined:
    Jun 18, 2001
    Location:
    WestCost, USA
    #12
    RealBASIC

    If you did it in RealBASIC you could make exicutable Mac and PC versions of your game. Its a very simple environment to work in and it gives you some GUI tools to work with if you want to make the interface look nicer.


    -evildead


    #!/bin/bash
    #
    init 0
     
  13. Spelunk macrumors newbie

    Joined:
    Apr 24, 2002
    Location:
    Portland, OR -> Louisville, KY
    #13
    I know this is totally uncalled for, but might I suggest looking at the Python language. It has the advantages of being interpreted, cross-platform (Mac, Win, Unix, etc), free, easy to learn, and lots of other programatic niceness that you might like if you want to get more involved (very sensible object-orientation, extensive library, can use several GUI interfaces). It is also not BASIC. :D

    The homepage is www.python.org.

    Hey, I might not be a very good Mac zealot, but at least I can be a Python zealot.
     
  14. Stormyguy thread starter macrumors regular

    Joined:
    Apr 15, 2002
    Location:
    UK (Sussex)
    #14
    OK guys - thanks for the ideas.

    Where do I get RealBasic from?? Tried Versiontracker but only lots of 'extras' for RealBasic.
     
  15. Spelunk macrumors newbie

    Joined:
    Apr 24, 2002
    Location:
    Portland, OR -> Louisville, KY
    #15
  16. Stormyguy thread starter macrumors regular

    Joined:
    Apr 15, 2002
    Location:
    UK (Sussex)
    #16
  17. Stormyguy thread starter macrumors regular

    Joined:
    Apr 15, 2002
    Location:
    UK (Sussex)
    #17
    All concerned,

    Feedback:
    Thanks again for the help - the Chipmunk BASIC seems to be just fine and I'm getting on with the project no worries!

    Thanks again
    Danny
     

Share This Page