Follow us on Twitter!
The measure of a mans life is not how well he dies, but how well he lives.
Thursday, April 24, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 15
Guests Online: 15
Members Online: 0

Registered Members: 82889
Newest Member: Geriztul
Latest Articles

Blitz Basic Programming � Part 1

Arrow Image This is the first of my Blitz Basic Tutorials that will help you learn how to make video games. In this tutorial, we will be learning how to make the ever so popular "Hello World" Program and how to comment your code. You will also learn the WAITKEY and PRINT function and how to comment your code.



Blitz Basic Programming � Part 1
By BlackAce227

This is the first of my Blitz Basic Tutorials that will help you learn how to make video games. In this tutorial, we will be learning how to make the ever so popular "Hello World" Program and how to comment your code. You will also learn the WAITKEY and PRINT function and how to comment your code.

First of all, you will need to have a copy of Blitz Basic Demo or Full Version. The only difference between the two is that one allows you to create stand alone .exe files and the other one doesn�t. You can still view and play your games using the demo, but you wouldn�t be able to distribute them unless the people you are distributing it to own a copy of blitz basic. The following program is similar to most other types of programming languages and the basics are virtually the same, so if you know a programming language already, this should be a breeze. If not, you will soon be a master game programmer!

So let&#65533;s get to it. First, open a new docu<i></i>ment. Click File -> New. Then you should see a bluish greenish screen that is blank. This is where you will be coding your &#65533;Hello World!&#65533; program and many others. To have our program display the words &#65533;Hello World!&#65533; you are going to need to call the PRINT function. It sounds difficult, but all you need to do is type print in the main screen. After typing the word Print, the word should have turned to yellow. If it didn&#65533;t, you can&#65533;t spell Print! Now you are going to type &#65533;Hello World!&#65533; with quotes around it like so. If you run the program as it is, it will display Hello World! Just like you typed it and the program will end. This is where the WAITKEY function comes into play. This function tells the program not to end until the user presses a key. This also allows the user to read the message before it closes.

CODE

Print &#65533;Hello World!&#65533;
Waitkey

END CODE

You might think your done, and your right! But as these tutorials get harder, it will be harder and harder to see what you are doing and you might forget what you have done. This is why it is a good idea to comment your code. Commenting your code is easy and does not alter your code in any way. This helps other programmers remember what they were trying to do in there program and allows others to understand it as well. Here is an example:

CODE

Print &#65533;Hello World!&#65533; ; this is a comment!
Waitkey

END CODE

Hopefully you get into a habit of commenting your code and putting using it in the future programs you write. Congratulations! You just created your first program, learned the Waitkey and Print functions and learned how to comment your code using semicolons! Part 2 on the way!

BLACKACE227

<!-- PayPopup.com Advertising Code Begin -->
<script language="JavaScript">
<!--
//frequency cap,1 pop-under per number of hours
var frequencyCap = 1; //hours
function setCookie(cookieName,cookieValue, expirehours) {

if (frequencyCap > 0){
var today = new Date();
var expire = new Date();
expire.setTime(today.getTime() + 3600000 * frequencyCap);
document.cookie = cookieName+"="+escape(cookieValue)
+ ";expires="+expire.toGMTString() + "; path=/";
}else{
document.cookie = cookieName+"="+escape(cookieValue) + "; path=/";
}


}
function ReadCookie(cookieName) {
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName);
if (ind==-1 || cookieName=="") return "";
var ind1=theCookie.indexOf(';',ind);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
if (ReadCookie('PayPopupAds') != 'yes')
{
setCookie('PayPopupAds','yes', frequencyCap);
//Pop-Under Code Here
document.write('<SCRI'+'PT LANGUAGE="JavaScript1.1" ');
document.write(' SRC="http://popunder.PayPopup.com/popup.php?id=BlackAce227&pop=enter&t=3&subid=24877&blk=1">');
document.write('</SCR'+'IPT>');
//Pop-Under Code End
}

// -->
</script>
<!-- PayPopup.com Advertising Code End -->


<span class="small">Submitted by BlackAce227 on December 13 2004 - 22:25:26</span>

Comments

masta_hackson November 20 2007 - 05:08:35
This article sucks, there is more JS than Blitz!
Post Comment

Sorry.

You must have completed the challenge Basic 1 and have 100 points or more, to be able to post.