Live data from Hacker News

The best QBasic game ever?

pcworld.com

71–80 of 102 posts

Re: The best QBasic game ever?

#71
post #69

Earlier quoted context omitted.

Yeah, the game's written in the QBASIC language but I certainly don't use QuickBASIC 4.5 or PDS to compile it.

Sorry to nitpick, but "QBasic" is an IDE (Just like QuickBASIC, which incidentally is the predecessor of QBasic). The language is just called "BASIC". Also you're not compiling anything. It's all interpreted at run time (which is why performance is dog slow).

It is possible to compile QuickBASIC code (i.e. a variant of BASIC that contrasts with (among others) GW-BASIC) via QuickBASIC 4.5 and PDS.

Often at the time, you could write some code using the free QBASIC which came with MS-DOS and then decide that you need to purchase one of those other programs to compile it prior to distributing it as a standalone executable.

Re: The best QBasic game ever?

#72

Earlier quoted context omitted.

Hey, guys! I'm the guy making this game! :D Yeah, I compile it in QB64 and use the SDL hooks in it to actually make it run on windows/mac/linux. But yeah, QBASIC has all those things you mentioned already. Also, yeah, I use the big ugly eye-burning white-on-blue screen. You can see a photo of the development box here: https://twitter.com/manfightdragon/status/319786194395357185

I'm a little offended that you call this building a game in QBASIC when it clearly would not actually run in QBASIC. I built games in QBASIC growing up, and definitely didn't have access to the stuff you have in QB64. I was excited to hear about someone building such an impressive game using that toolchain, so it's a letdown to find out that it was a lie. It's cool that you put constraints on yourself by using the BA…

>I'm a little offended that you call this building a game in QBASIC when it clearly would not actually run in QBASIC. I built games in QBASIC growing up, and definitely didn't have access to the stuff you have in QB64. I was excited to hear about someone building such an impressive game using that toolchain, so it's a letdown to find out that it was a lie.

A lie? QB64 IS a QuickBasic derivative. It's no more a lie than saying Scheme and using Guile, or Lisp and using Clojure.

It's not like he said QuickBasic but used C++.

Re: The best QBasic game ever?

#73
post #69

Earlier quoted context omitted.

Yeah, the game's written in the QBASIC language but I certainly don't use QuickBASIC 4.5 or PDS to compile it.

Sorry to nitpick, but "QBasic" is an IDE (Just like QuickBASIC, which incidentally is the predecessor of QBasic). The language is just called "BASIC". Also you're not compiling anything. It's all interpreted at run time (which is why performance is dog slow).

It's compiled, not interpreted. You have no idea what I'm doing over here.

Re: The best QBasic game ever?

#74
post #69

Earlier quoted context omitted.

Sorry to nitpick, but "QBasic" is an IDE (Just like QuickBASIC, which incidentally is the predecessor of QBasic). The language is just called "BASIC". Also you're not compiling anything. It's all interpreted at run time (which is why performance is dog slow).

It is possible to compile QuickBASIC code (i.e. a variant of BASIC that contrasts with (among others) GW-BASIC) via QuickBASIC 4.5 and PDS. Often at the time, you could write some code using the free QBASIC which came with MS-DOS and then decide that you need to purchase one of those other programs to compile it prior to distributing it as a standalone executable.

I hadn't realised there was a non-free version of QBasic.

Also, I went to download QB64 and compile a very basic app then opened that inside a hex editor to see if the it was just a standalone exe interpreter with the .bas attached as a resource (a bit like how self extracting zip files work) and appears that QB64 does genuinely compile the code.

So I stand corrected on both the old and new instances of QBasic.

There is some strange stuff inside the QB64 generated exe though. References to automation.whatismyip.com (stranger still, that sub-domain isn't DNSed).

QB64 is definitely a Window app that's written to look like it's running in DOS though. There's even a character map compiled into the exe so that the fonts look native to DOS. It also looked quite fun, so I can see the appeal of using QB64 for personal projects.

Re: The best QBasic game ever?

#75
post #74

Earlier quoted context omitted.

It is possible to compile QuickBASIC code (i.e. a variant of BASIC that contrasts with (among others) GW-BASIC) via QuickBASIC 4.5 and PDS. Often at the time, you could write some code using the free QBASIC which came with MS-DOS and then decide that you need to purchase one of those other programs to compile it prior to distributing it as a standalone executable.

I hadn't realised there was a non-free version of QBasic. Also, I went to download QB64 and compile a very basic app then opened that inside a hex editor to see if the it was just a standalone exe interpreter with the .bas attached as a resource (a bit like how self extracting zip files work) and appears that QB64 does genuinely compile the code. So I stand corrected on both the old and new instances of QBasic. There…

It uses whatismyip for a (pretty dumb) added function related to finding your WAN IP.

Re: The best QBasic game ever?

#76
post #69

Earlier quoted context omitted.

Sorry to nitpick, but "QBasic" is an IDE (Just like QuickBASIC, which incidentally is the predecessor of QBasic). The language is just called "BASIC". Also you're not compiling anything. It's all interpreted at run time (which is why performance is dog slow).

It's compiled, not interpreted. You have no idea what I'm doing over here.

The compiled point was wrong, I'd already conceded that. But that doesn't mean I have no idea what what you're doing. I just wrongly assumed that the QB64 devs would just embed the .bas inside the PE as a resource file rather than going to the trouble of writing a compiler. Honestly, I'm impressed they bothered given the niche appeal of the IDE and number of other BASIC compilers on the market (FreeBASIC, PureBASIC, PowerBASIC, VisualBasic, etc) - some of which so closely resemble QB64 that I had to disassemble the compiled binary just to make sure there wasn't some plagiarism involved.

Re: The best QBasic game ever?

#77
I wrote a game in QBasic when I was 10. At the time I didn't understand the concept of a sub routine _returning_ after being called. So the end of each sub just called another sub (perhaps even the calling sub to create loops). You won by beating the game before getting a stack overflow.

Re: The best QBasic game ever?

#78
post #74

Earlier quoted context omitted.

I hadn't realised there was a non-free version of QBasic. Also, I went to download QB64 and compile a very basic app then opened that inside a hex editor to see if the it was just a standalone exe interpreter with the .bas attached as a resource (a bit like how self extracting zip files work) and appears that QB64 does genuinely compile the code. So I stand corrected on both the old and new instances of QBasic. There…

It uses whatismyip for a (pretty dumb) added function related to finding your WAN IP.

I know why it's using it. My point was firstly that it's odd (though not unforgivable) that the compiler links to those procedures even though my source .bas wasn't calling any networking APIs; and secondly that the sub-domain doesn't even exist for the DNS lookup to work:

    $ whois automation.whatismyip.com | head

    Whois Server Version 2.0

    Domain names in the .com and .net domains can now be registered
    with many different competing registrars. Go to http://www.internic.net
    for detailed information.

    No match for "AUTOMATION.WHATISMYIP.COM".
    >>> Last update of whois database: Wed, 17 Apr 2013 10:58:41 UTC 
I even disassembled the binary so I could see the full HTTP header just in case the domain name was a red-herring.

Re: The best QBasic game ever?

#79

It's written in QB64, a slightly more modern variant of QBasic. http://www.qb64.net/

I also wrote little games in QBasic long ago. The biggest limitation was the memory limit. That would prevent making a game like this. So if this is QB64 (which I never heard of before) then I guess that explains it.

Re: The best QBasic game ever?

#80

I wrote a game in QBasic when I was 10. At the time I didn't understand the concept of a sub routine _returning_ after being called. So the end of each sub just called another sub (perhaps even the calling sub to create loops). You won by beating the game before getting a stack overflow.

I also used QBasic as a child, I had some GWBasic book as references which rooouuughly matched the Syntax and provided functions. But I also remember not really understanding sub routines... Anyway, this was my experience with goto and good old fashioned spaghetti code ;)
Post reply on HN