DarkBASIC Professional Tutorials We proudly present our first batch of tutorials for DarkBASIC. At the start of we decided to open source DarkBasic Professional and give it to the Syntax formatting. Online help. Showcase examples. Tutorials. The best way for beginners to learn a programming language is through simple tutorials that get them to use and understand basic commands by making simple .
|Published (Last):||17 January 2004|
|PDF File Size:||7.24 Mb|
|ePub File Size:||14.98 Mb|
|Price:||Free* [*Free Regsitration Required]|
This is the first part of our tutorial series. The first line is a comment. This allows us to leave comments in our code for clarity.
The second line tells the computer to print something to the screen. The final line, wait tutorialsstells the computer to not continue until a key processional pressed on the keyboard. What kind of games programming course would we be if that was all you did with your first program? First, download this graphic:. So what exactly does this code do?
Well, sync on allows us to manually refresh the screen. This is very important when programming games. The next command, hide mousetells the computer not to show the mouse. Sync rate 60 tells the computer at what frame rate we should be refreshing the screen.
Now we need to load in the player image. Place the image in a folder and save your program into this same folder. The assets you use and the program need to be in the same place on your computer so they can find profdssional other. This line of code is telling the computer to load an image from the computer. These are going to tell the computer the coordinates on the screen to draw our player sprite.
Types of Projects
This line of code is where we actually draw the image to darbasic screen. The sprite command draws an image to the screen at the coordinates we specify.
Now to the meat of the game, the game loop. The game loop is where our game starts to happen.
What is this doing? Well, do signifies the beginning of a loop. It constantly repeats everything inside the loop over and over again starting from top to bottom. Try running the program now and see what it does.
You should see our player image drawn onto the top left corner of the screen.
DarkBASIC Programming – Wikibooks, open books for an open world
Kinda boring still, right? Place these lines of code inbetween the sprite command and the sync command. What does it do exactly? Well, the if statements are checking to see if the argument after it is true or not.
Try running the program now. Using the arrow keys you can move our player around the screen! Remember the sync rate 60 command we used earlier?
Go ahead and try changing that to 0 or some other number and see what effect it has on the program. October 15, Posted by gamemakingtutorials Part 1 – Hello World! DarkBASIC Professional is a game development language that simplifies the process so prospective game tutorisls, even absolute beginners to the world of coding, can start making their own games. October 15, Posted by gamemakingtutorials About Introduction Leave a comment.
By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: