<html>

<head>
<meta http-equiv="content-type" content="text/html">
<link rel="stylesheet" type="text/css" href="qb.css">
<link rel="stylesheet" type="text/css" href="qb-colors.css">
<title>QB Express: Issue #21</title>
</head>


<body>

<br>

<div id="content">

<div id="top">
<h1>QB Express</h1>
<h3 class="date"><b>Issue #21 &nbsp;~&nbsp; July 16, 2006</b></h3>

<p class="topquote"><i>"A magazine by the QB community, for the QB community!"</i></p>

</div>

<h3>In This Issue</h3>

<ul>

<div id="contributors">
<center><b>Contributors</b></center>
<hr>
<ul>
<li>Pete (Editor)</li>
<li>MystikShadows</li>
<li>Rick Clark</li>
<li>SJ Zero</li>
<li>Relsoft</li>
<li>Moneo</li>
<li>Rattrapmax6</li>
<li>Redcrab</li>
<li>mennonite</li>
<li>tunginobi</li>
<li>Kristopher Windsor</li>
<li>Eclipzer</li>
<li>Roger Greenlaw</li>
</div>

<li><b>Regular Columns</b><br>
<ul>
<li><a href="#editor">From The Editor's Desk</a></li>
<li><a href="#letters">Letters</a></li>
<li><a href="#poll">Express Poll</a></li>
<li><a href="#news">News Briefs</a></li>
<li><a href="#gallery">Gallery</a> - LONG, Super Smash Bros. Clone and FieldView</li>
<li><a href="#awards">Awards</a></li>
<li><a href="#comic">Comics</a> - QB Horse Humor, 0 1 Comics, Stickblob</li>
<li><a href="#final_word">Final Word</a></li>
</ul>
</li>

<li><b>Articles & Editorials</b><br>
<ul>
<li><a href="#qlympics">Qlympics 2006: Nominations Round</a> - Pete</li>
<li><a href="#24hours">How to Design and Program a Game in 24 Hours</a> - SJ Zero</li>
<li><a href="#next">The Next (R)evolution in Computing</a> - Rick Clark</li>
<li><a href="#polemic">Polemic For the Future of FB</a> - SJ Zero</li>
<li><a href="#digg">Digg it!  The Year's Best Programming Articles From Digg.com</a> - Pete</li>
</ul>
</li>

<li><b>Tutorials</b><br>
<ul>
<li><a href="#sdarray">Single-Dimension Dynamic Arrays in Types</a> - Rick Clark</li>
<li><a href="#tui">Text User Interface Development Series: Part One - T.U.I. Basics</a> - MystikShadows</li>
<li><a href="#circles">Using Circles as Objects in Games</a> - Kristopher Windsor</li>
<li><a href="#controller">Computer Controller Design</a> - SJ Zero</li>
<li><a href="#random">Generating Random Integers</a> - Moneo</li>
<li><a href="#floormap">Floor Mapping Tutorial</a> - Eclipzer</li>
<li><a href="#delay">An Improved Delay Routine</a> - Roger Greenlaw</li>
<li><a href="#winsock">An Introduction to Network Programming Using Winsock</a> - MystikShadows</li>
<li><a href="#bounce">We are the Normal and the Bounce Equation</a> - Relsoft</li>
</ul>
</li>

</ul>

</div>


<br><br>


<div id="content">

<a name="editor"></a>
<h2>From The Editor's Desk</h2>
<h3 class="writer">Written by Pete</h3>

<p>This past month, there has been a lot of <a href="http://www.ascii-world.com/phpBB2/viewtopic.php?p=2717#2717">speculation</a> and a lot of conspiracy theories that QB Express is "dead" or "dying," that I don't care about the magazine anymore, and that nobody is submitting articles.  Well, to quote the great Mark Twain, when his obituary was erroneously published:</p>

<blockquote class="letters"><font size="+1"><b><i>"The reports of my death have been greatly exaggerated."</i></b></font></blockquote>

<p>QB Express is not going anywhere.  Sure, things have slowed down the last few months, and the issues have started coming out on a bimonthly basis -- but I am still dedicated to publishing QB Express as often as possible, and always doing the best job that I can.  Ideally, I'd like to pump an issue out right on schedule on the fifteenth of every month, but sometimes life gets in the way...and the issues always end up taking far more time to write/compile than I ever expect them to take.  But rest assured: As long as you, the readers, continue to submit content, QB Express WILL come out, sooner or later (preferably sooner), and it WILL continue to maintain the same high quality that it has always had.  That is my promise to you.  And I take this very seriously.</p>

<p>I'd like to rebuke some of the jabs people have made at QB Express lately, particularly in <a href="http://www.ascii-world.com/phpBB2/viewtopic.php?t=507">this thread</a>.  In that post, the moderators of ASCII-World (MystikShadows, lurah and mennonite) announced the creation of a new QB magazine, entitled "PCOPY."  When I heard about PCOPY, I was happy, and wished them well...I believe that there's room for many more QB magazines in the community, and the way I see it, the more activity, the better.  But some QB Express fans started questioning the new magazine, saying it would hurt QB Express and that there was no need for a second BASIC magazine.  Hearing the criticism, mennonite went on a <a href="http://www.ascii-world.com/phpBB2/viewtopic.php?p=2717#2717">tirade</a> against QB Express.  Here are some of his claims -- and my responses:</p>

<blockquote class="letters">
<p><b>1.</b> QBE is becoming something <b>most members of the qmunity</b> (my qmunity) <b>have no reason to post to</b>. it is becoming <b>too specialized</b>, and although pete says he will publish anything about qbasic/freebasic (indeed, thanks to his server he can publish just a little more than pcopy can) the fact is that most things will not FIT there. what? i mean contextually. <b>qbe is becoming a magazine for the highly skilled</b>, mostly. that can change- it should!</p>
</blockquote>

<p>I disagree completely -- QB Express is a magazine for EVERYBODY in the Qmunity, of all skill levels.  Very few people who read QB Express are "elite" coders.   I myself certainly am not a good QB/FB programmer...  Besides, a lot of the tutorials in QB Express are *very* basic.  I mean, we've had a half dozen tutorials that introduce people to the PRINT command!</p>

<p>There have always been tutorials covering a wide array of topics, for both beginners and advanced coders. And that's the way it should be. Why should I pander to one specific group when I can deliver content that will appeal to everyone, whether they're a beginner or an expert?  If you aren't skilled enough to understand a tutorial, skip it.  Passing on one article doesn't ruin the experience of reading the entire magazine.  My hope is that there is something in QB Express for everyone, and I think we've succeeded so far.</p>

<blockquote class="letters">
<p><b>2.</b> the main reason no one is sending stuff in to qbe is because (i think, and at least two others have suggested something like it) is that <b>there is an unconscious feeling it won't be published anyway</b>. i mean pete's been busy...the damage is done- three months is a long time to see qbe get irregular!</p>
</blockquote>

<p>First off, QB Express still gets plenty of submissions.  The submissions were a little bit slow this month, and we have had bigger issues in the past, but this issue is still huge.  I mean, there are NINE tutorials this month, FIVE comics, one of the biggest news briefs sections ever, and a ton of other articles!  Before QB Express, it was unheard of for a QB magazine to have more than four or five tutorials a month...I just think that QB Express' huge success has made people have hugely inflated opinions of how much content a magazine needs.  Honestly, I don't know what you're complaining about.</p>
<p>Second, becoming a bimonthly magazine for a few months instead of a monthly isn't going to kill QB Express.  I'll be the first to admit that the magazine's lost a little bit of momentum, but it's not like QB Express is down for the count.  I hope to get back to the monthly schedule if I can find the time.  (That's the hard part...keep in mind that Pete's QB Site is one of a dozen other websites that I run; that I work 60+ hours a week for <a href="http://www.actualreality.tv">Actual Reality Pictures</a>; I produce a cartoon called <a href="http://www.ictv.org/show/UnicornBoy/">Unicorn Boy</a> and I'm planning a new reality show that I will produce in the fall; I'm writing a feature-length screenplay and spec scripts for TV shows; I do work for my parents' company, <a href="http://www.thunderbirdatlatl.com">Thunderbird Atlatl</a>; I live in Los Angeles, where I spend at least an hour stuck in traffic a day; I've got many other hobbies that I pursue...and I also have friends, family and a social life.)</p>

<blockquote class="letters">
<p><b>3.</b> something needs to change anyway. i've tried changing pete's course before, it doesn't work. pete's gonna do his thing, (and if you were in pete's shoes, wouldn't you?) <b>i don't think the way pete is doing things now is gonna work</b>, and i want there to BE a qbe 22, 23, 24... and this might make him see <b>he needs to change something fast</b>, sooner. this is the best kick in the ass i can think of, and i swear, it's at the right time. this has been planned for a while. </p>
</blockquote>

<p>Considering that QB Express is the longest running and largest QB magazine ever, I think I'm doing something right. Look at the archive. We've published more articles in QB Express than almost every other QB magazine combined. What needs to change? My system has worked better than any has in the past, and QB Express is by far the single most productive website in the QB / FB community. I challenge you to name any other site that has more content posted to it on a regular basis.</p>

<p>Maybe I haven't been running QB Express perfectly, but you can't say I haven't done a decent job.</p>

<p>And so, those are my retorts.  If you, the readers, are worried that QB Express is done for, go ahead and jump ship.  Now that there are other magazines for you to submit content to, you've got choices.  I know some of you aren't happy with what I've been able to scrape together every month and a half or so, but I ask that you cut me some slack.  QB Express is a shitload of work, and it's work that I don't HAVE to be doing.  It's a hobby; it's something that I do for "fun" (even though it's not really all that fun, especially with all these people ripping on me).  And I don't make a cent for the dozens of hours of work that I put in.  Just put yourself in my shoes.  That's all that I ask.</p>

<p>Enjoy the issue.</p>


<br>

<h3>Submit To QB Express</h3>

<p>You all know the drill.  This magazine can't exist without people SUBMITTING articles, editorials, tutorials, reviews, news and feedback.  This is not just a solo effort by me... it's a group effort by people throughout the QB community.  <b>If you have anything to submit, or have time to write something, DO IT!</b></p>

<p>If you want to write about something, but can't think of a topic, or need inspiration, check out the <a href="http://www.petesqbsite.com/forum/viewtopic.php?t=745">"Official QB Express Article Requests" thread</a>!  There have been quite a few articles requested -- and even if none of them strikes your fancy, we can help you come up with something that you would like to write about.   If you're interested in getting your own monthly column or just want to write an article or two, by all means, do it!  <b>Anything that is submitted will be included!</b></p>

<p>I also want feedback and letters to the editor regarding this magazine.  I want suggestions and critiques.  What do you like?  What don't you like?  What could be done better?  Let me know!</p>

<p>All submissions and feedback can be sent to <a href="mailto:pberg1@gmail.com">pberg1@gmail.com</a>.  You can also PM me on the <a href="http://www.petesqbsite.com">Pete's QB Site</a> or <a href="http://www.qbasicnews.com">QBasic News</a> message forums.  If <i>QB Express</i> is going to continue to be so good, YOU need to contribute!</p>

<p id="signature">-Pete</p>


</div>




<br><br>




<a name="letters"></a>
<div id="content">
<h2>Letters</h2>


<h3>Letter From MystikShadows</h3>

<p>Hi Pete,</p>
 
<p>I had to make my coffee first to read this edition ;-). WOW is just about the only word that comes to mind reading that ;-). You know, there's something to be said about the day QB Express is finally made available.  I, for some reason, picture the community suddenly quieting down, sitting down at their PCs and starting to read.  Almost like sunday church ;-).</p>
 
<p>Maybe I'm the only one that thinks that though I don't know.  But you know the feeling I'm trying to explain? hehe.  what I do know is that I like to plan my reading ;-).   I don't try to read it on a day where it just won't work.  I'll look at the table of contents, see what's on the menu so to speak and then know what i'll be reading next when that time comes. So I'm a motivator huh?  I can live with that ;-) hehe...Although it's not just a bout motivating per se, but if it's one of the side effects, I can open up a MystikShadow Cult or something hehe.</p>
 
<p>I'd like to talk about Lachie's (2 month worth) letter.  well especially about the part that concerns me (as in me not doing my job).  Well first off, for the last 2 issues (hence 3 1/2 to 4 months), he's right.  I have to admit, I've been neglecting the newsbrief side a bit.  But as he'll read in this issue #21 I am back on on the chain.  And i'll be sure to make sure to be sure he never needs to say that ever again ;-).  Also to help his problem, I would strongly recommend atleast 256 Megs of RAM to run Windows XP, 512 would be even better.  XP is a resource hog with no precedence and no limit to what it can eat.  so if he can upgrade his ram it would be great.  if not, I would recommend reverting to Windows 98 with driver and Direct-X upgrades.  Should make things run alot smoother.</p>
 
<p>A word about my MIDI series, I haven't been able to finish it for this issue.  This month has been weird for me to say the least, always outside doing something, so my time got cut short.  it's started but not completed (as most know, I've been busy with my FB Elite project (see the newsbriefs in this issue), The 4th installment of the MIDI series should be available in QB Express #22.  I'm also looking for other subjects (midi and/or music) related to write about that I might not be thinking about at the moment (since the series seems to be good so far, let's push the bar and make it the single most complete MIDI reference work available anywhere.  So if any of you readers have an idea, feel free to let me know.  As a Part 5 I want to describe everything about the SoundFont format (getting popular today) and how to use it.  After that I'll let the readers decide ;-) (and yes, digital audio is on the schedule with things like special effects and FFTs (Fast Fourrier Transforms).  But I know there's so much more :-).</p>
 
<p>And now comes the letter itself.  First off, your express poll, when I saw the list, I was amazed (and somewhat dissapointed at myself) at how many names I didn't know in there. makes me mad to not have been there back in those days. I'm glad I arrived when I did, in a way, in another, I wonder where I would be in gaming today, if I would have arrived a heck of a lot earlier in the QMunity than I did ;-). This is also why I emailed you all these questions and posted about it on your forum.  Hopefully, someone will clue me in on everything I missed since the beginning of the QMunity.  It's one thing to read about some of the stuff, it's another to have experienced it and tell me about it :-). Come on guys make me live these classic moments ;-).</p>
 
<p>Now, how about that news section huh?  I know I didn't participate in it but like wow, there's a whole lot happening still today as I can see. There's really alot going on, seems not as many people are talking about it though or actually announcing it, some of the news happens on threads not destined to be announced as news.  So you gotta look everywhere to be sure to get it all.  But it's still awesome to see that so much is still happening.  Things are alive and well as we can see from that news section.  I bet you there's even more happening that we're not aware of.</p>
 
<p>I have to admit I was a bit biased in my suggestion for the awards.  The reason I suggested Jace Masula's website was well I like the design of course, crisp, clean, easy to nanigate, professional looking, you name it.  But I really like his ASCII Quest game creation system too.  As for Piptol, well you named the reasons very well.  He really does deserve a lifetime achievement award for all his contributions to the QMunity.</p>
 
<p>Cyber Chick, wow, so far it's shaping up to be one of the best 2D games I've seen (any language).  I love the graphics, I love where the game seems to be going.  Things look great on all the screenshots shown.  I mean wow.  I think more games like those should surface, I love them (yes, I don't just love text ;-) but this is a prime example of the type of 2D game I like.  Great work on the part of the creator.  I'm looking forward to hearing more about that project and eventually playing that game.</p>
 
<p>I enjoyed lurah's first ever game review.  I'm still laughing when he said that playing that game was suicide in every possible way (lurah killing lurah as in the screenshot lol.  Good ole lurah has a great way with words even if his english isn't as good as he wants it to be, he does a great job at expressing himself.  And I think, for a first review, he did an awesome job at it too.  Three cheers for lurah.  I want more of those :-).  More articles too, so far, I've found every article he's written to be very through provoquing and true.  C'mon lurah, get busy hehe.</p>
 
<p>Pritchard's making a QB or FB site article, I thought, brought out some good tips as to what you should do before you make the website.  I think it might even be the reason why alot of QB/FB website projects have failed in the past as well.  It's one thing to do a QB/FB website that has everything, it's another to do a QB/FB website that has things no one else has.  In that regard, I think Pritchard did an outstanding job at bringing out information to those that want to make a QB/FB website that just might make the difference whether their website succeeds or not.  Great work and I enjoyed reading it a lot.</p>
 
<p>Nathan's article about Creatively Writing Game Story Lines, I think, was one of his best article, though short, it seemed to be enough to bring the reader to think alot before making their next story based games.  looks like he covered alot of grounds with that small article which is, in effect, quite a feat of strength considering the subject matter.  So I had to point that out here.  I'm wondering how good nathan93 would be on a subject that requires a more detailed article, but I think that if he likes the subject enough, he might surprise us and maybe even himself. Great work there.</p>
 
<p>Moneo's "The Fallacy of Meaningful Codes" explains an age long issue in the professional software developement industry (specifically in IT (Information Technology).  It's obvious Moneo has had plenty of experience in the subject, the article does nothing else but show all that experience.  Now, when you think about it, making sure each record of a database can be uniquely retrieved can definitaly be applied to games (more complex games at that too). So if some of the game coders out there think that this doesn't apply to them, the best thing I can tell them is that wait till you have a couple 10s of thousands items to deal with in your game of which only a few can be worked with depending on where you are in your game's world, etc etc...and maybe you'll see the usefulness of having meaningful codes implemented.  I think this article is worth it's weight in gold for the IT industry and for any industry that might need to deal with a large amount of data.</p>
 
<p>What's to say about Immortis' "What Not to Do as a Programmer" article. Can you imagine, in 3 rather short categories, he explained over 40 years of computing issues with the programmers in pretty much all it's gory (but true) details.  Not being in one of those 3 categories is what makes a good programmer, end of discussion :-).  I'd sure like to see Immortis tackle other great subjects like this one. I really liked his way of explaining things in a dead on target, in your face with diplomacy (I define diplomacy as sending someone to hell in such a way that they can't wait to make the trip hehe).  But All true and those that fit in one of the categories will see that he's absolutely right.  Awesome work.</p>
 
<p>Always glad to read ratt's comics, they are so consistant, and he's definitaly getting better at the humor behind the comics.  I don't agree with Lachie on his comment about them at all.  It's a nice break from the magazine, in the magazine (who sais QBE doesn't offer everything now huh HUH?) hehe.  It's also great to see the other 2 comics.  I mean come on, what's the new york times without it's sunday morning funnies? hehe.  Myabe QVE should be released on sundays only to give these comics their due value? hehe.  I liked them all.</p>
 
<p>Optimus' "Polar Plasma" explained to me something I've been wanting to know for a good long while now, for a few years, I've always seen plasma demos, but I never quite studied code or looked at anything in enough details to actually understand how they work per se.  I'm glad Optimus explained it here.  It's alot clearer in my mind now.  So a big thank you to him for writing on the subject, I for one definitaly appreciated the effort and am tremendously glad to have read it.</p>
 
<p>Fuzzypig's "Making Good Sound Effects". What can I say, I love sound and music, digital audio or MIDI files (as some might have noticed by now hehe).  Whenever I see a title with sound, music or sound effects in there, my eyes open wide and i'm ready to absorb all I can from the contents.  It's clear to see fuzzypig's knowledge in the field, and I would like to thank him right here for taking the time to talk about it here on QB Express. One of the best readings I've had personally.  I might email him with a good set of questions now that I know someone that know that much about digital audio and FX.  A great read.</p>
 
<p>Well I was hoping lachie would do a follow through to his "How To Program A Game With FreeBASIC" and was pleasantly surprised to see that it was there.  I gotta say, there's no denying lachie's knowledge in that field. he's one of the best and certain one with the abilities to share that knowledge clearly with the readers.  So i'm glad he took it upon himself to share that knowledge with the readers. I'm learning alot from him and well I can't wait to read more about it. Keep on writing Lachie, I'm waiting hehe.</p>
 
<p>What can I say, the reason why I'm such a big (err motivator, yeah that's it ;-) ) is because there's so much to motivate about :-).  Look at all the great contents it has and the great people contributing to it.  I shouldn't be the only one with the pom poms here hehe.</p>
 
<blockquote>MystikShadows<br>
Stephane Richard</blockquote>

<blockquote class="letters">

<p>Haha, looky here!  Another fantastic letter to the editor, as we've all come to expect by now. :)</p>
<p>I love reading your take on *every* single article in each month's issue -- you're always so positive, and so <i>motivating</i>, and I guarantee you that the writers really appreciate the kind words.  Maybe I should buy you some pom-poms, because you're one heck of a cheerleader.  :)</p>

<p>You've mentioned many times that you wish you had been around to see the QB community in its infancy, back in the mid-to-late '90s -- back in the proverbial "golden age".  I wish I were able to able to satiate your hunger on the topic, but I'll tell you, the reason why I'm still hanging around the Qmunity now is because I had so much fun in those early years.  I'm sure I have a gilded memory of the Qmunity back then, considering I was an enthusiastic 12 or 13 year old, and we tend to remember fond childhood memories as even better than they actually were.</p>

<p>But still, I think the Qmunity as a whole  was a whole was a lot more <i>excited</i> to be coding back then.  We were younger, the World Wide Web was still new, and this concept of sharing your little game programs and talking to each other online and running your own website for the world to see was just new and exciting.  Now, I think a lot of us take it for granted.  The newbies that are joining the QB community have grown up with things like high-speed internet access and message forums, so this stuff doesn't seem revolutionary to them.  For me, on the other hand, the QBasic community was the *first* online community I ever interacted with, the first message boards that I visited, and Pete's QBasic Site was my first website.  I didn't have Internet access at home until I was 12, and that's also when I really got interested in computers and programming.</p>

<p>Anyway, how can you find out about the Qmunity back then?  Don't expect the "veterans" that are still hanging around to be able to give you the full picture.  I suggest you go back and read through the huge amounts of "historical documents" that are still online.  The <a href="http://www.petesqbsite.com/sections/zines/zines.shtml">Zines Archive</a> is a good place to start.  And there are hundreds of old QBasic sites from the '90s still lurking on the Internet, waiting to be explored.  It's a veritable treasure trove, and I'm sure you can find out more than you ever thought you'd find if you take the time to look. :)</p>


<p id="signature">-Pete</p>
</blockquote>


<br>


<h3>Letter From mennonite</h3>

<p>hi pete, i have questions on my mind, and i thought i'd run them by you.</p>

<p>you might not like these questions, you might think i'm being a dick, i really can't anticipate your exact reaction.</p>

<p>all the same, i thought i'd get your opinions first, since for one, you're certainly involved, and also, because as you've said before, this isn't even about programming for you anymore- it's about the community. i think among a few others, you might be best fit to address these questions. and forgive me being longwinded... you probably noticed it's the only way i write, and it's never on purpose. i try to explain my questions to make sure it's not misunderstood what i'm asking.</p>

<p>anyway, here's a start: who rules the qmunity?</p>

<p>has v1ctor usurped him or does the qmunity rule v1ctor?</p>

<p>does the qmunity have a ruler? is it z!re? do people rise to power, as shadowwolf says, "there are a few people like Z!re with in the community that can pull of this type of thing... they got this type of power by winning flame wars and climbing the political ladder so to speak."</p>

<p>also, if there was a ruler of the qmunity, what would he be like?</p>

<p>personally, i think the qmunity is better off without a ruler... more like with leaders... who lead not just one, two, or three people around, bullying newbies, (which never happens, so forget i said it!) but someone who really creates what you used to truly be able to call a "community" that is... a community of *people*, vs. just a "community," of individual persons, as i suspect things are moving towards.</p>

<p>but all the same, lets look at some "person"-types, and decide who's best fit if we're all stuck with him (or her.)</p>

<p>is this person someone with an image to maintain, verses a real sort of "thing" about integrity, or is it someone who simply abuses everyone to maintain an "image" of superiority? (i don't think at the end of the day one person is actually superior to another, but our society is undoubtedly full of such false images.)</p>

<p>is this person someone who's so full of himself that he can't tell or even notice when other people are making substantial contributions to the qmunity?</p>

<p>or is this person more of a puppet... a mouthpiece for the real leaders of the qmunity, one that says one thing now, another later... as long as it's what the community expects to be said at a given time? someone who will bow to anything, the ridiculous, the profound, whatever strikes the mood of the masses? a lapdog leader- do any of us want or need one, or can we say for ourselves what is on our mind and render such a figure worthless?</p>

<p>do we want someone who is so completely busy with projects that he doesn't have time... similar to someone who is merely too full of himself... but not in terms of ego, merely someone who is too preoccupied? would this make a suitable leader, if we had one? or would a newbie with a new hobby (that is, programming) be better suited? admittedly, in *most* instances such a newbie would NOT be fit at all. still, i'm asking.</p>

<p>then again, most people simply (and without any reason to be ashamed of it) have something better to do. what's being the leader of a band of geeks (i use the term affectionately)... even a loosely defined sort we belong to now, compared to who knows what else?</p>

<p>again, i don't think a leader is needed, per se... but i think we might be stuck with people "rising to the top" as it were... and i'm not sure that alone is a problem. as long as an ideal is created where people trying to crush each other isn't the main goal of "belonging," and where the priority becomes... i dunno, helping each other in a real way, and not making newcomers sorry they asked... i think there won't be any consequence of a leader,  other than the occasional (and welcome) extra topic or project being discussed.</p>

<p>in other words, a community that values people (as a whole) won't pay much attention to a leader anyway. too busy being a true community. and that's good enough!</p>

<p>i put this idea forward at a time when people are jumping out of line to disapprove of this or that... sometimes someone goes too, too far in attempting to destroy another person. actually, seph comes to mind, but there's no telling who i am referring to. you may think i am referring to pete, who felt compelled to trash seph personaly for whatever reason in qbe #20. i am of the impression (perhaps mistaken, to be sure!) that seph did nothing of any sort to pete... that pete only decided to trash seph as a bandwagon sort of thing- but perhaps seph, as i once did, managed to rub pete the wrong way in an email- i dont know.</p>

<p>i could also be talking about z!re, in her inability to wish seph and his new family the best, only to take yet another opportunity to say he's essentially unfit to exist. i could be talking about that.</p>

<p>or, as they often are to me, these could merely be part of another trend i see, and wonder about. it may seem very silly, even absurd to even ask these questions, or admit they've crossed my mind.</p>

<p>but as long as they have, i thought i might try to find out what others think. whether i truly and ultimately care, or whether i don't- i'm honestly curious.</p>

<p>is there a particular mission left, or common ideal left in this community? what ideal would that be, and who is best fit to help others see that goal to fruition?</p>

<p>and don't say v1ctor... because really, everytime someone asks him anything like this, he just sort of ducks away. and that's not bad- maybe we all should do just that, but as you must know, sometimes i can't help myself.</p>

<p>i had to ask.</p>



<blockquote class="letters">


<p>Who rules the Qmunity?</p>

<p>That's an easy one: <b>NOBODY</b></p>

<p>The Qmunity is an <b>autonomous collective</b>; nobody has any real control over anybody.  That's not to say that some people don't rise to the top and influence how people behave.  But it's not because they have any special rights or privileges; it's because they earn a little something called <b>respect</b> for what they contribute.  The people that make the biggest contributions become our defacto "leaders" -- but they are leaders because other people value their works and their ideas, not because they have any real power.</p>

<p>I know why you wrote this letter.  You're disgruntled because the so-called "leaders" of the Qmunity have different opinions than you...and you don't like where the Qmunity is headed.  You wish you could call the shots.  The thing is, nobody calls the shots.  The way you "lead" the Qmunity is by <b>making contributions</b> and thus, <b>earning respect</b>!  Then people might actually listen to you.  But instead of actually contributing something, you complain and browbeat and personally attack our most productive and respected members.  That's not a very good strategy if you actually want your opinions to be heard.</p>

<p>Let's review some of your posts this past month: You lambast V1ctor and the choices he made about *HIS* compiler (just look at your <a href="http://www.freebasic.net/forum/viewtopic.php?t=4783">childish</a> and <a href="http://www.freebasic.net/forum/viewtopic.php?p=38887#38887">exceedingly rude posts</a> at FreeBasic.net); you personally berate MystikShadows (<a href="http://www.freebasic.net/forum/viewtopic.php?t=4783">this post</a>); you <a href="http://www.ascii-world.com/phpBB2/viewtopic.php?p=2717#2717">accuse me</a> of "killing" QB Express, running an "elite" magazine, and marginializing certain members of the Qmunity; and now you attack me, Z!re and others for dismissing Seph's <a href="http://www.qb45.com/index.php?page=forum&action=viewpost&post=4226&forum=1272">failed attempt to organize a community-wide mutiny</a> when he was banned from a forum for being a jerk.</p>

<p>Personally, I'm sick and tired of it.  In the past few months, my opinion of you has dropped through the floor...  You're just trying to stir the pot and cause controversy, and you're making all of us very angry.  You're convinced that everything is some grand conspiracy, and you take everything way too personally.  And the way you go about expressing yourself makes you seem like a jackass.  For someone who claims to hate flaming, it seems to be one of your favorite hobbies.</p>

<p>mennonite, there's a reason why you don't get any respect in this community.  It's because you talk and complain a lot, but have hardly contributed anything.  I think the opinion of the Qmunity is best summed up in Cha0s' <a href="http://www.freebasic.net/forum/viewtopic.php?t=4783">response</a> to one of your posts:</p>

<blockquote>
<i>
<p>"Go

<p>Code

<p>Something

<p>Useful"
</i>
</blockquote>

<br>

<p>I'm sure I've offended you (whether you like it or not), but I think you need some chewing out.  I hope you take Cha0s' advice and roll with it.  <a href="http://www.ascii-world.com/phpBB2/viewtopic.php?t=507">PCOPY</a> is a great start, if you guys are able to get it off the ground.  But we're not going to cut you any slack until we see some sort of concrete contributions...and a little bit less attitude.  As I said last month, "I guess most people on QB/FB forums just want to....(gasp)... get along."</p>

<p id="signature">-Pete</p>
</blockquote>


<hr>

<center>Have a letter for the editor? Send all your rants, raves, ideas, comments and questions to <a href="mailto:pberg1@gmail.com">pberg1@gmail.com</a>.</center>

</div>





<br><br>






<a name="poll"></a>
<div id="content">
<h2>Express Poll</h2>
<p>Every issue, <i>QB Express</i> holds a poll to see what QBers are thinking.  The poll is located on the front page of <a href="http://www.petesqbsite.com">Pete's QBasic Site</a>, so that's where you go to vote. Make sure your voice is heard!</p>

<h3>What is the best QBasic game developer of all time?</h3>

<p>With the help of Lachie Dazdarian, I've decided to run a tournament to find out who the community thinks is the greatest QB game programmer / programming group of all time.</p>

<p>The two of us have nominated the <b>50</b> top QB game developers, who we feel deserve special recognition for their contributions to the QB gaming scene.  From these 50 choices, YOU are going to vote to select the  greatest QB game programmer.  The winner will receive a <b>special award at the Qlympics 2006</b>, which will take place in QB Express over the next few months.</p>

<p>I've randomly split up the nominees into five divisions.  You will get to vote for the top developer in each division, and then we will have a final vote between the five finalists.</p>

<p>So, without further ado, here are the nominees.  (Category winners are in <b>bold</b>.):</p>

<blockquote>
<u><b>DIVISION 1</b></u><br>
Aleksander Trojanowski <i>(ATTE series)</i><br>
Bulma Produktions <i>(Suds Skins 1 & 2, Johnny Abbot's Sex Adventures 1&2)</i><br>
CMC <i>(DarkPhear)</i><br>
Hamster Republic <i>(Wandering Hamster, SpitWar, RPG, Cowbobs)</i><br>

Hyper Anime <i>(BAkuen SakuRu, Kunio Kun)</i><br>
Pieslice Productions<i>(MUX, TerraScape)</i><br>
<b>RelSoft & Adigun A. Polack <i>(Frantic Journey)</i></b><br>
Shattered Realm Productions <i>(TWIGZ Engine, The Great Escape)</i><br>
TopGun Software <i>(Space Commando 1&2)</i><br>

<b>Typosoft<i>(Ped xing's Quest, Sumo, SuperSumo 1&2)</i></b><br><br><br>


<u><b>DIVISION 2</b></u><br>
<b>Darkness Ethereal <i>(Mattress Warrior, Secret Of Cooey series, In The Nocturne, Mysterious Song, Lianne in the Dark Crown, Legend of Lith II)</i></b><br>
Eric Carr <i>(SpinBall)</i><br>
focus ZERO <i>(Monkey Blast!)</i><br>

<b>J.B. <i>(Sonic Xtreme)</i></b><br>
Master Creating <i>(Shadow Of Power, Diamond Fighter IV)</i><br>
M \ K Productions <i>(Pieces 1&2, Bob Saget Killer 2000, Fury)</i><br>
Na_th_an <i>(Jill The Goddess, Lala Prologue, Oytkator's Plans)</i><br>
Pantera55 <i>(Elysian Fields)</i><br>
Pasco <i>(Groov Buggies, France '98 World Cup Soccer)</i><br>

Sasha Vukelich <i>(Dynamic - The Colonization of Jupiter)</i><br><br><br>


<u><b>DIVISION 3</b></u><br>
<b>Piptol <i>(Ghini Run, Squealer TNT, Kingdoms)</i></b><br>
Future Software <i>(BomberZone, Zelda Clone, Cobra, Space Invaders)</i><br>
Jocke The Beast <i>(Dark Woods 1&2, Mirkwood)</i><br>
<b>Lachie Dazdarian <i>(Detective Academy, Ball Blazing Fantasy, Rocket Fuel Mayhem, Dark Quest, Another World Memory, Run 'Em Over, Pong Worz)</i></b><br>
Mark Hall <i>(ARC Legacy)</i><br>
Oren Bartal <i>(Super Stack, Ultimate Super Stack)</i><br>
syn9 <i>(ZeroG)</i><br>
Stefan Hendriks <i>(Arrakis)</i><br>
Terry Cavanagh <i>(The Hunt, Black Hole)</i><br>
WisdomDude <i>(Hack-Man 2&3, Cyber Chick)</i><br><br><br>


<u><b>DIVISION 4</b></u><br>
BINARYmagic <i>(Alien Terror, Anaconda)</i><br>
BjM Software <i>(DreamScape)</i><br>
Danny Gump <i>(Mystical Journey, Super Mario World Clone)</i><br>

Jason Gould / The_Brain <i>(Puz, Peanut Patrol 2)</i><br>
JAWS V Soft <i>(Mini RPG series)</i><br>
Mike Snyder <i>(Lunatix, Lexter 1&2)</i><br>
Nekrophidius <i>(Wrath Of Sona, Two Lords)</i><br>
PHAT Kids<i>(Kids of Karendow Chapter 1, PHAT Professional Burglar)</i><br>

SV Reanimator <i>(PromZone, Cyclone)</i><br>

TMB <i>(Percussor, Around The World, The Little Pixie 2, The Adventures)</i><br><br><br>


<u><b>DIVISION 5</b></u><br>
Angelo Mottola <i>(WetSpot 1&2)</i><br>
Delta Code<i>(Larry The Dinosaur 1&2, Unofficial Tournament)</i><br>

Jace Masula <i>(CODELINK, StarQuest)</i><br>

Kevin Reems <i>(Stick Fighters Brawl 1&2)</i><br>
Michael Hoopman <i>(Dark Ages)</i><br>
Milo Sedlacek <i>(MonoSpace)</i><br>
Nick London / NutzBoy <i>(Peanut Patrol)</i><br>

SonicBlue Productions <i>(SB's Bricks)</i><br>
StarsDev <i>(The Terror)</i><br>

Tsugumo <i>(Untitled, TheGame)</i><br>
</blockquote>

<br>

<p>In order to vote, visit the front page of  <a href="http://www.petesqbsite.com">Pete's QB Site</a>.  (The poll can be found in the left column.)</p>

<p>Good luck to all the nominees -- and may the best developer win!</p>

<br>

<h3>Results of Division 2</h3>

<p>The top two developers move on to the final round of the competition!</p>

<center>
<table border=0 cellpadding=2 cellspacing=2>
<tr><td width="25%"><b>Developer</b></td><td width="10%"><b>Votes</b></td><td width="10%"><b>Percent</b></td><td width=*><b>Graph</b></td></tr>

<tr><td>Piptol</td><td>11</td><td>21%</td><td><img src="poll.gif" border=1 width=210 height=15></td></tr>
<tr><td>Future Software</td><td>4</td><td>8%</td><td><img src="poll.gif" border=1 width=80 height=15></td></tr>
<tr><td>Jocke The Beast</td><td>8</td><td>15%</td><td><img src="poll.gif" border=1 width=150 height=15></td></tr>
<tr><td>Lachie Dazdarian</td><td>10</td><td>19%</td><td><img src="poll.gif" border=1 width=190 height=15></td></tr>
<tr><td>Mark Hall</td><td>3</td><td>6%</td><td><img src="poll.gif" border=1 width=60 height=15></td></tr>
<tr><td>Oren Bartal</td><td>0</td><td>0%</td><td><img src="poll.gif" border=1 width=1 height=15></td></tr>
<tr><td>Syn9</td><td>9</td><td>17%</td><td><img src="poll.gif" border=1 width=170 height=15></td></tr>
<tr><td>Stefan Hendriks</td><td>3</td><td>6%</td><td><img src="poll.gif" border=1 width=60 height=15></td></tr>
<tr><td>Terry Cavanagh</td><td>2</td><td>4%</td><td><img src="poll.gif" border=1 width=40 height=15></td></tr>
<tr><td>WisdomDude</td><td>3</td><td>6%</td><td><img src="poll.gif" border=1 width=60 height=15></td></tr>

<tr><td colspan=4><center><i>53 Total Votes</center></td></tr>
</table>
</center>

<blockquote class="letters">

<p>Finally some competition!  While the winners of the first two divisions were pretty overwhelming, this third division was a squeaker.  Four developers stood out in this poll -- Piptol, Jocke The Beast, Lachie Dazdarian and Syn9, and just a few more votes for any of them could have completely changed the results.</p>
<p>But despite the popularity of Jocke's "Dark Woods 2" and Syn9's "Zero G", the two developers that ended up getting the nod were <b>Piptol</b> and <b>Lachie Dazdarian</b>.  What gave these two the edge is probably their sheer number of QB releases.  While Jocke and Syn9 each had only one big QB game under their respective belts, Piptol and Lachie both released several.</p>
<p>Just look at this list: <i>Detective Academy, Ball Blazing Fantasy, Rocket Fuel Mayhem, Dark Quest, Another World Memory, Run 'Em Over, Pong Worz, Ghini Run, Squealer TNT, Kingdoms</i>.  That's TEN games...and the list doesn't even include *all* of the QB games Lachie and Piptol put out.  This is quite the accomplishment -- and it makes Piptol and Lachie Dazdarian worthy of advancing to the next round of the Greatest QB Game Developer tournament!</p>
</blockquote>

</div>





<br><br>



<a name="news"></a>

<div id="content">
<h2>News Briefs</h2>
<p>News from all around the QB community, about the latest games, site updates, program releases and more!</p>

<h3>QB / FB Site News</h3>

<dl>

<dt>QB Express Gets Some Competiton: <i>PCOPY</i> and <i>FreeBasicNews.net</i></dt>
<dd>

<p>It's about time!  QB Express has been the ONLY QB or FB mag to publish regularly in the past two years (and with the exception of one issue of <a href="http://qbxl.net">QBXL</a> in March 2005, the ONLY magazine)...  This is a far cry from the "golden age" of the Qmunity in 1998-2000 when there were four or five magazines going at once.</p>

<p>But it looks like that's all going to change.  In the past month, two new BASIC magazine projects have been announced: <b>PCOPY</b>, an joint effort by the staff of <a href="http://www.ascii-world.com">ASCII-World</a>, MystikShadows, lurah and mennonite; and <a href="http://freebasicnews.net">FreebasicNews.net</a> by Pritchard and Mr. Match.</p>

<p><b>PCOPY</b> will be a magazine dedicated to covering all dialects of BASIC, beyond just QB and FB, and it hopes to tailor toward programmers at all levels (including articles written by newbies, for newbies).  <b>FreebasicNews</b> will be focused solely on FB programming, and will likely have a focus on the happenings of the Freebasic.net forums.  Both magazines will be released irregularly (though there have been claims that there may be bimonthly releases).  Since neither magazine has actually released an issue yet, we still don't know exactly what to expect.  Currently, PCOPY has an issue in the works; FreebasicNews is still doing preliminary work on designing their website.</p>

<p>If you'd like to read up on the mission statements and debate surrounding both magazines, you can check out these forum threads: <a href="http://www.ascii-world.com/phpBB2/viewtopic.php?t=507">PCOPY thread</a> and <a href="http://www.freebasic.net/forum/viewtopic.php?t=4621">FreebasicNews thread</a>.  The PCOPY thread in particular elicited a heated debate over my handling of QB Express, and also whether another magazine was appopriate.  I addressed this in my "<a href="#editor">From The Editor's Desk</a>" article, so I won't go into it again, but you should know that I fully support both magazines -- and no matter how well these magazines turn out, QB Express is here to stay.</p>

<p>On behalf of QB Express, I warmly welcome our new competition!  I hope that both magazines succeed.  It would be nice to see someone give us a run for our money!</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>




<dt>Beginner's Guide to FreeBasic by Rick Clark</dt>
<dd>

<p>Rick Clark wants to teach all you newbies how to code in FB...the right way.  Here's a news brief from the man himself:</p>

<blockquote class="letters"><p>I am working on a beginner's guide to FreeBasic. You can find the details here if you are interested:</p>

<p><a href="http://www.freebasic.net/forum/viewtopic.php?t=3910">http://www.freebasic.net/forum/viewtopic.php?t=3910</a></p>

<p>There is a preview in pdf format that I update as I
finish content in the first post. This is a wip, of
course, so the preview isn't really polished at all.
:)</p>

<p>Rick Clark</p>
<p><a href="http://rdc.ascii-world.com/">http://rdc.ascii-world.com/</a></p>
</blockquote>

<p id="signature"><small><i>News Brief by Rick Clark</i></small></p>
</dd>





<br>





<dt>Mystery Solved: The October 1999 Pete's QB Site Shutdown!</dt>
<dd>

<p>In October of 1999, Pete's QBasic Site was shut down by my free hosting provider, Hypermart, for distributing illegal copies of QuickBasic 4.5...even though the files weren't hosted on my server, and I was merely linking to another QB site that was distributing the compiler.</p>
<p>According to Hypermart, somebody had filed a complaint that my site had breached its contract and broken U.S. copyright law.  Hypermart suspended my account and shut down my website, without a single warning.  Needless to say, I was pretty mad about the whole situation... and I thought I'd never find out who the "perp" was that filed the complaint.  But a few weeks ago, I was startled to receive this email:</p>

<blockquote class="letters">
<p>This is something that is probably long overdue.  I was sitting here at work when someone mentioned soemthing about DOS and it brought up some old memories from my young Qbasic days.  I went to Qbasic.com, then to qbtop50.com, and followed on to your site.  I was curious of who still owned it and I started reading the history page.  And then I came across <a href="http://www.petesqbsite.com/sections/history/history.shtml">this</a>:</p>

<blockquote><i>"Then at the end of October '99, it almost all came to an end. For the last couple of months, I had been offering free downloads of QuickBasic 4.5 in the "Compilers" section of my site. Hypermart somehow found out about it and terminated my account. Immediately, a witch hunt broke out, with everyone on the message board blaming each other for reporting my site."</i></blockquote>

<p>I'm not proud of this at all, but I did it.  I was 13 going on 14 years old at the time and I owned a competing (stupidly, that's how I saw it) website.  You might recall someone owning Quickbasic.net, and then also buying QuickBasic.com.  That was me.  I called it the Quick Basic Network, or the QBN.  This was how my nickname was formed on most of the message boards as  theqbn .</p>

<p>It was entirely immature and heartless for me to have done that and I apologize.  I never thought that emailing that complaint to the Hypermart abuse department would have led to deleting your entire site, but I was wrong.</p>

<p>I am now in my last year of college for my Networking and Security degree and I own a real estate brokerage firm in Eastern North Carolina.  I gave up the domains several years back as I lost interest.  I seemed to generate a lot of criticism in the QB community back then and I thought it was about time for me give up.</p>

<p>I just wanted to shed some light on this and I wish you the best of luck.</p>

<p>Thanks,</p>
<p>[NAME REMOVED]</p>
</blockquote>

<p>Although this shut down almost led to the downfall of my site, I was able to sweet-talk Hypermart into restoring my account -- so in the end, nothing was really lost except for a few weeks of updates that I would have done if my site were online.  I wrote the guy back and told him there were no hard feelings.  Here's my response, if you're interested:</p>

<blockquote class="letters">
<p>Don't worry about it, I'm not mad.  It happened so long ago, and Hypermart restored my site, so it's all water under the bridge. Besides, if I recall correctly, I kind of enjoyed the month-long vacation from updating my site. :)</p>

<p>It seems like your early interest in internet security must have paid off, considering you're about to get your degree in "Networking and Security"!</p>

<p>Thanks for the email,</p>

<p>Pete</p>
</blockquote>

<p>Mystery solved!</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>





<dt>Preview of Lachie's QBasic Games Directory!</dt>
<dd>

<p>Lachie Dazdarian never ceases to amaze me with his knowledge of and dedication to preserving and promoting QBasic/QuickBasic games.  You're probably familiar with Lachie's reviews of QB games and his "Searching For The Unknown" series for QB Express, but those articles are nothing compared to his latest project.  The <b>QBasic Games Directory</b> is a huge undertaking, and you absolutely have to check out the preview version Lachie's got up:</p>

<p><a href="http://games.qbasic.com">http://games.qbasic.com</a></p>

<p><img src="qbgamesdir.jpg" width=300 height=188 border=1 align="right">Lachie's goal is to "collect, archive and offer to public" all "worthy" QBasic games that have ever been released publically.  ("Worthy" games being quality titles, and preferably not engine demos unless they're really good.)</p>
<p>So far, he's really lived up to that goal.  Lachie's got close to <b>500</b> games entered in the database, most of them with screenshots.  He's also written up a description and rated every program, and everything is entirely searchable because the site is custom-built with PHP.  To my knowledge, this is the best and most thorough archive of QBasic programs ever assembled.  Some archives may be larger, but they're not of anywhere near the same quality...and they usually have a lot of "unworthy" games clogging up the collection.  This directory is the real deal.</p>

<p>Unfortunately, the actual GAMES have not been uploaded yet, but that <i>should</i> be coming soon.  Lachie asked me to give Mark Wilhelm, the owner of QBasic.com and hosting provider, a little bit of prodding: <i>"The site is still not 100 % ready since it's taking EONS for Mark to set it up but maybe you can write a small line about it for the News Brief."</i>  Well, Mark, here's my "small line" of motivation: <b>get to work!</b></p>

<p>With the games uploaded, and maybe a little bit of restructuring/redesigning, this could very well become the most important QBasic website on the Internet.  Lachie, we thank you for your amazing work, and we can't wait to see the final product!</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>





<dt>Fuzzypig Launches New Website</dt>
<dd>

<p>Fuzzypig, a regular over at Freebasic.net, has <a href="http://www.freebasic.net/forum/viewtopic.php?t=4257">launched</a> a new website of his own: <a href="http://fuzzypig.awardspace.com">Fuzzypig's Domain</a>.  So far, it's just got a few of Fuzzypig's own programs, links, an empty forum, a new blog, and a design that hearkens back to 1997 GeoCities websites.  It's not much to look at yet, but you should bookmark it and check back...who knows, it could become amazing.  A lot of of great QB/FB sites started <a href="http://www.petesqbsite.com/sections/history/10-19-98.html">the same way</a>.</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>




<br>







<dt>FreeBasic.tk Moves</dt>
<dd>
<p><img src="fbtklogo.png" align="left" width=201 height=91> FreeBasic.tk, formerly hosted at FBTK.net, has now moved back to its predecessor's domain, QBTK.net.  Apparently, Sumo Jo let the domain name expire, and he doesn't want to pay a penalty fee to get it back.  So now if you want your FBTK goodness, you'll have to visit: <a href="http://fbtk.qbtk.com/phpBB2/news.php">fbtk.qbtk.com</a>.  Or, I suppose you could use the domain name that the site is actually named after: <a href="http://freebasic.tk">freebasic.tk</a>.</p>
<p>Anyway, head over there and post something!  The once-active forum has been DEAD for the last few months.</p>
<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>







<br>




</dl>


<h3>Project News</h3>

<dl>


<dt>New Zero GTR Demo: Mindblowing</dt><dd>

<p>Prepare for your mind to be blown.  Syn9 has released an engine demo of his upcoming "Anti Gravity Racing League" game, entitled <i>Zero GTR</i>, that is the single most professional piece of work I've ever seen come out of the FreeBasic scene.  If you haven't <a href="http://www.freebasic.net/forum/viewtopic.php?t=4943">checked it out yet</a>, now is the time.</p>

<center><img src="zerogtr_shot.jpg" width=500 height=375></center><br>

<p>Although it's still just a one-track engine demo, <i>Zero GTR</i> looks and feels like a game you'd play on a modern console, not something that a hobbyist made in his spare time in...BASIC...  Syn9's got a real gift for graphic design -- the world he creates is made up of simple geometric shapes, and has far fewer polygons than anything you'd see in a current racing game, yet its simple stylistic look is absolutely gorgeous.  This demo is proof that it's not the complexity of the graphics that makes a game look "modern", but good design that really makes all the difference.</p>

<center><img src="zerogtr_logo.jpg" width=450 height=188 border=1></center><br>

<p>Syn9 has also registered a domain name for <i>Zero GTR</i>: <a href="http://www.zerogtr.com/">http://www.zerogtr.com/</a>  It's just a placeholder right now, but it looks like he's planning to do some major promotion of this game when it's finished.  Since <i>Zero GTR</i> will feature online network play, zerogtr.com will most likely be the hub for players to communicate.</p>
<p>This is really exciting.  I think that of any FB game so far, <i>Zero GTR</i> could be the one that attracts mainstream gamers to the FB community...and to FreeBasic.  I can't wait to see the game get developed over the next few months, before its estimated <b>Winter 2006</b> completion date.</p>

<p>Here are the links to try out the demo:</p>

<blockquote class="letters">
Download the demo: <a href="http://www.zerogtr.com/trackTest2.zip">trackTest2.zip</a><br>
Download the updated/improved program file: <a href="http://www.zerogtr.com/download/core.exe">core.exe</a>
</blockquote>



<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>







<br>







<dt>New "Seamless Tactical RPG" by Xerol</dt>

<dd>


<p>You've got to check out this awesome project:</p>

<blockquote class="letters">
<p>I don't have a full name for this yet, but STRPG is just a description of the "genre": A seamless tactical RPG.</p>

<p>The main beef I've got with TRPGs (like FFTactics, Disgaea, etc.) is that 99% of the action takes place on limited battlefields. STRPG will remove this restriction, but bring in new features to compensate for the seamless nature of the world and still keep the tactical nature of the game.</p>

<p>It's still in its very early stages; so far we've just started working on our first battle demo (which doesn't explore the 'seamless' part of the game just yet) so all you're gonna get for now is these screenshots:</p>

<center>
<img src="xerol1.jpg" width=400 height=310 border=1><br><br>
<img src="xerol2.jpg" width=400 height=310 border=1>
</center><br>


<p>As you can see we're using temporary models for now because we don't have a character modeler. This is a paid position that is open to the first person who can demonstrate they have the abilities to meet the requirements of this job. The game will be published (under the Level Ground label) and sold online. Obviously at this early stage we can't give any estimates for when a final product will be available, but we expect to have a playable demo out within a week. (Already you can battle, but there are a ton of issues that need to be worked out, and the code is patchy at best.)</p>

<p>Anyone interested in the modeling position can email <a href="mailto:xerol3@yahoo.com">xerol3@yahoo.com</a> or contact us on AIM:lggaming.</p>

</blockquote>

<p id="signature"><small><i>News Brief by Xerol</i></small></p>

</dd>




<br>


<dt>The Long-Awaited Official Release of FreeBASIC 0.16b</dt>
<dd>
 
<p>On June 12th, V1ctor announced the release of version 0.16b of the awesome <a href="http://www.freebasic.net">FreeBASIC compiler</a>.  IF you read the changelog you can see that alot of corrections and additions have been made, once again which is great news.  always good to see the FB team working so hard to bring us a highly efficient and usable programming language.</p>
 
<p>According to some users, some project that compiled with version 0.15b might not work as is with version 0.16b however, following the changelogs and making the appropriate changes in the code seems to be all that is needed to get them to compile properly. </p>
 
<p>Three cheers for the FB Team!</p>

<p id="signature"><small><i>News Brief by <a href="mailto:mystikshadows@gmail.com">MystikShadows</a></i></small></p>
</dd>





<br>





<dt>MystikShadow's FB Elite IDE project</dt>
<dd>

<p>On June 3rd, I announced a project I've been working on for a few weeks.  It's called the FreeBASIC Elite I.D.E. It's an IDE with a more than familiar look and feel (see the screenshot for details).  The object is to make an IDE reminescent of the QB family of compilers. Here is a list of the main features planned for the project:</p>

<ul> 
<li>Split view editing (like the QB IDEs have).
<li>Syntax Highlighting (colored FB code like all of today's IDEs).
<li>Syntax Checking while editing option (just like in QB)
<li>FreeBASIC Consultant (to play the role of the QB Advisor)
<li>Ability to load more than one file at a time (.mak file support).
<li>Immediate mode code interpreting (again like all QB environments).
</ul> 

<p>Here's a screenshot of the editor showing the FreeBASIC Consultant with the help for the PRINT statement just to give you a taste of what's ahead.</p>
 
<br>
<center><img src="fbconsultant.png"></center>
<br>
 
<p>I'm currently working on the file open/save dialogs and other standard editing dialogs like search, replace and the likes.  After that I start on some of the bigger engines like debugging options, interpreter and the likes.</p>
 
<p>Here are links to some of the comments I've gotten so far on the project: <a href="http://www.freebasic.net/forum/viewtopic.php?t=4424" target="blank">My post on the freebasic.net forum</a> and <a href="http://forum.qbasicnews.com/viewtopic.php?t=12014" target="blank">My post on the QBasicNews forum</a>.</p>
 
<p id="signature"><small><i>News Brief by <a href="mailto:mystikshadows@gmail.com">MystikShadows</a></i></small></p>
</dd>





<br>






<dt>Rattrapmax6's ASCII_Drop_Player Announced</dt>
<dd>

<p>On June 6th of 2006, Rattrapmax6 made this <a href="http://www.freebasic.net/forum/viewtopic.php?t=4467" target="blank">this announcement</a> about his newly created MP3 player.  It is designed to be very simple to use, just drop an MP3 file on the icon and it will start playing.</p>
 
<p>As he states in his post, the player currently can only be used by dropping an MP3 file on it, there's no playlist (but perhaps it would be a good thing to add.)</p>

<p id="signature"><small><i>News Brief by <a href="mailto:mystikshadows@gmail.com">MystikShadows</a></i></small></p>
</dd>





<br>











<dt>Vector X FB Port, Courtesy of Lachie D.!</dt>
<dd>

<p>Here's the latest game release from the ever-newsworthy Lachie Dazdarian: <a href="http://www.freebasic.net/forum/viewtopic.php?t=4188">Vector X 2006</a>.</p>

<p>It is, as Lachie describes it, it's "a port of a rather unknown 3D QBasic game" originally released by Dan McFadyen in 2001.  The game uses wire-frame graphics, and you control a space ship flying down a narrow passage, trying to avoid or destroy enemies, mines and landscape features along the way.  There are five levels, and at the end of each level, you must destroy a specific structure to advance.</p>
<p>Check out some screenshots:</p>

<center>
<img src="VectorX2006_1.png" width=640 height=480 border=1><br><br>
<img src="VectorX2006_2.png" width=640 height=480 border=1><br><br>
<img src="VectorX2006_3.png" width=640 height=480 border=1>
</center><br>

<p>"Of course," Lachie explains, "my port is not just a simple port but more, what is to be expected from me."  Compared to the original QB version of the game, Lachie completely overhauled this version, adding music / sound effects, improving the graphics substantially, adding backgrounds, new menus, improving the control and a whole lot more.  Lachie says this release falls somewhere between being a port and a complete remake.</p>

<p>I gave <i>Vector X 2006</i> a spin, and I was very impressed.  It feels quite polished -- the menus, the presentation, the music, etc. -- which is something we've all come to expect from Lachie's work.  The game was pretty fun to play, once I got the hang of it.  I managed to get to the third level, and I really liked the little touches, like the destructable terrain and the placement of the mines.  It's a challenging game, but it is pretty well-balanced in terms of gameplay (I never felt like I was cheated by the enemies).</p>

<p>However, I found the wireframe graphics to be confusing -- While I liked the simplistic style of the graphics, I was never sure where in 3D space my ship was in relation to the ground and the enemies.  (If the surfaces were opaque, this wouldn't be as much of a problem.  Also, a shadow on the ground directly below the ship would be a huge improvement, in my opinion.)  I also found the pop-in of new ground on the horizon to be distracting.</p>

<p>Overall, though, this is definitely one of the most "worthy" FB games I've had a chance to play, and I encourage you all to check it out.  It's in my top ten favorite FB games so far, and that's saying something!</p>

<p>You can download the game below:</p>

<blockquote class="letters">
Download <a href="VectorX_2006.zip">VectorX_2006.zip</a> (2762 KB)<br>
Download <a href="VectorX_2006Lite.zip">VectorX_2006Lite.zip</a> (no sound version; 880 KB) 
</blockquote>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>






<dt>Pritchard Releases Geometry Library</dt>
<dd>
 
<p>As announced in <a href="http://www.freebasic.net/forum/viewtopic.php?t=4499" target="blank">this freebasic.net forum thread</a> Pritchard has created a geometry library for FreeBASIC.  The library was created to offer some 2D/3D based geometry calculations (including 2D and 3D collision detection routines). Here are some of the highlights as expressed by Pritchard himself:</p>
 
<blockquote class="letters"><p>The Lib Supports the Following:</P>
 
<ul>
<li>Tested on Version .16 Unstable, so no guarantees for you .15'ers
<li>1D, 2D, and 3D Trigonometric Functions with Single Digit Precision
<li>Spherical Against Line Segment Collision Detection for All Dimensions Supported:
     
<blockquote><font face="Courier New">Code: Collision_Detection_Dimension(Boundary Type, Boundary Start, Boundary End, Object Position, Radius)</font></blockquote>
 
<li>Boundary Type is the value of which normal to use.</li>
<li>Spherical Against Spherical Collision</li>
<li>A ton of other stuff, really (function list below) :P</li>
</ul>
</blockquote>

<p>From what people are saying, this is a very fast and efficient library and I have to agree to it after I've tried it on my PC.</p>

<p id="signature"><small><i>News Brief by <a href="mailto:mystikshadows@gmail.com">MystikShadows</a></i></small></p>
</dd>





<br>










<dt>Finally!  True DOS Networking Routines For QuickBasic</dt>
<dd>

<p>Mike Chambers has created a method to do TCP/IP networking in QB...something that people have been working on for years with only marginal success.  Here's the news from Mike:</p>

<blockquote class="letters">
<p>Anybody who has ever wanted to use TCP/IP networking in QuickBASIC under true DOS can now do it using Mike Chambers' TCP routines. All you need is an ethernet packet driver. You can download the routines with documentation here: <a href="http://rubbermallet.org/qb/index.html">http://rubbermallet.org/qb/index.html</a></p>

<p>It is also on Pete's QB site under the <a href="http://www.petesqbsite.com/downloads/misc.shtml">misc downloads section</a>.</p>

<p>If you find a packet driver that wraps to winsock.dll you could also use this under Windows.</p>
</blockquote>

<p id="signature"><small><i>News Brief by Mike Chambers</i></small></p>
</dd>





<br>








<dt>Wetspot II Ported to Windows</dt>
<dd>

<p>Randall Glass has followed up Adigun A. Polack's "Wetspost 10th Anniversary Remix" and given the same treatment to Angelo Mottola's classic <i>WetSpot II</i>.  Here's the news:</p>

<blockquote class="letters">
<p>For all you Wetspot II game players; Wetspot II has been converted to Windows !</p>

<p>Have you ever tried to run the Dos version of Wetpot II but could not get it to run because of ems problems on you modern computer.</p>

<p>Well fear no move. Wetspot II has been converted to Windows using FreeBasic.</p>

<p>It is an improved Wetspot game in play ability and and improved documentation.</p>

<p>And new cheat codes !</p>

</blockquote>

<p>You can download the game at <a href="http://www.simtel.net/product.php%5Bid%5D96136%5Bsekid%5D0%5BSiteID%5Dsimtel.net">this Simtel.net page</a>, and relive the memories from what is widely considered to be the best QB game ever made!</p>


<p id="signature"><small><i>News Brief by Randall L Glass</i></small></p>
</dd>





<br>







<dt>Deleter's FreeBasic Bitmap Font Library</dt>
<dd>

<p>Deleter has released a useful library that could save you some time the next time you're, say, <a href="#24hours">coding a game in 24 hours</a>: routines to incorporate your own bitmap fonts!  Here's some more info.</p>

<blockquote class="letters">
<br>
<center><img src="ffnt_screenshot.png" width=490 height=382></center><br>
<p><b>Description:</b><br>
A small static lib in freebasic that does some pretty simple printing routines. While not particularly ingenious, it nevertheless makes it really easy to use custom bitmap fonts and saves time for the fun stuff when coding a game. It works with any bit mode so whether you need a fast fix for custom fonts on that retro arcade 8-bit classic, or if you are making a slick, high-tech app, this lib has what you need. All the code for the lib is available, so if you want to peek at or even modify the internals, go right ahead. There is a small test program available for both 8bit and 32bit mode that explains all the functions.</p>
</blockquote>

<p>You can download the library and fonts at <a href="http://deleter.phatcode.net/ffnt/ffnt.html">Deleter's website</a>.</p>


<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>









<dt>Mind Maker QBasic Version 1.1</dt>
<dd>

<p>I got an email from Corey Yeates (who asked me to refer to him as "Corey Yeates ==&gt; evil_chicken"), asking me to include one of his simple programs in this issue of QB Express.  The program, entitled "Mind Maker", is a compilation of several very simple programs.  While I didn't have a chance to actually check out the program, I did scroll through the source code, and I saw a series of ASCII art drawings of a sailboat getting destroyed by a giant wave, as well as text like <i>"You Lose A Man From The Impact Of The Wave."</i>  This could be interesting!

<p><a href="http://geocities.com/coreyyeates/PROGRAM_EDITION.txt">http://geocities.com/coreyyeates/PROGRAM_EDITION.txt</a></p>

<p>You can also visit Corey Yeates / evil_chicken's homepage at <a href="http://geocities.com/coreyyeates/index.html">this link</a>.</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>







<dt>Wallace Releases <i>Visual Editor</i>, Continues Work On <i>Inspiration</i></dt>
<dd>
<p>Wallace Software has continued working, quietly, on his upcoming FB first person shooter, <i>Inspiration</i>.  If you check the <a href="http://www.freewebs.com/wallacesoftware">Wallace Software homepage</a>, you'll see the latest updates on <i>Inspiration</i> -- which come every few days.</p>
<p>Some noteworthy quotes from the last month:</p>

<blockquote class="letters">
<p>"All of the bugs in the weapon editor have been figured out and its looks fantastic, so far I've created a double barrel shotgun and a sword."</p>
<p>"I'm still hoping that a cross FreeBasic will go cross platform so that I can test it on my main computer, but the Acer is very fast.  I'm making my Virtual PC on my iMac the standard for speed since it is fairly slow going there.  I think on my Acer Inspiration will blister around 250 FPS so I'll have a LOT of room for advanced effects."</p>
<p>"Map Editor chugging along.  I've decided because of the complexity of the sprite portion of the maps that I will be splitting the map editor into two programs.  One will edit the static parts of the map like the walls and floors and stuff, while I will have another editor for the sprite map.  I have also decided that the main map, light map, and sprite map will be three different files, that way I can use the same wall set for multiple levels of the game and change the lighting arrangements of them without making whole new maps.  I will soon start working on the engine."</p>
</blockquote>

<p>Wallace also released the <a href="http://www.freewebs.com/wallacesoftware/Wallace%20Visual%20Editor.zip">Wallace Visual Editor 1.2</a> back in June, which is being used to create assets for <i>Inspiration</i>.  Groovy!</p>
<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>







<dt>Lynn's Legacy Undergoes Beta Testing; Final Release Imminent!</dt>
<dd>
<p>Josiah Tobin and Cha0s' action RPG, <i>Lynn's Legacy</i>, is coming along very well, and in the past month and a half, a private demo has been circulated to a group of beta testers.  (You can read all about it in <a href="http://www.freebasic.net/forum/viewtopic.php?t=4351">this thread</a>).  Already one of the most promising games in development for FB, it sounds like it's really starting to come together:</p>

<blockquote class="letters">
<p>On May 29th, Cha0s wrote: <i>"We currently are about half a day's work away from finishing the first chapter of the game. That's 3 dungeons and various sidequests. There's about one hour worth of game play."</i></p>
</blockquote>

<p>But the real big news came this morning (June 16th), when Cha0s announced:</p>

<blockquote class="letters">
<p>We will be releasing a final version of Lynn's Legacy to beta testers this week, and plan a full public release next Friday.</p>

<p>Just thought you might like to know. ;)</p>
</blockquote>

<p>This is fantastic news.  Lynn's Legacy is one of the most-awaited projects of the year, and the entire Qmunity is frothing at the mouth to get their hands on the final version.  Friday (five days from now) can't come soon enough!</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>






<dt>RelSoft Updates Genso's Junkyard</dt>
<dd>

<p>RelSoft, the king of the FB graphics demo, has just posted SEVEN new demos on his website, <a href="http://rel.betterwebber.com/">Genso's Junkyard</a>...and they are all stunning:</p>

<center>
<img src="rel1.jpg" width=320 height=240 border=1> <img src="rel2.jpg" width=320 height=240 border=1><br><br>
<img src="rel3.jpg" width=320 height=240 border=1> <img src="rel4.jpg" width=320 height=240 border=1>
</center><br>

<p>I think the gfx demos speak for themselves...<a href="http://forum.qbasicnews.com/viewtopic.php?t=11974">check them out!</a></p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>











<dt>"They came... We shot them down!" by Lithium (and others)</dt>


<dd>

<p>Last month, Lithium <a href="http://www.freebasic.net/forum/viewtopic.php?t=4658">released</a> an awesome shooting game entitled "They came... We shot them down!" that is one of the most fun FB games I've played.  Take a look:</p>

<center>
<img src="lithium_1.jpg" border=1 width=320 height=240> <img src="lithium_2.jpg" border=1 width=320 height=240>
</center><br>

<p>You control the jeep in the picture, and it's your job to protect the little green people walking the streets below from the constant alien bombardment that falls from the sky.  It's similar to "Missile Command", except your jeep is mobile, and the alien attackers have some new weapons and tricks up their sleeves.  This game is mouse-based and handles really well.  With a little more polish, it could become something really great.</p>

<p>You can find a 75% complete demo of "They came... We shot them down!" at <a href="http://lithium.zext.net/they.php">Lithium's page</a> (which, by the way, has recently gotten a really cool redesign).</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>






<br>




<dt>"King's Land 2" by Jace Masula</dt>

<dd>
<p>Jace Masula has <a href="http://www.petesqbsite.com/forum/viewtopic.php?t=1573">released</a> a second version of his QB strategy game, <i>King's Land</i>, and it looks really great.  Check out the animated screenshot and description below:</p>

<blockquote clas="letters">
<p>
<img src="kingsland.gif" width=320 height=203 align="right">
King's Land is a simple turn based strategy game similar to warcraft and age of empires. The game takes place during the middle ages and has 3 levels of difficulty. each campaign focus different aspects of strategy. Its a cross between chess, stratego... and warcraft i guess.</p>

<p>I'm in the process of writing a game manual... but it is fairly self explainitory and anyone can figure out how to play in 15 minutes. anyway, it worth a look if you enjoy old school cheesy strategy games. please report any bugs or constuctive suggestions right here. </p>
</blockquote>

<p>For a pure-QB game, this is very impressive (and it's also one of very few new QB games that has come out in the past year).  Definitely worth your time!  You can download King's Land and find out more info at <a href="http://qb45.think-new.com/kingsland.php">Jace Masula's QBasic Lab</a>.</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>






<br>






<dt>Eclipzer Previews New Voxel Viewer</dt>

<dd>

<p>Eclipzer has <a href="http://www.petesqbsite.com/forum/viewtopic.php?t=1574">posted a screenshot</a> of a new Voxel Viewer that he's working on.  In case you're unfamiliar with voxels, they are essentially 3D pixels (the term itself stands for "Volumetric Pixels").  Voxels are a less common method of creating 3D graphics, but it leads to some really cool effects.</p>

<center><img src="voxel_viewer_004.png" width=320 height=240 border=1></center><br>

<p>According to Eclipzer, <i>"Eventually this will be a full blown editor, once more of the core programming is completed."</i></p>

<p>I spoke with Eclipzer regarding what he plans to do with the voxel editor / viewer once it's completed, and he mentioned that he was interested in possibly remaking Alias' QB game <a href="http://qbcm.hybd.net/issues/1-6/#blobeteers">Attack of the Blobeteers</a>.  (In fact, the model that you see in the Voxel Viewer screenshot above is from AotB.)  Unfortunately, Eclipzer has been unable to find the original sourcecode of the game.  If you have a copy of <i>Attack of the Blobeteers</i>, or know where to get it, please get in touch with Eclipzer!</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>






<br>




<dt></dt>

<dd>

<p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>

</dd>





<br>





<dt>Some Other Cool Projects / Posts</dt>


<dd>

<p>Here are some other neat programs that are worth a look.  I'd write up full news briefs for them, but I'm exhausted and just want to get this dang magazine published!</p>

<ul>

<li><b>shockwave</b> has released some cool demos this month: a <a href="http://forum.qbasicnews.com/viewtopic.php?t=12039">6 Hour blobs Demo</a> and a <a href="http://www.freebasic.net/forum/viewtopic.php?t=5009">Realtime Fire Demo</a>.  Nice!</li><br>

<li><b>phycowelder</b> made a simple maze game called <a href="http://forum.qbasicnews.com/viewtopic.php?t=12134">Hedge Row Maze</a>.</li><br>

<li><b>speedlemon</b> released a game called <a href="http://forum.qbasicnews.com/viewtopic.php?t=12125">Gem Hunt</a> with the following notice -- "Warning: This game barely has any food in it."  Watch out!</li><br>

<li><b>Rick Clark</b> created a simple graphics editor called <a href="http://forum.qbasicnews.com/viewtopic.php?t=12193">Glyph32 Maker</a>, which outputs your graphics in the form of DATA statements.</li><br>

<li><b>thesanman</b> made a <a href="http://www.freebasic.net/forum/viewtopic.php?t=4886">Flight Simulator</a> program, and is also working on a 3D first person shooter entitled <a href="http://www.freebasic.net/forum/viewtopic.php?t=4906">Realms of Darkness</a>.</li><br>

<li><b>mennonite</b> posted some Qmunity stats that he collected and charted, regarding the number of forum views versus replies.  Check out <a href="http://www.ascii-world.com/phpBB2/viewtopic.php?t=496">this thread</a> to see the graph and his analysis.</li><br>

<li><b>Rattrapmax6</b> moved his website, <a href="http://www.xteraco.com/xtrgraphics/index.html">x.t.r. GRAPHICS</a> to a new server and off of AOL.  He also did a nice redesign of his website, and has kept up with regular updates.</li><br>

<li><b>Clyde</b> made a graphics demo called <a href="http://forum.qbasicnews.com/viewtopic.php?t=11952">Gravity - Electro</a>.  Yum.</li><br>

<li><b>TheAdventMaster</b> created some <a href="http://forum.qbasicnews.com/viewtopic.php?t=11973">TextBox and Font Routines</a>, which could be very useful if your FB program uses text or text boxes (and it probably does)...</li><br>

<li><b>Adigun A. Polack</b> posted the results of the <a href="http://forum.qbasicnews.com/viewtopic.php?t=12043">2nd FreeBASIC Ultimate Demo Compo</a>.  The winner?  A cool music player by <b>Clyde</b> and <b>DBF</b>: <a href="http://forum.qbasicnews.com/viewtopic.php?t=12092">Camouflage Music Disk</a>.  The Music Disk has a really nice interface, and I would recommend taking a look.  Also, while you're at it, visit the <a href="http://dbfinteractive.com/index.php"> DBF-GVY Demo Code Forum</a>, a fairly active forum about graphics demo programming with a FreeBasic section.</li><br>

<li><b>Ryan (rmann05)</b> is working on a program called <a href="http://www.freebasic.net/forum/viewtopic.php?t=4776">Test Master</a> that will help students study for tests. You can find it at <a href="http://blazer.kire.net/~rmann/">his website</a>.</li><br>

<li><b>Rick Clark</b> has started giving out something called <a href="http://www.freebasic.net/forum/viewtopic.php?t=4619">FreeBasic Outstanding Contributor</a> award.  The June award went to <b>cha0s</b>: <i>"Cha0s is always willing to help those who need guidance with excellent explanations and helpful code examples. Thanks cha0s."</i>  Congratulations!</li><br>



</ul>


<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>





<br>


</dl>







<h3>Other News</h3>

<dl>


<dt>Lachie Updates His FB Game Programming Tutorials</dt>
<dd>


<p>In the last two issues of QB Express (#19 and #20), we have featured excellent and extensive FreeBasic programming tutorials by Lachie Dazdarian.  However, being the perfectionist that he is, Lachie wasn't completely happy with how they turned out.  As a result, he's released corrected / updated versions of both of them:</p>

<ul>
<li><b>Lesson #1:</b> Download <a href="http://fileanchor.com/24910-d">Lachie_GFXlib_Tutorial_1.zip</a></li><br>
<li><b>Lesson #2:</b> Download <a href="http://fileanchor.com/24911-d">Lachie_GFXlib_Tutorial_2.zip</a></li>
</ul>


<blockquote class="letters">
<p>If you are wondering about mistakes the biggest one was in the first lesson where I incorrectly gave instructions about using 24 bit graphics in GFXlib. I said you can't get transparency with sprites saved in 24 bit mode in a GFXlib program that uses 24 or 32 bit screen color depth. I realized later that this was caused by my incorrect way of converting 8 bit graphics to 24 bit color depth mode. In the second it was only one word but kinda important(I refered to a variable with an incorrect name). And several nitpicks(of course).</p>
</blockquote>

<p>These were already AMAZING tutorials, and now they're even better!</p>

<p id="signature"><small><i>News Brief by Pete</i></small></p>
</dd>



</dl>


<hr>

<center>Got news to report?  Send it to: <a href="mailto:pberg1@gmail.com">pberg1@gmail.com</a>!</center>


</div>






<br><br>




<a name="gallery"></a>

<div id="content">
<h2>Gallery</h2>
<h3 class="writer">Written by Pete</h3>
<p>Every issue <i>QB Express</i> features a preview and exciting new screenshots from an upcoming QB game. If you would like your game featured, <a href="mailto:pberg1@gmail.com">send in</a> some screenshots!</p>

<p>This month, we feature THREE previews: <b>LONG: Legend of Noname General</b> by Lachie Dazdarian, a <b>Super Smash Bros. Clone</b> posted at FreeBasic.tk by "someusername," and <b>FieldView</b> by Z!re and company.</p>

<br>

<h3>LONG: Legend of Noname General</h3>

<center><img src="long_logo.gif" width=320 height=200></center><br>

<p>In development in QB since 2002, Lachie Dazdarian's point-and-click adventure <i>LONG</i> is living up to its name, having quite a long development cycle.  But this summer, Lachie plans to port it to FreeBasic and finish off the game once and for all.  LONG will also receive a huge graphical upgrade from the QB version, which you will be able to see in the following before/after screenshots that follow.</p>

<p>But first, here's a little more info on the game's premise, straight from Lachie's website, <a href="http://kentauri.digitalblackie.com/">Kentauri</a>:</p>

<blockquote class="letters">
<p>The Legacy Of Noname General is a point and click adventure programmed in QuickBasic [and soon, FreeBasic]. Since i don't want to create just another point and click adventure I'll try to create a unique graphical design and interesting story.Story will be mixture of D.Lynch Lost Highway and R.Zelazny "pocket world" motif.</p>
</blockquote>

<p>The graphics are indeed pretty stylistic.  Check out some of the <a href="http://kentauri.digitalblackie.com/long.html">old QB screenshots</a> that really showcase LONG's graphical stylings.  But in the FB version, the graphics will look even nicer, according to Lachie:

<blockquote class="letters">
<p>I decided to make LONG a 24 bit graphics game. The reasons are not really relevant but it's important to say this should(I can't promise) advance the look of the game. This is still in testing phase but "the tests" I did so far are very promising. I've sent you 5 scene images and if you want to make news of this PLEASE PUBLISH ONLY THE FIRST THREE IMAGES(long_new1, long_new2 and long_new3)! Others appear really later in the game and I don't want for all the community to see them before the game is out.</p>
</blockquote>

<p>Here are some before/after shots.  I wish I could show you the other two screens Lachie sent me (they are much more impressive than the three below), but he was very clear that they were for my eyes only.</p>

<center>
<table border=1>
<tr>
<td width="50%"><center><b>BEFORE</b></center></td>
<td width="50%"><center><b>AFTER</b></center></td>
</tr>

<tr>
<td><img src="long/long1_old.gif" width=320 height=200></td>
<td><img src="long/long1_new.jpg" width=320 height=200></td>
</tr>

<tr>
<td><img src="long/long2_old.gif" width=320 height=200></td>
<td><img src="long/long2_new.jpg" width=320 height=200></td>
</tr>

<tr>
<td><img src="long/long3_old.gif" width=320 height=200></td>
<td><img src="long/long3_new.jpg" width=320 height=200></td>
</tr>

</table>
</center>

<br>

<p>Lachie also sent me a mock-up of what the new FB version's user interface will look like:</p>

<blockquote class="letters">

<center><img src="long/game_screen_testing.jpg" width=318 height=239></center><br>

<p>"The 6th image represents some of my ideas on how the new game screen might look like. It's all still testing, the very screen is not operable. In this screenshot I also show how 24 bit graphics will allow me to enable some really cool translucency scene transitions. Fell free to show this image to community too."</p>

</blockquote>

<p>So when will LONG be released?  I'm guessing this fall, or perhaps at the end of this summer.  Lachie just recently graduated from college, and he has informed me that he will be without internet access for the rest of the summer...and that he will also have plenty of free time to work on various projects.  He hopes to complete the FB version of LONG during that time.  After that though, who knows what will become of the Lachie that we know and love:

<blockquote class="letters">
<p>So LONG at least should be ported during this period. It will be the last summer of Lachie Dazdarian, as I call in my head. Huge changes must and will happen in my life after I finish college and even if I keep making games like I did so far I will be living a different life. I hate being a grownup. :P</p>
</blockquote>

<p>Don't worry.  My feelings are that we will keep seeing Lachie around for years to come.  Someone as dedicated to game programming as Lachie will find a way to be part of the Qmunity.  Like they say, "Once a QBer, always a QBer!"</p>

<br><br>


<h3>Super Smash Bros. Clone</h3>

<p><i>AKA "Super Smash Brothers 7: Kirby Gets Frisky"</i></p>

<center>
<img src="ss/ss1.jpg" width=320 height=240 border=1> <img src="ss/ss2.jpg" width=320 height=240 border=1>
</center><br>

<p>Okay, I really don't know anything about this game, but I think it looks really cool.  Being a HUGE fan of <i>Super Smash Brothers</i>, I thought I'd share everything I know about it, hook, line and sinker.  I have not spoken to its creator, (a guest at FBTK calling him/herself "<b>someusername</b>"), and aside from a few posts in <a href="http://fbtk.qbtk.com/phpBB2/viewtopic.php?t=1309">this thread</a>, I haven't seen anything else posted about this game.  When someone asked someusername about his identity, he replied: <i>"Who am I? Well, I've been programming in Basic/QB/FB during +10 years now, and I've always lurking in all QB/FB communities so far, never posting. I think this is (probably) my first post ever!"</i></p>

<p>As for the game, here's what someusername has said the following:

<blockquote class="letters">
<ul>
<li>It is a 2D clone of <i>Super Smash Brothers</i>, and uses the original Nintendo characters.</li><br>
<li>"So far I only have that stage, and one character (Kirby, d'oh!) with half of his movelist finished."</li><br>
<li>"I'm planning to change the font to fit with the rest the game, as well as adding lightning effects and such."</li><br>
<li>On June 14th, someusername posted: "I just finished implementing YAGL. I need to tweak some minor details, finish a basic movelist for Kirby (the only character so far), and a demo will be released. Maybe in a week or two."</li>
</blockquote>

<p>Sounds (and looks) like it will be a very fun game!  I hope the demo does indeed come out soon, because I'd love to give it a go.</p>

<p>But anyway, enough talk... time for a flood of screenshots!  (I apologize that I'm doing a rather half-assed Gallery here, but I never bothered to do any research on this game.  Therefore, this article will live up to the "gallery" name and feature a lot of pictures...and not much else.)</p>

<center>
<img src="ss/ss3.jpg" width=320 height=240 border=1> <img src="ss/ss4.jpg" width=320 height=240 border=1><br><br>
<img src="ss/ss5.jpg" width=320 height=240 border=1> <img src="ss/ss6.jpg" width=320 height=240 border=1><br><br>
<img src="ss/ss7.jpg" width=320 height=240 border=1> <img src="ss/ss8.jpg" width=320 height=240 border=1><br><br>
<img src="ss/ss9.jpg" width=320 height=240 border=1> <img src="ss/ss10.jpg" width=320 height=240 border=1><br><br>
</center>
<br>

<p>That's all, folks!  Visit the <a href="http://fbtk.qbtk.com/phpBB2/viewtopic.php?t=1309">original thread</a> for more info.</p>

<br>

<h3>FieldView</h3>

<center><img src="fieldview_logo.gif" width=375 height=50></center><br>

<p>Z!re and her <a href="http://www.plantasy.darkwizard.org/fieldview/staffinfo.php">team</a> of developers are busy at work on the massive online open RPG in the works, entitled <i>FieldView</i>.  This uber-ambitious project aims to be by far the biggest and most intricate FB game ever created (though most of the features outlined so far have not been developed yet, and are thus "vaporware").</p>

<p>This month, Z!re sent me a work-in-progress version of the FieldView manual to share with you all.  Although this "gallery" article does not include any screenshots, I figured that this would be the best place to include this document.</p>

<p>But first, here's some info from Z!re:</p>

<blockquote class="letters">
<a href="http://plantasy.darkwizard.org/fieldview/">FieldView / Plantasy Studios Official Site</a>

<p>The latest release is always here: <a href="http://fieldview.mine.nu/download.php?id=1">http://fieldview.mine.nu/download.php?id=1</a></p>

<p>In most cases the auto-patcher will handle the updating just fine though.  People can see for themselves whats going on and whats added.</p>

<p>As always, questions or bugreports are to be sent to <a href="mailto:muhdev@gmail.com">muhdev@gmail.com</a></p>

<p>We're especially looking for gameplay/ingame questions such as the ones described in the manual.</p>

<p id="signature">-Z!re</p>

</blockquote>

<p>And now for the <b>FieldView WIP manual</b>:</p>

<blockquote class="letters">
--General Info--<br>
<br>
FieldView is a Massive Multiplayer Online Role Playing Game, or MMORPG for short.<br>
It is set in a medieval fantasy world where players are allowed to live out their lives folowing whatever path they choose.<br>
Various pieces of history regarding the lands found within FieldView is available ingame in the form of books.<br>
<br>
--The Goal--<br>
<br>
FieldView aims to allow players as much freedom as possible, within 'reality' rules. For example players will be able to construct buildings, chop down trees, become smiths, merchants, bakers. Or simply wander off into the wild looking for some game to hunt.<br>
<br>
--Starting Up--<br>
<br>
When starting for the first time players have to create an account, details on this can be found by following the onscreen instructions.<br>
After an account has been created you can create or load a character, once again onscreen instructions explain how to do this.<br>
If you start a new character a tutorial mode will start that explains the basics of the game.<br>
<br>
--The Gameplay--<br>
<br>
There is no difference between a player and a NPC.<br>
FieldView offer no "mobs" or "creeps".<br>
There is no automatic respawning, nor pre-defined spawnpoints.<br>
<br>
In FieldView players can perform various tasks ranging from, as previously mentioned, baking bread to fighting savage hordes of beasts.<br>
Players are also able to gather enough fame that other players, or NPCs, join them in a common cause, creating a clan, pack, army or empire if you will.<br>
Such leaders are able to issue abstract orders to his followers, much in the sense of many Real Time Strategy games.<br>
As previously mentioned players can gain followers, this is not limited to non-animal followers.<br>
This means that a player can gain the trust of a dog, which will then follow the player around.<br>
<br>
FieldView is a class-less game, meaning that you do not pick a class and thats what you get. Instead players are able to excel at the skills of their choosing.<br>
Skills are learned as they are performed, or learned from experienced players, much like a master trains a novice.<br>
There is no levelup system for your character as a whole, instead you train your skills.<br>
In addition, items such as swords do not have an innate damage, the damage you do with your sword depends on your swordsmanship skill and what type of sword it is. In addition, your strenght plays in telling how hard you hit.<br>
Attributes such as strenght are dynamicaly shifted towards the one you use the most. If you carry a large stone, your strenght will go up, lowering your other attributes.<br>
All players have the same amount of health, if you want to fight, wear armor.<br>
<br>
--What Happens if You Die--<br>
<br>
If you die in FieldView you will become a lootable corpse. Your spirit will be transported either to the celestial or abyssal planes.<br>
Your corpse remains lootable until your spirit has performed the tasks given to them.<br>
Spirits that do not perform their tasks and return to the body will be hunted by spirithunters.<br>
Death on Elite difficulty will make you loose 50% of your skills.<br>
Elite difficulty gains 100% skill increase, Normal difficulty gain only 50%<br>
It is possible to change to Elite at any time, but not possible to change back.<br>
Normal players suffer no penalty from death other than the possibility of having their items looted by other players/NPCs.<br>
Spirits can ressurect with their body either by possessing their corpse, or by going to the temple of their most favored god.<br>
<br>
<br>
--List of Playable Races--<br>
<br>
Players will be able to play any one of 14 races in FieldView, the races with their pros and cons are listed below (Some races not listed as their abilities are not yet decided):<br>
<br>
Dragons<br>
Pros: Magic resistant, Tough skin<br>
Cons: Few magic skills, Unable to wear armor, Unable to perform certain jobs<br>
Special: Flight, Fire breath<br>
<br>
Dwarves<br>
Pros: Strong, High morale<br>
Cons: Low stamina and dexterity, weak magic skills<br>
Special: Forge, Imbue, Runebind<br>
<br>
Goblins<br>
Pros: Small, Fast, Stealthy<br>
Cons: Physically weak, Low morale<br>
Special: Construct, Repair, Enhance<br>
<br>
Humans<br>
Pros: Can learn almost all skills, Survivalists, Widespread, Good spellcasters, Learns skills faster<br>
Cons: Unable to excel in most skills, Dissliked by most other races<br>
Special: None<br>
<br>
Minotaurs<br>
Pros: Strong, Horns and claws<br>
Cons: Low intelligence cap, Unable to learn many magic skills, Low agility cap<br>
Special: Can one-hand weild many two-hand weapons, Can wear heavy armors without penalty<br>
<br>
Ogres<br>
Pros: Big, Strong<br>
Cons: Slow, Stupid<br>
Special: Inspire fear, Ranged melee, Critical strike<br>
<br>
<br>
<br>
--The policy--<br>
<br>
As FieldView aims to allow as much freedom as possible to players there are few restrictions to play. The most significant are:<br>
No bot usage<br>
No cheating<br>
No selling of any FieldView related material for money or other services outside of the FieldView game.<br>
FieldView admins are Gods, obey them.<br>
Registering an account to play FieldView can be done either ingame or from the official website.<br>
</blockquote>

<p>And so, there you have it!  Make sure you visit the <a href="http://plantasy.darkwizard.org/fieldview/">FieldView / Plantasy Studios Official Site</a> for the latest news and information on FieldView!</p>

<br>

<hr>

<center>
Have a game that you'd like previewed in the Gallery?  Email some screenshots and information to: <a href="mailto:pberg1@gmail.com">pberg1@gmail.com</a>!</center>

</div>






<br><br>









<a name="qlympics"></a>

<div id="content">
<h2><i>Qlympics 2006:</i><br>The Nominations Round</h2>
<h3 class="writer">Written by Pete</h3>

<center><img src="qlympics_2006_big.jpg" width=600 height=400></center><br>


<h3>The Qlympics 2006</h3>

<p>It's taken a few months, but the Qlympics 2006 is finally here!</p>

<p>Based on the suggestions of the Qmunity, I have compiled a huge list of nominees for all of the categories in the 2006 Qlympics.  Now, it is up to <b>you</b> to help narrow down that huge list of nominees into three to five nominees per category.</p>

<p>You do this by filling out...</p>

<center><font size="+2"><b><a href="http://www.petesqbsite.com/sections/qlympics/qlympics_nominations_2006.html">THE QLYMPICS 2006 NOMINATIONS BALLOT</a></b></font></center><br>

<p>Fill out this form, and let's get this party started!</p>

<p>In issue #22, I will release the FINAL VOTING BALLOT, where you will vote to decide the winners!  The final voting round will begin with the release of QB Express #22, in August, 2006.</p>

<h3>The Rules</h3>

<ul>
<li>Only <b>one ballot</b> per person!</li><br>
<li>For each category, a maximum number of nominees that you may vote for is specified.  You may <b>abstain from voting</B> in any category, or you may <b>vote for fewer than the maximum number of nominees</b>.</li><br>
<li>If you or one of your programs is nominated, <b>you are allowed to vote for yourself</b>.</li><br>
<li><b>Cheating will not be tolerated</b>; if we find evidence of cheating / multiple ballots, we reserve the right to throw out any illegitimate ballots that are submitted.</li><br>
<li>Ballots must be submitted by the release of <b>QB Express #22</b>.  That will most likely come out on or around <b>August 20th</b>, so make sure you get your votes in!</li>
</ul>


<h3>Additional categories</h3>

<p>In case you're wondering, there are a few other awards categories that will not be subject to this nominations round:</p>

<ul>

<li><b>Best QuickBasic Game Developer of All Time</b> - to be determined by a poll on the front page of <a href="http://www.petesqbsite.com">Pete's QB Site</a>; check the "Express Poll" section of QB Express for more info.</li>

<li><b>Best QuickBasic Game</b> - All FB games nominated in the "Game" categories will be eligible.</li>

<li><b>Best FreeBasic Game</b> - All FB games nominated in the "Game" categories will be eligible.</li>

<li><b>Special Achievement Awards</b> - To be awarded to individuals for remarkable contributions to the QB / FB community.  These awards will be determined by the Qlympics staff and organizers, and will not be subject to voting.</li>

</ul>

<h3>Time to Vote!</h3>

<p>What are you waiting for?  Go <a href="http://www.petesqbsite.com/sections/qlympics/qlympics_nominations_2006.html">vote</a> for your favorites!</p>

</div>











<br><br>











<a name="24hours"></a>

<div id="content">
<h2>How to Design and Program a Game in 24 Hours</h2>
<h3 class="writer">Written by SJ Zero</h3>

<blockquote class="letters">
<p>If you've been around the Qmunity for the past two years, you're no doubt familiar with SJ Zero's 24 hour FreeBasic minigame coding competitions.  The rules are simple: you have only 24 hours to complete the best possible game that you can.  When the time is up, everyone uploads their games, and people vote to decide a winner.  It's a simple concept, but it results in some pretty awesome games (SJ Zero's awesome "<a href="!!!!!!!!!!!!!!!!!">Rambo Vs. Kitty Cat</a>" is a testament to this).</p>
<p>And if you go way back to the days of QB RPGs and Darkness Ethereal, you'll find scads of partially-completed RPG demos from DarkDread's many 24-hour RPG coding competitions.  The QB classic "<a href="!!!!!!!!!!!!!!e">The Secret of Cooey</a>" was the fruit of one of these awesome contests.  It's amazing how much can be accomplished with a little experience, a little inspiration, and 24 hours.</p>
<p>But before you start, it's a good idea to think over the process a bit.  That's why SJ Zero wrote this article.  Coding a game in 24 hours is a completely different animal from a conventional game development cycle (which, can take up to NINE YEARS, as <a href="!!!!!!!!!!!!!!!Duke Nukem Forever Link">Duke Nukem Forever</a> has shown us).  The extreme time constraint forces programmers to think very creatively, work efficiently, and run on pure adrenaline (and caffeine) for a whole day...but if you decide to partake in one of these stressful marathon coding sessions, you'll accomplish something that most coders in this community only dream about: <i>actually finishing a game.</i></p>
<p></p>
<p class="signature">-Pete</p>
</blockquote>

<h3>1. Design and assessment</h3>

<p>Fundamentally, this journey of 1000 lines of code begins before you've even turned on your computer. More than any other type of game, the 24 hour game absolutely requires planning.</p>
<p>In other arenas up to now, people have suggested planning every single equation beforehand. You don't have time for that now. If you spend 8 hours planning, you've suddenly only got 16 hours left to actually code and accumulate. Do NOT make the mistake of planning into minute coding detail. Instead, ask yourself the following:</p>

<blockquote class="letters">
<ul>
<li>What kind of game would I like to make?</li><br><br>
<li>What is the setting of this game going to be?</li><br><br>
<li>Which non-coding assets will I require to make this program work?</li><br><br>
<li>What is the best way to get those assets?</li><br><br>
<li>What kind of graphics, sound, and input will my program accept?</li><br><br>
<li>What libraries will be ideal to make this game work?</li><br><br>
<li>Do I know the ideal programming libraries? If not, can I use another?</li><br><br>
<li>Do I have any experience at all creating this sort of game?</li>
</ul>
</blockquote>

<p>By answering such questions, you will begin to get a fairly solid idea of what will be involved in making the game you've decided to make.</p>

<p>This may sound trivial, but by answering the questions in the first hour, you can concentrate on programming, and gathering or creating art, music, and sounds.</p>

<br>

<h3>2. Data Structures</h3>

<p>The first thing to get started with when you've made your decisions is to start designing and coding up data types for every object in the game. By creating the data structures first, you end up inadvertently designing a large portion of the game.</p>

<p>The nice thing about this step is that almost every game starts almost every object with the same fundamental attributes: X, Y, X acceleration, and Y acceleration. From there, you'll often want to give it some designation for an object subtype so you can, for example, have multiple enemies using a single data type.</p>

<p>Always try to keep in mind exactly how you're going to use these variables. Remember, that fundamentally, you need to know where every object is, what every  object looks like, what every object does, how every object is going to move over the next set time period, and what the status of the object is. By correctly setting up the data structures, you ensure that your program will more or less design itself.</p>

<p>Having created the data structures, just create arrays for the different object types.</p>

<br>

<h3>3. Graphics</h3>

<p>Before we start programming the graphics engine, get your art assets together. Ideally, you'd create them from scratch, but you've got 24 hours – there's no shame in taking a few from elsewhere. The ideal is to use public domain images, however. There's no reason to infringe anyone's copyrights.</p>

<p>Now, you might be asking why on earth we'd set up graphics at this time. The answer is very simple: By having graphics set up, loaded and running, you've got a visual debugger for the physics engine and player controls. Therefore, make sure that the fundamentals of the graphics, that is to say, the position and sprites for all the objects on the screen, are functioning. It may be a good idea to use some false data in the data structures you've created so you can tell if everything is working.</p>

<br>

<h3>4. Physics</h3>

<p>Physics is the most involved part of the process, but it's much easier now that you have graphics in place. With this phase comes a large portion of independent design I can't get into here, but some of the most important questions you have to ask yourself are related to how objects act and why. For example, most arcade games function the way they do because they are hard-coded to do so. Most modern video games, conversely, tend to have universal physics models which treat everything the same and force objects to move according to a universal model.</p>

<p>No matter which philosophy you choose for your physics model, ensure that  everything is taken care of in this little block: Enemy stuff, player stuff, movement stuff. Keeping it centralized has the added distinction of allowing you to move to a TCP/IP networking model later, or allowing you to make changes to the fundamental gameplay without altering anything but the physics engine.</p>

<br>

<h3>5. Player Controls</h3>

<p>In the past, player controls would be difficult because it had to do everything. Because of the way I've recommended you tackle your physics, it is the most simple: Simply alter the physics values so your player character is compelled to act in the way you want it to move. Want to move left? Increase the X velocity. Want to move right? Increase the Y acceleration. Want to jump? Set the Y acceleration to a relatively large negative value. By handling player controls in this way, multiplayer is easy to implement, and the physics engine can cover everything important. The centralization has so many benefits I couldn't possibly list them all here.</p>

<br>


<h3>6. Level asset creation</h3>
<p>If you are creating a game that requires manual level asset creation, God help you. You've chosen a path that will require the majority of your time to be focused on creating level assets. However, if you get the first 5 steps out of the way quickly, you can still end up with a large, playable game.</p>

<p>One lovely thing is, because of the way you've implemented everything in an encapsulated manner, you can just pull the physics and player controls out of the engine and use the same base as a level editor.</p>

<p>For Rambo vs. Kitty Cat, I didn't even do that – I simply made the mouse into a level editing control device and kept the keyboard as the game playing control device.</p>

<p>After completing these 6 steps, you'll have a complete, playable game! From here, you can expand it however you'd like, polish it up for a true release, or move onto another game.</p>

<p>Whatever you choose to do, congratulations! I hope to see you at the next <a href="http://qbxl.net">QBXL</a> Competition!</p>

<p id="signature">- SJ Zero</p>

<hr>

<center>Download a copy of this article: <a href="24hours.html">24hours.html</a></center>

</div>







<br><br>











<a name="next"></a>

<div id="content">
<h2>The Next (R)evolution in Computing</h2>
<h3 class="writer">Written by Rick Clark</h3>


<p>Modern computing has come a long way from the days of Babbage's Difference and Analytical Engines, which are thought by many to the true ancestors to the modern computer, even though neither machine was actually built as a full-scale working model. The first production computers were mechanical devices, in many ways similar to Babbage's Analytical Engine. These mechanical computers evolved into electro-mechanical devices, a hybrid of electrical relays and mechanical parts, which in turn became electronic analog devices, then electronic digital devices, which finally gave way to the semiconductor-based digital computers we have today.</p>

<p>Even though the guts of the computer have changed over the years, the main function of the computer hasn't. Babbage created his Difference Engine to calculate logarithmic tables and Eniac was created to calculate artillery trajectories. Modern computers can do all sorts of things besides calculating tables of logarithms-but at their core, they are still overgrown calculators. </p>

<p>The principles of computing, which were beginning to be developed as early as the 1930's and became practical on a large scale in the 1950's are still being used today. The new frontiers of computing technology, quantum-based CPU's and holographic memory may increase the speed and capacity of computers, but will not change the fundamental nature of computers; they will still be large (or small) calculators.</p>

<p>The problem with computers is that, for all of the gigabytes of memory and fancy HD displays, they are hardware-centric, engineering devices, designed to solve engineering problems. Sure, the attempt has been made to make computers more user friendly by layering operating systems and programs on top of the hardware, but the user is still at the mercy of the computer engineer and software designer to develop the tools that are needed to use the computer. And even though it is much easier to use a computer now than it has been in the past, the available software is still hardware-centric, making the user conform to the rules of the machine, rather than making the machine conform to the rules of the user.</p>

<p>Making computers faster, or increasing their capacity won't change the fundamental paradigm of machine centered computing. The next evolutionary step in computing, the next revolution in computers will be the shift from hardware-centric computing to human-centric computing. Instead of using a computer to solve a problem, we will interact with a computer to solve the problem together. What is needed to make this paradigm shift possible? Computers will need to understand human languages.</p>

<p>This can be shown by using an example familiar to all of us programmers: writing a program. To write a program, you start with a programming language of your choice. Once you write the source code, it is fed into a compiler or interpreter to convert the source code into machine code that is then executed by the computer. Notice the process: we write a human-readable document that must be converted to a machine-readable document before the computer can understand what we want accomplished.</p>

<p>Source code is a strictly human construct. A computer has no idea what Dim a as As Integer means from a language perspective. In order to make the computer understand what we want done, the code must be translated to machine language. The machine forces this step-wise process because we must conform to the rules of the machine. To make matters worse, we as programmers must conform to the rules of the language designer, even though the rules of the language may not be what we really need in the first place.</p>

<p>It makes more sense, from a human perspective, that to solve a problem, we simply tell the computer the problem, and together, build a solution. If the computer understood our language, we could explain to it what needed to be done. If what we are asking is ambiguous or not understood, language provides the mechanisms necessary to clarify concepts and ideas, and arrive at a common understanding. Human-centric computing means making the machine conform to human rules; that is, changing computing from calculation-based to language recognition.</p>

<p>Consider the following:</p>

<blockquote class="letters">
<ol>
<li>Understanding language implies interaction. If a computer understood human language, it would have the facility to be an interactive partner in problem solving, because language is the basis for human interaction. </li><br>
<li>Understanding language implies learning. The only way to develop language skills is to learn the language. In order for a computer to understand language is has to learn the language, and must have the capacity to learn the language of the user.</li><br>
<li>Understanding language implies intelligence. Language is, because it is a human construct, filled with subtleties. If a computer were able to understand language, it would also have the necessary intelligence to understand these subtleties.</li><br>
<li>Understanding language frees the computer and user from the constraints of the engineer and software designer. If a computer can understand that I need to build a database of names, it will also have the capability to build and manage that list of names.</li><br>
<li>Understanding language implies a universal machine. If language is the medium of computer interaction, then the concept of a specific operating system, even specific programs, is no longer necessary. Language enabled computers would be universal, able to interact, not only with humans, but with other computers as well, in a humanistic fashion.</li><br>
<li>Understanding language implies evolutionary change. Languages change over time, and the evolutionary progress of man can be measured by the changes in human language. If a computer understood language, it too would evolve right along with humans.</li><br>
</ol>
</blockquote>

<p>While all of this may sound nearly impossible, the shift from calculation computing to language computing does not mean a new set of computing principles. Rather it is the reformulation of those principles, the change of perspective that needs to come about in order for the paradigm shift to occur. Calculation oriented computing has undeniably changed the world. Language oriented computing, the next (r)evolutionary step in computing, may have an even bigger impact.</p>


<hr>

<center>Download a copy of this article: <a href="The_Next.txt">The_Next.txt</a></center>

</div>







<br><br>










<a name="polemic"></a>

<div id="content">
<h2>Polemic For the Future of FB</h2>
<h3 class="writer">Written by SJ Zero</h3>

<p>This is a call to arms; a call to war. Too long have we done nothing
with our great freedom. Too long have we wasted our time and bickered
amongst ourselves and tried our very best to ignore the fact that we
were achieving nothing. I've watched the greatest programmers of our
generation lured away or drawn into nothingness. I've watched an
entire community scream in anger about nothing, and be answered in
kind.</p>

<p>Quit wasting my time.</p>

<p>Today, more than at any other point in our history, we need a
direction. We need some fight to be fought, some direction to pit one
against another not in the airy realm of useless semi-philosophical
thoughts, but hard code hammered into something great and useful.</p>

<p>There is only one way to do this.</p>

<p>Pick up a project, right now. It doesn't matter if it's good. It
doesn't matter if it's stupid. It doesn't matter what you think of it
at all. Just pick up a project and RUN with it. This issue, we've got
all the information you'll need to get a demo up and running in 24
short hours. Think about how insignificant a slice of time that is. In
a single day, you could have something. And if everyone reading this
message runs out and spends 24 little hours on something, and looks at
everyone else's product of 24 little hours, then really interesting
things start happening: People start to go "Gee, I like how that
little 24 hours turned out. I think I'll try to spend 24 little hours
trying to make something better.", and they do. From there, the little
bits of 24 little hours accumulate and we'll have a community to put
any other on the Internet to shame.</p>

<p>We have the technology. All we need now is the will.</p>



<hr>

<center>For more articles by SJ Zero, visit <a href="http://qbxl.net">QBXL.net</a>.  But really, you should take SJ's advice and go <a href="#24hours">code something</a>.</center>

</div>







<br><br>









<a name="digg"></a>

<div id="content">
<h2><i>Digg it!</i><br>The Year's Best Programming Articles From Digg.com</h2>
<h3 class="writer">Written by Pete</h3>

<blockquote class="letters">
<p>If you haven't heard of the social tech news site <b><a href="http://www.digg.com">Digg.com</a></b> yet, you've been missing out on the single best source of news and interesting bookmarks on the entire web....if you're a geek, that is.</p>
<p>In the past few months, <b>Digg</b> has passed the former king of online geek news, <b>Slashdot</b>, and it keeps growing.  In fact, on Monday, June 26th (tomorrow when I'm writing this), Digg is launching version 3 of their website, which will add a ton of new features and will expand the site beyond just tech/geek news to everything from movies and music to world news to art.</p>
<p>But one topic that Digg has always covered extremely well is perhaps the geekiest subject of them all: <a href="http://www.digg.com/programming"><b>Programming</b></a>.  You'll find some of the most interesting and informative articles about computer programming listed at Digg -- covering everything from how to create high-tech new Ruby On Rails web apps, to old-school DOS programming, to general programming theory.</p>
<p>Since I'm sure a lot of QB Express readers have missed out on many of the good programming articles posted at Digg, <b>I've gone through the last year's worth of top programming articles and filtered out the ones that would appeal to QB / FB programmers</b>: the ones on general programming know-how, and some of the stuff on old-school BASIC / DOS coding.  (I've left out all the articles on specific languages and web programming... but if you're interested in learning PHP, AJAX, CSS, Python, Java, C++, or web programming, you'll find literally hundreds of fantastic articles in the Digg programming archives.)
<p>If you're not already a member of Digg, I encourage you to sign up and pay the site some visits.  If you ever need to kill time, or want to keep yourself informed about the latest in technology, science and entertainment, Digg.com is *the* place to visit online.  You never know what you're going to find.  Plus, you can submit articles of your own and direct mega traffic to your site (if enough people actually digg your article).  Also, you should check out the weekly Audio / Video podcast <a href="http://revision3.com/diggnation">Diggnation</a> with Kevin Rose (Digg.com founder) and Alex Albrecht.  It's the most entertaining podcast I've found anywhere.</p>
<p>As you've guessed, I'm a Digg addict... I visit the site every time I sign online, and can't get enough.  If you're interested in seeing the stories that I've been Digging throughout the week, visit <b><a href="http://www.digg.com/users/bandergrove">my user profile</a></b> -- and if you're a member, add me as a friend!  None of my real-life friends use Digg, so I don't have many Digg friends yet...but if all you QBers befriend me, then I won't be such a digg dork. :)</p>
<p>Enjoy the articles!</p>
<p id="signature">-Pete</p>
</blockquote>

<br>

<h4><span style='font-family:Arial'><a
href="http://www.htdp.org/2003-09-26/Book/" target="_blank">How to Design
Programs: An Introduction to Computing and Programming</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/dirtyfratboy"></a>submitted by <a
href="http://digg.com/users/dirtyfratboy"><span style='color:#4D4D4D'>dirtyfratboy</span></a>
1 day 23 hours ago (<a href="http://www.htdp.org/2003-09-26/Book/"
target="_blank"
title="How to Design Programs: An Introduction to Computing and Programming"><span
style='color:#4D4D4D'>via http://www.htdp.org/2003-09-26...</span></a>)</span></p>

<p><span style='font-family:Arial'>Programming a computer requires patience and
concentration. Only rigorous planning and adherence to the plan will prevent
serious logical mistakes in our designs. But when we finally master the design
of programs, we will have learned skills that are useful far beyond the realm
of programming.</span></p>

<p><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www-cs-students.stanford.edu/%7Eamitp/gameprog.html"
target="_blank">Ultimate Game Programming Guide</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/shirini"></a>submitted by <a
href="http://digg.com/users/shirini"><span style='color:#4D4D4D'>shirini</span></a>
3 days ago (<a href="http://www-cs-students.stanford.edu/%7Eamitp/gameprog.html"
target="_blank" title="Ultimate Game Programming Guide"><span style='color:
#4D4D4D'>via http://www-cs-students.stanfor...</span></a>)</span></p>

<p><span style='font-family:Arial'>This is one of the best resources for game
programmers out there.</span></p>

<p><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.cse.ucsd.edu/%7Edasgupta/mcgrawhill/" target="_blank">All the
programming algorithms you might ever need</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/bonlebon"></a>submitted by <a
href="http://digg.com/users/bonlebon"><span style='color:#4D4D4D'>bonlebon</span></a>
4 days ago (<a href="http://www.cse.ucsd.edu/%7Edasgupta/mcgrawhill/"
target="_blank" title="All the programming algorithms you might ever need"><span
style='color:#4D4D4D'>via http://www.cse.ucsd.edu/~dasgu...</span></a>)</span></p>

<p><span style='font-family:Arial'>This is a pure gold link for CS pros, techs
and hobbyists.</span></p>

<p><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.defmacro.org/ramblings/fp.html" target="_blank">Functional
Programming For The Rest of Us</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/dirtyfratboy"></a>submitted by <a
href="http://digg.com/users/dirtyfratboy"><span style='color:#4D4D4D'>dirtyfratboy</span></a>
5 days ago (<a href="http://www.defmacro.org/ramblings/fp.html" target="_blank"
title="Functional Programming For The Rest of Us"><span style='color:#4D4D4D'>via
http://www.defmacro.org/rambli...</span></a>)</span></p>

<p><span style='font-family:Arial'>&quot;So what is FP? How did it come about?
Is it edible? If it's as useful as its advocates claim, why isn't it being used
more often in the industry? Why is it that only people with PhDs tend to use
it? Most importantly, why is it so damn hard to learn?&quot;</span></p>

<p><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://hoskinator.blogspot.com/2006/06/10-tips-on-writing-reusable-code.html"
target="_blank">10 tips on writing reusable code</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/depi"></a>submitted by <a
href="http://digg.com/users/depi"><span style='color:#4D4D4D'>depi</span></a> 6
days ago (<a
href="http://hoskinator.blogspot.com/2006/06/10-tips-on-writing-reusable-code.html"
target="_blank" title="10 tips on writing reusable code"><span
style='color:#4D4D4D'>via http://hoskinator.blogspot.com...</span></a>)</span></p>

<p><span style='font-family:Arial'>Really good tips how to write reusable code.</span></p>

<p><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.knowing.net/PermaLink,guid,f3b9ba36-848e-43f8-9caa-232ec216192d.aspx"
target="_blank">15 Exercises to Know A Programming Language: Part 1</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/rlamarch"></a>submitted by <a
href="http://digg.com/users/rlamarch"><span style='color:#4D4D4D'>rlamarch</span></a>
8 days ago (<a
href="http://www.knowing.net/PermaLink,guid,f3b9ba36-848e-43f8-9caa-232ec216192d.aspx"
target="_blank" title="15 Exercises to Know A Programming Language: Part 1"><span
style='color:#4D4D4D'>via http://www.knowing.net/PermaLi...</span></a>)</span></p>

<p><span style='font-family:Arial'>The fastest way to learn a new language is
to write some code. Here are 15 exercises from veteran programmer Larry O'Brian
to kick start your studies.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.jobsnake.com/seek/articles/index.cgi?openarticle&amp;8533&amp;"
target="_blank">15 Exercises for Learning a new Programming Language</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/sickaltima"></a>submitted by <a
href="http://digg.com/users/sickaltima"><span style='color:#4D4D4D'>sickaltima</span></a>
13 days ago (<a
href="http://www.jobsnake.com/seek/articles/index.cgi?openarticle&amp;8533&amp;"
target="_blank" title="15 Exercises for Learning a new Programming Language"><span
style='color:#4D4D4D'>via http://www.jobsnake.com/seek/a...</span></a>)</span></p>

<p><span style='font-family:Arial'>Prashant N Mhatre has a working knowledge of
several programming languages but job demands to learn a new language
frequently in a short time. Prashant shares 15 exercises to master languages
quickly.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.emailbattles.com/archive/battles/ip_aadiedddfi_cd/"
target="_blank">How The Current State Of Case Law Forces Software Patenting</a>
</span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/dirtyfratboy"></a>submitted by <a
href="http://digg.com/users/dirtyfratboy"><span style='color:#4D4D4D'>dirtyfratboy</span></a>
19 days ago (<a
href="http://www.emailbattles.com/archive/battles/ip_aadiedddfi_cd/"
target="_blank"
title="How The Current State Of Case Law Forces Software Patenting"><span
style='color:#4D4D4D'>via http://www.emailbattles.com/ar...</span></a>)</span></p>

<p><span style='font-family:Arial'>Programmers have slowly come to realize
that, if they don't patent their code, they may find themselves unable to
legally use it after someone else patents it much later. Out of necessity, a
new patent-oriented ethos has taken over.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://thestarman.dan123.com/asm/debug/debug.htm" target="_blank">Complete
MS-Debug Tutorial</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/gwjc"></a>submitted by <a
href="http://digg.com/users/gwjc"><span style='color:#4D4D4D'>gwjc</span></a>
21 days ago (<a href="http://thestarman.dan123.com/asm/debug/debug.htm"
target="_blank" title="Complete MS-Debug Tutorial"><span style='color:#4D4D4D'>via
http://thestarman.dan123.com/a...</span></a>)</span></p>

<p><span style='font-family:Arial'>If you started on MS-DOS PC's back in the
80's you probably still have fond memories of writing .coms in debug. Even if
you never used it, Microsoft still gives you a copy of it with Windows, so you
can fire it up and flashback to the days before the GUI.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.old-computers.com/fun/stupid_scans/stupid_Atari_great_laugh.jpg"
target="_blank">They Laughed When I Sat Down At The Keyboard</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/tastypastry"></a>submitted by <a
href="http://digg.com/users/tastypastry"><span style='color:#4D4D4D'>tastypastry</span></a>
35 days ago (<a
href="http://www.old-computers.com/fun/stupid_scans/stupid_Atari_great_laugh.jpg"
target="_blank" title="They Laughed When I Sat Down At The Keyboard"><span
style='color:#4D4D4D'>via http://www.old-computers.com/f...</span></a>)</span></p>

<p><span style='font-family:Arial'>Atari/Microsoft ad from the early 80's for
Microsoft Basic II.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://keithdevens.com/wiki/ProgrammerFonts" target="_blank">Good List of
&quot;Programming Fonts&quot;</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/mbuchetics"></a>submitted by <a
href="http://digg.com/users/mbuchetics"><span style='color:#4D4D4D'>mbuchetics</span></a>
55 days ago (<a href="http://keithdevens.com/wiki/ProgrammerFonts"
target="_blank" title="Good List of "><span style='color:#4D4D4D'>via
http://keithdevens.com/wiki/Pr...</span></a>)</span></p>

<p><span style='font-family:Arial'>Programmers have very particular font needs.
A font for programming must be mono spaced, extremely readable, and must
sharply distinguish between similar characters, such as capital O and zero and
the number 1, capital I, and lowercase L. In addition, good programming fonts
allow you to view more lines of code on screen at once.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a href="http://2020ok.com/5.htm"
target="_blank">Massive List Of 5000 Programming / Computer / Internet Books -
For Free!</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/lonelycanuck"></a>submitted by <a
href="http://digg.com/users/lonelycanuck"><span style='color:#4D4D4D'>lonelycanuck</span></a>
57 days ago (<a href="http://2020ok.com/5.htm" target="_blank"
title="Massive List Of 5000 Programming / Computer / Internet Books - For Free!"><span
style='color:#4D4D4D'>via http://2020ok.com/5.htm</span></a>)</span></p>

<p><span style='font-family:Arial'>Who needs to pirate books / steal from the
library with a list of free resources like these?</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://jroller.com/page/rolsen/20060419/" target="_blank">5 Truths About
Code Optimization</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/palindrome"></a>submitted by <a
href="http://digg.com/users/palindrome"><span style='color:#4D4D4D'>palindrome</span></a>
66 days ago (<a href="http://jroller.com/page/rolsen/20060419/" target="_blank"
title="5 Truths About Code Optimization"><span style='color:#4D4D4D'>via
http://jroller.com/page/rolsen...</span></a>)</span></p>

<p><span style='font-family:Arial'>&quot;See if you can speed this code
up.&quot; It's usually code I've never seen. It's probably important, otherwise
they wouldn't be worried about how it is performing. And speed it up to what?
Still, there are some basics you can fall back on when someone asks you to
optimize some code.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://photoncubetutorials.blogspot.com/2006/03/what-is-computer-science.html"
target="_blank">Interested in Computer Science?</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/dbxz"></a>submitted by <a
href="http://digg.com/users/dbxz"><span style='color:#4D4D4D'>dbxz</span></a>
71 days ago (<a
href="http://photoncubetutorials.blogspot.com/2006/03/what-is-computer-science.html"
target="_blank" title="Interested in Computer Science?"><span style='color:
#4D4D4D'>via http://photoncubetutorials.blo...</span></a>)</span></p>

<p><span style='font-family:Arial'>If your planning on going to University for
it here is an article that will give you a small taste of what Computer Science
is like.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://glyf.livejournal.com/46589.html" target="_blank">Ethics for
Programmers: Primum non Nocere</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/bonlebon"></a>submitted by <a
href="http://digg.com/users/bonlebon"><span style='color:#4D4D4D'>bonlebon</span></a>
84 days ago (<a href="http://glyf.livejournal.com/46589.html" target="_blank"
title="Ethics for Programmers: Primum non Nocere"><span style='color:#4D4D4D'>via
http://glyf.livejournal.com/46...</span></a>)</span></p>

<p><span style='font-family:Arial'>I've been mulling over these ideas for quite
a while, and I think I may still have more thinking to do, but recent events
have gotten me thinking again about the increasing urgency of the need for a
professional code of conduct for computer programmers.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a href="http://www.computer-books.us/"
target="_blank">Computer and programming books</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/lacop"></a>submitted by <a
href="http://digg.com/users/lacop"><span style='color:#4D4D4D'>lacop</span></a>
93 days ago (<a href="http://www.computer-books.us/" target="_blank"
title="Computer and programming books"><span style='color:#4D4D4D'>via http://www.computer-books.us/</span></a>)</span></p>

<p><span style='font-family:Arial'>High quality computer books for available
for free download.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://c2.com/cgi/wiki?LazinessImpatienceHubris" target="_blank">The
Three Great Virtues Of A Programmer</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/mudgen"></a>submitted by <a
href="http://digg.com/users/mudgen"><span style='color:#4D4D4D'>mudgen</span></a>
100 days ago (<a href="http://c2.com/cgi/wiki?LazinessImpatienceHubris"
target="_blank" title="The Three Great Virtues Of A Programmer"><span
style='color:#4D4D4D'>via http://c2.com/cgi/wiki?Lazines...</span></a>)</span></p>

<p><span style='font-family:Arial'>&quot;We will encourage you to develop the
three great virtues of a programmer: laziness, impatience, and hubris&quot; --
Larry Wall.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://steve-yegge.blogspot.com/2006/03/math-for-programmers.html"
target="_blank">Math For Programmers: It Isn't As Hard As You Think</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/dirtyfratboy"></a>submitted by <a
href="http://digg.com/users/dirtyfratboy"><span style='color:#4D4D4D'>dirtyfratboy</span></a>
100 days ago (<a
href="http://steve-yegge.blogspot.com/2006/03/math-for-programmers.html"
target="_blank" title="Math For Programmers: It Isn't As Hard As You Think"><span
style='color:#4D4D4D'>via http://steve-yegge.blogspot.co...</span></a>)</span></p>

<p><span style='font-family:Arial'>&quot;They teach math all wrong in school.
Way, WAY wrong. If you teach yourself math the right way, you'll learn faster,
remember it longer, and it'll be much more valuable to you as a
programmer.&quot;</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.oreilly.com/news/graphics/prog_lang_poster.pdf" target="_blank">Poster
of History of Programming Languages</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/rsanchezg"></a>submitted by <a
href="http://digg.com/users/rsanchezg"><span style='color:#4D4D4D'>rsanchezg</span></a>
104 days ago (<a
href="http://www.oreilly.com/news/graphics/prog_lang_poster.pdf" target="_blank"
title="Poster of History of Programming Languages"><span style='color:#4D4D4D'>via
http://www.oreilly.com/news/gr...</span></a>)</span></p>

<p><span style='font-family:Arial'>Poster of history of programming languages
of 1954-2004.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.cabochon.com/%7Estevey/blog-rants/tour-de-babel.html"
target="_blank">What Programming Languages You Should Actually Care to Learn</a>
</span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/geezusfreeek"></a>submitted by <a
href="http://digg.com/users/geezusfreeek"><span style='color:#4D4D4D'>geezusfreeek</span></a>
105 days ago (<a
href="http://www.cabochon.com/%7Estevey/blog-rants/tour-de-babel.html"
target="_blank"
title="What Programming Languages You Should Actually Care to Learn"><span
style='color:#4D4D4D'>via http://www.cabochon.com/~steve...</span></a>)</span></p>

<p><span style='font-family:Arial'>This is probably my favorite tour of the
popular languages we all hear debates about and which ones are actually worth
their steam. It includes C, C++, Lisp, Java, Perl, Ruby, and Python. This is
sure to spark at least a little controversy in the comments.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a href="http://critticall.com/"
target="_blank">Natural Selection Yields a Sorting Algorithm Better than Quicksort</a>
</span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/dirtyfratboy"></a>submitted by <a
href="http://digg.com/users/dirtyfratboy"><span style='color:#4D4D4D'>dirtyfratboy</span></a>
113 days ago (<a href="http://critticall.com/" target="_blank"
title="Natural Selection Yields a Sorting Algorithm Better than Quicksort"><span
style='color:#4D4D4D'>via http://critticall.com/</span></a>)</span></p>

<p><span style='font-family:Arial'>This is the home page of Critticall. A
programming tool, which enables you to apply the Darwinian force to algorithms!
To those fundamental, and to those quite common. Evolution isn't just a theory.
It's a nature's technology to make complicated things.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a href="http://www.scene.org/awards.php"
target="_blank">The real power of programming in assembly</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/deathray"></a>submitted by <a
href="http://digg.com/users/deathray"><span style='color:#4D4D4D'>deathray</span></a>
114 days ago (<a href="http://www.scene.org/awards.php" target="_blank"
title="The real power of programming in assembly"><span style='color:#4D4D4D'>via
http://www.scene.org/awards.ph...</span></a>)</span></p>

<p><span style='font-family:Arial'>Check out these 64k intros, less than 64kb
in size and yet more than 2 minutes of graphics and music. Programming at its
best.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.chrylers.com/weblog/topten.php" target="_blank">Top Ten List
of Programming Advice to NOT Follow</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/slf67"></a>submitted by <a
href="http://digg.com/users/slf67"><span style='color:#4D4D4D'>slf67</span></a>
132 days ago (<a href="http://www.chrylers.com/weblog/topten.php"
target="_blank" title="Top Ten List of Programming Advice to NOT Follow"><span
style='color:#4D4D4D'>via http://www.chrylers.com/weblog...</span></a>)</span></p>

<p><span style='font-family:Arial'>Addresses some of the most common things
people are being told about programming with which the author disagrees.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.linux-watch.com/news/NS6361290460.html" target="_blank">Programmers
get their own search engine</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/jsmiley17"></a>submitted by <a
href="http://digg.com/users/jsmiley17"><span style='color:#4D4D4D'>jsmiley17</span></a>
138 days ago (<a href="http://www.linux-watch.com/news/NS6361290460.html"
target="_blank" title="Programmers get their own search engine"><span
style='color:#4D4D4D'>via http://www.linux-watch.com/new...</span></a>)</span></p>

<p><span style='font-family:Arial'>A tool, known as Krugle, is designed to
deliver easy access to source code and other highly relevant technical
information in a single, clean, easy-to-use interface for programmers. Krugle
works by crawling, parsing, and indexing code found in open source repositories
and code that exists in archives, mailing lists, blogs, and Web pages.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.irishdev.com/NewsArticle.aspx?id=1857" target="_blank">Seven
Secrets of Successful Programmers</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/netmancer"></a>submitted by <a
href="http://digg.com/users/netmancer"><span style='color:#4D4D4D'>netmancer</span></a>
143 days ago (<a href="http://www.irishdev.com/NewsArticle.aspx?id=1857"
target="_blank" title="Seven Secrets of Successful Programmers"><span
style='color:#4D4D4D'>via http://www.irishdev.com/NewsAr...</span></a>)</span></p>

<p><span style='font-family:Arial'>Nice quick list of seven good programming
practices.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://en.wikipedia.org/wiki/List_of_algorithms" target="_blank">List of
Algorithms</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/vagabond0101"></a>submitted by <a
href="http://digg.com/users/vagabond0101"><span style='color:#4D4D4D'>vagabond0101</span></a>
144 days ago (<a href="http://en.wikipedia.org/wiki/List_of_algorithms"
target="_blank" title="List of Algorithms"><span style='color:#4D4D4D'>via
http://en.wikipedia.org/wiki/L...</span></a>)</span></p>

<p><span style='font-family:Arial'>This single wikipedia webpage shows you a
list of algorithms neatly classified into categories. Pick the ones you are
interested in !</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://epsilondelta.wordpress.com/2006/01/29/programming-like-a-mathematician-i-closures/"
target="_blank">Do Programmers think like mathematicians?</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/summer2005"></a>submitted by <a
href="http://digg.com/users/summer2005"><span style='color:#4D4D4D'>summer2005</span></a>
145 days ago (<a
href="http://epsilondelta.wordpress.com/2006/01/29/programming-like-a-mathematician-i-closures/"
target="_blank" title="Do Programmers think like mathematicians?"><span
style='color:#4D4D4D'>via http://epsilondelta.wordpress....</span></a>)</span></p>

<p><span style='font-family:Arial'>This is the start of a new series,
“Programming Like A Mathematician”. The author will explain how a mathematician
thinks about a particular problem, with hopes that programmers will be able to
see things from a different perspective.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.hacknot.info/hacknot/action/showEntry?eid=81" target="_blank">The
A to Z of Programmer Predilictions</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/Carlsb3rg"></a>submitted by <a
href="http://digg.com/users/Carlsb3rg"><span style='color:#4D4D4D'>Carlsb3rg</span></a>
151 days ago (<a href="http://www.hacknot.info/hacknot/action/showEntry?eid=81"
target="_blank" title="The A to Z of Programmer Predilictions"><span
style='color:#4D4D4D'>via http://www.hacknot.info/hackno...</span></a>)</span></p>

<p><span style='font-family:Arial'>Hilarious caricatures of 26 different types
of programmers</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://download.savannah.gnu.org/releases/pgubook/ProgrammingGroundUp-1-0-booksize.pdf"
target="_blank">FREE ebook: Programming from the ground up</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/bonlebon"></a>submitted by <a
href="http://digg.com/users/bonlebon"><span style='color:#4D4D4D'>bonlebon</span></a>
153 days ago (<a
href="http://download.savannah.gnu.org/releases/pgubook/ProgrammingGroundUp-1-0-booksize.pdf"
target="_blank" title="FREE ebook: Programming from the ground up"><span
style='color:#4D4D4D'>via http://download.savannah.gnu.o...</span></a>)</span></p>

<p><span style='font-family:Arial'>All you wanted to know about programming and
never dared to ask. ALERT: PDF ahead.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://blogcritics.org/archives/2006/01/13/213613.php" target="_blank">I'm
A Programmer, Not A Computer Guy</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/FilteringCraig"></a>submitted by <a
href="http://digg.com/users/FilteringCraig"><span style='color:#4D4D4D'>FilteringCraig</span></a>
160 days ago (<a href="http://blogcritics.org/archives/2006/01/13/213613.php"
target="_blank" title="I'm A Programmer, Not A Computer Guy"><span
style='color:#4D4D4D'>via http://blogcritics.org/archive...</span></a>)</span></p>

<p><span style='font-family:Arial'>This is a funny article showing that just because
someone can program a computer doesn't mean that that makes them a
&quot;computer guy.&quot; This is to programmers what printers and copiers are
to computer guys.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.technicat.com/writing/mit.html" target="_blank">What I Learned
at MIT</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/LewsTherin"></a>submitted by <a
href="http://digg.com/users/LewsTherin"><span style='color:#4D4D4D'>LewsTherin</span></a>
168 days ago (<a href="http://www.technicat.com/writing/mit.html"
target="_blank" title="What I Learned at MIT"><span style='color:#4D4D4D'>via
http://www.technicat.com/writi...</span></a>)</span></p>

<p><span style='font-family:Arial'>Some lessons learned by Philip Chu from
being a student at MIT, especially ones not taught by teachers. My favorite is
&quot;Work Alone&quot;.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.technicat.com/writing/programming.html" target="_blank">Seven
Habits of Highly Effective Programmers</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/crapiolio"></a>submitted by <a
href="http://digg.com/users/crapiolio"><span style='color:#4D4D4D'>crapiolio</span></a>
183 days ago (<a href="http://www.technicat.com/writing/programming.html"
target="_blank" title="Seven Habits of Highly Effective Programmers"><span
style='color:#4D4D4D'>via http://www.technicat.com/writi...</span></a>)</span></p>

<p><span style='font-family:Arial'>Must read if you are a new or pro
programmer.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://all-technology.com.nyud.net:8090/eigenpolls/bpfsd/" target="_blank">Best
Practices for Software Development</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/equanimous"></a>submitted by <a
href="http://digg.com/users/equanimous"><span style='color:#4D4D4D'>equanimous</span></a>
196 days ago (<a
href="http://all-technology.com.nyud.net:8090/eigenpolls/bpfsd/" target="_blank"
title="Best Practices for Software Development"><span style='color:#4D4D4D'>via
http://all-technology.com.nyud...</span></a>)</span></p>

<p><span style='font-family:Arial'>Here is a voteable list of best practices in
software development. I am using the coral cache because the server is a little
old, so if you would like to vote or post please remove .nyud.net:8090 from the
url.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://samizdat.mines.edu/howto/HowToBeAProgrammer.html" target="_blank">How
to be a Programmer: A Short, Comprehensive, and Personal Summary</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/jak119"></a>submitted by <a
href="http://digg.com/users/jak119"><span style='color:#4D4D4D'>jak119</span></a>
220 days ago (<a href="http://samizdat.mines.edu/howto/HowToBeAProgrammer.html"
target="_blank"
title="How to be a Programmer: A Short, Comprehensive, and Personal Summary"><span
style='color:#4D4D4D'>via http://samizdat.mines.edu/howt...</span></a>)</span></p>

<p><span style='font-family:Arial'>just what the title says</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.cenriqueortiz.com/weblog/General/?permalink=Developers-Top-10-replies-when-code-doesnt-work.html"
target="_blank">Developer's Top 10 replies when code doesn't work...</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/seven5"></a>submitted by <a
href="http://digg.com/users/seven5"><span style='color:#4D4D4D'>seven5</span></a>
237 days ago (<a
href="http://www.cenriqueortiz.com/weblog/General/?permalink=Developers-Top-10-replies-when-code-doesnt-work.html"
target="_blank" title="Developer's Top 10 replies when code doesn't work..."><span
style='color:#4D4D4D'>via http://www.cenriqueortiz.com/w...</span></a>)</span></p>

<p><span style='font-family:Arial'>I've said them all...</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.wired.com/news/technology/0,1282,68872,00.html?tw=wn_tophead_2"
target="_blank">C'mon Kids, Let's Play Programmer</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/Albertpacino"></a>submitted by <a
href="http://digg.com/users/Albertpacino"><span style='color:#4D4D4D'>Albertpacino</span></a>
278 days ago (<a
href="http://www.wired.com/news/technology/0,1282,68872,00.html?tw=wn_tophead_2"
target="_blank" title="C'mon Kids, Let's Play Programmer"><span
style='color:#4D4D4D'>via http://www.wired.com/news/tech...</span></a>)</span></p>

<p><span style='font-family:Arial'>The creator of a board game says computer
programming can be fun. A few rolls of the die later you, too, could become a
programmer.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a href="http://www.tiobe.com/tpci.htm"
target="_blank">The most popular programming languages</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/jtam"></a>submitted by <a
href="http://digg.com/users/jtam"><span style='color:#4D4D4D'>jtam</span></a>
290 days ago (<a href="http://www.tiobe.com/tpci.htm" target="_blank"
title="The most popular programming languages"><span style='color:#4D4D4D'>via
http://www.tiobe.com/tpci.htm</span></a>)</span></p>

<p><span style='font-family:Arial'>The TIOBE Programming Community index gives
an indication of the popularity of programming languages. The index is updated
once a month. The ratings are based on the world-wide availability of skilled
engineers, courses and third party vendors.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.glassgiant.com/misc_count_to_31_on_one_hand.php"
target="_blank">I can count to 31 on one hand</a> </span></h4>

<p class=news-submitted><span style='font-family:Arial;color:#4D4D4D'><a
href="http://digg.com/users/futoranime"></a>submitted by <a
href="http://digg.com/users/futoranime"><span style='font-size:10.0pt;
color:#4D4D4D;text-decoration:none'>futoranime</span></a> 293 days ago (<a
href="http://www.glassgiant.com/misc_count_to_31_on_one_hand.php"
target="_blank" title="I can count to 31 on one hand"><span style='font-size:
10.0pt;color:#4D4D4D;text-decoration:none'>via
http://www.glassgiant.com/misc...</span></a>)</span></p>

<p><span style='font-family:Arial'>Learn the art of binary counting with your
hand. Just dont stay on 4 or 20 while in public. If this is a dupe, then 4
you!!</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://blog.outer-court.com/archive/2005-08-24-n14.html" target="_blank">Why
Good Programmers are Lazy and Dumb</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/mdipi"></a>submitted by <a
href="http://digg.com/users/mdipi"><span style='color:#4D4D4D'>mdipi</span></a>
301 days ago (<a href="http://blog.outer-court.com/archive/2005-08-24-n14.html"
target="_blank" title="Why Good Programmers are Lazy and Dumb"><span
style='color:#4D4D4D'>via http://blog.outer-court.com/ar...</span></a>)</span></p>

<p><span style='font-family:Arial'>Lazy programmers write simple code, and dumb
programmers always want to learn more. Great read.</span></p>

<p><span style='font-family:Arial'>&nbsp;</span></p>

<h4><span style='font-family:Arial'><a
href="http://www.pachesoft.com/rockerferbasic" target="_blank">Program in
BASIC...online</a> </span></h4>

<p class=news-submitted><span style='font-size:10.0pt;font-family:Arial;
color:#4D4D4D'><a href="http://digg.com/users/armand_wall"></a>submitted by <a
href="http://digg.com/users/armand_wall"><span style='color:#4D4D4D'>armand_wall</span></a>
306 days ago (<a href="http://www.pachesoft.com/rockerferbasic" target="_blank"
title="Program in BASIC...online"><span style='color:#4D4D4D'>via
http://www.pachesoft.com/rocke...</span></a>)</span></p>

<p><span style='font-family:Arial'>Yes, online. Enter a few lines of Basic
code, hit &quot;Run&quot; and actually see the results in a web page. Even the

&quot;Input&quot; keyword works! The site includes a complete reference and has
some example code. I think this is useful for programming apprentices. And if
you already know how to program, this is fun to fiddle with. Take a look.</span></p>

<p class=MsoNormal><span style='font-family:Arial'>&nbsp;</span></p>





<hr>

<center>Check out my Digg <a href="http://www.digg.com/users/bandergrove">user profile</a> to see what else I've been digging -- and add me as a friend. :)</center>

</div>







<br><br>




<a name="awards"></a>

<div id="content">
<h2>Monthly Awards</h2>
<h3 class="writer">Written by Pete</h3>

<p>Every month, QB Express hands out two awards to recognize QB or FB coders and websites that have done exceptional work in <b>the last month</b>.  They are not awarded for work done in the past, only for work that has been released since the last issue of the magazine.  We will bring you these awards on a monthly basis to help give credit where credit is due.</p>


<br>

<h3>Site of the Month</h3>

<blockquote>

<center>

<font size="+3"><b>Genso's Junkyard</b></font><br>
<a href="http://rel.betterwebber.com/">http://rel.betterwebber.com/</a><br><br>
<font size="+2"><b>Webmaster: Relsoft</b></font><br><br>

</center>

<br>

<img src="gensos.jpg" border=1 width=450 height=338 align="right">

<p>There isn't much to Relsoft's personal projects page, <b>Genso's Junkyard</b>, but everything you'll find there is absolutely fantastic work by one of the Qmunity's best coders.  You'll find (most) of Rel's games, graphics demos, libraries, projects, tutorials, downloads and screenshots on this site -- everything on it was made by Relsoft, and and all of them of the high quality that we've come to know and expect of RelSoft's work.  The site itself has a nice style to it, with a sleek blue color scheme and an anime logo featuring one of Rel's favorite anime characters.</p>
<p>This past month, Relsoft posted a huge update, where he added SEVEN new FB graphics demos that he's written in the past few months, complete with screenshots and descriptions.  All of these demos are very impressive on their own, but all seven of them together will knock your socks off!</p>
<p>While Genso's Junkyard doesn't have the most frequent updates, and a lot of the content is a bit outdated, it still stands out as one of the best personal pages in the Qmunity.  And for that reason, plus the latest update, I hereby award Relsoft the <b>QB Express Site of the Month award</b>!

</blockquote>

<br><br>

<h3>Programmer of the Month</h3>

<blockquote>
<center>

<font size="+3"><b>Xerol</b></font><br>

<a href="http://www.lggaming.com">http://www.lggaming.com</a>
<br>
</center>
<br>

<table border=0>
<tr><td width="50%" valign="top">
<img src="untank.jpg" width=400 height=310 border=1><br>
<img src="xerol1.jpg" width=400 height=310 border=1><br>
<img src="xerol3.jpg" width=400 height=310 border=1>
</td>
<td width="50%" valign="top">
<p>Xerol is someone who's been a frontrunner for programmer of the month for just about every month since I started giving out the award.  He's a talented coder, and is extremely active in the FB scene.  Just about every month he's released <i>something</i> new, whether it's a new minigame he's written to win a programming contest (this happens a lot), posted a preview of one of his upcoming games (so does this), or announces a new project or library that leaves us all drooling (check).</p>
<p>Let's take a look at some of the things Xerol's done lately:</p>
<ul>
<li><a href="http://www.petesqbsite.com/sections/express/issue6/">QB Express #6</a> - His 3D Engine is a runner-up in the Frost 2K5 Remembers FB coding competition.</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue8/index.html">QB Express #8</a> - A 3D tutorial by him is featured in QBXL issue #4.</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue9/index.html">QB Express #9</a> - Releases a cool arcade game called "Squares!"</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue10/index.html">QB Express #10<a> - Announced the FreeTile Library for FreeBasic.</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue11/index.html">QB Express #11</a> - Xerol releases his entry to the QBXL 24-hour "Structure" competition.</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue12/">QB Express #12</a> - Xerol releases two shooting minigames: "Bombard" and "Shooter"</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue13/index.html">QB Express #13</a> - Releases a 63-line Pong game that he coded in just 22 minutes.</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue14/index.html">QB Express #14</a> - His Roguelike competition entry was featured in the gallery.</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue16/index.html">QB Express #16</a> - Wins the "One Key Challenge Revisited" by an overwhelming majority, with his <i>"shoot-the-helicopters-and-parachuting-guys"</i> game.</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue18/index.html">QB Express #18</a> - Xerol previews UnTank in the Gallery.</li>
<li><a href="http://www.petesqbsite.com/sections/express/issue19/index.html">QB Express #19</a> - Releases more information about <i>UnTank</i>.</li>
</ul>

<p>That's a lot of great stuff -- and that's just the stuff that's gotten featured in QB Express!</p>

<p>This past month, Xerol released a lot of information and screenshots on a new game he's working on: a "Seamless Tactical RPG" that looks like it will be awesome.  (Check it out in the News Briefs above.)</p>
<p>For his countless program releases and always phenomenal work, Xerol is the <b>QB Express Programmer of the Month</b>.</p>

</td>
</tr>
</table>

</blockquote>


<hr>

<center>Have a suggestion for Programmer / Site of the Month?  <a href="mailto:pberg1@gmail.com">Email me!</a></center>


</div>




<br><br>










<a name="comic"></a>

<div id="content">
<h2>Comics</h2>
<h3 class="writer">By Rattrapmax6, Redcrab and tunginobi</h3>

<p>Three different comic series this month!  Rattrapmax6 is back this month with another QBasic Horse Humor comic, Redcrab returns with another "0 1" comic, and tunginobi is here with three more Stickblob comics.</p>

<br>

<hr>

<br><br>

<center><img src="QBHH02.jpg" width=750 height=241 alt="QBasic Horse Humor">
</center>

<br><br>

<hr>

<br><br>

<center><img src="01-2.gif" border=1 width=576 height=200></center>

<br><br>

<hr>

<br><br>

<center>

<img src="sb0007.png" width=600 height=240 border=1><br><br><br><br>

<img src="sb0008.png" width=600 height=240 border=1><br><br><br><br>

<img src="sb0009.png" width=600 height=240 border=1><br><br><br><br>

<br>

</center>

</div>





<br><br>






<a name="sdarray"></a>

<div id="content">
<h2>Single-Dimension Dynamic Arrays in Types</h2>
<h3 class="writer">Written by Richard D. Clark</h3>

<p>This is the first part of a two-part series on creating dynamic arrays within type definitions.</p>

<p>A Dynamic array in a type definition is a very useful feature, but FreeBasic doesn't support it. Or rather, it doesn't support it directly. However, you can create dynamic arrays by using pointers and the associated memory functions.</p>

<p>An array is simply a contiguous block of memory that holds a certain data type. Arrays in FreeBasic use an array descriptor to describe the data contained within the array, and you can use this same technique to build a dynamic array within a type. The two elements you need within your type-def are a pointer to a particular data type, and a size indicator. </p>

<p>You can then use the ptr field to allocate a block of memory to the needed size, and save that size in the size indicator field. The size field is used to tell you how many elements are currently in the array. Once the array has been initialized, you can then use pointer indexing to access each element in the array.</p>

<p>The following program illustrates the steps in creating, initializing and resizing a dynamic type-def array.</p>

<br><br>

<p>Option Explicit</p>

<blockquote class="code"><pre>'Define type:
'size is current size of array
'darray will contain array data
Type DType
    size As Integer
    darray As Integer Ptr
End Type

'Create an instance of type
Dim myType As DType
Dim As Integer i, tmp

'Create enough space for elements
myType.darray = Callocate(5, Sizeof(Integer))
'Set the length of the array
'in the array size indicator
myType.size = 5

'Load data into array
For i = 0 To myType.Size - 1 
    myType.darray[i] = i
Next

'Print data
For i = 0 To myType.Size - 1
    Print "darray[";i;" ]:";myType.darray[i]
Next
Print "Press any key..."
Sleep
Print

'Save the current array size
tmp = myType.size
'Now resize the array
myType.darray = Reallocate(myType.darray, 10)
'Set the length indicator
myType.size = 10

'Load in data into new allocation
For i = tmp - 1 To myType.Size - 1
    myType.darray[i] = i
Next

'Print out contents
For i = 0 To myType.Size - 1
    Print "darray[";i;" ]:";myType.darray[i]
Next
Print "Press any key..."
Sleep

'Free allocated space
Deallocate myType.darray

End</pre></blockquote>


<p>The first step is, of course, to define the type-def:</p>

<blockquote class="code"><pre>Type DType
    size As Integer
    darray As Integer Ptr
End Type</pre></blockquote>

<p>Since this is just an example there are only two elements within the type, a size indicator and the array pointer. Notice that the array pointer is defined as an Integer ptr. When you define a pointer to a particular type, you are creating a "typed" pointer. The compiler can use this type information to check to make sure the values being placed into the array are valid, and will also use this information for pointer arithmetic.</p>

<p>The next step is to define the working variables.</p>

<blockquote class="code"><pre>Dim myType As DType
Dim As Integer i, tmp</pre></blockquote>

<p>Here an instance of the type is created, as well as some working variables that are used in the following code. WARNING: You must initialize the array pointer before you can use it; using an uninitialized ptr can cause program crashes, system lockups and all sorts of BAD things. </p>

<blockquote class="code"><pre>myType.darray = Callocate(5, Sizeof(Integer))
myType.size = 5</pre></blockquote>

<p>These two lines of code initialize the array pointer to hold 5 integers. Callocate is used to allocate the memory segment, since Callocate will initialize the segment to zeros.</p>

<p>The size field stores the current length of the array. Now, of course, you could calculate the size of the array by simply dividing the number of bytes in the allocation by the size of an integer, but using a size indicator within the type is much cleaner and saves you a calculation in your program.</p>

<blockquote class="code"><pre>For i = 0 To myType.Size - 1 
    myType.darray[i] = i
Next</pre></blockquote>

<p>This section of code loads the array with some values. You can see why saving the size of the array simplifies the coding process. Since the array is a typed pointer, you can access the array using the pointer indexing method, which is almost like accessing a predefined array.</p>

<blockquote class="code"><pre>For i = 0 To myType.Size - 1
    Print "darray[";i;" ]:";myType.darray[i]
Next</pre></blockquote>

<p>This section simply prints out the values using the same method that was used to load the array.</p>

<p>Of course, this should be a dynamic array, so you should be able to resize the array, and this is exactly what the next section of code will do.</p>

<blockquote class="code"><pre>tmp = myType.size
myType.darray = Reallocate(myType.darray, 10)
myType.size = 10</pre></blockquote>

<p>The first line of code saves the current size of the array so that the new memory segment can be initialized while not overwriting any existing data. You will see this in a moment.</p>

<p>The second line uses the Reallocate function to resize the memory segment, that is, resize the array. In this case, the array is being made larger; you could of course make the array smaller. If you were to make the array smaller, any data not in the new segment would be lost, as you would expect.</p>

<p>The last line of code above saves the new array size in the size indicator.</p>

<blockquote class="code"><pre>For i = tmp - 1 To myType.Size - 1
    myType.darray[i] = i
Next</pre></blockquote>

<p>Here, you can see why the old array size was saved. In the For statement, the initialization procedure starts from the old index and iterates through the newly added indexes, storing data within the memory segment. This is like using the Redim Preserve statement on a normal array.</p>

<blockquote class="code"><pre>For i = 0 To myType.Size - 1
    Print "darray[";i;" ]:";myType.darray[i]
Next</pre></blockquote>

<p>This code section simply prints out the new values. </p>

<blockquote class="code"><pre>Deallocate myType.darray</pre></blockquote>

<p>This is vitally important. You should always deallocate any allocated memory that you have created in your program to prevent memory leaks.</p>

<p>When you run the program you should see the following output:</p>

<blockquote class="code"><pre>darray[ 0 ]: 0
darray[ 1 ]: 1
darray[ 2 ]: 2
darray[ 3 ]: 3
darray[ 4 ]: 4
Press any key...

darray[ 0 ]: 0
darray[ 1 ]: 1
darray[ 2 ]: 2
darray[ 3 ]: 3
darray[ 4 ]: 4
darray[ 5 ]: 5
darray[ 6 ]: 6
darray[ 7 ]: 7
darray[ 8 ]: 8
darray[ 9 ]: 9
Press any key...</pre></blockquote>

<p>The first print out shows the original array. The second print out shows the newly resized array.</p>

<p>There you have it, a single-dimension dynamic array in a type. In the next tutorial, you will see how to add a two-dimensional array to a type-def using the same techniques.</p>


<hr>

<center>Download a copy of this tutorial: <a href="SDArray.txt">SDArray.txt</a></center>

</div>






<br><br>




<a name="colorusage"></a>
<div id="content">
<h2>Text User Interface Development Series<br>Part One - T.U.I. Basics</h2>
<h3 class="writer">Written by St&eacute;phane Richard (Mystikshadows)</h3>
<h3>INTRODUCTION:</h3>

<p>Welcome to this series on Text User Interface Development.  Of course, T.U.I. development is not
a new subject today.  However, it is always an interesting one.  If you want to program a text
game of any kind, a tool or utility or a full fledged application, in many of those cases, having
a good and intelligently designed text user interface can make a difference on how much your
program will be loved and used by it's potential users.  Alot of us have seen many examples of
text user interfaces from a simple text editor, to other programs that use a text user interface
to present the user with it's functionality.  We'll be using many of them as examples in this
series.
<br><br>
The layout of the series will be pretty straightfoward.  This first part of the series that you
are reading right now will basically present the basics of T.U.I.  What are the components, what
role would/could they play in a complete design, what they are typically used for and the likes.
Some basic TUI concepts will also be explained in this first part so that they are clearly
understood before they are used further in this series.  Let's begin right now.
</p>

<h3>WHAT A TEXT USER INTERFACE IS:</h3>

<p>When you make a program, it's great to give it a good set of complete features and functionality
that help your project accomplish it's designated role (game, application, tool and utility, you
name it). The only way that the program becomes useful to a user is in the way that all that
functionality is presented to them.  To present these, in an intelligent way, to the user is the
art of creating a user interface and a text user interface is a text only way of interacting with
the user. In the course of computer history, there were basically four types of user interfaces that
have arised.  Here they are here with a brief explaination of what they entail.
<ul>
<li><b> Command Based Interface:</b><br>
  These interface are of course the easiest of interfaces.  They typically require hardly any
  design at all.  They have a set list of keywords that the user can manually enter at the
  prompt of the program and depending on the command that the user enters, some specific part
  of the program is executed.  The classic example of this type of interface is the DOS command
  prompt.
</li><br>
<li><b>The Menuless Interface:</b><br>
  In this type of application, any option on a given screen is usually readily available and seen
  on the main screen of the application.  User typically need to select one of these options which
  in turns lets them interact with the rest of the screen.  For example, you'd see a customer
  screen and either on top, left, right or bottom you'd see direct commands or buttons to say Add,
  modify, Delete, Find and other functions on the customer. There's no special key or you don't
  need to enter a special mode, everything is there.
</li><br>

<li><b> The Selection List Interface:</b><br>
  This is a more structured approach to interface design.  It arised when too many functions were
  need on the menuless interface that they had to be broken down into function groups.  When this
  type of application begins, you're typically in a menu.  In a classic design, the first menu
  you see presents the different modules (customers, suppliers, Inventory, for example).  After
  selectign a module, you would typically fall into the options for that module (such as Add,
  Modify, Delete and the likes).  Once you select that option you would fall into the proper input
  screen for the module where you can begin data entry or processing depending.  Many applications
  were created based on this artchitecture because although sometimes longer to use, it helped
  keepthings very organized and sequential, hence, easier to learn and use.
</li><br>
<li><b> The S.A.A. User Interface:</b><br>
  In 1985, with the beginning of Windows and other GUI, User interaction took a whole new meaning.
  I.B.M. created what is called the Standard Application Architecture standard which include the
  C.U.A. (Common User Access) derivative.  C.U.A. successfully created what we know and use today
  in Windows, and most of the more recent DOS or Windows Console Applications will use that
  standard as well.  One of the most classic set of applications was Borland's Turbo C++ and Turbo
  Pascal wich both had a complete implementation of C.U.A. functionality.  This defined that
  a pulldown menu system should be at the top of the screen, status bar at the bottom, shorcut
  keys should stay the same for all common functionality (F2 to Open for example would work in all
  applications that followed the S.A.A. standard).  This greatly helped the speed at which users
  could learn an application so it cought on quick and became an industry standard.
</li>
</ul>

<p>Now, for the sake of this series, we will be concentrating on the S.A.A. / C.U.A. User interface
design since it is, by far the most widespread of them all.  As such, we'll be describing exactly
what entails the C.U.A. standard.  Everything it means, along with every single visual aspect of
this standard as far as visual components, operation standards and the likes.  Once this is done,
and in future issues of this series we'll be building our codebase to create and operate a standard
C.U.A. compliant and functional text based user interface framework that you can customize and
use in all of your other projects if you wish.</p>

<h3>STANDARD APPLICATION ARCHITECTURE / COMMON USER ACCESS DEFINITION:</h3>

<p>In a nutshell, the C.U.A. standard is based on the fact that you have a file, database or document
of some sort and are about to perform somekind of work on that document.  You can have more than
one type of document you might be working on, and you can have tools that might come in handy while
you are working on that document.  Think of a C.U.A. application as a desktop metaphore (much like
Windows, OS/2, Gnome opr KDE in linux). Where the programs are different windows and tools (like a
calculator, a calendar and the likes) are typical things that you might find on your desk.  The
menu system, of course, reflects the functionality available based on which type of file you are
currently working on.  I will be using existing text/DOS applications to explain the many components
that make up a complete typical C.U.A. application.  The system we'll be creating will be very
similar to those however, since I believe some of the funcionality (visual and non visual) can be
better, I will make them better in this series.  Let's start by taking a look at three screenshots.
</p>

<ul>
<li><b>FreePascal Version 2.0.2 I.D.E.</b><br>
    Here's a screenshot that shows a typically C.U.A. screen layout.  You can notice the puldown menu system on
    the top row, shortcut bar on the bottom and in this case, the rest of the screen is basically known as the desktop
    area where any file and or tools and utilities (here a calculator and an ASCII chart) are shown and used by the yser.
    <br><br>
    <center><img src="freepascal.png"></center>    <br><br>
</li>
<li><b>Microsoft QBasic Version 1.1 Environment</b><br>
     Basically, this program reflects alot of the standard C.U.A. components, you can see the dialog box here showing the list
     of subs and function that make up the current source file. Again, the pull down menu on the top, the status/shortcut bar on the
     bottom, work file in the rest of the screen. Main difference here is that there's no desktop per se.  In this program the "background"
     of the screen is the current work document.
    <br><br>
    <center><img src="qbasicdialog.png"></center> <br><br>
</li>

<li><b>Microsoft Windows XP Text Based Editor</b><br>
    Here's another example.  This one I'm showing you so you can see a good example of a standard dialog. one that alot of your programs
    might need.  In this case, you can see the "File Open" dialog where files, folders and drives are shown.  The main idea is to select the
    file you want work on and hit the "Ok" button. <br><br>
    <center><img src="xpeditor.png"></center> <br><br>
</li>
</ul>

<p>Now, the main reason I showed these 3 screenshots is so you get good visual examples of everything that make up a Text user Interface. As you can
see from these three screenshots, there are many parts that make up a C.U.A. application.  After this series is done, we'll have everything we need
to build complete C.U.A. compliant applications.  So then, let's start this by decribing what makes up a complete C.U.A. user interface, each component
and each type of dialog and so on. and that will conclude this first part of the series.  So let's get right to it shall we?
</p>

<h3>COMMON USER ACCESS STANDARD T.U.I. COMPONENTS:</h3>

<ul>
    <li><b>Labels:</b><br>
        Small rectangular areas that can hold descriptive texts. In the screenshot above (last one) you can see a label that says "File Name:" it's basically
        there to tell the user what is expected or what is currently going on.
    </li><br>
    <li><b>Text Box:</b><br>
        Small rectangular areas that is there to allow the user to enter information usually with the keyboard.  With some coding, you can make it so a text box
        can accept a specific set of keys like only allow numbers for example. Many fields don't need special formatting features, in that case, the text box is
        the ideal control to use.
    </li><br>
    <li><b>Formatted Text Box:</b><br>
        This works pretty much the same way as a text box (above).  Except it is created to allow a very specific data format to be entered and managed.  For example
        a telephone number (which has an area code and 7 digits that look like ### ###-####). Or dates can benefit from this kind of
        control as well.
    </li><br>
    <li><b>List Box:</b><br>
        As the name implies, a list box is a box, that offers a list of items from which the user can pick one (sometimes more than one depending). In the screenshots, you
        can see the list of files and folders or the list of subs and functions as good examples of list boxes.  It's a rather straightfoward scrollable list of items
        with a selection highlight (also called marque). you can typically click the desired item with the mouse or using the arrow keys.
    </li><br>
    <li><b>Command Box:</b><br>
        this is a type of control that only has two event.  You can either click on it with the mouse's left button or press enter.  It can have a caption to indicate what the
        purpose of the button is and can have more than one look (see the screen shots above for examples of different styles of command buttons).
    </li><br>
    <li><b>Combo Box:</b><br>
        This is a combination control (hence it's name).  It involves a text box, a command button and a listbox.  you can either enter text in the text box section or push the button
        to bring down the list box where you can select something from it isntead of typing the value in.  This comes in handy for any values that have a fixed number of possible valid answers.
    </li><br>
    <li><b>Check Box:</b><br>
        A checkbox basically is a box that can be clicked or unclicked.  For example "[X] Print to file" the X can be click with the mouse or the push of the space bar.  the X is either there
        when the value is checked or an empty space when the value is unchecked.  Basically they are there to select one or more of possible options when performing a given task.  Note that if you have
        more than one check box, any and all of them can be checked at once.
    </li><br>
    <li><b>Radio Buttons:</b><br>
        A radio button works as a special group of checkboxes where only one of them can be selected at one time.  for example, if you'd want to send a print job to one of the printer ports (just one) you would use
        radio buttons named like: "(*) LPT1   ( ) LPT2   ( ) LPT3" if you select LPT2, LPT1 will be deselected as only one of those printer port can be chosen at any one time.
    </li><br>
    <li><b>Scrollbars:</b><br>
        Scrollbars consists of a line, arrows on each edge (top and bottom for vertical scrollbars and left and right for horizontal scrollbars (take a look at first screenshot for sames of scrollbars around the source file
        window (dark blue) on the screenshot).  On the bar is an indicator that shows visually, where in the file or list or database you are (if the indicator is about 1/2 in the middle of the bar you can say you're about halfway
        down the total list or number of lines etc etc....arrow keys, home, end, page up or page down all affect the value of the indicator. You can also use
        the mouse to scroll down, up, left or right as well.  To use a scroll bar you typicallyh need a minimum and maximum value as well as a Current Value to know where you are in
        the range of the document or database lines.
    </li><br>
    <li><b>Pulldown/ Popup Menu System:</b><br>
        Today, pretty much any application you use in windows atleast have a pulldown menu.  you have a menu bar at the top (look at the screenshots) and when selected, these options on the menu bar pull down a sub menu of options
        relative to the menu bar option name.  For example, the FIle menu would bring down options like New2 File, Open File, Close File, etc... When you are creating more than one appliation with the same interface it's important to
        keep the pulldown menu as similar as possible in all programs.  SO if File / Open opens a file, it's best to make sure that all options that open a file are under the File menu.  It helps keep things consistent and again shortens
        the learning curve dramatically.
    </li><br>
    <li><b>Status Line:</b><br>
        Today, user feedback is a very important part of user interaction.  A status line does one basic thing. Give the status of things to the user in a one line format. Basically, if the caps lock key is pressed (or other such keys) the
        status line will show that. Likewise, the status line will show which file, project, document, database you are currently working on as added feedback. There's no need in putting too much information on a status line.  But the information
        should be relevant to what's currently going on.
    </li><br>
    <li><b>Shortcut Line:</b><br>
        Most programs today can be accessed either with the mouse or using the keyboard. Depending on where you are in your application and what should be available to the user at that specific point in time, the shortcut line contants a list of
        most used keyboard shortcuts showing what can be done without going through menus or complex screens.  These are know as shortcuts.  you can either press the indicated shortcut key or click on that part of the shortcut key to have that short
        cut execute the appropriate code it's destined to execute.
    </li><br>
    <li><b>Frame Box:</b><br>
        Frame boxes are rectangular boxes that can have a solid background or not.  Their main purpose in an T.U.I. is to group items together (radio buttons for example). They can have a caption that appear on the top line of the frame and
        can also be flat or have a 3D look and appear raised or inset.  when a screen has a lot of fields for entry, sometimes frames can really help keep things in perspective and grouped intelligently.
    </li><br>
    <li><b>Outline Control:</b><br>
        This is probably the most complicated control to create and quite possibly the most useful as well.  This control allows you to categorize alist of items in a group that resembles the branches of a tree.  For example, you could visually see that Dog, cat, horse and others are part of the Mammals category because they would appear slightly shifted right compared to
        the position of the Mammals element.  Windows coders might be more familiar with the term "treeview control" which is the same thing in windows.  If you open Windows Explorer, the folders on the left are organized in a treeview just to give you an idea
        of what the outline control can be used for.
    </li><br>
    <li><b>Grid Box:</b><br>
        Whether it's a spreadsheet, a list of items, records in a database with independant fields, if it can be represented as tabular data (data organized in a table format) then it belongs in a grid control.  typically, you setup the columns independantly to be adjusted later by the program or by the user.  when the user navigates in the grid he/she either changes record number
        or shifts between the different fields of a record that are displayed on the grid. A grid is a composite of labels, textboxes and scrollbars all connected together in order to make it operate the way it's supposed to.  Users of Microsoft Excel, Lotus 123 or Quattro Pro will know what a grid control is all about.
    </li><br>
    <li><b>Tab Control:</b><br>
        Tab controls are tabs, much like tabs you'd find in a filing cabinet.  You typically click on a desired tab to view whatever bits of information or screen that the selected tab should show.  When you have a long data entry screen for example where many bits of information are required by the user, it's  a good idea to use tabs to split the big form into smaller more manageable
        pages. If different types of options pertain to very different types of domains (like options of an application where some affect printing, others affect the screen, etc etc, using tabs to seperate all the options into category pages like this also help make your screens alot more usable and much easier to understand.
    </li><br>

</ul>

<p>Now that we defined all these, it's time to get a glimpse at why these control exist, how they can be used in every day application development projects.  The best way to do that is to define some standard dialogs.  you can define a standard dialog as being a dialog that anything can use at will when needed.  If doing a business application, chances are any business module might need to
   open either a document or a database from the hard drive (or the network depending).  For those, you can create one dialog that will be available to all business modules (maybe even all other related applications as well, if it works in one place it will work in all places too).  This minimizes the coding effort and once that one form is stabilized, it's good for every other module that might
   need to make use of it.  So there's definitaly alot of advantages to taking the time to create standard dialogs and test them quite well.  Here there are right here so we know what we'll be creating.
</p>

<h3>COMMON USER ACCESS STANDARD DIALOGS:</h3>

<p>Standard dialogs are windows that offer common functionality that you are likely to find in all types of application no matter whether it's a game, a tool, a full fledged application you name it.
   Typically and especially when you are building more than one application, it's highly recommended that you offer a standard way to do certain things
   like opening files and the likes. This will greatly minimize the learning curve of all your applications and hence make your
   programming projects more interesting to your potential users.  Here are these standard dialogs
</p>

<ul>
    <li><b>File Open/Save Dialog:</b><br>
        As you can see from the screenshot above, a standard file dialog as they are called allow you to select the drive, directory and file.  Or, when
        saving, allow you to enter a filename and extension in order to save the current file.
    </li><br>
    <li><b>Change Directory Dialog:</b><br>
        This is basically part of the File Open dialog.  But this is typically used to change the current directory we are working in.  There are options to select
        the drive and folder we will be positioning ourselves in.  Once selected and the ok button selected, everything we do with files will be saved and updated in
        the newly selected folder.
    </li><br>
    <li><b>Printer Dialogs:</b><br>
        These aren't shown on the screenshots either.  Basically, there's three types of printer dialogs, a dialog about the current print job which lets you select
        current printing options and hit ok to perform the actual printing.  A dialog for Printer Options such as printer orientation, print quality and the likes.  Finally
        there's a dialog that basically lists all the printers available in order to select which printer to send the print job at.
    </li><br>
    <li><b>Color Dialog:</b><br>
        As you can see from the screenshot above, a standard file dialog as they are called allow you to select the drive, directory and file.  Or, when
        saving, allow you to enter a filename and extension in order to save the current file.
    </li><br>
    <li><b>Font Dialog:</b><br>
        This name speaks for itself.  Sure, in a text mode environment, you can't see the font per se.  However, if you are making a text based word processor, you'll still want
        the ability to select a font and such.  This dialog is basically a list of installed fonts and the ability to choose a color for the font.
    </li><br>
    <li><b>Message Box:</b><br>
        This dialog has more than one role.  When an error occurs you'd use a message box to popup the error on the screen for the user to see.  You can also use message boxes for
        confirmation and simple information messages too.  This typically displays the message to the user in a window, and expects the user to click a button to leave the dialog.
        This could of course mean selecting a yes or no button, an Ok, Cancel and apply buttons depending on the type of message being displayed.
    </li><br>
    <li><b>The Document Window:</b><br>
        This is not a dialog per se, but any application will have atleast one special kind of form design to work with the data in question.  For example, a text editor form will allow
        to edit a file on the screen.  A grid view will allow to edit any type of tabular data (say in a spreadsheet program for example).  OThers might be data entry screens where many
        fields are displayed and the user can edit them directly on the screen as if they were filling out a form.  There's many types of document related forms and they all depend on the
        application and what the form is expected to do.
    </li>
</ul>

<p>Now that we have our standard dialogs defined, It's time to talk about standardization.  I won't mention too much here because the rest of the series will detail our standardization in
 complete details.   Here one thing I can say is that it's time to start thinking about keyboard and mouse access.  it's time to start thinking about what Alt + F2 will do throughout your
 whole application or even complete range of applications.  IT's important to define these right up front, before any coding is done so that you are prepared for it.   It's also time to jot down
 what visual interaction you'll want your T.U.I. to allow the user to do.  For example, will you want the user to be able to drag controls arounds, move them around the screen with the mouse (or keyboard of course), wil lAlt, or F10 be the key to activate the mouse.
 What part of the color configuration will the user be allowed to change (will he be able to select specific colors and/or specific themes of colors) and all these details. In the next part of the series
 we'll start covering all these details so that again, we know right up front, waht kind of coding project we're up against and be better prepared to start the coding phase.

<h3>IN CONCLUSION:</h3>

<p>And there you have it.  I believe that with this first part, we'll now have a complete "to do list" in order to get started on implementing our T.U.I. framework.   We've covered all the controls
that we'll be implementing as well as our standard dialogs.  I'm sure you started visualizing a bit how your whole T.U.I. framework will be, how things will be called.  Maybe you even dared to start 
writing down some keyboard shortcuts and such to start preparing for our next installment. That's great.  You're of course free to do whatever you want. But me, in the next installment is when I'll be defining
all these things, maybe when you read that, you'll get ideas and insight on your own standards that might make you change a few things.
</p>
<p>I'm always open to emails with criticism, suggestions, comments and compliments (of course) as well as exchange of ideas.  So if by reading this, a whole bunch if things appeared in your head and you want to talk about it, feel free to email me (click my nick name below to email me) and
we can have a good detailed discussion about all this.  I answer, of course, any and all questions and critiques, the object of these series is that all of us become better at what we do best.  That certainly can include me as well.  Until our next installement, happy reading and coding.
</p>

<blockquote><b><a href="mailto:mystikshadows@gmail.com">MystikShadows</a></b><br>
St&eacute;phane Richard</b>
</blockquote>

<hr>

<center>Download a copy of this article: <a href="TUISeries1.zip">TUISeries1.zip</a>, or view it on its own here: <a href="tuiseriespart1.htm">tuiseriespart1.htm</a></center>

</div>










<br><br>








<a name="circles"></a>

<div id="content">
<h2>i-TECH Tutorial:<br>Using Circles as Objects in Games</h2>
<h3 class="writer">Written by Kristopher Windsor</h3>

<p>The object of this tutorial is to move a circle with the arrow keys, and have the circle interact with some other objects on the screen. The program uses CONST, CIRCLE, DO WHILE, INKEY$, SELECT CASE, SQR, and multidimensional arrays, which should be understood before using this tutorial. To start, here is the game code format:</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables

'Initialize the display

'Loop until the program ends

'Respond to user input

'Move the circle

'Initialize and move the other objects

'Accept user input</pre></blockquote>

<br>

<h3>Step 1: Make the circle move</h3>

<p>The variables X, Y, and SIZE will be used for the main circle. DIST controls how far your circle will move when you press a key. The game will run in SCREEN 12 (640*480*16) until the user presses escape.</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
dist = 8
key$ = ""
size = 32
x = 320
y = 240

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input

'Move the circle

'Initialize and move the other objects

'Accept user input
key$ = INKEY$

LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br>

<p>The game will use SELECT CASE to process user input from the arrow keys. CHR$(0) + CHR$(72) is the up arrow key, and CASE CHR$(0) + CHR$(80) is the down arrow key. The IF statements stop the circle from leaving the screen.</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
dist = 8
key$ = ""
size = 32
x = 320
y = 240

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
END SELECT

'Move the circle

'Initialize and move the other objects

'Accept user input
key$ = INKEY$

LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br>

<p>Now the game needs to display the circle. This displays the circle, but leaves a trail when it is moved. (The trail makes a very nice effect.)</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
dist = 8
key$ = ""
size = 32
x = 320
y = 240

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
END SELECT

'Move the circle
CIRCLE (x, y), size

'Initialize and move the other objects

'Accept user input
key$ = INKEY$

LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br>

<p>When the circle moves, it has to be erased from its previous location, to avoid leaving a trail. After the circle is drawn at (X, Y), the variables X and Y are stored to the variables PX and PY. Then, after the program has looped, a black circle is drawn at (PX, PY) to erase the white one, and the white circle is redrawn at (X, Y), which lets it move as neccessary.</p>

<br>


<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
dist = 8
key$ = ""
size = 32
x = 320
y = 240

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
END SELECT

'Move the circle
CIRCLE (px, py), size, 0
CIRCLE (x, y), size
px = x: py = y

'Initialize and move the other objects

'Accept user input
key$ = INKEY$

LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br>

<p>The erasing makes the circle flicker, so the game should only erase the circle if it is going to be moved. Also, the variable C is added so the user can change the color of the circle by pressing [Space]. This program works well, and is the end of step one.</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
c = 15
dist = 8
key$ = ""
size = 32
x = 320
y = 240

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
CASE " ": c = INT(RND * 7) + 9
END SELECT

'Move the circle
IF x <> px OR y <> py THEN CIRCLE (px, py), size, 0
CIRCLE (x, y), size, c
px = x: py = y

'Initialize and move the other objects

'Accept user input
key$ = INKEY$

LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br><br>


<h3>Step 2: Add other objects and make them interact with the circle</h3>

<br>

<p>You might wonder how fast QBasic is re-reading the DO WHILE loop. This adds "1" to the variable framecount each time it loops, and then displays that variable:</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
c = 15
dist = 8
framecount = 0
key$ = ""
size = 32
x = 320
y = 240

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
CASE " ": c = INT(RND * 7) + 9
END SELECT

'Move the circle
IF x <> px OR y <> py THEN CIRCLE (px, py), size, 0
CIRCLE (x, y), size, c
px = x: py = y

'Initialize and move the other objects

'Accept user input
key$ = INKEY$

framecount = framecount + 1: LOCATE 3, 5: PRINT "Frames: "; framecount
LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br>

<p>The program is easily running at over 1,000 frames per second, which is approximately fifty times faster than necessary. Next, the program will use some other objects. They will be smaller circles. These other objects will use the two-dimensional array of integers o([the number of objects in the game],[however many numbers are needed for each object]). Each object will use an x-coordinate, a y-coordinate, and a color. The objects do not need to be defined before the game starts, because they will be positioned as the game runs. Note the array and the ocount constant variable (oxy-moronically named).</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
c = 15
dist = 8
framecount = 0
key$ = ""
CONST ocount = 64
size = 32
x = 320
y = 240
DIM o(1 TO ocount, 3) 'The three is for coordinates and colors

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
CASE " ": c = INT(RND * 7) + 9
END SELECT

'Move the circle
IF x <> px OR y <> py THEN CIRCLE (px, py), size, 0
CIRCLE (x, y), size, c
px = x: py = y

'Initialize and move the other objects

'Accept user input
key$ = INKEY$

framecount = framecount + 1: LOCATE 3, 5: PRINT "Frames: "; framecount
LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br>

<p>The objects will not exist on the screen the whole time, so the game needs to know whether the objects exist or not. So, if the color is black (that is color zero), the game will not think the object is there. Every time the game loops, it should attempt to make a new object exist if it does not already. This game will pick a random object each time it loops, and if that object is not being displayed, then the game gives random coordinates to that object and gives it a random color. This will display the object since its color is no longer black (except the object display is not yet written).</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
c = 15
dist = 8
framecount = 0
key$ = ""
CONST ocount = 64
size = 32
x = 320
y = 240
DIM o(1 TO ocount, 3) 'The three is for coordinates and colors

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
CASE " ": c = INT(RND * 7) + 9
END SELECT

'Move the circle
IF x <> px OR y <> py THEN CIRCLE (px, py), size, 0
CIRCLE (x, y), size, c
px = x: py = y

'Initialize and move the other objects
a = INT(RND * ocount) + 1 'Tries to initialize this object
IF o(a, 3) = 0 THEN o(a, 1) = INT(RND * 640): o(a, 2) = INT(RND * 480): o(a, 3) = INT(RND * 15) + 1

'Accept user input
key$ = INKEY$

framecount = framecount + 1: LOCATE 3, 5: PRINT "Frames: "; framecount
LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br>

<p>The objects won't be moving, so displaying them is a bit easier, although the game needs the variable OSIZE to size these objects. This game has sixty-four objects, so the game now runs at about 100 frames per second. Speed will not be a problem for this game, but it is more limiting for these types of games than memory is.</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
c = 15
dist = 8
framecount = 0
key$ = ""
CONST ocount = 64
CONST osize = 12
size = 32
x = 320
y = 240
DIM o(1 TO ocount, 3) 'The three is for coordinates and colors

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
CASE " ": c = INT(RND * 7) + 9
END SELECT

'Move the circle
IF x <> px OR y <> py THEN CIRCLE (px, py), size, 0
CIRCLE (x, y), size, c
px = x: py = y

'Initialize and move the other objects
a = INT(RND * ocount) + 1 'Tries to initialize this object
IF o(a, 3) = 0 THEN o(a, 1) = INT(RND * 640): o(a, 2) = INT(RND * 480): o(a, 3) = INT(RND * 15) + 1

FOR a = 1 TO ocount 'Loops for each object to display
IF o(a, 3) > 0 THEN CIRCLE (o(a, 1), o(a, 2)), osize, o(a, 3)
NEXT a

'Accept user input
key$ = INKEY$

framecount = framecount + 1: LOCATE 3, 5: PRINT "Frames: "; framecount
LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br>

<p>Now the game needs interaction. The game needs to know when the main circle touches one of the objects, and that is calculated through the pythagorean theorem. The distance between the main circle and object A is SQR((x - o(a, 1)) * (x - o(a, 1)) + (y - o(a, 2)) * (y - o(a, 2))). If that value is smaller than the size of the main circle plue the size of the object, then the two are overlapping. When the circle and object collide with each other, the main circle will change color, and the smaller circle (object) will disappear. To make an object disappear, it has to be erased from the display, and its color has to be set to zero. Once the object has disappeared, it is soon re-created.</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
c = 15
dist = 8
framecount = 0
key$ = ""
CONST ocount = 64
CONST osize = 12
size = 32
x = 320
y = 240
DIM o(1 TO ocount, 3) 'The three is for coordinates and colors

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
CASE " ": c = INT(RND * 7) + 9
END SELECT

'Move the circle
IF x <> px OR y <> py THEN CIRCLE (px, py), size, 0
CIRCLE (x, y), size, c
px = x: py = y

'Initialize and move the other objects
a = INT(RND * ocount) + 1 'Tries to initialize this object
IF o(a, 3) = 0 THEN o(a, 1) = INT(RND * 640): o(a, 2) = INT(RND * 480): o(a, 3) = INT(RND * 15) + 1

FOR a = 1 TO ocount 'Loops for each object to display
IF SQR((x - o(a, 1)) * (x - o(a, 1)) + (y - o(a, 2)) * (y - o(a, 2))) < size + osize AND o(a, 3) > 0 THEN
c = INT(RND * 7) + 9 'Changes circle color
CIRCLE (o(a, 1), o(a, 2)), osize, 0 'Erases the object
o(a, 3) = 0 'Sets the object color to black so it no longer exists
END IF

IF o(a, 3) > 0 THEN CIRCLE (o(a, 1), o(a, 2)), osize, o(a, 3)
NEXT a

'Accept user input
key$ = INKEY$

framecount = framecount + 1: LOCATE 3, 5: PRINT "Frames: "; framecount
LOOP UNTIL key$ = CHR$(27)</pre></blockquote>

<br>

<p>Instead of showing how many frames have been run in the program, the game will loop for 5,000 frames (CONST FRAMESTOTAL), and show the user how many frames are left. So the DO LOOP must be changed to stop when FRAMECOUNT equals FRAMESTOTAL. Now the program needs a scoring feature. The variable SCORE will increase by one every time the circle overlaps an object. The PRINT statement also must be changed to show the time (frames) left and the score.</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor

'Declare and initialize variables
c = 15
dist = 8
framecount = 0
CONST framestotal = 5000
key$ = ""
CONST ocount = 64
CONST osize = 12
score = 0
size = 32
x = 320
y = 240
DIM o(1 TO ocount, 3) 'The three is for coordinates and colors

'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS

'Loop until the program ends
DO

'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
CASE " ": c = INT(RND * 7) + 9
END SELECT

'Move the circle
IF x <> px OR y <> py THEN CIRCLE (px, py), size, 0
CIRCLE (x, y), size, c
px = x: py = y

'Initialize and move the other objects
a = INT(RND * ocount) + 1 'Tries to initialize this object
IF o(a, 3) = 0 THEN o(a, 1) = INT(RND * 640): o(a, 2) = INT(RND * 480): o(a, 3) = INT(RND * 15) + 1

FOR a = 1 TO ocount 'Loops for each object to display
IF SQR((x - o(a, 1)) * (x - o(a, 1)) + (y - o(a, 2)) * (y - o(a, 2))) < size + osize AND o(a, 3) > 0 THEN
c = INT(RND * 7) + 9 'Changes circle color
CIRCLE (o(a, 1), o(a, 2)), osize, 0 'Erases the object
o(a, 3) = 0 'Sets the object color to black so it no longer exists
score = score + 1
END IF

IF o(a, 3) > 0 THEN CIRCLE (o(a, 1), o(a, 2)), osize
NEXT a

'Accept user input
key$ = INKEY$

framecount = framecount + 1: LOCATE 3, 5: PRINT "Score: "; score; " | Time left: "; framestotal - framecount
LOOP UNTIL key$ = CHR$(27) OR framecount = framestotal</pre></blockquote>

<br>

<p>I got 275 points! {:-D) The program is now finished, but it has no name. Give it one! The program is currently fifty-eight lines long, but it can be shrunk by using colons to fit more on a single line. Now it is under thirty lines long (only twenty if the comments are removed)!</p>

<br>

<blockquote class="code"><pre>'i-TECH Tutorial: Using Circles as Objects in Games
'(C) 2006 i-TECH and Kristopher Windsor
'Declare and initialize variables
c = 15: dist = 8: framecount = 0: CONST framestotal = 5000: key$ = "": CONST ocount = 64: CONST osize = 12: score = 0: size = 32: x = 320: y = 240: DIM o(1 TO ocount, 3)
'Initialize the display
SCREEN 12: WIDTH 80, 60: CLS
'Loop until the program ends
DO
'Respond to user input
SELECT CASE key$
CASE CHR$(0) + CHR$(72): IF y > 0 THEN y = y - dist
CASE CHR$(0) + CHR$(75): IF x > 0 THEN x = x - dist
CASE CHR$(0) + CHR$(77): IF x < 639 THEN x = x + dist
CASE CHR$(0) + CHR$(80): IF y < 479 THEN y = y + dist
CASE " ": c = INT(RND * 7) + 9
END SELECT
'Move the circle
IF x <> px OR y <> py THEN CIRCLE (px, py), size, 0
CIRCLE (x, y), size, c: px = x: py = y
'Initialize and move the other objects
a = INT(RND * ocount) + 1: IF o(a, 3) = 0 THEN o(a, 1) = INT(RND * 640): o(a, 2) = INT(RND * 480): o(a, 3) = INT(RND * 15) + 1
FOR a = 1 TO ocount 'Loops for each object to display
IF SQR((x - o(a, 1)) * (x - o(a, 1)) + (y - o(a, 2)) * (y - o(a, 2))) < size + osize AND o(a, 3) > 0 THEN c = INT(RND * 7) + 9: CIRCLE (o(a, 1), o(a, 2)), osize, 0: o(a, 3) = 0: score = score + 1
IF o(a, 3) > 0 THEN CIRCLE (o(a, 1), o(a, 2)), osize
NEXT a
'Accept user input
key$ = INKEY$
framecount = framecount + 1: LOCATE 3, 5: PRINT "Score: "; score; " | Time left: "; framestotal - framecount
LOOP UNTIL key$ = CHR$(27) OR framecount = framestotal</pre></blockquote>

<br>

<p>The End! Support and Feedback at <a href="mailto:kristopherwindsor@yahoo.com">kristopherwindsor@yahoo.com</a>. This tutorial was written by Kristopher Windsor in June 2006.</p>

<br>

<hr>

<center>Download a copy of this tutorial: <a href="circles_as_objects.html">circles_as_objects.html</a></center>

</div>












<br><br>












<a name="controller"></a>

<div id="content">
<h2>Computer Controller Design</h2>
<h3 class="writer">Written by SJ Zero</h3>


<h3>Computer Controller Design</h3>
<p>Controllers are sort of a black art among most engineers, believe it
or not. Many controllers used are simple on-off affairs, or gain +
bias controllers for continuous control. Computer Scientists can
sometimes be even worse, coding strange hacks to regulate variables
rather than trying to control them. Today, we'll be looking at some
general control theory, five controllers, the theory behind them, and
how to implement them in FreeBASIC. Finally, we'll look at a few minor
tricks you can use to make controllers extremely useful for
controlling things in your software.</p>

<br>

<h3>General Control Theory</h3>
<p>A controller takes a variable of what's going on, called a "Process
Variable" or PV, and tries to change another variable, called the
"Manipulated Variable" or M, to drive the Process Variable towards the
desired value, called "Set Point", or SP. The manipulated value M goes
to whatever is controlling the process, and that device is called the
"Control Element".</p>
<p>To illustrate this, let's consider a controller which controls the
amount of time a computer spends sleeping to correctly get the desired
frame rate. The frame rate itself is the Process Variable in this
case. The time the computer spends sleeping is the manipulated
variable.  The desired frame rate is the Set Point. The pause itself
is the control element.</p>
<p>The difference between a controller and a regulator can basically be
summed up in terms of software by the presence or absence of a set
point as part of the fundamental design. In real-life process control,
a control loop is a much more complicated and elabourate device than a
regulator. For the above example of controlling frame rate, an
effective method to regulate the frame rate is to simply set the frame
wait to 1/3 of a second. If the PC is fast enough, the rate will
regulate to its optimum value. If the PC is too slow, the regulation
will not correct properly.</p>
<p>One often-overlooked concept in controllers is the concept of "Fail to
safe". In terms of computers, this isn't relevant for safety reasons,
because the controller and the control element will never fail
independently of each other (In real life, lines can be cut or
pneumatics can be blown out). Where this IS important is the fact that
not every control element will act in the same direction! In the
example above, increasing the frame period will decrease the frame
rate. What if, instead, you were increasing the frequency of the frame
wait? In that case, the increase in frequency would increase the frame
rate. For this reason, we have "DIR" and "REV" outputs. The thing to
remember is that DIR outputs will increase with an increase in
error(More on this later), and REV outputs will decrease with an
increase in error.  In practice, you must ALWAYS ask yourself: "If my
PV changes, which direction of change in M will bring PV back to SP?"</p>

<br>


<h3>Controller 1: The knife-edge on-off</h3>
<p>The knife-edge controller functions basically by comparing the process
variable to set point, and setting M to 100% or 0%, depending on the
DIR/REV setting, when PV drops below SP, and hammering M to the
opposite value when the PV rises above SP. This results in a fairly
tightly controlled PV, oscillating at the natural frequency of the
process.</p>

<p>The knife-edge controller is the easiest to write in FB – basically,
it's just an IF statement!</p>

<blockquote class="code"><pre>IF DIRREV = DIR then
       IF PV < SP then M = 100 else M = 0
ELSE
       IF PV < SP then M = 0 else M = 100
ENDIF</pre></blockquote>

<p>Note that the reason this is called "knife edge" is that there is a
single sharply defined point where on becomes off. This effect can
also be created by setting the proportional gain on a P+B controller
(Covered later) to a massive value, thus sending M to max or min
depending on the PV and SP.</p>

<br>


<h3>Controller 2: The Hysteresis on-off</h3>
<p>The Hysteresis, or "Band gap" on-off controller is virtually the same
as above, with one important difference: Unlike the knife-edge
controller, which will turn a process on and off right around a single
point, the on and off values are different. This is used mostly in
places where hammering a control element off and on so quickly will
have a detrimental effect.</p>

<blockquote class="code"><pre>IF DIRREV = DIR then
       if M = 100 then IF PV < SP + X then M = 100 else M = 0
       if M = 0 then IF PV < SP - X then M = 100 else M = 0
ELSE
       if M = 100 then IF PV < SP + X then M = 0 else M  = 100
       if M = 0 then IF PV < SP - X then M = 0 else M = 100
ENDIF</pre></blockquote>

<p>Notice that this controller just changes the point around a bit
depending on the direction M is in. Controllers like these are used in
industrial operations when the simplicity of an on-off controller is
ideal, but the high oscillation of a control element using a
knife-edge controller will cause excess mechanical wear.</p>

<br>

<h3>Controller 3: The P+B</h3>
<p>The P+B controller is where things get interesting, because we're
getting into continuous control. P+B means "Proportional + Bias". To
understand what this means, you must first understand that error is
either SP-PV or PV-SP, depending on the DIR/REV setting. Therefore,
all the remainder of the controllers actually know is exactly how
different PV is from SP.</p>
<p>Proportional control uses this information, E, by simply multiplying
it by some factor Gp. The effect is any error in the process variable
signal vs. set point will drive M to oppose the error proportionally.
To understand this, consider you have your two hands pushing against
each other. Now, when one starts pushing harder, the other starts
pushing harder. When one lets up, the other lets up. In the end,
nothing moves. This is exactly how this controller functions. It also
has a bias function, however. The purpose of this is to eliminate the
offset caused by the Proportional signal. There is an offset because
the proportional signal REQUIRES error to act. Thus, if there is no
error, the output won't change. If the output won't change, your PV
drifts from SP. If your PV drifts from SP, you get an error, and the
controller can correct that error!</p>

<blockquote class="code"><pre>M = B + Gp*E

if DIR then E = PV – SP else E = SP – PV
M = B + Gp*E</pre></blockquote>


<br>


<h3>Controller 4: The P</h3>
<p>We covered mathematical integrals in a previous article. This
controller supposedly take the integral of error over time, multiplies
the integral by a constant Gi, and adds that to the proportional gain
covered in the previous controller. The result is that the controller
'seeks' zero error by integrating the error over time, and acting in
the direction required to push error towards 0.  This would be tough
if we were actually planning on taking the integral mathematically,
but you can sum the error using a much better method: just keep adding
the error to a value, scaled with time!</p>
<p>One problem with this form of controller is  they can "wind up" the
integral and take a long time to "unwind" on some processes. This can
happen if your SP is set very high or very low, and is then set very
low or very high. There is no bias in this controller, because the
Integral action actually functions as an 'auto-bias' mechanism.</p>

<blockquote class="code"><pre>M = Gp * E + GI * E

if DIR then E = PV – SP else E = SP – PV
IntegralE += E
M = B + Gp*E + Gi*IntegralE</pre></blockquote>

<br>

<h3>Controller 5: The PID</h3>
<p>The PID controller takes the previous PI controller, and adds one more
element. A problem with many processes, such as temperature control
loops, is that the strange time constants will make a PI control loop
oscillate. This happens because a PI control loop can have no clue
when the process starts approaching the appropriate value. The PID
controller adds a derivative unit, which opposes the rate of change of
the process variable, multiplied by a constant Gd. By limiting the
rate of change, the PID controller can achieve what almost appears to
be prescient control with some processes, such as temperature. An
important thing to remember though, is processes with Gaussian
noise(that is, noise that more or less stays around the measurement
signal) will act WORSE with a pid controller.</p>

<blockquote class="code"><pre>M = GP * E + GI * integral(E) + GD * dE/dt

if DIR then E = PV – SP else E = SP – PV
IntegralE += E
DerivativeE = oldE - E
oldE = E
M = B + Gp * E + Gi * IntegralE + Gd * DerivativeE<pre></blockquote>

<p>Note that the so-called Derivative is nothing more than the difference
between the old error and the new. Again, calculus concepts so
difficult with equations are much simpler when you exist in the time
domain.</p>

<br>

<h3>Integrating a control loop into a software process</h3>

<p>To integrate the controller into a loop, simply plug the sensed
variable into PV, and the controlled variable into SP. You may need to
scale both, but that's more or less self-explanitory.</p>

<br>

<h3>Tuning your control loop</h3>

<p>There are a large variety of ways to tune a control loop, including
the Process Reaction Curve and Zeigler Nichols. Instead of trying to
explain those complex techniques, I'll just tell you to do the easy
thing: Increase proportional gain until the loop starts to oscillate,
then pull back a bit. Then, increase integral gain until the loop
starts to oscillate, then pull back a bit. Finally, do the same for
derivative. It's not pretty, but it will provide a relatively good
reaction, possibly better than quarter amplitude damping.</p>



<hr>

<center>Download a copy of this tutorial: <a href="Computer_Controller_Design_-_SJ_Zero.txt">Computer_Controller_Design.txt</a></center>

</div>







<br><br>









<a name="random"></a>

<div id="content">
<h2>Generating Random Integers</h2>
<h3 class="writer">Written by Edward F. Moneo</h3>

<p>More and more of us are requiring random integers in our QB programs.
Some of us can write the statement for generating a random integer by heart.
However, I'm going to lay down the rules for those of you that don't know them
by heart.</p>

<br>

<h4>RANDOMIZE TIMER</h4>
<ul>
<li>This statement seeds the random number generator.</li>
<li>This statement must appear at the beginning of your program, at least before the first RND statement.</li>
</ul>

<br>

<p>Without the RANDOMIZE TIMER, the RND statement(s) of the program will always
generate the exact same set of random numbers. This could be handy for
debugging the program.</p>

<br>

<p>The following DIM statements are for proper definition of the variables:</p>

<blockquote class="code"><pre>DIM LOWER   AS INTEGER   'The FROM or LOWER value of the required random range.
DIM UPPER   AS INTEGER   'The TO or UPPER value of the required random range.
DIM RANDINT AS INTEGER   'The generated random integer within the range.</pre></blockquote>

<br>

<p>The following is the statement for generating a random integer:</p>

<blockquote class="code"><pre>RANDINT = INT ((UPPER - LOWER + 1)*RND + LOWER)</pre></blockquote>

<br>

<p>Depending on your QB manual, you may also see the following statement:</p>

<blockquote class="code"><pre>RANDINT = INT(RND * (UPPER - LOWER + 1)) + LOWER</pre></blockquote>

<br>

<p>Either statement works equally well.</p>

<br>


<h3>CONSIDERATIONS:</h3>

<h4>1) Abbreviated statements.</h4>
<p> Some programmers will often abbreviate the RND statement as follows.</p>

<blockquote>
<p><b>Example #1:</b> Get random integers from 1 to 10.</p>
<blockquote class="code"><pre>RANDINT = INT(RND * (10 - 1 + 1)) + 1</pre></blockquote>
<p>They often abbreviate this to:</p>
<blockquote class="code"><pre>RANDINT = INT(RND * 10) + 1</pre></blockquote>
</blockquote>

<br>

<blockquote>
<p><b>Example #2:</b> Get random integers from 0 to 9.</p>
<blockquote class="code"><pre>RANDINT = INT(RND * (9 - 0 + 1)) + 0</pre></blockquote>
<p>They often abbreviate this to:</p>
<blockquote class="code"><pre>RANDINT = INT(RND * 10)</pre></blockquote>
</blockquote>

<p>These shortcuts can lead to problems, especially when you need to modify the upper or lower values of the range. The best approach is to place the complete RND statement, with the LOWER and UPPER parameters, into a subroutine, SUB or FUNCTION, and always pass both the lower and upper values of the range.</p>

<br>

<h4>2) Unique random integers.</h4>
<p>Random integers can and will repeat like the throws of the dice.</p>

<p>Some applications need the random integers to always be unique.</p>

<p>Here's a sample bit of code to eliminate duplicate random integers.</p>

   
<blockquote class="code"><pre>RANDOMIZE TIMER
DIM LOWER   AS INTEGER
DIM UPPER   AS INTEGER
DIM RANDINT AS INTEGER

LOWER =  1
UPPER = 52

DIM DUP (LOWER TO UPPER)   'Setup an array covering all the possibilities.

FOR X = LOWER TO UPPER
    DO
      RANDINT = INT(RND * (UPPER - LOWER + 1)) + LOWER
    WHILE DUP(RANDINT) = 1
    DUP(RANDINT) = 1
    PRINT RANDINT
NEXT X</pre></blockquote>

<p>The above FOR loop will generate 52 unique random integers.</p>

<p>Within the above DO loop, we get a random integer. We check the DUP array to see if that value is flagged with a 1, indicating that we had it before.</p>

<p>If we had it before, it's a duplicate, so ignore it and get another random integer. If it's unique, continue and flag it in the DUP array to indicate that we just had it, and now process it (in this example, print it).</p>

<br>

<p>Hope this all works for you, or at least gives you some ideas.</p>

<p id="signature">Regards,<br>
Moneo</p>



<hr>

<center>Download a copy of this tutorial: <a href="random_integers.txt">random_integers.txt</a></center>

</div>








<br><br>










<a name="floormap"></a>
<div id="content">
<h2>Ecliptorial: Volume I<br>Floor Mapping Tutorial</h2>
<h3 class="writer">Written by Eclipzer (Quinton Roberts)</h3>



<p><i>
  The following tutorial has been reconstructed, by the author, from the original. Though some content has
  been modified for clarity, the original format has been retained for authenticity.
</i></p>

<blockquote><table style="font-weight: bold;">
<tbody><tr><td width="100">Item #</td><td>???</td></tr>
<tr><td>Subject</td><td>Floor Mapping</td></tr>

<tr><td>Author</td><td>Quinton Roberts</td></tr>
<tr><td>Completed</td><td>06/23/00</td></tr>
<tr><td>Updated</td><td>07/08/06</td></tr>
</tbody></table>
</b>
</blockquote>

<p>Copyright (c) Quinton Roberts 2000-2006.</p>

<h3><i>Introduction</i></h3>

<p>
  One effect that was used quite a bit on the Super Nintendo was an effect called floor mapping. This
  essentially took an image and tilted it into the distance to simulate depth. A prime example of floor
  mapping can be seen in Nintendo's classic game Super Mario Kart.
</p>

<br>

<h3><i>Floor Mapping with an Infinite Tile</i></h3>
<p>
  Before we cover the more advanced methods of floor mapping we need to cover the basics. The easiest way to
  understand floor mapping is to use a single tile and map it indefinitely across our floor. First we must
  create a tile to map. In our case we will use a 128x128 image.
</p>

<center>
<table align="center" border="0">
<tbody><tr><td><img src="floormap_files/floor_tile.gif"></td></tr>
<tr><td align="center"><i>floor map tile</i></td></tr>

</tbody></table>
</center>

<p>This tile is then projected onto the floor indefinitely.</p>

<center>
<table align="center" border="0">
<tbody><tr><td><img src="floormap_files/floor_map.gif"></td></tr>
<tr><td align="center"><i>floor map tile projected indefinitely</i></td></tr>
</tbody></table>
</center>

<br>

<h3><i>Projection Model</i></h3>
<p>
  Our first step is to construct a diagram that models our desired projection. The floor will be a plane
  which extends outward indefinitely. Perpendicular to the floor will be the screen. The eye will be located a
  distance 'd' behind the screen and a height 'h' above the floor. Conceptually, the eye generates a ray
  which passes through the screen and intersects with the floor. The point at which the ray intersects the
  screen (x,y) is where we will color the pixel. The point at which the ray intersects the floor (u,v)
  gives us the color of the pixel we will draw to the screen. The following is a diagram to represent this:
</p>

<center>
<table align="center" border="0">
<tbody><tr><td><img src="floormap_files/floor_diagram_0.gif"></td></tr>
<tr><td align="center"><i>conceptual diagram for floor mapping</i></td></tr>
</tbody></table>
</center>

<p>
  Now, the idea is that given the distance of the eye from the screen and its height from the floor, we
  should be able to find any floor coordinate (u,v) given any screen coordinate (x,y). By seperating the
  above diagram into individual parts, we should be able to derive the relationship between floor
  coordinates (u,v) and screen coordinates (x,y).
</p>

<br>

<h3><i>Solving for 'v'</i></h3>
<p>
  Removing triangle DEP from the original diagram we get the following diagram:

</p>

<table align="center" border="0">
<tbody><tr><td align="center"><img src="floormap_files/floor_diagram_1.gif"></td></tr>
<tr><td align="center"><i>diagram solving for floor coordinate 'v'</i></td></tr>
</tbody></table>

<p>
  It should be immediately obvious that we have similar triangles here, the most important of which has
  been formed with the dotted line. Since similar triangles are proportional to each other, we can set up a
  ratio and solve for 'v', the vertical component of the floor coordinate we wish to find.
</p>

<blockquote class="code"><pre>1. Construct a ratio:

     v/h = d/(h-y)

2. Solve for 'v'

       v = h*d/(h-y)
</pre></blockquote>

<br>

<h3><i>Solving for 'u'</i></h3>
<p>
  Removing triangle MDP from the original diagram brings us to the following diagram:
</p>

<table align="center" border="0">
<tbody><tr><td align="center"><img src="floormap_files/floor_diagram_2.gif"></td></tr>
<tr><td align="center"><i>diagram solving for floor coordinate 'u'</i></td></tr>
</tbody></table>

<p>
  Again it should be immediately obvious that we have similar triangles. We'll once again set up a ratio and
  solve for 'u', the horizontal component of the floor coordinate we wish to find.

</p>

<blockquote class="code"><pre>3. Construct a ratio

     u/v = x/d

4. Solve for 'u'

       u = v*x/d
</pre></blockquote>


<p>
  Though we now have the (u,v) coordinates, the 'u' coordinate is dependent on the 'v' coordinate as seen in
  step 3. To retain as much accuracy as possible it's best to have the coordinates dependent only on what's
  given (x,y,d,h). Therefore we will simply substitute equation 2. for 'v' and simplify.
</p>

<blockquote class="code"><pre>5. Substitute for 'v' using equation 2.

     v = d*h/(h-y)        'equation 2.
     u = v*x/d            'equation 4.
     u = [d*h/(h-y)]*x/d  'substitute for 'v'

6. Simplify

     u = x*d*h / d(h-y)   'multiply (top by x, bottom by d)
     u = x*h/(h-y)        'd's cancel

7. Final Equations

     u = x*h/(h-y)
     v = d*h/(h-y)
</pre></blockquote>

<p>
  So we now have the equations necessary to transform any screen coordinate (x,y) into its respective floor
  coordinate (u,v). There are, however, some important things to note about our newly found projection
  transform equations. The first is that both the 'u' and 'v' coordinates are scaled by the same value,
  h/(h-y). This little fact can be used to increase the speed of calculations. The second is that the
  denominator of both equations, (h-y), tells us that the height of the eye must never equal the height of
  any pixel on the screen, as this would produce a zero in the denominator (dividsion by zero is bad).
  Therefore, it is very important to remember that the eye must always be either above or below the screen.
</p>
<p>
  --Eclipzer
</p>


<hr>

<center>Download a copy of this tutorial: <a href="floormap.zip">floormap.zip</a> / <a href="floormap.html">floormap.html</a></center>

</div>












<br><br>











<a name="delay"></a>
<div id="content">
<h2>An Improved Delay Routine</h2>
<h3 class="writer">Written by Roger Greenlaw</h3>

<blockquote class="letters">
<p>Hello, Pete,</p>

<p>I tested the tutorial programs for QuickBasic that are located on your website for tutorials, and have made a change to one of the example programs.  [EDITOR'S NOTE: Referring to Andre Van Wyk's <a href="http://www.petesqbsite.com/sections/tutorials/tutorials/basicgd.htm">Basic Course In Game Design</a>, originally published in 1996.]</p>

<p>I discovered that the programmer who wrote the tutorial used a very simple loop to control program timing.  Modern programs are compiled (QB45 or FreeBasic) and most compilers provide some optimization.</p>

<p id="signature">Roger Greenlaw</p>
</blockquote>

<br>
 

<p>An example of this process looks like this:</p>

 

<p>Timed loop #1:</p>

 

<blockquote class="code"><pre>FOR counter = 1 TO 10000

NEXT counter</pre></blockquote>

 

<p>This process works well on interpreted programs but the following problems can be observed</p>

 

<p>1,.  Shortening the code by combining the two lines</p>

 

<blockquote class="code"><pre>FOR counter = 1 TO 10000: NEXT counter</pre></blockquote>

 

<p>will cause the loop to run in a much shorter time.  This time the loop will be completed faster, and therefore the end of the range (10000) would need to be much higher to achieve the same time delay.</p>

 

<p>If each of these loops are compiled using QB45 or FreeBasic the loops will each execute in the same amount of time.  The programmer would need to test the loop and adjust the ending value repeatedly until the desired delay is achieved.  Once compiled, the loop will execute at different speeds on different machines.  The faster the processor, the quicker the loop will execute.  To make a delay loop that is more effective I wrote a subroutine that can be included in any QuickBASIC or FreeBASIC program which provides more reliable timing delays.</p>

 

<blockquote class="code"><pre>DECLARE SUB SNOOZE(delay)

 

SUB SNOOZE(delay)

 

  StartTime = TIMER

  WHILE StartTime + delay < TIMER

  WEND

 

END SUB</pre></blockquote>

 

<p>This loop will sleep for a specific amount of time with the following statement</p>

 

<blockquote class="code"><pre>REM Sleep for ¼ second

Delay = .25

CALL SNOOZE(delay)</pre></blockquote>

 

<p>To allow for keyboard interruption of the delay loop the following can be used</p>

 

<blockquote class="code"><pre>DECLARE SUB SNOOZE(delay, keypress$)

 

SUB SNOOZE(delay, keypress$)

 

  StartTime = TIMER

  WHILE StartTime + delay < TIMER

  Keypress$ = INKEY$

  IF keypress$ <> “” THEN END SUB

  WEND

 

END SUB</pre></blockquote>

 

<p>This routine will function the same as the first example with the following differences:</p>

 

<blockquote class="code"><pre>Delay = .1

Keypress$ = “”

CALL SNOOZE(delay, keypress$)</pre></blockquote>

 

<p>When the loop completes, and program control returns to the main program from the subroutine keypress$ will contain the key that was pressed to exit the loop, or will be empty if no key was pressed before the delay time expired.</p>

 

<p>This technique can make it easier to program delays in programs.</p>

 

<p>If anyone would like to contact me about these routines please email <a href="mailto:rgreenlaw@adelphia.net">rgreenlaw@adelphia.net</a></p>

 

<p id="signature">Roger Greenlaw</p>

<hr>

<center>
Download a copy of this tutorial: <a href="delay.txt">delay.txt</a>
</center>

</div>












<br><br>









<a name="winsock"></a>
<div id="content">
<h2>An Introduction To Network Programming Using Winsock</h2>
<h3 class="writer">Written by St&eacute;phane Richard (MystikShadows)</h3>

<h3>INTRODUCTION:</h3>

<p>Welcome to this introductory tutorial on network programming using winsock.  The subject has been talked
   about and asked for both on the <a href="http://www.petesqbsite.com/forum/viewtopic.php?t=745&start=0" target="blank">Official QB Express Article request thread</a> and in a few emails I've received and
   although there is an example it seems that some of the things could be explained in a bit more details.  As such
   I've decided to create this tutorial that will guide you through using winsock in order to connect to a specific
   website URL and retrieve information from the server. Since all you can do with winsock is far beyond the scope of 
   an introductory tutorial, I will be providing you with links to all the information you'll need so that you'll be equipped
   to take on just about any network/internet related tasks.
</p>
<p>When it comes to this tutorial, the example program supplied should also work in linux (with perhaps some minimal changes) since
   linux sockets work pretty much the same way as Windows sockets. Since I don't have linux installed at the moment I can't
   give you these changes directly or know the discrepencies of Windows and Linux when it comes to sockets programming.  If someone
   has played with sockets programming in linux with freebasic and knows these discrepencies (if any) please let me know via email and
   i'll be glad to add these to this tutorial. And now, let's get right into the core of winsock programming.
</p>

<h3>FREEBASIC WINSOCK PROGRAMMING BASICS:</h3>

<p>In most cases, when programming with winsock, there is a very simple order of things to follow.  Since winsock typically talks
   to a server, no matter what type of interchange you'll be making with that server, you will be basically following the following
   order:
</p>

<ul>
    <li><b>Connect To The Server In Question:</b><br>
        To do this, you'll essentially make a call to Winsock's Connect() function.  This will require certain
        structures to be initialized with proper values
    </li> <br>
    <li><b>Send Proper Command To Get Needed Data Or Perform Needed Task:</b><br>
        In the general sense of the word, to send a command via winsock, you need to form a command string and send it
        to the server for processing. We'll see some of these commands in greater details in the example.
        These commands will vary depending on the connection type (HTTP, SMTP, FTP) and the task to be performed.  At this
        point, more than one thing could be consecutively performed or requested say, in a loop, for example.
    </li> <br>
    <li><b>Close The Connection To The Server:</b><br>
        Of course, just like file manipulation, it's a great idea to close whatever you open for very obvious reasons.  This frees
        the server of your connection to it and allows it to work on other server requests.
    </li>
</ul>

<p>It doesn't matter the job to be done via winsock, there's no command that automatically opens or closes things for you so it will be
   a simple question of remember to open, perform the request or task and close. Just be warned that if you don't close your connections
   after a while of opening new connections, you (or you with other people) could overflow the server and hence freeze on your side and slow
   down the server dramatically for other users so just pay a little attention and show a little consideration when doing internet related 
   network programming.
</p>

<h3>MAKING SENSE OF THE PROTOCOLS AND COMMANDS:</h3>

<p>The commands in question, as I mentionned, differ depending on the protocol used.  Each type of connection allows different sets of
   commands and as such, I will enumerate here the four most used protocols with links to list of commands so you get an idea of what can
   be done under these different protocols.  The protocols are:
</p>

<ul>
    <li><b>HTTP (HyperText Transfer Protocol:</b><br>
           The name says it all here.  HTTP is a protocol originally created to transfer html files. It is a request/response protocol between clients and servers. Here is
           the <a href="http://en.wikipedia.org/wiki/HTTP" target="blank">Wiki Page</a> on the HTTP protocol.
    </li> <br>
    <li><b>FTP (File Transfer Protocol):</b><br>
           FTP is typically used in internet access that will be transfering files from and to a given server. The server, of course,
           needs to offer FTP access in order for FTP commands to work.  Here's the <a href="http://en.wikipedia.org/wiki/File_Transfer_Protocol" target="blank">Wiki Page</a> for the FTP
           protocol.
    </li> <br>
    <li><b>SMTP (Simple Mail Transfer Protocol):</b><br>
        As you might have guessed, this protocol is for email related functionality and requests. Whether you are receiving or sending mail, this will be the protocol
        to use.  Here's the <a href="http://en.wikipedia.org/wiki/SMTP" target="blank">Wiki Page</a> on the SMTP protocol.
    </li> <br>
    <li><b>TCP/IP (Transmission Control Protocol/Internet Protocol):</b><br>
        I used TCP/IP here because it's the most renouned name for it, but today, it seems to be called the Internet Protocol Suite now.  It now pretty much emalglobates
        the three other protocols above and is designed to work both for networks and internet related functionalities.  Here's the <a href="http://en.wikipedia.org/wiki/TCP/IP" target="blank">Wiki Page</a> on the TCP/IP protocol.
    </li>
</ul>

<p>Of course, there are other protocols, but in all honesty, the other protocols are either used less and less or practically dissapeared from the map.   When you think about it, there's not much more you'd be doing
   on the internet (except chatting or group gaming which is done with TCP/IP anyways) aside viewing websites, sending and receiving emails and uploading or downloading files.
</p>
<p>FreeBASIC comes with a special library for winsock and sockets programming. In the next section we'll talk about it however, we'll limit ourselves to just what we need for this tutorial or the next section would be 
   way passed the scope of this tutorial. So then, let's get right to it.
</p>

<h3>THE DREADED WINSOCK.BI INCLUDE FILE:</h3>

<p>I'm not sure if any of you have looked at the "winsock.bi" file but you might notice that it's 17kb in size, has a lot of defines,
   user defined types, constants and sub and function declaration. There is also the winsock2.bi file which stands at a whopping 48kb,
   has alot more defines, constants, user defined types and subs and functions declarations.  In otherwords, it has alot more definitions
   and declarations that we need for a first program.  winsock.bi and winsock2.bi are located in your freebasic installation folder under the
   inc\win\ folder. If you want, you can take a look at them to get their full scope of definitions.  However, for the purpose of this tutorial 
   and your convenience, I've extracted the definitions and declarations that that we will be needing only.
</p>
<p>Since these are extractions, I have not documented them per se, the most important thing to know here is that all these definitions are in winsock.bi and winsock2.bi. if you want
a good complete reference on winsock programming, take a look at the <a href="http://www.sockets.com/" target="blank">Sockets.com</a> which features everything you ever wanted to know
about the subject and complete references to standards, protocols, function and sub references for winsock and reference lists and references for all RFC standards. sockets.com is by far
the best website to use for anything winsock related, take a look and see for yourself how complete it is.
</p>

<p><b>The Constant Definitions and Define Statements:</b></p>

<p>As you can see below, we don't need alot of constants here. we only have four defined here (note that winsock.bi has alot more because of the different types of internet protocols and connections that can be made) and for
this tutorial it's really all we'll need.  We defined a macro called MAKEWORD that essentially assures that the value return is of a valid USHORT type (0 to 65535 in range).
</p>

<blockquote class="code"><pre><div id="bigcode">OPTION EXPLICIT

' --------------------
'  Library Inclusions
' --------------------
'#Include "winsock.bi"    <- Commented out for tutorial purposes,
                          '  should be used instead in projects
#INCLIB "wsock32"


' ------------------------------------------------------------------
'  Constants and defines extracted from winsock.bi for this example
' ------------------------------------------------------------------
CONST AF_Inet     = 2
CONST Sock_Stream = 1
CONST IPProto_TCP = 6
CONST NewLine     = CHR$(13)+CHR$(10)

#DEFINE MAKEWORD(a,b)      ((a) shl 8 or ((b) and &h000000FF))
#DEFINE WSADESCRIPTION_LEN 256
#DEFINE WSASYS_STATUS_LEN  128
</div></pre></blockquote>


<p><b>The User Defined Types:</b></p>
<p>The user defined types shown here (seven of them) are shown here because they are used either in other structures (some structures have fields that are of other structure types) or as final structures to be used
   by the winsock related functions. Some of the names here are quite ambiguous and in my opinion could have been given much better and clearer names than those used here.
</p>

<blockquote class="code"><pre><div id="bigcode">' ---------------------------------------------------------------
'  User Defined Types extracted from winsock.bi for this example
' ---------------------------------------------------------------
TYPE WSAData
     wVersion         AS SHORT
     wHighVersion     AS SHORT
     szDescription    AS STRING * WSADESCRIPTION_LEN+1-1
     szSystemStatus   AS STRING * WSASYS_STATUS_LEN+1-1
     wMaxSockets      AS USHORT
     wMaxUDPDG        AS USHORT
     dwVendorInfo     AS BYTE PTR
END TYPE

TYPE HostEnt
     H_Name           AS BYTE PTR
     H_Aliases        AS BYTE PTR PTR
     H_AddrType       AS SHORT
     H_Length         AS SHORT
     H_Addr_List      AS UINTEGER PTR PTR
END TYPE

TYPE S_Un_B_
     S_B1             AS UBYTE
     S_B2             AS UBYTE
     S_B3             AS UBYTE
     S_B4             AS UBYTE
END TYPE

TYPE S_Un_W_
     S_W1             AS USHORT
     S_W2             AS USHORT
END TYPE

UNION In_Addr
      S_Un_B          AS S_Un_B_
      S_Un_W          AS S_Un_W_
      S_Addr          AS UINTEGER
END UNION

Type SockAddr_In
     Sin_Family       AS SHORT
     Sin_Port         AS USHORT
     Sin_Addr         As In_Addr
     Sin_Zero(0 TO 7) AS BYTE
End Type

Type SockAddr
     SA_Family        AS SHORT
     SA_Zero(0 TO 13) AS BYTE
END TYPE
</div></pre></blockquote>

<p><b>The A.P.I. Function Declarations:</b></p>

<p>Again, winsock.bi and winsock2.bi have a whole lot more API function declarations than those shown here.  However, for the sake of this tutorial, once again, I merely included
   the functions that we will need.  the WS prefix you can see in most of these functions are to indentify that the functions are WinSock related.
</p>

<blockquote class="code"><pre><div id="bigcode">' ----------------------------------------------------------------------
'  API Function Declarations extracted from winsock.bi for this example
' ----------------------------------------------------------------------
DECLARE FUNCTION WSAStartup _
             LIB "WSock32" _
           ALIAS "WSAStartup" (BYVAL wVersionRequired AS SHORT, _
                               BYVAL lpWSAData        AS WSAData PTR) AS LONG

DECLARE FUNCTION WSAGetLastError _
             LIB "WSock32" _
           ALIAS "WSAGetLastError" () AS LONG

DECLARE FUNCTION WSACleanup _
             LIB "WSock32" _
           ALIAS "WSACleanup" () AS LONG

DECLARE FUNCTION Socket _
             LIB "WSock32" _
           ALIAS "socket" (BYVAL AF       AS LONG, _
                           BYVAL S_Type   AS LONG, _
                           BYVAL Protocol AS LONG) AS LONG

DECLARE FUNCTION CloseSocket _
             LIB "WSock32" _
           ALIAS "closesocket" (BYVAL S AS LONG) AS LONG

DECLARE FUNCTION Connect _
             LIB "WSock32" _
           ALIAS "connect" (BYVAL AS LONG, _
                            BYVAL AS SockAddr PTR, _
                            BYVAL AS LONG) AS LONG

DECLARE FUNCTION HTons _
             LIB "WSock32" _
           ALIAS "htons" (BYVAL HostShort AS USHORT) AS USHORT

DECLARE FUNCTION GetHostByName _
             LIB "WSock32" _
           ALIAS "gethostbyname" (BYVAL szHost AS STRING) AS HostEnt PTR

DECLARE FUNCTION Send _
             LIB "WSock32" _
           ALIAS "send" (BYVAL SocketID  AS LONG, _
                         BYVAL BufferPtr AS LONG, _
                         BYVAL BufLen    AS LONG, _
                         BYVAL Flags     AS LONG) AS LONG

DECLARE FUNCTION Recv _
             LIB "WSock32" _
           ALIAS "recv" (BYVAL SocketID  AS LONG, _
                         BYVAL BufferPtr AS LONG, _
                         BYVAL BufLen    AS LONG, _
                         BYVAL Flags     AS LONG) AS LONG
</div></pre></blockquote>

<p>Now, take a look at the following 2 functions.  You'll notice they are quite empty (1 line each) and well I thought I'd explain why I didn't just use the WS related functions themselves.  Usually, a winsock "session" needs to have
   an initialization/creation section prior to the work to be done, and a closing section after, one never knows what might be needed when creating or closing an internet connection.  Therefore, I've created
   these two functions as a skeleton app.  In your projects, you might need to create variables, assign some values, to different things before you execute your task and keeping this initialization material in one function is a great
   way to keep the code organized and clear.  Same goes for closing or terminating a winsock session.  So think of these two functions as a template to follow.  But again, my style is my style and you're more than welcome to use it, or not, depends
   on what you need initialized and prepared before you perform your work as well as what needs to be closed and released from resources when the work is done.
</p>

<blockquote class="code"><pre><div id="bigcode">'====================================================
' StartSockets gets a WSAData structure ready to be
' used in the rest of the program.
'====================================================
FUNCTION StartSockets() AS LONG

    DIM WSAInfo AS WSAData

    WSAStartup(MakeWord(1,1), @WSAInfo)

END FUNCTION

' ====================================================
'  EndSockets clears resources used by StartSockets
' ====================================================
FUNCTION EndSockets() As Long

    WSACleanup()

END FUNCTION
</div></pre></blockquote>

<p>Next on the list, take a look at the ConnectToURL function below. This is where "the work" actually happens. I have commented
   the code here so you see what each part does but the basic idea is to perform the following (once the socket is opened):
   <br><br>
   &nbsp;&nbsp;&nbsp;1. Retrieve the URL's host<br>
   &nbsp;&nbsp;&nbsp;2. Create the URL's socket<br>
   &nbsp;&nbsp;&nbsp;3. Connect to the URL<br>
   &nbsp;&nbsp;&nbsp;4. Prepare HTTP GET request and send it to throught the socket<br>
   &nbsp;&nbsp;&nbsp;5. Retrieve the contents<br>
   &nbsp;&nbsp;&nbsp;6. Display the retrieved contents on the screen<br>
</p>

<blockquote class="code"><pre><div id="bigcode">' ====================================================
'  NAME:         ConnectToURL()
'  PARAMETERS:   BYVAL URL AS STRING
'  RETURN VALUE: A LONG typed value
'  ASSUMES:      URL to be a valid website URL
' ----------------------------------------------------
'  DESCRIPTION:  This function performs the actual
'                work of this demonstration.  it will
'                connect to the URL passed as its
'                parameter and retrieve and display
'                some information about the URL.
' ====================================================
FUNCTION ConnectToURL(BYVAL URL AS STRING) AS LONG

    ' ----------------
    '  Work Variables
    ' ----------------
    DIM URLHost       AS HostEnt PTR
    DIM URLSocket     AS SockAddr_In
    DIM URLSocketID   AS UINTEGER
    DIM Connection    AS LONG
    DIM Message       AS STRING
    DIM Buffer        AS STRING
    DIM BufferReceive AS ZSTRING *1001
    DIM BytesReceived AS LONG

    ' ---------------------
    '  Retreive URL's host
    ' ---------------------
    URLHost = GetHostByName(URL)
    ' ---------------------
    '  Create URL's Socket
    ' ---------------------
    WITH URLSocket
         .Sin_Family      = AF_Inet
         .Sin_Port        = HTons(80)
         .Sin_Addr.S_Addr = **URLHost->H_Addr_List
    END WITH
    ' -------------------
    '  Create The Socket
    ' -------------------
    URLSocketID = Socket(AF_Inet, Sock_Stream, IPProto_TCP)
    ' --------------------
    '  Connect To The URL
    ' --------------------
    Connection  = Connect(URLSocketID, @URLSocket, LEN(URLSocket))
    ConnectURL  = URLSocketID
    ' -------------------------------------------------------------
    '  Prepare HTTP GET request and send it to throught the socket
    ' -------------------------------------------------------------
    Message     = "GET / HTTP/1.0" + NewLine _
                  + "Host: " + URL + NewLine _
                  + "User-Agent: MystikShadows/1.0" + NewLine + NewLine
    Send(URLSocketID, STRPTR(Message), LEN(Message), 0)
    ' ---------------
    '  Retrieve File
    ' ---------------
     BytesReceived = Recv(URLSocketID, STRPTR(BufferReceive), 1000, 0)
     WHILE BytesReceived > 0
           Buffer = Buffer + LEFT$(BufferReceive, BytesReceived)
           BytesReceived = Recv(URLSocketID, STRPTR(BufferReceive), 1000, 0)
     WEND
     ' --------------------------------------------
     '  Display received file and info to the user
     ' --------------------------------------------
     PRINT Buffer

END FUNCTION
</div></pre></blockquote>

<p>With all of these created, it makes the main part of the program quite short. All it does now is declare a variable called Connection of type LONG, calls the StartSockets() function (with whatever initialization code you may need), calls the ConnectToURL() function which performs the actual task and finally calls the EndSockets() function to close what's been opened (and release resources as needed by your projects).
</p>

<blockquote class="code"><pre><div id="bigcode">'==========================
' MAIN PART OF THE PROGRAM
'==========================
DIM Connection AS LONG

StartSockets()
Connection = ConnectToURL("www.ascii-world.com")
EndSockets()

SLEEP
</div></pre></blockquote>

<p>And that just about covers it really. This program will perform the intended work which is to connect to http://www.ascii-world.com and display information and contents about the URL. Note that you can change the call to ConnectToURL to supply other URL addresses to see what they will show you.  Don't worry, you don't have to type (or cut and paste) all that in, here's a link to the <a href="sockets.bas" target="blank">sockets.bas</a> so you can just download the file and compile it for yourself.  Here is what the program produced with the ascii-world URL.
</p>
<center><img src="socketsoutput.png"></center><br>

<h3>AND TO CONCLUDE THIS TUTORIAL:</h3>

<p>There you have it, we are at the end of this winsock programming tutorial in FreeBASIC.  I think that as an introduction, it covered alot of grounds and gave you a good start on your own winsock projects.  As far as winsock itself is concerned, the functions needed are all present in winsock.bi and winsock2.bi. Don't forget to consult the links I provide in this
   tutorial to learn everything that you can do with winsock and how to do them as well.  The references to the protocols will tell you which you should use on a given wonsick project and also have valid protocol commands for you so you can learn HTTP, FTP, SMTP programming in all it's details.  Winsock programming is by no means a simple subject.  When looking at
   the example shown here we can see that it still takes quite a few steps to perform a very basic winsock related task.  However, there's no denying the necessity of winsock programming whetehr you are creating an online game, or an application that can really benefit from a connection to some online resource. So I believe this should be enough to get you curious to see
   just what else can be done with winsock.
</p>
<p>Remember, as always, that i'm always opened to comments, suggestions, ideas, constructive criticism and questions from you, just email me with anything you want to share with me about winsock programming.  I'll be happy to answer questions, and bring suggestions and help to your winsock projects as well.  If you'd like me to write on other winsock related subjects
   just let me know either by emailing me (see the email address below) or on the <a href="http://www.petesqbsite.com/forum/viewtopic.php?t=745&start=0" target="blank">Official QB Express Article request thread</a> and I'll see what I can do.  Until next time, happy reading, and coding.
</p>

<blockquote>
<b>MystikShadows</b><br>
St&eacute;phane Richard<br>
<a href="mailto:mystikshadows@gmail.com">mystikshadows@gmail.com</a>
</b></p>
</blockquote>


<hr>

<center>Download a copy of this tutorial: <a href="FBWinsockIntro.zip">FBWinsockIntro.zip</a>, or view it on its own: <a href="winsockprogramming.html">winsockprogramming.html</a></center>

</div>








<br><br>









<a name="bounce"></a>

<div id="content">
<h2>We are the Normal and the Bounce Equation</h2>
<h3 class="writer">Written by Relsoft</h3>

<p>Hello, it's been a while since I last wrote something for Pete.&nbsp; The last time I wrote for QBE was an intro into OpenGL.&nbsp; For those who are expecting another 3d tute, sorry, this is  2d. But be sure to understand the concepts here for the algos and equations  presented here could he used in a 3d engine.</p>

<p>"How do I bounce?". I've always seen this question being asked on all the forums I have been to.  Since I've always have something to say on the topic, I decided to make this tute.  This tute has a long time coming.  I envisioned it before I went AWOL from the community after my good friend, <b>DR_D</b>, showed me an awesome 2d demo of a ball colliding and "sticking" to lines that it collided to (see appendix).  I thought this demo could be extended to make a pinball like engine.  So I "searched" the net for the bounce-to-an-arbiraty-line-algorithm but lo and behold, I never thought there isn't a single tutorial covering it, at least in 2d, but most likely, I suck at using google. :*)</p>

<p>So I sat on a table one day and with a pen and a paper drew some vectors and the vectors I want to get. After about 15 minutes(maybe less, but I draw slow) of work, I figured the damn thing out. I was sure of the equations I came to but when I translated it to code, something went wrong.  There are some issues/errors with the direction and after 2 days of trying to figure it out, I gave up and posted my problems here: <a href="http://www.freebasic.net/forum/viewtopic.php?t=3132&start=0">vector secret....</a>  It took like 3 seconds for <b>DJ Peters</b> to figure out what was wrong.  I was using integers instead of singles! The equations were fine, the code was fine, but the coder(me) wasn't.  Then for a double whammy, after I made the equations and the code, figured out the vector math, etc., <b>Blitz</b> and <b>Shadowolf</b>, or was it <b>ShiftLynx</b>?, pointed me to the standard equation o get the reflection vector (see appendix). It felt good knowing that I did the vector math myself without resorting to any ready made equation though. Enough rant. Let's start.</p>

<p>Before actually being able to bounce, we need to have:</p>

<ol>
<b>

<li>A point to line collision system</li><br><br>

<li>A way to calculate a 2d normal of a line segment</li><br><br>

<li>A firm knowledge of vector arithmetic (not really needed that much) Namely the dot product and vector addition</li>

</b>
</ol>

<br>

<h3>I. The Normal</h3>

<p>Number 3 is easy, all you have to do is read this: &lt;<a href="http://rel.betterwebber.com/mytutes/3dtutes/chapter3/chapter3.htm">vector tutorial</a>&gt;. With all the vector brouhaha out of the way, we could now code our 2d normal algo.  A normal to a line is a vector perpendicular to the given line. It means that the normal has a union of 90 degrees to the said line. Ie. Their intersection has a 90 degree angle in it. read the vector tute if you're still getting blanks. :*) Now for every line, their are always 2 normals and what you use depends on where you want to bounce.</p>

<p>Here's the figure:</p>


<center><img src="bounce/2dnormal.jpg" width=283 height=203 border=1></center><br>

<p>The black line is our line segment and the blue line or the red line are 2 normals to the line. Here's the code to calculate the normal:</p>

<blockquote class="code"><pre>private sub get_2dnormal (seg as segment_type, s as integer)

    if s then
        seg.normal.x = -(seg.y2-seg.y1) 'negate to get the other normal
        seg.normal.y = (seg.x2-seg.x1)  'erase negation here if you want the other
                                        'normal
    else
        seg.normal.x = (seg.y2-seg.y1)  'negate to get the other normal
        seg.normal.y = -(seg.x2-seg.x1) 'erase negation here if you want the other
                                        'normal
    end if
    normalize (seg.normal)
end sub</pre></blockquote>

<p><b>"s"</b> as a parameter is a "switch" to give you the option of what normal to use. <b>"seg"</b> is the line segment.</p>


<br><br>


<h3>II. Closest point on line</h3>

<p>To be able to collide a ball to a line segment, we need to have a closest point to a line function and check whether the ball's radius intersects the line. To get the closest point...</p>


<center><img src="bounce/bfig1.jpg" width=228 height=134 border=1></center><br>

<p>Say we have a point <b>P </b>and a line segment defined by<b> AB</b>.&nbsp; We need to find a way to find out the distance of <b>P</b> from the line  defined by <b>AB</b>.&nbsp; AS some of you have already known (from Geometry) that the  closest point on a line is located on a line perpendicular to it.&nbsp; Now the  problem is we know where P is, we know where <b>A</b> and <b>B</b> are be we don't know the perpendicular vector/line that intersects <b>AB</b> which also intersects <b>P</b>.&nbsp; The  answer? The dot product.&nbsp; The dot product returns the Cosine of the angle  between 2 vectors but it also gives us the &quot;projection&quot; or the &quot;length of  projection&quot; of one vector onto another. Now to get the dot product we need  to define a vector from <b>A</b> to <b>P</b> and from <b>A</b> to <b>B</b>.&nbsp; To define a vector from <b>A</b> to <b>P </b>you only have to subtract <b>A</b> from <b>P</b>.</p>

<p>ie.</p>

<center><img src="bounce/bfig2.jpg" width=278 height=281 border=1></center><br>

<blockquote class="code"><pre>v1.x = P.x - A.x
v1.y = P.y - A.y</pre></blockquote>

<p>Doing the same with <b>A</b> and <b>B</b>...</p>

<blockquote class="code"><pre>v2.x = B.x - A.x
v2.y = B.y - A.y</pre></blockquote>

<br>

<p>Now we need to get the projection by using the dot product...</p>


<center><img src="bounce/bfig3.jpg" width=367 height=267 border=1></center><br>

<p>We normalize <b>v2</b> because we need to project <b>v1</b> onto it using the dot product.&nbsp; Projecting <b>v1</b> onto  <b>v2</b> gives  us the component if <b>v1</b> that is parallel to <b>v2</b>. Check the vector tute for  reference. The dot product essentially &quot;drops&quot; a perpendicular from <b>P</b> to a point in <b>AB</b>. What you get as a result is the length of projection.</p>

<p>Just dropping a perpendicular does not necessarily results in <b>P</b> being in the in between the line <b>AB</b>.&nbsp; There are 3 cases.</p>

<br>

<hr>

<h4>Case 1</h4>

<center><img src="bounce/bfig4.jpg" width=384 height=166 border=1></center><br>

<p>This is the first case where the angle is greater than 90 but less than 270 where out dot is negative. How can I be sure that its sign is negative?</p>

<p>Proof:</p>

<blockquote class="letters">
<b><i>Let: R = Radius(length of A to P)<br><br>

cos(angle) = dot(v2,v1)/|v1||v2|<br><br>

cos(angle) = A/H or X/R<br><br>

sign of X is negative when 90&lt;angle&lt;270 since point P would be in Quadrants II or III.<br><br>

cos(angle) = -/+ = (-)   :*)
</i></b>
</blockquote>


<p>For this case we return <b>A</b> since <b>P</b> does not have a  projection within the line. How do we check for this case? Easy check if the dot  is less than 0. :*)</p>

<p>Proof(clue):</p>

<blockquote class="letters"><b><i>cos(90) = 0; figure it out yet. :*)</i></b></blockquote>

<p><b>If dot<=0 Then Return a</b></p>


<br>

<hr>

<h4>Case 2</h4>

<center><img src="bounce/bfig5.jpg" width=339 height=196 border=1></center><br>

<p>In this case the projection of P is still outside the boundaries of <b>A</b> and <b>B</b> but it's also located on the right of B so we return  B. How do we check?&nbsp; We check if the length of projection&nbsp; is greater than the distance from <b>A</b> to <b>B</b>. :*)</p>

<p><b>If dot>=distance(a,b) Then Return b</b></p>

<p>The distance formula is just the magnitude of the vector from A to B (v2)</p>

<blockquote class="code"><pre>private function get_magnitude ( v as vector2d ) as single

    return sqr( ( v.x * v.x ) + ( v.y * v.y ) )

end function</pre></blockquote>

<br>

<p>Now for the generic case...</p>

<br>

<hr>

<h4>Case 3</h4>

<center><img src="bounce/bfig6.jpg" width=411 height=265 border=1></center><br>

<p>In this case the projection is within the lines boundary so we return an arbitrary vector that is also the same vector as v2 but scaled according to the projection length. :*)</p>

<blockquote class="code"><pre>vreturn.x = a.x + (v2.x * t)
vreturn.y = a.y + (v2.y * t)
return vreturn</pre></blockquote>

<p>The whole function is in the sources called</p>

<blockquote class="code"><pre>function closest_point_on_line(a as vector2d, b as vector2d, p as vector2d) as vector2d

:

:
end function</pre></blockquote>


<br>
<br>

<h3>III. The bounce equation</h3>

<center><img src="bounce/bounce1.jpg" width=413 height=280 border=1></center><br>


<p>Given a ball with a direction vector <b>a</b> colliding on a plane with a normal b, how do we get vector <b>c</b>? (the bounce  vector is <b>c</b>) Answer: basic vector arithmetic.&nbsp; All the vectors I'll be discussing here are called &quot;free&quot; vectors. Free vectors are vectors that could be placed anywhere you want. :*)</p>

<center><img src="bounce/bounce2.jpg" width=413 height=280 border=1></center><br>

<p>The above picture is the same as the first one but with another vector <b>d</b>. vector <b>d</b> is the negative of vector <b>a</b>. Hence it points in the direction opposite vector <b>a</b>. Magnitude of <b>d</b> is also equal to <b>a</b>.</p>

<p>Important!!! In the following figure, <b>our d vector above becomes the b vector below</b> and not the normal b.</p>

<center><img src="bounce/bounce3.jpg" width=405 height=208 border=1></center><br>

<p>Since we substituted the letter <b>b</b> instead of <b>d</b>, <b>b</b> is the negative of <b>a</b> in this case.</p>

<p>Now I subtract a from <b>b [b + (-a)]</b> to get a vector pointing opposite a but twice the length since mag(a) = mag(b). We'll call it <font color="#008080"><b>impact</b></font> vector . I drop a perpendicular from impact to the normal to get the length of the projection which is:</p>

<blockquote class="letters"><b>leng = (impact dot normal) / Magnitude(normal)</b></blockquote>

<p>We multiply this length to our original normal to get the new vector we'll call it <font color="#006688"><b>impulse</b></font>.</p>

<center><img src="bounce/bounce4.jpg" width=731 height=194 border=1></center><br>

<p>Now that we have the <b><font color="#006688">impulse</font></b> vector, all we need to do is to add it to our original vector <b>a</b> to get <b>c</b>.</p>

<p>See it's sooo easy!</p>

<br> 

<hr>

<br>


<p><b>Here's the demo of this tutorial.</b> :*)</p>

<blockquote>
<ul>
<li><a href="bounce/bounceline.bas">bounceline.bas</a></li><br>
<li><a href="bounce/bounceline.exe">bounceline.exe</a></li>
</ul>
</blockquote>
 

<br>

<hr>

<br> 


<p><b>Special thanks to:</b></p>

<br>

<p>Dr. D</p>
<p>DJ Peters</p>
<p>Blitz</p>
<p>Shadowwolf or Shiftlynx</p>


<br><hr><br>

 
<p>Richard Eric M. Lope BSN RN</p>

<p>Relsoft 2006</p>

<p><a href="http://rel.betterwebber.com">http://rel.betterwebber.com</a></p>


<br> 

 

<h3>Appendix</h3>

<h4>a. Dr. D's Line Collision Demo</h4>

<blockquote>
<ul>
<li><a href="bounce/drbounce.bas">drbounce.bas</a></li><br>
<li><a href="drbounce.exe">drbounce.exe</a>
</ul>
</blockquote>

<br><hr><br>

<h4>b. The general equation for the reflection vector is:</h4>

<blockquote class="letters"><b>-2*(V dot N)*N + V</b></blockquote>

<br>

<p>Here's a demo showing <b>gravity</b> and <b>simplified bouncing</b> using the general reflection vector equation.  By Dr. D and Relsoft.</p>

<blockquote>
<ul><li><a href="bounce/dr_grav.bas">dr_grav.bas</a>
</blockquote>

<br><hr><br>


<h4>c. As an exercise, why not make multiple balls bouncing on the screen?</h4>

<p>Bouncing from ball to ball is almost the same as our equation. Here's a demo of it in QB that I wrote: <a href="http://faq.qbasicnews.com/?blast=BallToBallCollision">Ball to ball collision and response</a>. It is based on this <a href="http://freespace.virgin.net/hugo.elias/models/m_snokr.htm">tutorial</a> by Hugo Elias.<p>
<p>Hah! I ported the ball to ball demo to FB.</p>

<blockquote>
<ul>
<li><a href="bounce/ball2ball.bas">ball2ball.bas</a></li><br>
<li><a href="bounce/ball2ball.exe">ball2ball.exe</a></li>
</ul>
</blockquote>


<br><hr><br>

<h4>d. Bouncing demonstration <i>inside</i> a rotating polygon</h4>

<p>Demo of 2D bouncing inside rotating polygon, written by Relsoft.  Use the mouse to point inside the rotating poly.</p>

<blockquote>
<ul><li><a href="bounce/inside_poly.bas">inside_poly.bas</a>
</blockquote>



<br>

<hr>

<center>Download a copy of this tutorial (and all demo programs): <a href="bounce.zip">bounce.zip</a></center>

</div>










<br><br>




<a name="final_word"></a>
<div id="content">
<h2>Final Word</h2>

<p>Sure, it came out late again, but I think QB Express #21 turned out to be a pretty fantastic issue!  I hope you enjoyed it.  I know I sure did.</p>

<p>The deadline for the next issue is: <b>August 15th, 2006</b></p>

<p>Please get all of your submissions in by then.  I'm hoping that QB Express will be back on track and out of this slump we've had as of late...we'll see what my schedule is like a month from now.  I'll continue working for Actual Reality Pictures and living in Los Angeles for the first three weeks of August.  I will be driving back across the country starting August 18th, and my senior year at Ithaca College begins on August 30th, so it's going to be a busy month.  But I am determined to get QB Express #22 published before August is over -- and preferably BEFORE the 18th!</p>

<p>As always, you can send them to: <a href="mailto:pberg1@gmail.com">pberg1@gmail.com</a>.</p>

<p>But more importantly, make sure that you <a href="http://www.petesqbsite.com/sections/qlympics/qlympics_nominations_2006.html">nominate your choices for the Qlympics 2006</a>!  It is up to YOU, the members of the QB/FB community, to decide which programs and people will get recognized for being the best of the best, and every vote matters!</p>

<p>Until next time...<b>END</b>.</p>
<p id="signature">-Pete</p>
</div>




<br>



<center>
Copyright &copy; Pete Berg and contributors, 2006. All rights reserverd.<br>
This design is based loosely on <a href="http://www.oswd.org/design/1454/stndard_beaer/">St.ndard Bea.er</a> by Altherac.

<br><br>

<!-- QB Top 50 -->
<a href="http://www.qbtop50.com/"><img border="0" src="http://www.qbtop50.com/tracker.php?do=in&id=15" alt="QB Top 50 - The best QBasic and QuickBasic Sites" /></a>
<!-- /QB Top 50 -->
</center>

</body>

</html>
