QB Express

Issue #2  ~  September 15, 2004

"A magazine by the QB community, for the QB community!"

In This Issue

From The Editor's Desk

Written by Pete

This magazine couldn't have come at a better time. Right now, the QBasic Community is in one of the most severe droughts of activity in years. Take, for example, QBasic News, the world's preeminent QB news source. Currently, there hasn't been a single new news article posted on the site for seventeen days. Normally, this site is bustling with activity, and several news items are posted a week. Meanwhile, other major QB sites like V Planet! has gone for an entire summer with a grand total of two updates. This is quite the contrast from earlier in its career when the editors posted apologies for letting the site go for fifteen days without a major update. Times have definitely changed in the QB community. Hopefully this magazine will help speed it up.

This month marks the second issue of QB Express. Yes, QB Express. I decided to keep the name, since it's already gotten quite a following, and the name isn't that bad. Quite a few people sent in suggestions, including QB Courier, PRINT "QB", 'QB Remarks, Spearhead QB, and a few more. And also, aetherfox said "You stole the name of my magazine!!! Heh, I have this unfinished magazine sitting on my harddisk with the same name. I was going to finish it and post it up. Oh well." I opted to keep QB Express because I don't want to confuse people, and besides, it's a pretty good name. (Ask aetherfox!)

This issue is quite big, and includes FIVE tutorials covering topics as diverse as Fractals (by Terry Cavanagh) and "Liberating" QB programming from the DOS IDE (by Martin Rampersad). Also, this issue, RelSoft brings us the latest chapter of his incredible 3D series, and Nathan1993 has contributed a short tutorial on Object-Oriented RPGs. New this month is the start of a new tutorial series from Neo Deus Ex Machina, called QBNow!, which will be featured monthly. QBNow! will start from the absolute basics of QB and take you through to advanced techniques.

Also this month, I have also debuted some new features. These include reviews (the first review is of Detective Academy, and was written by Oz), and the monthly programming competition, which kicks off with the "Four Line" contest which I resurrected from NeoZones' old CodeX challenges. And of course, all the old features are back, as well as the latest QB news and a few articles by yours truly. There's lots of great stuff from a lot of great writers! But instead of listing it all here, I'm just going to let you get started. Go ahead -- and enjoy!



Letter From Marcade

Hey Pete,

Very nice magazine; I like it a lot .. (haven't read the entire thing yet but I will do that during my microwave dinner here).

I just read your comment about 'blast-of-the-past'. One that definately should be done then is Tsugumo's TheGame!!

At least, that was one of the RPG's (aside of Darkdread's RPG) that got things going back in the time. For me and for other people. And that must have been 7 years ago! (Isn't that even before you came into the scene ;) )

Tsugumo probably still is around somewhere; so is TheGame.

For the rest; no comment. The first magazine is always the most fun to make, I think .. (even though I never created magazines) .. from there on I guess it will get harder and harder, and more and more boring .. not to mention harder to find new (interesting content) .. so I hope you can keep it up!!

(Personally I would advise you .. if there's not enough content or you feel bored or down, take a short break .. don't continuously force yourselves into doing things you rather not want to do at the moment. If you do that, the faster you will really get tired of it.)

Oh well, have a nice evening,

Best regards,

Thanks for all the great feedback, Marcade!

I've taken your advice for this issue, and decided to focus this issue's Blast From The Past! article on TheGame by Tsugumo. Honestly, that one little demo, along with DarkDread's Lianne in...the Dark Crown, sparked the entire QB RPG craze. For a few years, 90% of all games released in QB were RPG demos, and I blame DarkDread and Tsugumo. (Those two demos were friggin' mindblowing back in 1997, and everybody wanted to replicate their awesomeness.)

And no, I won't be needing to take a "short break" due to lack of content...at least this month. This issue is absolutely jam-packed full of articles, and is even bigger than last month's gigantic issue! If submissions keep on coming in like they have this month, QB Express could be publishing for decades.


Letter From Fling-master


Excellent job on QB Express! I know from working on a QB magazine myself that it's a lot of hard work... and you've done an incredible job! It was a really nice refreshing read which made me think back a few years to waiting for new issues of QB:TM and the QB Times. Even though I no longer use QB at all I still enjoyed the read and will continue to read future issues. I personally think that, based on the first issue, the QB Express is just the kind of thing the QB community needs. It definitely is on par with QB:TM and the QB Times in my books.

Now, I have two complaints if you can even call them that as they're pretty small heh. First, you got the capitalization wrong on my nickname. There is no capital 'M' in Fling-master. A lot of people seem to get this wrong and it kind of bugs me whenever I see that. Just thought I'd try to set that straight heheh. Second... you make it sound like 'Gered' and 'Fling-master' are two different people working on the QB45.com reconstruction project. In fact, Gered = Fling-master (my real name is Gered King).

Other then that... excellent work! I look forward to the next issue!


Hearing people compare QB Express with legends like QB:TM and QB Times is a really great compliment. Those are the magazines that I've modeled this magazine after, and it's amazing to hear.

As for the capitalization error and the confusion in the QB45.com news article, I have fixed them. I have also corrected the spelling of badlogic from the previous issue. Previously, it was written as Bad-Logic.

Changing dated periodicals is supposedly a big no-no in the publishing industry, but I say screw that convention. I think it's stupid. Most magazines let errors in past issues stand, and then apoligize for the mistakes with a "Corrections" column in the following issue. But I'm not going to do that with QB Express. Due to the dynamic nature of web magazines, I am able to instantly fix errors in previous issues. I think it would be stupid to leave blatant errors in a previous issue when they can be so easily fixed. If there's a factual, grammar or spelling error you'd like me to correct, let me know and I'll actually fix it -- instead of just apoligizing.


Reader Response To The First Issue

Written by Pete

The first issue of QB Express got a lot of positive and constructive feedback from members of the QB community. Here's a sampling of responses to the first issue:

"Great work, man. Good read and really nice aesthetics."
"That is by FAR the best QB Magazine I have ever seen! _WELL DONE_ man, on writing and editing a fantastic, very smart looking magazine. I enjoyed reading it very much =)"
"Great work dude, I agree, it's one of the best ever."
"That mag is great! :)"
"I like the mag, great work. Layout is great, nice and readable. Look forward to more. :)"
"Everything about the magazine owns, except for the layout. Make it a page by page thing. Of course you don't have to, that would just make it near-perfect. How have I gone this long missing Pete's QB site? It's almost right up there with VPlanet! :) Great work."
Adigun A. Polack
"Man, I gotta honestly say that your newest QB online mag is truly awesome stuff and reading!! Look, you really have some creative and spectactular ideas that *really* pay off big-time!!! I mean, first the resurrection of your site, and now this ever-sparkling gem of yours called QB Express. My, you are GREAT!!! :)!! Keep up the outstandingly good work, you understand that? ^_- !! Thanks so much!!"
"Worth a read and definitely a project worth supporting! :)"
"And say congrats on the best qb mag I've read since qbtm. Well done indeed. I swear it almost got me interested in firing up QB again. Almost. Actually.... Hmm. "
"Very nice, except for the porn... but it's also very long, which is good for me, but - I hope you didn't burn yourself out!"
"Nice work geezer. That takes a lot of work. Good read :)"
"Pete... you're the man, man."
"Still reading it, but... very good so far. The code examples are nice too & it's got boobies."
"Great read. Well done with the magazine Pete. I especially enjoyed the rants and interviews."
Martin Rampersad
"Great first issue."
"Nice... and i thought the qmunity was dead... lol"

Express Poll

Every issue, QB Express holds a poll to see what QBers are thinking. The poll is located on the front page of Pete's QBasic Site, so that's where you go to vote. Make sure your voice is heard!

What is your favorite QB message forum?

QBasic News1628%
BASIC Network23%
Pete's QB Site814%
58 Total Votes
Editor's Note: Keep in mind that Several major QB message boards, such as QBNZ, The Code Post, Tek-Tips and MaxCode were left out of this poll. Also, note that this poll took place on Pete's QB Site.

News Briefs

News from all around the QB community, about the latest games, site updates, program releases and more!

QB Site News

QB45 Readies Its New Layout

The popular programming site, QB45.com, is well on its way in a massive redesign effort that promises to restore the site to its former glory. However, the remake has not exactly been smooth sailing: QB45 now tailors to all programming languages instead of just QBasic/QuickBasic, so the redesign must be able to manage content from more than a dozen different languages -- certainly no easy task. There have been several different discussions of how the site should be subdivided, and it still appears that no concrete decisions have been made.

Recently, Fling-master and Jofers, the leaders of the redesign effort, posted about their dilemma on the QB45 discussion board. Fling-master wrote: "Alright... so we've hit another snag in design ideas that should have been finalized a long time ago. Since we (Jofers and myself) can't decide which is best we'd like to open the floor to your opinions. There are kind of two dilemmas I guess... the design to use and still the subsite idea."

Fling-master offered up two different design mock-ups to the board's scrutiny: Jason's design, which consists of several different color-schemed subsites, and Jofers' design, which does away with the subsite idea and centralizes content into one main site. The board overwhelmingly selected Jofers' design, which uses a yellow, blue and gray color scheme and features the Sasquatch character that has adorned the top of QB45.com during the reconstruction process. (You can see the mock-up to the right.)

With any luck, this will be the final redesign of the QB45 site before its grand reopening. In the past several months, many different designs and layout schemes have been discussed, and there is even a preview version of a completely different design -- but nothing much has come of this. With the announcement of the new designs, Fling-master wrote that "hopefully this will be the last dilemma we have... this new site has been delayed far too long already, heh." All of us QB45 fans definitely feel the same way.

GBGames Archive Up

The popular QB reviews site, Gianfranco Berardi's GBGames, has returned after more than a year of downtime. Between August 2000 and January 2003, Gianfranco (also known as Pigeon) wrote honest and accurate reviews of a total of fifty-five QuickBasic games. Though the site has returned, it is up solely for archival purposes; there are are no plans to do any actual updates in the future, aside from eliminating some dead links and images. GBGames is a useful and entertaining site, with a heck of a lot of content, and I encourage anyone who hasn't visited to go take a look!

Nebula Software Updates With More 3D Goodness

Nebula Software, home to all things having to do with both QuickBasic and three dimensions, updated on August 27th with two reviews of 3D programs and an article. The two reviews covered Sunstorm 3D, a polygon engine by Sebastian Mate and Avenger 3D, a first person shooter by Storm Group. Nebula's other article discusses ATTE3, "an unfinished Egyptian adventure" by Roel Tempelaar. If you're interested in 3D programming in QB, you should definitely check these out!

Vance Muses on V Planet!

V Planet! managing editor Vance Velez recently posted some random musings about the popular but currently inactive QB magazine / reviews site. Despite the lack of updates, Vance claims to still monitor V Planet! regularly: "I do visit the mailbox and staff forums at least once everyday," he reported. The reason for the lack of new reviews is because Vance's Windows 98 computer has "had serious issues" for the last two months, and he is unable to run or review QB games. He added: "Which really sucks 'cause we've been receiving all kinds of cool stuff to the V Planet mailbox... but I can't try it all."

Once one of the most active QB sites ever, V Planet!
has notably slowed down in the past six months.

Vance encouraged others to pick up his slack on the QB game reviewing front: "I think the QB community needs more reviews. It's great to see sites like Pete's QBasic Site and GBGames back, but without new QB game reviews somewhere we'll lose sight of all the cool games that have been coming out in the QB community, especially during the last six months or so." Luckily, this month QB Express is beginning its new monthly reviews column, with a review of KENTAURI's Detective Academy by Oz. Hopefully some other sites will take also take Vance's encouragement seriously, and also begin doing QB game reviews again!

Project News

Dark_Prevail Releases Bubble Blast

On August 28, dark_prevail released a new mini-game entitled Bubble Blast, where the player's goal is to, um, "capture the floaty things using a bubble." Most people at the QBasic News Forums found this game to be fun and addictive, and quickly got sucked in by the simple but absorbing gameply. However, there were complaints that the game was a bit too difficult -- because maneuvering the bubble is quite cumbersome and the low-contrast graphics make parts of the game difficult to see. Bubble Blast uses RelLib, and makes use of the powerful but widely-overlooked RelLib XMS routines. For more information, check out this thread at the QBasic News Forums.

Legend of Noname General Progress

Lachie Dazdarian's point-and-click adventure game, Legacy Of Noname General has been in production for quite a *long* time. Since early 2002, Lachie has worked diligently on this game, which has a dark, original graphical design and a story similar in style to David Lynch's Lost Highway or Roger Zelazny's 'pocket world'. Lachie has announced his progress through this topic at the QBasic News forums since mid-2003, most recently at the end of August. In this update he announced that the game is now 90% done, and that it will probably come out before the "winter holidays". Also, he listed the following progress: "I added 4 new scenes, 3 in the power plant and one...uhm, maybe I shouldn't reveal much." He went on: "One scene was really demanding. Especially in the click box department." -- meaning that this area will have a whole lot of interactivity. Judging by the preliminary demo from 2002, LONG will be a pretty sweet game, with a very stylistic and engrossing story. For more information, check out the KENTAURI Site or the QBasic News Forums.

QBChat Released By QBWorks

QBWorks, "a small 'start-up' software company based on the Philippines which started last April 2003," recently released an online chatting program called QBChat. QBChat is a user-to-user IP Chat Program written in QBasic. It makes use of the NETQB Library, a user friendly, lite version of the popular WINSOCKXS library by someone42. According to QBWorks, "This chat program is very useful in Local and Wide Area Networks like the internet. Just connect as server and wait for a client to connect to you." Of course, running QBChat requires users to disable firewalls and other programs using UDP/IP protocol, such as filesharing managers. A Work-In-Progress version is available at the QBWorks Official Site.

Unlike most QB groups, QBWorks is in this for money. According to them, "The NETQB library... will be licensed as a shareware or commercial product." I'll be the first to say that QBWorks should probably re-think their business model. Last I knew, QB was a dying language used almost exclusively by hobbyists, many of which are children, teenagers and college students -- definitely not the demographic that will pay for a "lite" DOS version of WinSock. With alternatives like V1ctor's DSock available for free, it's pretty doubtful that QBWorks is going to make any money on this venture.

Dies Irae Remake Demo Released

Someone with the username "I am Har har har" recently released a demo of a QB RPG known as Dies Irae over at RPGDX. This demo uses GSlib to "convey stunning graphics", and has been described as "A true console style masterpiece" by the author.

"I am Har har har" provided the following description and screenshot with the game:

"A game with a horror theme, take on a terrorist that threatens a highly flawed society. Fight against the forces of the undead, sadistic war machines, and the terrifying leader of it all-Dr. BIose Sinclair.

"The current download is the beta demo. It includes all aspects of the game up to a conflict with Dr. Sinclair. Play and enjoy!"

You can download Dies Irae at this address.


Z!re has released some cool new information on his ambitious do-anything RPG, MOORPG. Check out this issue's Gallery for more!

Sonic X-treme Due Out In November

One of the longest-running QBasic projects ever, Joseph Burke's Sonic The Hedgehog clone, Sonic X-treme, is finally wrapping up its six-year development cycle. Version 10, which will be the final release of the popular QB platformer, will likely be released in November.

In an email to QB Express, JO mentioned several new features of this highly-anticipated release:

"In this release, I have included enemies (which are objects can be user defined) and the ability to select from multiple characters (eg, Sonic or Tails). Previously, the objects, and their effects were hardwired into the code. In the game, if Sonic picked up a ring, it turned into stars which faded away after a short time. At a subroutine level, a sub in SonicX would recognise the ring, delete it from the array, create a new object called starring at the same postion, give it a life of 0.5 seconds, add 100 points to the score counter and 1 ring to the ring counter. This took up a fair amount of code.

"I have written a system which stores the object parameters in a file outside SonicX, but deals with them automatically without any specific coding for an individual object from within SonicX. With this system, it is now possible for objects to move along a specified path, and kill Sonic. So now enemies are part of the game, and the code required for this new property was less then the size of the code which dealt with all the objects from previous games individually. The Bottom line? I have added new features and the game still compiles."

Also included with the email was the screenshot you see above, which demonstrates the power of the new engine. Notice that you can now play as Tails and there are two types of enemies incorporated into the level environment. The new engine will include a module allowing for "conditional execution of variables," which will allow for bosses and other "smart enemies" that change their behavior based on the player's decisions.

The upcoming released of SonicX is quite an accomplishment, not just for the excellent programming and dynamism of the engine, but also because it is actually getting finished after six years. This game has been in production for so long that most people assumed it would probably never get done. After all, most highly ambitious QuickBasic programs (like this one) die long before their releases, because the programmers get bored or frustrated with them. JO is one of a very few shining examples of dedication in the QB community (along with WisdomDude and Cyber Chick, Michael Hoopman and Dark Ages ][, and a few others), who just refused to let his project die. In his email, JO added the following insight about long-term QB programming:

"The weird thing about having such a long project in QB, is that it isn't about writing code, it's about keeping the code size down to a level that will still compile. So, for every subroutine I bring into the game, one has to get cut out, or modified to the extent that it is practically cut out."

Sonic X-treme has had regular demo releases since early 1999; in fact, SonicX Version 1 was the second program I ever reviewed for Pete's QB Site. (Over the years, other iterations of SonicX have been reviewed by major QB reviews sites like V Planet! and Lovely Pressure.) You can find out more about Sonic X-Treme at the official site, QBasic Central.

Hobbit 3D Music Previewed

Oz has recently released preview music tracks for his upcoming three-dimensional Tolkien-inspired RPG, Hobbit 3D. At the QBasic News Forums, you can find Oz's post, which contains links to short preview tracks of the intro music and and some fighting music. Both tracks are pretty catchy and were complimented by several members of the forum.

For those of you who don't know, Hobbit 3D will come with a suite of 3D utilities to make your own games. Oz announced that the following programs will be included with the Hobbit 3D release:

(1) 3D Sprite Editor with Animation and Skeletal support -- which comes with a texture editor and source routines to load and see sprites;
(2) 3D Rendering Test Program;
(3) Hobbit 3D game -- with full documentation;
(4) Easy Mod-ing so you can create your own levels, characters and plots based on the engine.

Competition News

QB Movie Competition

QBasic.tk is hosting a competition to make the best QB movie / cutscene. According to the originator, Pyrodap, "In just about every RPG there is SOME sort of cut scene...well, I was thinking, what if we made one BIG cutscene! QBMovie! This would be a chance to see everyone's creative story-writing ablilities." The rules of the contest are pretty broad: the movie must be "made in QB", you may use any libraries you'd like, and the movies must NOT be interactive: "This should be something that a person can just sit back an enjoy. Obviously you could add things like pause, rewind, fast forward and stuff...but other then that is not allowed." As of press time, the contest is very loosely organized and has no time limit, but one may be imposed soon. Check out this thread for more details!

"Use Each Keyword Once" Challenge

Oracle of QBasic New Zealand held a very interesting programming contest on the QBNZ board this past month, called simply "Use Each Keyword Once". According to the rules of the contest, entrants had to write the best program they could put together, but were only allowed to use each individual QBasic statement or keyword one time. That means entrants could use just one IF statement, one DO...LOOP, one PSET, one SUB and one FUNCTION." This interesting scenario resulted in some neat programs and an interesting discussion at the QBNZ Forums between July 17th and August 31st, when the contest ran. Unfortunately, as of press time, Oracle has not yet announced the winners of this competition.

2004 Gaming Golds Coming Soon

Nekrophidius recently revealed that this year's edition of the Gaming Gold Awards will be coming in November! The recent drought of updates at the competition's host, V Planet!, and the complete lack of any news regarding the upcoming competition had previously led many to believe that the Gaming Gold Awards would not return this year. No Gaming Golds were held in 2003 because the V Planet! staff did not have enough free time and support to hold the annual contest.


Written by Pete

Every issue QB Express features a preview and exciting new screenshots from an upcoming QB game. If you would like your game featured, send in some screenshots!

MOORPG - "Massive Offline Open RPG"

Ultima, Shenmue, Grand Theft Auto, Everquest... in recent years, an absolute bounty of games that create massive worlds where the player is free to "go anywhere" and "do anything" have surfaced...and been extremely successful. These games, which simulate the freedom of everyday life (with enough fantasy elements to keep it interesting) have sucked in players for hundreds of hours, amazing them with the non-linearity and sheer amount of interactivity.

But making a gigantic, interactive, non-linear world where players can do anything, is obviously no easy task. It took development teams of dozens of people years to create any of the games listed above. So it comes as no surprise that even the most ambitious QuickBasic programmers have steered away from this type of game project in the past. Amateur programmers generally aim for more simplistic gameplay designs, because laying the groundwork for near-unlimited interactivity is a programming nightmare.

Not QB guru Z!re, though. His latest project, MOORPG promises an absolutely huge explorable world, filled to the brim with characters and areas to explore; a branching, non-linear plot that is affected by the player's choices through the game; and and vast amounts of interactivity, far beyond anything seen in a QB game before.

According to Z!re, "MOORPG stands for (or stood for) "Massive Offline Open RPG." It is the working name, but has been adopted to be the realname of the game. Massive as it's got a huge world (the world will be detailed, and populated), Offline as it's.. err.. offline..., and Open because it will not be locked, ie force the player into doing a certain thing."

For example, in MOORPG, this type of scenario will be possible:

You meet a farmer who asks you to rescue his wife. You accept, and find the wife being held captive by some trolls or whatever. But instead of saving the wife, you choose to join the trolls and kill the wife. You then go back to the farmer and tell him that the "trolls" had already killed her... The farmer will not know what an evil bastard you are unless he actually sees it, or he is told about what you've done.

The more I've learned about MOORPG, the more ambitious and impressive it sounds. If Z!re can achive everything he plans for this game, it will be absolutely mindblowing -- not just as a QB game, but as a videogame in general. Intrigued? Below is a collection of features that are planned for the game, straight from Z!re himself.

"Huge... really really huge" is right. Let's hope that Z!re can make all this a reality.

Screenshots of MOORPG

Below are two of the latest screenshots of MOORPG that Z!re has released. These graphics may be a bit inaccurate, since Z!re is redoing all the tiles and the engine. This is "to make the ground more alive, and not as square as before." They still are definitely worth a look, though!

A beach area from MOORPG's massive in-game world.

Trees layered over a stone road. Notice the shadows.

For more information about MOORPG, you can check out the following message board posts: (here, here and here.)

Blast From The Past!

Written by Pete

Every issue, we take you back in time to the early days of QB on the Internet and show you a lost relic of the QB Community. This is your Blast From The Past!

Tsugumo's TheGame

It's 1997. The online QB community is still in embryonic form, made up of a bunch of kids who are making mostly Snake, Tetris and Space Invaders clones. To most of the Qmunity, "graphics" means LINE, PSET, PAINT and CIRCLE. Tile engines and sprites are something used by the "pros" and the "experts", not normal QB programmers. Making console-style RPGs in QB is out of the question for most people...they simply had no idea how to do it, or that it was possible.

But then, one day, out of nowhere, some guy named "Tsugumo" pops up with a QBasic RPG called TheGame. And then QB as we know it changed forever.

The overworld of TheGame. It might not look like much, but in 1997, this was mindblowing.

Back in 1997, Tsugumo (Jeff Hangartner) released two small engine demos of TheGame, both of which amounted to little more than walking engine demos with good graphics. The demo was the start to a very ambitious Final-Fantasy based RPG about a young man named Kyodai and his quest...but it never really amounted to anything. The demo consisted of a single town (which had a total of three buildings and five NPCs), and an overworld map with a bunch of trees, a few streams, and an ocean. In the town, you could visit the cemetery, randomly fill your inventory with equipment and sell it, and talk to a few randomly-placed NPCs. The demo had extraordinarily good graphics for the time, especially for a QB game, but really that's all there was to the demo.

So what, then, made TheGame so incredibly influential? Well, to the crowd of young, amateur QB programmers that were fiddling with Pong clones and LINE statements, it showed just what is possible with that little programming language they played around with in their free time. Instead of dismissing professional quality RPGs as an impossibility in QB, people started breaking them down and figuring out, piece by piece, how to put them together. People began to look at each others' code and share their tricks between each other: tutorials on how to make tile engines, use sprites, manipulate the palette, and even create good pixel art were written. No longer were these concepts secrets, or reserved for the "1337".

But to say that TheGame was influential is a vast understatement. TheGame almost singlehandedly launched the QB RPG craze, which then dominated the QB community for three years. With its amazing anime-style graphics, smooth and flexible engine, humorous dialogue, and great console RPG atmosphere, TheGame inspired dozens upon dozens of copycat games. According to QBasic: The Magazine's October, 1998 issue, "Other than Darkdread's Lianne and the Dark Crown, no QB game has been more influential than TheGame."

Although there were hundreds of games directly influenced by TheGame, some of the most-loved QB RPGs were spurred as a result of Tsugumo's little demo. According to V Planet!, TheGame "was so inspirational that it was secretly the inspiration of Mike Hoopmann's amazing masterpiece, Dark Ages I: The Continents."

In fact, while searching for QB RPGs inspired by TheGame, I turned up this post on the GameDev.net Forums. Somebody recommended Tsugumo's series of pixel art tutorials to someone looking for help on creating game graphics, and Arek The Absolute posted the following response:

"Tsu--... Tsugumo's Lair still exists?!? Thank you for that link! TheGame was what got me into game development! I'm absolutely floored that I've found his site again! I haven't seen it in YEARS. I thought he'd been sucked into oblivion or something."

-Arek The Absolute

Back when Tsugumo's Lair was originally the talk of the town, many people followed TheGame with almost fanatical reverence. Tsugumo's every move was recorded in all the QB news outlets around the community in 1997 and 1998. Take, for example, Sublime Productions. The webmasters of that site updated a total of thirteen times in 1998. Out of their thirteen news posts, seven of them mention Tsugumo, as if he's some kind of god. In fact, on several occasions, updates were made simply to announce that Tsugumo had updated his site. Check out this update from January 15th, 1998:

Attention all! Attention all!! Tsugumo has updated. :) Yep, but the only news is bad news. Tsugumo has some final exams he has to take. What does it mean to you? No updates for a while. And here's the big news. TheGame has once more been canceled!! ACK!!!!!!!!! Anyhoo, Tsugumo claims he'll start back up in the summer. :) Onto other news. Our File Lair has files! And the Links page are up. YAY!! Rapid updates are coming. That's about all the news. Come back for more great (yeeeeaaaaahhh) news. C-ya! ~StoverTech~

That news post not only puts Tsugumo's own news ahead of the actual site's update (the File Lair), but treats the news about TheGame and Tsugumo with absolute fanatacism. (The red text you see there was not my addtion; it was in the original document.) That was the kind of influence that Tsugumo had on the QB community back in 1998. QB:TM was right; with the possible exception of DarkDread and Lianne And The Dark Crown, no other game to that point had had a bigger effect on the QB community than TheGame. After all, it wasn't just *a* game. It was *THE* game.

In October of 1998, after more than a year of cancelling and restarting TheGame, Tsugumo finally dropped the project. The October issue of QB:TM announced that TheGame had finally officially been cancelled. The title of that article included an exclamation mark and the world "CANCELLED" in all caps, further indicating how important this game was to the growing, RPG-crazed QB community. Zkman wrote: "TheGame, whose demo released last year by Tsugumo was hailed as one of the greatest graphical achievements in QB of all time, has been Cancelled. The demo was basically just a showoff of the graphics engine and Tsu apparently thought that the gameplay just wasn't original enough to continue..."

But that wasn't the end of TheGame; the QB:TM article continued: "Its graphic style has been used in many upcoming RPG's, such as Eldim, Marconian Dreams and Relics, and its cancellation is sad news for all those awaiting the ambitious full version." And as you already know, great QB games like Michael Hoopman's Dark Ages were also inspired by TheGame.

In fact, TheGame stayed in the limelight for years to come. In the December, 1999 issue of QB On Acid, Spiege wrote an article about "Giving Credit Where Credit Is Due." In it, he ranted about people ripping graphics from others' QBasic programs:

"This little trend in the QB community seems to have started back a couple of years, when TheGame was the talk of the town. Several people saw the work of Tsugumo, and decided to steal his graphics without permission and use them in their own little excuse for an RPG, and went as far as to call them their own. I talked with Tsugumo himself about this, and his general thought was that if they had asked first, he may have granted permission...however, the fact that they had stolen them outright was kind of ridiculous. Needless to say, Tsugumo sorta disappeared from the QB scene not too long afterwards."

This article, of course, came at a time when Tek of NeoZones Productions was getting lambasted for ripping Tsugumo's graphics in the demo of his RPG, Indigo Moon. And it came long after Tsugumo had tipped his hat and disappeared from the QB scene altogether.

Over the years, the QB RPG craze dissipated, and obsession over TheGame began to wane. (Though I must add that it certainly wasn't forgotten.) In 2000, Tsugumo returned briefly to the QB scene and, working with FrozenEmu, he put together a demo of a second RPG with an equally ambiguous title: Untitled. This project was created for the 2000 QB Expo, and had phenomenal graphics and an innovative battle engine that really wowed everyone that saw it. This was called the "show-stealer" of the event. In 2000, Vance Velez of V Planet! wrote: "Tsugumo [made] a contribution to QuickBasic with this surprise gem of what looks like a future, revolutionary RPG in QBasic. It's one of the first turn-based RPGs in QB to use combination attacks, and the game also uses many special effects never seen in such combination or magnitude in a QB game before."

Untitled was an amazing technical achievement, and was far more of a masterpiece than TheGame ever was. However, it came out to a larger and more experienced QB community, who now were producing games of similar caliber on their own. Compared to Tsugumo's first RPG demo, Untitled was barely even noticed. Though the Official Untitled website is no longer available, the site is available in its entirety through Archive.org, including the zip archive which includes the program.

Since he left the QB scene for the second time, Tsugumo has dabbled quite extensively in Pixel Art, which was always his true passion. In 2001, he wrote an incredible eleven-part Pixel Art Tutorial, which I highly recommended for all QB programmers, as well as all game programmers in general. It's absolutely phenomenal. Tsugumo also founded Pixelation, a popular pixel art forum community. He has also updated his new official site with a lot of neat artwork. You can check out Tsugumo's Site O' Junk for his art, and his Online Portfolio for his game programs (including both TheGame and Untitled).

While TheGame is held at almost mythical standing among the QB community, we should keep in mind that it was simply an RPG walking demo. It had incredible influence, but it honestly isn't nearly as amazing as we all remember. It was a simple engine with some good (by 1997 standards) graphics that made a lot of superficial QB programmers go apewild. Perhaps Tsugumo sums up TheGame best:

"[TheGame] was one of my first large projects, and it's more than 6 years old now. I made it back in high school in my free time, and used QBasic to do so... This was one of the first largely graphical RPGs made in QBasic at the time. It's sort of laughable now and there isn't much to it..."

Still, if you want to understand how the QB RPG craze got started, and how the QB community as we know it formed, TheGame is by far one of the most important pieces of the Qmunity's long and storied history.

Download TheGame Demo 2 here (349KB), or visit Tsugumo's Site O' Junk.

Detective Academy Review

Reviewed by Oz

Kentauri's latest game lets you play the detective. Do you have what it takes?

At A Glance

Can you pick out all the clues? That's exactly what Detective Academy(DA) helps you do. You can train in practice mode for the academy, and obviously, once mastering the practice mode, you can play in academy mode to unlock new scenes/scenarios. The concept, as mentioned, is rarely done, and in the world of QB, an original game is hard to come by, so this definitely excels.

Without delay, here is the review...


Wow is all I have to say. Sure they aren't the worlds greatest, but for the game, they really bring out the surroundings. The colours for the game, in my opinion, should have been slighly darker, since you are investigating a crime scene. The lighter the palette, the happier it seems. The amount of possible details were very good, though. I enjoyed looking at specific details, only to find out that indeed, I was looking at the wrong things. The amount of details, and variety of them make it difficult to pick out "important" ones, and, in a real academy, you would be told what you are looking for and have more background information.

-Darken the palette
-Create a more plausible amount or details/clues


Ouch! I'd rather just skip it. There was a small amount of sound added, which should have just been left out. That's all.

-Don't put in last minute sounds


The concept of this game is highly original, as you memorize small, seemingly pointless details, that could reveal how a crime took place. There is no storyline, unfortunately, so you are not solving a specific crime, or visit more than 2 scenes for each scenario. The game could have been improved by creating a level editor, with themes. Kentauri has not released any such program due to the amount of detail that is put into one level, and I am unsure if such a program was created. Again, there is no story line, other than "you have to find all the clues in some amount of time." There is also a face memorizing mode, where a head briefly goes across the screen, and you must remeber the features. Then, you must reconstruct the face, with 50% or more of the features correct. The harder the difficulty, the faster the face goes across the screen.

-Release source code for others to add their own levels and themes.
-Take the pain-staking time to create multiple levels and settings.

Replay Value

The challenge the first few times is very strenuous, but after that, the gameplay becomes too repetitive, and boring. There are about 15 clues for each scenario, that change slightly (such as colour, or amount), but when you get the general gist, the challenge goes away.

-Create a senario editor/creator

Over All

My opinion: Good game. Definitely worth the playing, but not something I'd just sit and play every day.

Positives: Negatives:
> Original Concept

> Fair Graphics

> Good Memory Test
> The palette is too bright for the theme

> No story line

> Sound, if enabled, was very pointless

> Few levels


The Search For The Mags

Written by Pete

A famous comedian once said that any group with at least three members is pretty much guaranteed to have its own magazine. Through painstaking, thorough research (aka, Google), I've found that it's pretty much true. There's The Civil War Times, informing war reenacters of the latest news on a war that happened 140 years go; QUILT - America's Favorite Quilting Magazine; Travel Naturally, a magazine for nudist vacationers; Nails, the world's #1 magazine dedicated to fingernails and toenails; The Bead Bugle an on-line magazine all about beads; G-Fan Magazine, a quarterly magazine for Godzilla fans; and Found Magazine, which publishes love letters, birthday cards, kids' homework, to-do lists, poetry on napkins, telephone bills, doodles and more that are found in public places -- you know, for weird stalker types. If there's a group of people dedicated to any hobby, you can count on it that they've got their own magazine.

QB has seen over two dozen different magazines in its short history.

So if there are magazines for all of these odd groups, there might as well be one for a small online contingent of diehard programmers using a scoffed at, almost dead, twenty-year-old beginners' programming language.

But it's not like there's been only one QB magazine. There have been over two dozen different QB periodicals produced in the past fifteen years. QB Express is just the latest in a long line of QuickBasic publications that date back to at least 1989.

The History of QB E-zines

The first QB magazines were created mostly for professional programmers (like QBNews, which ran from 1989-1992). They discussed advanced DOS programming techniques, and were largely inaccessible to the amateur programmers, as well as young children, teenagers and college students who fiddled around with QBasic for fun, making silly text adventures or Pac-Man clones, and turning the banana-throwing apes in Gorillas into package-throwing Santa Clauses. The people who made little QB games for fun weren't interested in creating TSR programs, advanced database management or transferring data through the serial port; they just wanted to have fun.

Later, when these young, amateur programmers started to use the Internet (or "information superhighway" as we it called back then), the first QBasic/QuickBasic sites began to show up. These hobbyists, who were mostly teenagers, uploaded their own original QBasic games and utilities to free web servers like AOL Hometown and Geocities. People began to communicate with each other back and forth about QBasic programming. The QB community started to take shape. (Few of these original sites are still around, though you can still find some dating back to 1995 or so, like Nocturnal Creations or M \ K Productions.)

In November, 1995, Peter Cooper started the first QB magazine of the fledgling QB online community, called The BASIX Fanzine. This text-based magazine featured tutorials, programming questions and answers, information on where to find QBasic resources online, and letters to the editor regarding both QB and PowerBasic. The BASIX Fanzine was the pioneer QB e-zine, and it really set a standard format and style that was copied by most QB magazines to come. Finally, the QB community was being brought together by a single, unified, community effort. Before, the QB "community" was a collection of competing websites, not a collection of programmers learning and sharing with each other. The coming of this first magazine equated to a renaissance for the programming language. People became interested in QBasic, and motivated to write programs. More people discovered and joined the community. It spread like wildfire.

When BASIX slowed down in about 1998, other publications like Jeff Rapp's QNews QBasic Newsletter and Acidus Software's QBasic Developers Forum stepped in and picked up the slack where the other magazine left off.

But QB magazines really took off in August of that year, when a fellow by the name of Zkman started what is still widely considered the best QBasic magazine ever. QBasic: The Magazine, which was also inspired by The BASIX Fanzine, instantly drew attention from the QB community. This well-written monthly quickly enlisted the aid of QB gurus like Petter Holmberg and Aaron Severn to contribute massive tutorial series. More significantly, QBasic: The Magazine began to do thorough, in-depth previews and reviews of QB games, and also developed into the center for the latest news and information regarding QB sites and projects. Previously, magazines tailored mostly toward the technical; tutorials and programming questions and answers were the focus, with news about upcoming software or reviews really being an afterthought. QB:TM became a magazine that could appeal to a broad spectrum of QBers: both the hardcore and beginner programmers, the webmasters, and the QB gamers who were more interested in playing homebrew games than making their own. QB:TM ran for twelve issues; its final edition came out in August of 1999.

At the same time that QB:TM was the talk of the town, other notable QB magazines were also publishing, such as VSNews by Danny Gump of VirtuaSoft and QB Voice by Martin Rampersad (aka Rems) of Rems' QBasic Site. Although largely forgotten, both of these magazines were of high quality and definitely worth the read.

In early 1999, The QB Times followed QB:TM, and later that year, so did the first run of Nekrophidius' QB On Acid. Both of these magazines are highly regarded, and were filled to the brim with content, much like QB:TM. Both publications (QBOA especially) filled their pages with rants and raves about the QB community, reviews, and up-to-the-date news, in addition to the standard proliferation of tutorials. But as these magazines thrived, others didn't quite get off the ground. After QB:TM finished its run, Terminator_Z and other contributors to the late magazine banded together to create a new e-zine called Razor Diskmag, which fell apart after one lackluster issue. Razor was criticized for being a whole lot worse than its main competitor, QB On Acid, which had two great issues in December of 1999, as opposed to Razor's one lousy issue.

2000 marked the high point of The QB Times, and also the arrival of Matthew R. Knight's QB Cult Magazine. QBCM had an incredible run of seventeen issues between March 2000 and January 2004, and is still not (officially) dead. The first issues of QB Cult Magazine really stand out, for being some of the longest and most interesting QB magazines ever released. This magazine was heavily focused on the QB community in its early days, and has always had some of the best QB programming tutorials ever published. As time passed, though, QBCM severely declined from its high point in the second and third issues. Its editors switched multiple times, and issues were released more and more sporadically, often with very little content other than a reprinted chapter of Ethan Winer's BASIC Techniques and Utilities book.

Meanwhile, several email-based QB "magazines" had been created in the previous few years, though none of them were particularly successful. Between July 1998 and February 1999, Jeff Rapp ran an email publication called QNews QBasic Newsletter which amounted basically to a QBasic question / answer listserv. QNews never really ran any traditional articles or tutorials, though some of the issues did turn out to be quite helpful. A more sophisticated email magazine, called The BASIX Newsletter was started in May, 1999. Editor Peter Johnson (Screech) was inspired by The BASIX Fanzine to create his own QuickBasic/PowerBasic magazine. Unfortunately, after two short issues, this magazine died. Finally, Tek of NeoZones Productions, then the most popular QuickBasic site on the Internet, decided to create his own email-based magazine. The QBasic Gazette had a total of eight issues in 1999 and 2000. They all featured very brief QB news snippets, reviews, articles and tutorials. Most articles were limited to a single paragraph, and were very informally written. Although the 'Gaz had a fairly wide readership, it never amounted to more than a couple pages.

Since 2000, there have been a few short runs of different QB magazines, many of which held a lot of promise. Fling-master's QB Chronicles, which had a feel strongly reminiscent of QB:TM and QB Times ran for four issues in 2001, and had several excellent tutorials on RPG programming and memory management. QB Gamer Magazine by Terry Cavanagh, which focused mostly on reviewing QB games, had two issues before it was discontinued due to "lack of interest". A QB humor periodical (mostly) by Gopus and Skarab, called QB Inquirer had 94 different articles printed between July 2000 and June 2001. More recently, QB Accelerator by SJ Zero and his hordes of minions had three bizarre and humorous issues between summer of 2003 and January of 2004. Additionally, Nekrophidius' QB On Acid proved to be the "comeback kid" of QB mags; after its initial run ended in early 2000, it was resurrected for three issues in December 2000 to January 2001, and another three issues between October 2003 and January of this year. Unfortunately, none of these magazines proved to have the legs of a QB Cult Magazine or BASIX Fanzine, and all died after only a few issues.

As of August of 2004, the QB community had been magazine-less for the longest time since The BASIX Fanzine. Not only that, but just about every QB "magazine" site, including the incredible V Planet!, GBGames, and, to a lesser extent, QBasic News, have all slowed down in recent years. Since these sites do not publish publish their content in periodical issues, they are not technically magazines... but the point is that QB news coverage has slowed down considerably. The number of QB game reviews written by anyone this year can probably be counted on your fingers. The number of new QB tutorials written is practically zero. The number of new QB games and programs released is at the lowest level in years. This is not a good thing if the QB Community is going to continue.

That's why I started QB Express last month. I'm trying to turn around this dark chapter in QB history. I'm hoping to breathe some life into this dwindling community, and get people excited about QBasic/QuickBasic programming again. Hopefully this latest chapter in the "History of the QB Mags" doesn't turn out to be the last.

But where did they all go?

Sure we can *say* that all of these QB magazines existed, but up until recently, the vast majority of them had seemingly disappeared off the face of the planet.

Over the years, the QB magazine archives have been purged from the free web servers like Geocities, Xoom, Tripod and Hypermart. Or their paid domain hosts, such as the ChUcK's once-burgeoning QuickBasic.com, were shut down due to lack of funding. Or the webmasters purposefully took down their magazines, to free up server space or to hide their "embarrassing" past.

Whatever the reason, most of the QB magazines simply disappeared. Only a handful of the older QB magazines survived, and those were limited to the most popular magazines of the time: QB:TM, a few issues of The QB Times, a bit of QB On Acid...and that was it. More recent magazines like QB Chronicles and QB Cult Magazine stayed online, but gradually faded into obscurity as updates became fewer. Meanwhile, the older and less popular magazines disappeared from the Web completely. Time passed. The QB magazines faded into history. History became legend. And legend became myth. Not even Google could find the lost QuickBasic magazines.

The Search Begins

In Fall of 2003, Barok, a relative newcomer to the QB scene, became interested in the QB community's history. Upon hearing about all of the great QB magazines that had come out in the past, he decided that he would go out and collect as many as he could find. According to Barok, he started this project "mainly because I joined the QB scene about 3 years too late..." and he wanted to find out what he had missed.

So he started asking around, posting questions on message boards and emailing the editors of the magazines. And he got a great response; within a month, Barok had managed to get copies of fourteen different QB magazines. Some he got directly from the editors themselves (like The QB Times and QB Gazette), and others he found archived online (QB:TM, bits of QB On Acid). He sent a lot of emails, and found most of the major QB magazines. Others he got from third party archive sites (QBNews). It took days of emailing, following false leads, pestering people, Googling, posting on message boards and more...but Barok was persistent, and in the end, successful. Barok proved himself to be a meticulous archiver, librarian and historian of QB, and soon released an archive of all the mags he had found.

Barok's QB Magazine archive was the most thorough and complete collection of QB magazines ever when it was released, and it met a warm reception with the QB community. Magazines that had been lost for years were finally recovered. These time capsules of QB history were finally restored!

But Barok's archive was far from complete. Not only were several of the magazines missing issues, but there were several magazines that were left out of the archive. Also, Barok converted many of the issues to printable Word documents so that hard paper copies could be made easily. As a result, a lot of the original formatting was lost. And putting all the magazines in a 17MB zip archive made it anything but easy to access.

The Zines Section

Earlier this summer, when I was redoing Pete's QBasic Site, I stumbled across Barok's QB magazines archive...and I was absolutely overjoyed. I waxed nostalgic and checked through the old magazines I read back in 1998 and 1999, and then checked up on all the new ones that had come out since I dropped out of the QB scene. It was a really great experience, and really motivated me to keep on working on my site.

But while I was looking through the archive, I kept remembering other magazines that Barok had overlooked. Danny Gump's VSNews, Razor Diskmag, QB Voice, and many more. There were also many issues missing, such as a few QBNews issues, most of QB On Acid and some issues of Lord Acidus' QBasic Developers Forum.

I also found the archive quite difficult to navigate, since it was a 17MB zip file, with many cumbersome Word documents. There was also no index that listed which issues exactly were included -- or any information about the actual magazines for that matter.

I decided to change that.

Last month, I created a new section of Pete's QBasic Site called the "Zines" section, where I uploaded all the issues of all the QB magazines I could find -- in their original formats, so that you can read them in your browser. I made links to each individual issue and wrote a short synopsis about each of the magazines, so that they would be easy to search through.

Then I made a list of all the QB magazines that I couldn't find. There were a lot. VSNews, QB Gamer Magazine, Razor Diskmag, QB Voice, Qubed, Inside QuickBasic, Queue Basic and more. As I searched for the magazines, I kept on finding out about more and more QB magazines that had been made over the years. Many of them I had never even heard of before, but I added them to the list, and started looking for more information.

Over the past few month, I've been able to secure issues of several of the magazines that had been lost. You can find out more about the search if you check out this message board thread. Through networking, I was able to get in contact with some of the editors. HAL_8900 and 19day helped me reach Danny Gump and Martin Rampersad, who made VSNews and QB Voice, respectively. 19day also managed to give me a copy of the one issue of Terminator_Z's Razor Diskmag that was ever released. I got in contact with Danny Gump of VSNews, and he sent me all the issues. Hard Rock also had copies of all of Gopus and Skarab's QB Inquirer, which was a great find.

Other leads, however, turned out to be dead. Martin Rampersad, for example, no longer had any copies of the QB Voice magazine that he used to edit. QB Voice is probably lost forever.

Anyhow, I wrote this article mainly because I thought I'd bring attention to the QB magazines of the past, and also inform people about the current search that is going on to find the rest of the missing magazines. I figured that if I publicized this search, I might get a response and find even more about the missing magazines... or at least some more information that will help with the search. Although the archive is very large, it is far from complete. I've exhausted most of my leads, so I'm hoping that somebody else out there in the QMunity has some information on these mags. Below is a list of what has and hasn't been found.

What's Been Found... And What Hasn't

The following magazines have been found and archived in the Zines section thus far. This joint project, between me, Barok, members of the QB community (19day, Hard Rock, HAL_8900, Nekrophidius, etc.) and all the people I've contacted has resulted in the following list:

The following magazines have disappeared, in whole or part. Or some of them may have never existed. If you have copies or any information, make sure you contact me!

As I said before, if you know anything about any of these mags, make sure you let me know! (Especially if you have copies.)

What's this all about? Visit the Zines section at Pete's QBasic Site!

Four Line Game Competition!

Organized by Pete

This month, QB Express is proud to start the first of its monthly programming competitions! Every month, a QB programming competition will be held and judged by the staff of QB Express. Then, in the following issue, the results will be announced. So without further ado, let's get to the first challenge: The Four Line Game Competition!

The Challenge

Your challenge is to make the best possible QBasic game program using just FOUR lines of QBasic code. Games may be of any genre or style, but players must be able to win or lose depending on their input (otherwise, it's not a game).

For this challenge, you may link as many commands together as you can on a single line, using colons or otherwise. Since QBasic is limited to 256 characters per line, your game is limited to a maximum of 1024 bytes of code. You may not use any libraries or external files with the exception of the standard QuickBasic library, QB.QLB. All games must be compatible with QBasic v1.1.

This challenge was originally held in 1999 as one of NeoZones Productions' CodeX challenges, and had quite a good response. During the month, if I can find any of the original entries of the contest, I will post them at the official message board topic.

Entries will be due on or before October 10th, 2004 at midnight, Eastern Standard Time. Results will be revealed in Issue #3 of QB Express, which will come out on or around October 15th.

Here is a complete listing of the rules for this competition:


Visit the official message board thread for the latest information on this competition. This is where you go to ask questions and chat about your progress. You can also check here to get updates of when entries are submitted, and how the judging is going.

Good luck!

Send your entries to pberg1@gmail.com!


By Matt2Jones

Warning: These comics contain adult content!
(If you're wondering, there's some violence and blood...and a bit of strong language. If you don't want to see this, you can return to the table of contents or skip to the next article. You've been warned.)

Matt2Jones returns this month another "Bobby The QBasic Maniac" comic!

Object-Oriented RPGs

Written by Nathan1993

As you're read this, you are probably saying, "What the heck is this dude saying, and why am I reading this???" I'll tell you why: this tutorial will make QB programming much easier. And, I have not really gone into the topic too much, but meh, who cares.

This tutorial is aimed for advanced programmers. If you can make a pixel*pixel scrolling engine, can spell (unlike me), then you can probably do this. But, I would recommend Vic's (yes, you all know him, from back when you were still learning, Vic) sprite tutor. It helps. Down to business. When you want to make this, it's easier than you think. This is how you would want to do this. First, set up some variables. This is simple; you know how to do this!!! But, this is what you would need to do, kind of as a "header."

TYPE ObjectType
UpdateTimer AS INTEGER
Sprite AS STRING * 8

TotalDragons = 3
DIM Dragons(TotalDragons) AS ObjectType

FOR I = 1 to TotalDragons
READ Dragon(I).X, Dragon(I).Y…

Now, I am not going to teach you step by step how to do this, but you will get through. Anyway, now, you get how to set up your timer. And, by the way, you should also know how to animate tiles in a tile engine. Ok, so lets look at the psuedo code.

Replace all the TotalDragons with the NPC, wall, or whatever with the total amounts of those things you will have on the screen at one time. Now, you're probably thinking, OK, but how will this help me? Ever used GameMaker? That's where I'm getting these ideas. It works! So,we have all that. Now what? Well, now we will set up our little event trigger. This is easy. Lets say, when you change the variable Collision, you want to go to the Collision label. This is very easy. We would do it like this

ON Collision GOTO CollisionLabelHere:

Easy, eh? So, lets continue. Ok, that works, but how would I do any more? That's easy to. We would just keep setting these up. And this routine is very easy to use when drawing the screen too.

Put all of your normal stuff here, I guess the DO should be a FOR, lol
Now, do it like this:
FOR I = 1 to TotalDragons
PUT (Dragons(I).X, Dragons(I).Y), Dragons(I).Sprite

Add a few other routines, and your done. But, I would like to point out, that this works real well with the player. To it like this.

ON LeftMove GOTO leftMoveCode


While using this, you can easily implement more things, new things, and not to mention a mafia of players! Muhahahaha! Also, it will make your game more likely to be downloaded by other QB programmers. Mainly because they can use you easy to use code to make a mod, which will make them able to make a mafia, and win the game in 2 minutes, lol!

Try making a non-scrolling, shooter with this. Also, try making more variables like direction, speed, and etcetera. Its real simple.

Hope I helped!!!

Click here to download this tutorial in .txt format. Nathan1993 can be contacted at nathant93@gmail.com.

Fractal Exploration in QuickBasic

Written by Terry Cavanagh

The purpose of this tutorial is to explain the basic theory of and demonstrate how to render an escape-time fractal in Quickbasic. It assumes only some experience at coding in QB.

Mandelbrot Sets

Although the exact definition of a fractal is still an open question, for the purposes of this tutorial a fractal is just a shape that has some degree of self similarity - that when you zoom into it suffienctly and in the right place, you'll find an identical copy. The most commonly known escape-time fractal is called the Mandelbrot Set.

The mantelbrot set
The Mandelbrot Set

The interesting parts of the fractal are labeled on the image above:

Since the Mandelbrot Set is generated on a complex plane, a knowledge of complex numbers is essential. The complex numbers are simply the a field of numbers containing all the real numbers and additonally, something called the imaginary number i, where i^2 = -1.

This allows you to express the square root of negative numbers as a real number times 'i', for example, sqrt(-4) = 2*i.

Complex numbers are useful because they allow you to express solutions to problems such as this : find the roots of the equation x^2 - 4*x +5 (ans: x=2+i and x=2-i). A complex number is usually expressed in the form z = a + b*i, where a and b are both real numbers.

A complex plane
A Complex Plane

The following properties of complex numbers are of interest when considering fractals:

  1. Complex numbers can be usefully represented on a plane, with the real part of the complex number on the horizontal axis, and the imaginary part on the vertical axis.
  2. In the field of real numbers, the |x| operator would return the absolute value of x, i.e. if x were negative, it would return -x, if x were positive, it would simply return x, so that your result is always positive. Another way to look at this is that the |x| operator simply returns the length of x. In the field of complex numbers, this operator is called the modulus and returns the distance of the complex number from the origin.
The modulus Operator
|z| = sqrt(a^2 + b^2)

So for example, the complex number z = 3 - 3i has modulus |z| = sqrt(18) - in gereral you can work out the modulus by the simple formulua |z| = sqrt(a^2 + b^2).

Now, The Mandelbrot set is generated by an iterative function on a complex plane - (Z_(n+1)) = (Z_n)^2 + c, where z_0 is 0+0i, and c is any complex number. For any value of c, the rule is that if as n goes to infinity, then if |z_n|<2, that point is inside the Mandelbrot set. It's called the bailout test.

Take an example: Is 0.5 + i inside the Mandelbrot set?

Well, let's test it: Remember, Z_0 is 0 + 0i:

So z_1 = (z_0)^2 + c
= 0 + 0i + 0.5 + i
= 0.5 + i
z_2 = (z_1)^2 + c
= (0.5)^2 + i + i^2 + 0.5 + i
= (0.25) + 2i - 1 + 0.5
= -0.25 + 2i
z_3 = (-0.25)^2 + -i + 4i^2 + 0.5 + i
= (0.25/4) + 0.5 - 4


You've probably noticed a problem at this stage - a computer cannot possibly test until infinity. The simple solution that's used is to limit the number of iterations used - in other words, to say that if after say 170 iterations, |z_170| is still less than 2, we'll say that the point c is probably in the Mandelbrot set.

We're now one step away from generating this fractal in QB: Iterations.

Essentially the algorithm is as follows:

Say we're going to test up to 170 iterations:

The only realy problem here is converting the x,y coordinates to complex numbers: You can find a good transformation by practice, but the one I use for the Mandelbrot set is:

This centers the fractal on the screen, and scales it just right.

It's high time we wrote some code.

This program will display the Mandelbrot set on screen, with coloured iterations:


'Sets up the first 25 palette entries as a gradient from (0,0,0)
'to (25,48,63). This fast transition will make the outer borders
'of the fractal more distinct
FOR i% = 0 TO 25
OUT &H3C8, i%
OUT &H3C9, i%
OUT &H3C9, (i% / 25) * 48
OUT &H3C9, (i% / 25) * 63

'This completes the transition from (25,48,63) to white with the
'remaining relevent palette entries.
FOR i% = 26 TO 170
OUT &H3C8, i%
OUT &H3C9, 25 + ((i% / 170) * 38)
OUT &H3C9, 48 + ((i% / 170) * 15)
OUT &H3C9, 63

FOR y% = 0 TO 199
FOR x% = 0 TO 319
'zr! and zi! refer to the real and imaginary parts of z.
'They start at 0 + 0i
zr! = 0: zi! = 0
'cr! and ci! refer to the real and imaginary parts of c.
'They depend on the screen location, and are positioned
'so that the origin is about center, and that the axis
'extend about 2 units in all directions
cr! = ((x% / 319) * 4) - 2.5
ci! = (((y% * .625) / 199) * 4) - 1.2
'The iteration loop starts here
FOR i% = 0 TO 170
'A reminder of the formula:
'z_(n+1)=(z_n)^2 + c
'When considered as distinct real and imaginary parts,
'we have = (zr+zi*i)^2 + cr + ci*i
' = zr^2 + 2*zr*zi*i + zi*zi*i + cr + ci*i
' = (zr^2 - zi^2 +cr) + (2*zr*zi + ci)i (as i^2=-1)
' = real part + imaginary part
zrnew! = (zr! * zr!) - (zi! * zi!) + cr!
zinew! = (2 * zr! * zi!) + ci!
zr! = zrnew!: zi! = zinew!
'This is where we do the bailout test. Instead of checking
'whether or not sqrt((zr! * zr!) + (zi! * zi!)) > 2, it
'makes a lot of sense to simply square both sides and save
'on a potentially very time consuming operation...
IF ((zr! * zr!) + (zi! * zi!) > 4) THEN
GOTO exitloop
i% = 170
PSET (x%, y%), i%
'That's all there is to it.

You can see this code without comments here.

The process is exactly the same for other escape time fractals generated from different formulas. Try, for example, using (z_(n+1))=(z_n)^k+c instead - the results are very interesting for non-integer and negative values of k!

Once you've got a working fractal viewer, you'll probably want to use it to explore the fractal. I suggest allowing modification to the scale and positioning of the screen to complex plane transformation in the program. You may find it useful to use a lookup table for this.


Something quite easy to do without a lot of work is a Julia explorer. Julias are related fractals that were actually discovered before the Mandelbrot set, even though they are generated in almost the same way.

Four example Julias based on the Mandelbrot set

There are an infinite number of Julia sets, one for every conceivable complex coordinate. They are generated by providing what's called a seed value. How the Julia looks will depend entirely on the seed you pick. There's an interesting relation between the seed values and the same coordinate on the Mandelbrot set - if you zoom the Mandelbrot at the seed point, you'll see features similar to the Julia generated by that seed. In this way, the Mandelbrot set can be considered a map of Julia fractals.

You can generate a Julia set with the code used earlier for the Mandelbrot, just by making one slight change: In the Mandelbrot, z_0 is set to 0 + 0i, and c is the complex coordinate. However, for the Julia, z_0 is set as the complex coordinate, and c is the seed value. Then all you have to do is generate as normal.

You may find some of these seed values interesting:

0.7 - 0.25i
-1 + 0.25i
0.28 - 0.52i
-0.0672403 - 0.647148i

Below you'll find (uncommented) code for an animated Julia viewer. You can also download this program here.

DECLARE SUB DrawJulia (ci!, cr!)

'Lookup tables
DIM Sine!(359), Cosine!(359)
DIM SHARED Xmap!(319), Ymap!(199)

FOR i% = 0 TO 359
  Sine!(i%) = SIN(i% * (3.1415 / 180))
  Cosine!(i%) = COS(i% * (3.1415 / 180))

FOR i% = 0 TO 319
  Xmap!(i%) = ((i% / 319) * 16) - 4

FOR i% = 0 TO 199
  Ymap!(i%) = (((i% * .625) / 199) * 16) - 2.4


FOR i% = 0 TO 25
  OUT &H3C8, i%
  OUT &H3C9, i%
  OUT &H3C9, (i% / 25) * 48
  OUT &H3C9, (i% / 25) * 63

FOR i% = 26 TO 70
  OUT &H3C8, i%
  OUT &H3C9, 25 + ((i% / 70) * 38)
  OUT &H3C9, 48 + ((i% / 70) * 15)
  OUT &H3C9, 63

xoff! = 0
yoff! = 0
t% = 0
  xoff! = Sine((t% * 3) MOD 359) / 5
  yoff! = Cosine((t% * 5) MOD 359)
  t% = t% + 1
  IF (t% > 359) THEN t% = t% - 359
  DrawJulia xoff!, yoff!

SUB Delay

WAIT &H3DA, 8, 8


SUB DrawJulia (ci!, cr!)

LINE (79, 49)-(240, 150), 169, B

DEF SEG = &HA000

FOR y& = 0 TO 99
  FOR x& = 0 TO 159
    zr! = Xmap!(x&)
    zi! = Ymap!(y&)
    init% = 0
    FOR i% = 0 TO 70
      init% = init% + 1
      zr2! = zr! * zr!
      zi2! = zi! * zi!
      zrnew! = zr2! - zi2! + cr!
      zinew! = (2 * zr! * zi!) + ci!
      zr! = zrnew!: zi! = zinew!
      IF (zr2! + zi2! > 4) THEN
        GOTO exitloop
      END IF
    NEXT i%
    init% = 70
    POKE x& + (y& * 320) + 16080, init%
  NEXT x&




There are a few simple optimizations applied to the code, but it should be easy enough to follow. One of the main reasons why somebody would want to program something like this is as a programming practice - in fact, there are very few more interesting coding problems than optimising a fractal viewer. As a finishing touch to this tutorial, allow me to suggest some simple optimisations you could proceed with:

  1. The Mandelbrot set is symmetrical around the x axis. If you set the x axis at exactly y=100, you can simply mirror the top image. Of course, this is no good if you plan to build a zoomer, however, it is useful if you want to make a Julia explorer, as Julias are also symmetrical around the x axis.
  2. The lake is the most time consuming part to draw - but you can reduce the amount of time it takes by creating a lookup table of 170 complex coordinates and saving each value of z_n as you go. Then for each z_k such that k>n, check to see if z_k=z_n. If it is, you know that you are definitely in the lake (as it means that the iterative function will continue in a loop), and you can move onto the next pixel. This will slow down drawing of the boundary by quite a bit, but the speed gain on drawing the lake is definitely worth it.
  3. You could substitute the floating point math for fixed point - you'll lose a little bit of accuracy, and you'll have to be careful with keeping track of your scaling, however, it's worth it as integer math is usually much faster.
  4. One classic trick is called the 'bounding box method'. Rewrite your code so that it skips every second pixel and offsets every second line by one, so that there is a mesh of black pixels on the screen. This means that you only draw half as many pixels. You fill in the rest of the screen as follows: Scan over the screen, and when you come to a black pixel, check every surrounding pixel. If they are all the same color, then fill in that pixel with that color. If they aren't, then you'll have to calculate it's color in the normal way. This optimisation may not sound like it gives much of a speed boost, however, when faced with a screen that's mostly lake, it's one of the most powerful.
  5. QB can plot pixels much faster if you poke them to the screen buffer instead of using the PSET command. That's done as following:
    DEF SEG = &HA000
    POKE x% + (y% * 320), colour%
  6. Finally, and perhaps most simply, study your formula and try to use as few operations as you can. One simple suggestion for the Mandelbrot set is to put zr! * zr! and zi! * zi! in temporary variables, and use them both times instead of squaring them twice. This means that'll you'll be an iteration off, but that's easily fixed, and it means half as much math for QB.


That's it. I hope you've enjoyed this tutorial! If I've failed to make myself clear, send me an email at blinkthedarkness@hotmail.com and I'll try and clarify the best I can. Have fun exploring! Hopefully I'll see you next month with another tutorial!

- Terry Cavanagh

Download a zip archive of this tutorial and all images / programs here.

Liberate QB From DOS

Written by Martin Rampersad

This month, Martin Rampersad, a very experienced QB programmer who had a big presence on the scene back in 1997 to 1999, is releasing his first QuickBasic tutorial since the days when he edited the QB Voice magazine. Martin has brought us a great tutorial on "liberating" QB programming from the dated DOS GUI, and instead using a sleeker, Windows-based text editor. It's a great technique -- take a look!




QuickBasic had a mighty fine IDE in its day, but it's becoming dated and harder to use in Microsoft Windows. Personally, I'm beginning to find it tedious to work on multi-file QB projects in its native editor, copy and paste doesn't work quite right, and it seems to take 100% of my processor just sitting there. I have set out to eliminate the QB IDE from my programming workflow.

When you have completed this tutorial, you won't be coding in a DOS box with that nostalgic blue background, instead you'll be hacking code in the editor of your choice, and compiling it in a neat and tidy way.



My Approach

Build Tool

A build tool is a program that generates files based on other files and time-stamps. It processes a user-supplied recipe for generating those files.

Here's a simple example of a hypothetical build tool's recipe: (This is not the syntax of GNU Make)


The build tool reads the first line, and decides that it will create JUMPMAN.EXE if any of the following conditions are met:

The build tool quits with an error if a required file is not present (JUMPMAN.BAS). Next, the build tool executes the instruction (or in some cases, instructions) for creating JUMPMAN.EXE, which is on the next line.

We will use unxutils GNU Make, a Windows port of the de-facto standard Linux build tool: GNU Make.

Shell Integration

My Approach

After completing this tutorial, you will compile a QuickBasic project by right-clicking the folder which contains it and selecting Make.

Obtaining and Installing Make

Download the unxutils package. It comes with many standard Unix tools which may be of use to you in the future. For the purposes of this tutorial, only make.exe is important. Thankfully, the installation is completely painless, just extract make.exe into your QB folder. I'll assume the full path to make.exe is C:\QB\make.exe, but you can substitute any folder you wish.

You will also need shellmake.bat in your C:\QB folder. If you have chosen not to use C:\QB as your installation folder, you will need to edit the file.

Integrating With the Shell

Import shellmake.reg into your registry (You will have to edit it if you chose something other than C:\QB, beware of the fancy escaping). This will add Make to the context menu of all folders.

Testing GNU Make and QB

Now that GNU Make is in place, we can try to write a simple QB program and compile it.

Sample QB Source

Everyone's Favourite: HELOWRLD.BAS! Place this file in somewhere that's not C:\QB. I'll assume its path is C:\QBPROGS\HELLO\HELOWRLD.BAS.

Sample Makefile

Place the sample Makefile in the same folder as HELOWRLD.BAS, by design, it's required that you name this file Makefile with no extension. I'll assume its path is C:\QBPROGS\HELLO\Makefile. You will need to edit the makefile if your QuickBasic installation path differs from C:\QB.


Open up a new Explorer window. Navigate to C:\QBPROGS. Right-click the HELLO folder. Click Make. The result should be an executable stand-alone HELOWRLD.EXE

Visit Martin Rampersad's site, Remmy's Directory.

3D Tutorial Chapter 5:
Lookat: An alternate 3D Viewing System

Written by RelSoft

I. Introduction

One of the hardest part in making an article is actually starting one.  Here I am staring at the monitor for 15 minutes doing nothing but listening to smashing pumpkins.  Greatest band(the coolest!!) ever. I can't say the same for zwan though, as they sound so gay.  C'mon Corgan!!! Return to your roots!!!

Okay, enough out of topic babble. This time, I'm going to discuss about 3d viewing systems.  I would like to reiterate that you should have read my previous articles in 3d before reading this primer as this builds around those previous chapters. If not, here's the link:

II.  What is a viewing system?

A viewing system is a way to manage your 3d renders easily with a set of rules. This time we are going to use the left-handed system and the lookat transform. This by far is the easiest way to handle a 3d viewing system.

III.  Types of viewing systems

There are actually numerous types of viewing systems.  But all of them revolve around 3 mother systems.

1. Euler transforms

This is the pitch, yaw, roll way of viewing your world.  This is what we have been using all along.  Rotation from x, y and z axes.  Since it's been already discussed in previous chapters, I won't try to delve on the subject much.  This system, although much more "natural", has some major flaws.

2.  Quaternions

This my friend, is a way of representing vectors  using quats.  My opinion is, with you can do with quats, you can do with vectors and matrices.  Quats are extensions of Complex numbers.  Where complex = i, Quats = i, j, k. You you know how to deal with complex numbers you'd know how to deal with quats. Its just standard algebra if you can remember your (FOIL) technique in multiplying binomials.  They're not that hard, and lots of people use them not even knowing how to do quat arithmetic, since there are numerous premade stuff on the net to do Quat operations. :*)



  • Eliminates gimbal lock

  • Great in intepolation

  • Sounds cooler
  • Probably a fad/trend

  • You still have to convert from euler angles> quats > matrices to transform points.

  • Most open domain quat operations are in C and this is a QB mag. :*)

3.  The lookat transform

This is what I will be discussing in detail from this point onwards.  After making countless, looking good, running well 3d engines, I became sick of managing angles.  So I asked myself: "What if I there is a way to transform your world space using just 2 points?".  The reasons being that, in the real world we only need two points to look.  The one we are looking at and the one looking (that's us).

I must admit that I didn't know what the lookat transform does back then as I only heard it from UGL's U3d module by blitz and v1ctor(not their first names).  And since only they use it and it's not opensource, I had no way of knowing that it was what I needed.  So what I did was try to think of some ways that I could transform my points using 2 coordinates.

Since I know that transforming a point in 3d space requires 3 vectors, all I needed to do was to find values for these vectors.  Now I know my two points/coords.  Say the camera point and the point we would look at:

(cx, cy, cz) = camera(eye)

(tx, ty, tz) = target(what we are looking)

Finding the 1st(forward) and 3rd(right) vectors are easy enough. To find the vectors:

    Forward = target - camera


    Forward.x = target.x - camera.x

    Forward.y = target.y - camera.y

    Forward.z = target.z - camera.z


  Right = Cross(Forward x Up)

This is assuming I already know my up vector.

The problem is, how the hell do I find the up vector? At that time, I had no idea. My first solution is to align the forward, up and right vectors with the x, y and z axes. Not good enough since I have to use euler angles again. Next was to ask my friends at Qbasicnews on how to find the up vector. No one was able to give me the right answer, as all the links posted pointed to dead ends. Them I tried to "guess" the up vector with nasty results. I was almost about to give up on the matter when I saw a code made by TOSHI HORIE on how to find the right vector!!! After reading the code, I saw that the solution was staring me in the face that after reading the code, I would have liked to kick myself where it hurts a lot. :*(

The solution was actually very simple: " The up vector is your Y-AXIS!!!". Yep good ol' (0,1,0). " Would somebody kick my ballz?" j/k. So I now know how to calculate all the vectors, the only thing that remains is aligning all the vectors to your camera coord. This job is handled by the vector operations:

        1. Cross product 

        2. Dot product 

        3. Vector projection

See, I told you to read the previous chapters. These operations are discussed in detail in Chapter 3 of the series. So to make a matrix which transforms the points using the camera vector:


1. Find forward vector

2. Normalize it

3. Make your up vector (0,1, 0)

4. Align your up vector into the camera origin by subtracting the vector projection of forward from up.

5. Get their cross product to get the right vector.

6. Smack those values in the transformation matrix and transform your points.

To align the up vector to the camera origin, we need to find the projection of U(up) to F(forward) by dropping a perpendicular from U's head to F. This vector, which actually lies in the direction of F is the projection of U to F. Now what good would this be? Well we could get the Y(up) component of the Up vector be subracting the X(forward) component thereby, aligning the Up vector with the Forward vector's origin. The resulting vector, after Y is copied to Up is a vector perpendicular to the Forward vector.

1. Vector projection

2. Perpendicular vector after aligning

Here's the lookat function I made. Be sure to note of the up vector as we will have fun with it later on. :*) Matrix.Setcamera is just a function to smack the lookat transform's vector components to a matrix.

Now you only have to use the resulting matrix to transform your points and they would orient themselves the way we wanted to.

SUB Matrix.Lookat (M!(), Target AS Vector, Camera AS Vector) STATIC
'This sub returns a trasformation matrix defined fom 3 vectors U,F,R
'This type of viewing system is perfect for FPS's. ;*)
'I intentionally left out the roll angle since I have really no use for it.

DIM F AS Vector 'Forward vector
DIM U AS Vector 'Up vector
DIM R AS Vector 'Right vector

F.x = Target.x - Camera.x
F.y = Target.y - Camera.y
F.z = Target.z - Camera.z

Vector.Normalize F 'normalize forward vector

U.x = 0
U.y = 1
U.z = 0

Vector.Normalize U

Dot! = Vector.Dot!(F, U)

U.x = U.x - F.x * Dot! 'Align U to F
U.y = U.y - F.y * Dot!
U.z = U.z - F.z * Dot!

Vector.Normalize U 'normalize the Up vector

Vector.Cross R, U, F 'R = normal to plane f and u

Vector.Normalize R

'Set up camera matrix
Matrix.SetCamera M!(), R, U, F



SUB Matrix.SetCamera (M!(), R AS Vector, U AS Vector, F AS Vector)
' [ Rx Uy Fz 0 ]
' [ Rx Uy Fz 0 ]
' [ Rx Uy Fz 0 ]
' [ 0 0 0 1 ]

Matrix.SetIdentity M!()

M!(1, 1) = R.x
M!(1, 2) = R.y
M!(1, 3) = R.z

M!(2, 1) = U.x
M!(2, 2) = U.y
M!(2, 3) = U.z

M!(3, 1) = F.x
M!(3, 2) = F.y
M!(3, 3) = F.z


Now that we know how to transform points using the lookat transform, we would need to design a systems based on the mouse coordinates. Since the mouse has only 2d coords, we only need 2 angles to find a point in 3d space. How do we do that? Well, if you have read chapter 3 of the 3d series I made, it would certainly occur to you that we have to use the spherical coordinate system. I told ya. :*) for those who have forgotten the equations in converting spherical coordinates to rectangular coords:

    CamLookAT.x = SIN(Phi!) * COS(Theta!) 
    CamLookAT.z = SIN(Phi!) * SIN(Theta!)
    CamLookAT.y = COS(Phi!)

Where phi! = (Elevation) the angle against the horizon or your mousey and theta!=(azimuth) is the 2d angle that you can make from the horizon or mousex (think of a rainbow).

How do we get Phi and Theta correctly when there are 360 degrees(2PI) in one revolution and the maximum coords of the mouse are just 319 and 199 respectively (in screen 13)? The answer again is conversion. For those of you who have done Allegro GFX and some Democoding you probably already have heard of angles ranging from 0 to 255 or 0 to 512 or any maxvalue which is a power of two. Don't worry we will not use those values but we will in fact, use the same hack to interpolate our angle increments. :*) Here's the formula:

    Actualangle = 2*PI/Maxangle


    Actualangle = the value we would pass as an argument to the trig functions SIN and COS.

    2*PI = duh? It's one revolution

    Maxangle = would either be 320 or 200. :*)

Here's the code to convert mouse coords to spherical angles. Modified a lil bit to work seamlessly. :*)

    Theta! = 2 * -PI * (MouseX) / 320 'Azimuth
    Phi! = PI * MouseY / 200          'elevation

    CamLookAT.X = COS(Theta!) * SIN(Phi!) 'Spherical system
    CamLookAT.Y = COS(Phi!)
    CamLookAT.z = SIN(Theta!) * SIN(Phi!)

Movement (Translation) is just a matter of understanding vector mathematics I discussed in Chapter3(This is Chapter5 already). To move, we need our starting point(Camera Position), the lookat vector (Camera Lookat), and the speed we would like to move.

To get the speed(Magnitude), we multiply the lookat vector by a scalar value. ie. Scalar multiplication.:

    xmove = CamLookAT.X * speed
    ymove = CamLookAT.Y * speed 
    zmove = CamLookAT.z * speed

To walk forward, we subtract the speed of lookat vector from our camera position (Note that speed here is 3):

    Campos.X = Campos.X - CamLookAT.X * 3
    Campos.Y = Campos.Y - CamLookAT.Y * 3
    Campos.z = Campos.z - CamLookAT.z * 3

To move backward do the reverse:

    Campos.X = Campos.X + CamLookAT.X * 3
    Campos.Y = Campos.Y + CamLookAT.Y * 3 
    Campos.z = Campos.z + CamLookAT.z * 3

Since we translated the origin(the camera postion in world space, we also have to translate the origin of our camera lookat vector or our render wouldn't look nice. For that we add the camera position to our lookat vector. ie. vector addition.

    CamLookAT.X = CamLookAT.X + Campos.X
    CamLookAT.Y = CamLookAT.Y + Campos.Y
    CamLookAT.z = CamLookAT.z + Campos.Z

Now we are ready to transform!!!


1. Calculate spherical angles using mouse coords

2. Convert spherical to rectangular coord and put the resulting values on our lookat vector.

3. Move the camera depending on the input.

4. Translate the lookat origin to the relative to the camera origin(vector add)

5. Translate the matrix using the camera origin

6. Transform the matrix using the lookat transform

7. Transform your points.

8. Draw

That's it!!! Things to remember though is that the origin of rotation is the camera position. What this means is that the camera is not moving but the world space is moving relative to the camera (Einstein). ;*)

The "Puke" Cam

The word puke cam came from a review of Spy Hunter on the PS2/Xbox I saw on TechTV. They called it puke because it would really puke you out of your lunch if you play the game using that mode. You are racing normally but with a rotating camera. Now if that's not gonna make you puke, I don't know what will.;*)

You might think that this mode is a s useless as your worn out socks but think of a plane doing a roll, and a car travelling on an angled road. Surely it would be nice to have a way to roll the world around your forward vector. "No! not another boring vector operations again!". Hardly. :*). Implementing a roll on the camera is just plain fun and plain easy. All we have to do is change the UP vector's orientation. "But up is (0,1,0) right?". Yep, but what if we change the up vector to any orientation we want? Well, it turns out that doing something with out up vector permits us to roll the camera. How do we roll the camera? Easy, use the polar to cartesian coordinate conversion.

    'Calculate roll angle
    ra! = RollAngle% * 3.141593 / 180
    U.x = COS(ra!)
    U.y = SIN(ra!)
    U.z = 0

Clippin' it

The clipping algo that I would introduce here is the easiest one. By easiest doesn't mean it's sucks. Since the ASM triangle filler I used already implements scanline clipping, I should know since I made it. :*), the only clipping we have to do is a near/far clip and 2d x, y clip. Here's the algo.


For every poly
 if all z coords are > 1
   if all z coords are < Farthest distance
     if some x> 0 or some y >0 or some x <319 or some y<199
        Poly draw =True
     end if
   end if
  end if

I would have liked to discuss some more clipping techniques but I doubt that I would have enough space in this mag.

Contact & Credits

For things that you would like to write me about, you could contact me at:

- Richard Eric M. Lope BSN, RN. (Relsoft/Jelly)


Download a printable version of this tutorial, as well as a sample version of Relsoft's Lookat Engine (with source and a compiled executable version) right here.

Part I: The Basics, Chapters 1-3

Written by Neo Deus Ex Machina

This issue marks the beginning of Neo Deus Ex Machina's new QBasic tutorial series, QBNow! Starting this issue with the absolute basics of QB, this monthly tutorial series will turn a complete newbie into a seasoned veteran in no time! Every month, a new edition of QB Now! will be published in QB Express, which will build off of what you learned in the previous issue. Make sure you stay tuned!

In this issue, we present the beginning of QB Now! Part I: The Basics, which includes the Introduction, and Chapters 1 through 3.

And if you can't wait for the next issue, you can download a PDF version of QBNow! Part I: The Basics in its entirety right here! (This includes Chapters 1-5 and all appendices.)




Welcome to the QB Now! Tutorial, part one, explaining the basic things you need to know of and about QB. First of all, let me introduce myself. I am Neo Deus Ex Machina, but usually Neo to keep things easy. I started programming quite some years ago, I was 7 years old when I first saw a computer… with QB on it! I followed simple courses with the local programming club and started programming myself. After 6 years of programming, I didn’t know much more than 6 years before. But when I got to high school, where there was (free for me) internet, I started learning, faster and faster. The last 4 years up till now my programming skills were increasing rapidly. According to some people I may even be called a QB Expert, and I’m proud of that reputation, after 10 years of programming so far. But there are still better people who changed the whole QB world with their programming and I hope that one day I’ll change the QB World as well. But that’s for later.

The main objective I’m trying to accomplish by writing these tutorials is that I can copy some of my knowledge into the reader’s. I.e. it strives for the keeping of knowledge, and for preventing QB to die soon. The more people know much about QB Programming the better. Don’t let QB go extinct.

If you have any questions, remarks or other messages about this tutorial or anything found in it, please let me know. My email address is arecinos@gmx.net. I hope you like reading this tutorial and will be somewhat wiser after finished reading it! Enjoy!


In this tutorial some layout conventions will be used to clarify and to make the tutorial much more readable.

Code sections will be written as follows:

CODE SECTION (Courier New, light blue background)

Remarks or notes are given as follows:

Remark or note section (italic blue)

The following are warnings or exclamations:

Warning or exclamation section (bold red)

That was all so far, I think.

Let’s start with the real tutorial now.



First of all, to program in QB, you need to have a QB compiler or interpreter. You can get several from the internet. I advice you to download QB 4.5, the best version of QB, together with PDS. QB45 is covered in these tutorials. You can get QB45 from http://www.qbnz.com for instance.

If you have downloaded the package, extract it into a folder you like (e.g. C:\QB). Now go to that folder and run QB.EXE, which is the QB IDE. You’ll now see a blue screen, with a menu bar on the top. Go to options and make sure Full Menus is checked. This should enable all features of the QB IDE.

Now, that blue box on the screen is the programming area, in which you can type your code. In the File menu there is Save and Open possibilities, used for saving to and loading from harddisk respectively. There is also an Exit if you want to quit. If you’re used to Windows or a similar Operating System, you should have no trouble finding the means of the menu commands and how to use them. Next we’ll discuss the general basics about programming.

If Windows gives you an warning message about the working directory of QB.EXE being invalid, right-click on QB.EXE, go to properties and program. In the two fields Command Line and Working Dir type in the correct path of your QB.EXE version.


Before we start with the actual programming, I’ll first discuss the possibility of QB to generate EXE files from your code. These executables are somewhat faster than running in the QB IDE. Furthermore, if you distribute your program, most people would like EXE files better than the complete source code.

In the menu, select Run. There must be an option Make EXE. If you click that option, you’ll get to the make exe screen. Here you can select if you want a standalone or a dependent EXE. I advice you to always select Standalone because the other requires certain libraries (BRUN45.LIB) to be on the computer of the person who runs the program, and not all people have this library. Selecting standalone will incorporate this library into your exe, so that anyone can run it, as the library is also in the exe file. Your exe file will be a bit bigger, but that is of no importance (as a couple of kB’s extra isn’t much considering all those almost-terabyte harddisks nowadays). So select Standalone, always. Next you can choose if you want to Produce Debug Code. This should be off. Then you can type the name of your exe file in the textbox, but usually it’s already typed in the box. Then select Make EXE and the exe file will be made! Voila.


Programming is not just a thing you do as if you were eating. Programming involves knowledge, true. But the main thing it involves is thinking, and thinking like a computer would do. I can’t explain anyone how to think, so the hardest part of learning to program is learning to think. You’ll have to learn it yourself as no one can teach you to. Now I’ll discuss the general programming idea that every high programming language uses. It is also immediately a hard part for real beginners, so I’ll try to explain it as well as I can.


Variables are parts of the memory your program uses for storage of data. This data can either be numbers or text. Variables can store different types of data, depending on the data type the variable is of. The different types of data are discussed after this part. E.g. variables can be of type number, which means your program can store numbers in that variable. Other variables can be of type string, which indicates that you can store text in that variable. Variables are very handy things because you can also do something with them, e.g. you can add to number variables together to calculate the sum, or you could append two string variables to eachother. In other words, you can perform tasks with them, that’s why they’re there. Your program can retrieve the contents (value later on) of a variable, as well as putting something in the variable (assigning later on) or perform calculations with it. The best way to get used to variables is using them and seeing them be used. That’s why I’ll continue now.

If you don’t understand it yet, consider comparing variables with drawers of your desk. You have small and large drawers, in which respectively small and large stuff can be put. As already implied, you can put stuff in the drawers, you can also see what’s in the drawer. You can also remove stuff from the drawer. I learned this theory about variables using this simple example.


There are six different indigenous datatypes in QB. I’ll now discuss them one by one.

The most common datatype. It can only hold numbers without decimals ranging from –32768 to 32767. This datatype is 2 bytes in size.
Mostly used after integer, it can hold larger numbers than an integer. Viz. ranging from –2147483648 to 2147483647 without decimals. The long is 4 bytes in size.
A datatype which is also able to hold numbers, but with decimals. It can hold numbers from ±1.401298E-45 to ±3.402823E+38, with a precision of 7 digits. The single is 4 bytes in size.
A datatype bigger than a single, it can hold decimal numbers ranging from ±4.940656E-324 to ±1.7976931E+308, with a precision of 15 digits. The double is 8 bytes in size.
This is a datatype that can hold text or characters. A maximum of 32767 characters is the string’s limit. Strings are noted with double apostrophes (“) around it.
String * n
This is the same as string, only that it has a fixed size of n characters.

That were all data types for QB. There is a way to create your own (pseudo) data type, but that’s discussed in on of the next parts of QB Now!. You can declare variables to be one of the datatypes implicitly or explicitly. Explicit means that you type a statement explicitly saying that the variable is of that datatype. Implicitly means you just use the variable with a post-fix:

% - Integer
& - Long
! – Single
# - Double
$ - String

So a variable called MyVariable% is always an integer, even if you didn’t explicitly tell QB. About explicit declaring, it follows later.


When programming a lot of code, you may forget or have forgotten what some parts of your program do. In order to make it easier to find out again what the piece of code was meant for, there is the ability to add remarks to the code in QB. Remarks or comments are written as if it were code, but they are not executed by QB. You can write anything in remarks, QB won’t even look at it :). This way, you can just put in remarks during your code what happens at the very moment in your code.

In QB, you can add remarks on two ways. The first, and mostly used, way is using the apostrophe (‘). Everything after the apostrophe is a remark, and QB won’t look at it. The second way is using the command REM. Everything after this command is remark. In this tutorial, I’ll use the apostrophe-way, for most programmers do it the very way.


In QB you can give commands in order to do something. As you will learn soon, there are commands for printing text on the screen, or changing colors. However, commands can be divided into two groups, which are important. It’s also important you know this.

First of all there are the statements. These are just the regular commands doing something without returning something. Examples of statements are the text-printing command and the color switching command.

Then there are the functions. Functions are commands that not only do something, but also return something. Usually commands for retrieving data are functions, because they return the data you requested. E.g. there is a command for checking which character is on the screen at a certain location, and this function returns the character found at the location you specified.

If you understand it now already, you’re brilliant. Usually you’ll understand it when you see it working. Now, let’s start with programming!



Here, this is your first program:

PRINT “Hello! This is my first program!”

Type this into the code window of the QB IDE. Then run the code…

To run your code press [Shift] + F5.

What did you see? :) By looking what a program does when you know what the code is, is a better learning method than just reading about what it is supposed to do, but it is a convention and I won’t do else.

PRINT [var] This command (statement) prints text on the screen. It accepts any variable or data. If you don’t specify data to print, it prints an empty line.
END Ends the program immediately.

This should be clear for all. :) But there’s more you can do with text on the screen. For example think of colouring…

PRINT “This is red”
PRINT “How about blue?”
COLOR 5, 7
PRINT “Purple on grey”

Using the Color statement you can define the current color for printing text on the screen. Here is a table holding the color values and its attached color.

0 Black 8 Dark Grey
1 Blue 9 Light Blue
2 Green 10 Light Green
3 Cyan 11 Light Cyan
4 Red 12 Light Red
5 Magenta 13 Light Magenta
6 Brown 14 Yellow
7 Grey 15 White

You should know these colors by heart. Note that a color and it’s lighter version always differ 8, e.g. cyan = 3 and light cyan = 3 + 8 = 11.

The color statement is able to set the current foreground and background color used for the PRINT command. Only colors 0-7 can be used as background.

COLOR fground% [, bground%] This command sets the foreground and/or background color to be used with PRINT commands. All following PRINT commands adapt these colors until another color statement.

There’s still yet some other things that can be done with text on a screen. The following example tells you how to locate and clear text.

LOCATE 12, 24
PRINT “Text in the middle of the screen”
LOCATE 25, 1
PRINT “Bottom”;

As you can see when you run this program, the text will be placed on various positions on the screen, as specified in the code. Now, how does this locate work? The screen is divided into blocks. In each block fits one character. Normally, the screen his 80 blocks horizontal and 25 vertical, which means you can print 80 characters horizontally and 25 lines on the screen. To specify a place on the screen, you should use coordinates, which is a set of numbers (in this case 2) which are the vertical (y) and horizontal (x) position on the screen. The upperleft corner has coordinates 1, 1 and the lowerright 25, 80. Locate first requires the y-coordinate (vertical) and then the x-coordinate (horizontal). The next print statement will then be executed there.

Note that printing to line 25 in the example required a semicolon after the print. This is due to a simple, though stupid, reason. When you would print on lines 24 or 25 normally, the screen would shift up, so that the lines on top of the screen disappear. To prevent this shifting up, a semicolon should be added after the print statements which print on any of the lines 24 or 25.
LOCATE y%, x% Sets the coordinates on the screen for the next print command. Everything sent to the next print command will be printed on that position.
CLS This command clears the whole screen. All text and graphics printed on screen will disappear.


In this paragraph you will learn how to time you programs a bit. Take a look at the following example:

PRINT “Please wait 3 seconds or press a key”
PRINT “Ok, now press any key to quit”

As you can see when you ran this program, the sleep command can do two things. When you specify a number after sleep, it waits for the specified number of seconds, or for you to press a key. Sleep with no parameters (arguments, data passed to the command) waits until the user presses a key.

SLEEP [x] Wait for x seconds or wait until a key press.
As already told, sleeps can be skipped by pressing a key. However, when you press a ‘normal’ key, the keybuffer will be filled and you computer may beep, and your program will hang for a short while. To prevent this, you can also skip sleeps with the Control key without filling the keyboard buffer.


Finally time for more dynamic stuff. The variable part in the general section wasn’t there for nothing. Now we finally get to use them, and you can learn how they work. Take a look at the following example.

MyName = “Neo”
MyAge = 17
PRINT “Hello I am ”; MyName
PRINT “and I am ”; MyAge; “ years old”

Ok, there is some new stuff in this example, which will be explained soon. As you could see when you ran this example, the value of both variables MyName and MyAge was print on the screen on their respective locations specified in the print statement. Variables are means to store data (temporarily) for later use. In this case, the data is used with the print statement. You can assign a value to a variable using the equals (=). Also make sure that the variable you assign data to is able to hold such data. E.g. don’t try to assign text to a numerical variable.

Now lets discuss the making of a variable. The way used in the above example is the Explicit way of declaring a variable. This means, you explicitly tell the QB IDE you want a variable of that type with that name, using the command DIM (which stand for Dimension which is the same as creating a variable). Then further in the program, you can use your variable by just typing its name.

Secondly, there’s something new with print. In the example some semicolons are placed. With print, you can use either commas (,) or semicolons (;) to add different texts with variables together. If the variable is a string, you can use the + operator to add text and the variable together. Compare the output of the follow program:

MyName$ = “Neo”
PRINT “My name is: “ + MyName$
PRINT “My name is: MyName$”

When you compare the output of the first and second print, you’ll notice the difference. If you want to use a variable in your text, you should separately add it to the text already there, in this case + has been used (only for strings to text), but a semicolon or comma can also be used.

The second print in this example will actually work the same as the first in PHP.

Note that in this example the Implicit way of declaring a variable has been used. As you can see, there is no command explicitly declaring the variable of a certain type. With implicit declaring, you just use a variable as if you declared it, then it’s up to QB to see that a new variable has been created. Implicit declaring requires postfix type declarations, so that QB can still see what type the variable is of. The variable MyName in the example is of type string ($). If you don’t specify a postfix, the standard datatype will be used (usually Single). There is a way to change the standard datatype, but that’s for later. :)

Keep an eye on where to put quotes. Print MyName$ is different from Print “MyName$”. The first prints the value of MyName$ on screen, the second prints MyName$ literally to screen.
DIM varname [AS vartype]
[, more]
Explicitly declares as variable with the name varname as vartype. If the latter part is omitted, varname will have the standard datatype. You can declare multiple variables using on line of dim.
PRINT [var] [,] [var..]
PRINT [var] [;] [var..]
Prints a sequence of data to screen. Commas or semicolons are used to append certain data for screen output. If you use a semicolon, the two variables will be printed together without spaces between them. Using the comma however causes both variables to be print on screen with a certain amount of spaces between them. Print is not limited to printing two variables, you can specify much more. Also, if you omit the last variable while still placing a comma or semicolon at the end, the next print command will start on the very place.

To see what’s meant with the last sentence of the print-explanation (about omitting the last variable while still placing a comma or a semicolon), I give you an example:

PRINT “Hello “;
PRINT “You.”,
PRINT “How are you?”

When you ran this, you saw that you got attached to hello and the last question was still on the first line after you, but with a couple of spaces between it. Try experimenting with this as much as needed to understand it fully. :)


As you might have noticed, this is not very dynamic yet. It becomes a whole lot more when you are able to ask the user to enter a value for variables. This is possible using the command INPUT. Take a look at the following example.

PRINT “Enter your front name: “;
INPUT FrontName
INPUT “Enter your back name: “, BackName
PRINT “So your name is “; FrontName; “ “; BackName

You can clearly see the function of Input in this example, but not the syntax. I will discuss it soon. Anyway, input asks the user to input a value for the variable specified in the input command. As you can see, it is also able to display a prompt text, which is a string (variable) before the variable to ask the value of. If you don’t specify a prompt text, a question will be used as prompt text (ugly), so I advice you to always enter a prompt text, and if you don’t want one, not even a question mark, use an empty string “”.

You can also ask values of variables of numerical type. However, if the user doesn’t enter a number in that case, you get a ‘Redo from Start’-error, which stands ugly in your program, but allowing the user to type again. You’ll later on (following tutorial?) learn on how to prevent this.
INPUT [prompt$,] var
INPUT [prompt$;] var
Asks the user to input a value for the variable var. You can specify a prompt text. If you do specify one, you can separate the var and prompt by either a comma or semicolon. A colon is the normal way, a semicolon causes a question mark to be printed after prompt.


At the end of each programming chapter, there’ll be a program written by myself, using most of the things you’ve learnt in this chapter, by means of convention. This program will be a bit bigger than the examples you’ve seen so far. Also, after each chapter program there are some exercises for you to solve. Try making these exercises before proceeding to the next chapter. The answers to all exercises will be at the end of the tutorial.


PRINT “This program asks you to enter your favorite color.”
PRINT “Enter the color number of your favorite color (0-15).”
INPUT “Your favorite color: “, NiceColor
COLOR NiceColor
PRINT “So your favorite color has color number”; NiceColor;
COLOR 7, 8
PRINT “Press any key or wait 5 seconds to quit..”

Here are some exercises:

Exercise #1
Print the names of all 16 colors on the screen, in their respective color. E.g. ‘Green’ in green, ‘Red’ in red, etc.
Exercise #2
Ask the user to input his two most favorite colors, and then ask the user to input his/her front and back name. Clear the screen, then print the full name on one line, in which the front name is written in one favorite color, and the back name in the other.
Exercise #3
Make a program which poses the user 10 questions, with each question the screen will be cleared. At the end, print out, on one screen, what the user answered on all questions.

Appendix: Exercise Answers

My answers to all exercises in this tutorial.


Exercise #1: Print the names of all 16 colors on the screen, in their respective color. E.g. ‘Green’ in green, ‘Red’ in red, etc.

PRINT “Black”
PRINT “Blue”
PRINT “Green”
PRINT “Cyan”
PRINT “Magenta”
PRINT “Brown”
PRINT “Light Grey”
PRINT “Dark Grey”
PRINT “Light Blue”
PRINT “Light Green”
PRINT “Light Cyan”
PRINT “Light Red”
PRINT “Light Magenta”
PRINT “Yellow”
PRINT “White”


Exercise #2: Ask the user to input his two most favorite colors, and then ask the user to input his/her front and back name. Clear the screen, then print the full name on one line, in which the front name is written in one favorite color, and the back name in the other.

INPUT “What’s your favorite colornumber? (0-15) “, FirstFav
INPUT “What your 2nd favorite colornumber? (0-15) “, SecondFav
INPUT “What’s your front name? “, FrontName$
INPUT “What’s your back name? “, BackName$
COLOR FirstFav
PRINT FrontName$; “ “;
COLOR SecondFav
PRINT BackName$


Exercise #3: Make a program which poses the user 10 questions, with each question the screen will be cleared. At the end, print out, on one screen, what the user answered on all questions.

DIM Q1$, Q2$, Q3$, Q4$, Q5$, Q6$, Q7$, Q8$, Q9$, Q0$
INPUT “What does HTML stand for? “, Q0$
INPUT “What does QBASIC stand for? “, Q1$
INPUT “What does PHP stand for? “, Q2$
INPUT “What does CLS do? “, Q3$
INPUT “What does INPUT do? “, Q4$
INPUT “What was the predecessor of C? “, Q5$
INPUT “What is the PRINT equivalent in C? “, Q6$
INPUT “Did you understand this chapter (3)? “, Q7$
INPUT “Did you answer ‘NO’ on the previous question? “, Q8$
INPUT “Now, do you want to see your answers? “, Q9$
PRINT “Muhahaha, I’ll show them anyway ;)”
PRINT “What does HTML stand for?”
PRINT “What does QBASIC stand for? “
PRINT “What does PHP stand for? “
PRINT “What does CLS do? “
PRINT “What does INPUT do? “
PRINT “What was the predecessor of C? “
PRINT “What is the PRINT equivalent in C? “
PRINT “Did you understand this chapter (3)? “
PRINT “Did you answer ‘NO’ on the previous question? “
PRINT “Now, do you want to see your answers? “

Next Month: Chapter 4 of QBNow! discusses how you should structure your code, with topics like making choices based on user input, and modifying your data to a more useful form.

You can email Neo at arecinos@gmx.net.

Final Word

Well, that's it for this issue of QB Express!

A lot of you were worried I wouldn't get this out by the deadline. Actually, a lot of you were going crazy in anticipation, waiting for this issue to come out today. Well, I made it out on the Fifteenth of September -- with over two hours to spare! (Keep in mind all you superfans in Sweden and the Netherlands: I live in the Eastern Standard Time zone. Heheh.)

This was an absolutely great issue, thanks to the great contributions from everyone. I'm really hoping that the next one will be just as good. But that all depends on YOUR help. I need writers, reviewers, judges for the competitions, new tutorials, news reporters, and people to give me ideas and general feedback. If you have *ANYTHING* to contribute, make sure you send it in. I can be contacted at pberg1@gmail.com or through this contact form. Remember, this magazine is dedicated to free speech; anyone that wants to write can, and anything that is submitted will be published.

Next issue, you can expect a whole lot more great stuff. Neo Deus Ex Machina is back with Chapter 4 of QBNow!. Chaoticmass will be bringing us an insightful tutorial on scripting. Terry Cavanagh and RelSoft have also both hinted that they'd bring us some more all-new tutorials. Of course, all the regular columns will be back too, as well as some new stuff from yours truly. Plus, you'll get the epic results of the Four Line Game Competition. All this and more in QB Express Issue 3! You can expect it up on or around October 15th!

Thanks for reading! Until next time...END.


Copyright © Peter Berg and contributors, 2004. All rights reserverd.
This design is based loosely on St.ndard Bea.er by Altherac.