Blitz Basic / Blitz3D – Tutorials

I have a number of Blitz3D tutorial videos on youtube at the following address:
http://www.youtube.com/amcadam26

Beginners guide Series

These cover building a simple space invaders game from scratch, covering all the functions needed to build that type of game.

Part 1: Writing your first Blitz Program “Hello World” – http://youtu.be/xWRpRgv3lbw

Part 2: Introduction to loops and drawing basic shapes – http://youtu.be/5h4SmjCT-oQ

Part 3: Loading an image and moving it around the screen – http://youtu.be/2a6GFoHOvc0

Part 4: Introduces types and handles keyboard input – http://youtu.be/Q7lO6bqoEnc

Part 5: Add enemies to the game and collision detection – http://youtu.be/cno-A6BWRtk

Part 6: Add enemy fire to the game and looks at random numbers – http://youtu.be/evlEQDjbjTo

Part 7: Adds a score, enemy movement and exiting the game on game over – http://youtu.be/7IR7APxlyw0

Part 8: Add sound effects and music – http://youtu.be/a1nhEoIf0po

Part 9: Adds a highscore and basic file access – http://youtu.be/uyjl1oX0hDQ

Part 10: Add levels – http://youtu.be/1e6bP7yhjlM

Blitz Coding: A series of videos, each one looks at a different coding technique in Blitz basic.

Blitz coding: Animated Images – http://youtu.be/p5fQ6v1FwDQ

Blitz Coding: Custom Mouse Cursor – http://youtu.be/z9xglkifW8U

Blitz Coding: Star fields – http://youtu.be/XVz7nu7Y1Fg

Blitz Coding: Particles – http://youtu.be/68zVuVEsKwM

Blitz Coding: Simple Gravity – http://youtu.be/Gxuag5Y5IOc

Blitz Coding: Health Bars – http://youtu.be/gFZBZ_CFqm4

Blitz Coding: Parallax Scrolling – http://youtu.be/3VqwJPBrbiU

I’ve also started a set of 3D tutorials, which will be working towards building a simple First Person Shooter.

I’m always open for suggestions on where to go next with tutorials so please comment to let me know your thoughts…

  1. May 24, 2008 at 1:43 am

    Hey, just dropping by to find out when new vidtuts are going to come out. I am yearning for more. Please upload some more.

  2. ricky
    July 12, 2008 at 9:28 am

    Just checking out some of your prior games, i like em 🙂 also where do you get your artwork? i’m not an artist and i’ve been having trouble finding a reliable online art source. any places you know off? anyways sweet job on the games man

  3. July 22, 2008 at 1:58 pm

    hey man your tutorials is the best you help me a lot in blitz3D

    thank you!

  4. Labsdj
    August 5, 2008 at 2:10 pm

    Tks for your lessons is the best of lessons of Blitz3d i learn very well this programming kit of engine Blitz3d its the best way to now how i make a simple game with minus resources with a simple computer minus requesits. tks and good work for you and continued the lessons for begginers like me to enter in programming games area

  5. September 12, 2008 at 4:01 am

    I would just like to thank you personally for your video tutorials in Blitz. It has been a rather painless process migrating to Blitz for my game programming since I develop small software apps (for personal use) in VB .NET, but your tutorials have made my dive into games programming that whole lot easier. Many thanks, great work

    I am looking forward to more video tutorials from you. I know you prolly dont respond much to requests because you probably get so many, but im looking for a good tutorial on tile based scrolling as I am planning to make a 2D rpg, but have very little experience with programming tile scrollers / maps.

    Thank you once again, excellent work 10/10

  6. Br3nd0n
    October 30, 2008 at 12:26 am

    Plzz reupload the files— 😦 sorry for my bad inglish

  7. andymcadam
    October 30, 2008 at 4:08 pm

    I’m sorry but what do you mean by “reupload the files?” the youtube clips are all still there and the source code files are linked in from the description pane.

  8. acman22
    January 20, 2009 at 12:45 am

    I watched your videos on the space invaders games they were very helpful. but now i’ve been trying to make it get harder every level. I’ve tryed adding health to the aliens that get higher as you go and i’ve tryed making them drop more bombs but i cant seem to do it without bugs.help?

  9. artgames
    April 20, 2009 at 12:27 am

    I love you Tutorials you are very much the inspiration behind my video games without the tuts I would not know what I do.
    now I am making a game where I want an enemy to shoot at a player and mabey move could you do a tutorial on Artificial Intelligence?

    • andymcadam
      July 23, 2010 at 2:13 pm

      I’m working on a design for a new game now that will need some AI, so I’ll be writing some stuff about what I think of soon. It’s most likely going to be based on waiting random amoutns of tiem, then taking actions based on where the player is in relation to the enemy and what type of enemy it is. Might need to work out how to do some pathfinding too, for enemies to figure out routes to move to places aroudn the map.

  10. Indy
    May 11, 2009 at 10:17 pm

    Hi Andy,

    I’ve got to say that you’re tutorials are really good. You’ve got the balance just right. I was using BB about 2 years ago but gave up as I started to loose interest. I’ve always wanted to do my own 2D shootem-up game but just couldn’t see it through. I was wondering whether you would consider running a tutorial on writing a 2D shooter. I promise I’ll finish it this time if you help me out 😉

    BTW, I see you’re based in Huntingdon, Cambs. Well I’m in Herts so we’re practically neighbours.

    Anyway, hope you can find the time to squeeze in my request.

    • andymcadam
      July 23, 2010 at 2:12 pm

      what type of 2d shooter? do you mean like megaman or like geometry wars?

      • Indy
        July 16, 2014 at 4:15 pm

        Hi

        Vertical shooter. A bit like Xenon 2 (my favourite Amiga game)

        Thanks

  11. Silas Peck
    May 25, 2009 at 7:08 pm

    Hi.
    I’ve just finished the brilliant blitz basic tutorials that you have posted on youtube, but I’m having some problems…
    I can’t seem to get it to go onto the next level, the game just finishes and my ship is left on it’s own.
    Can I somehow send you the code to check?
    Thanks
    Silas

    • andymcadam
      July 23, 2010 at 2:11 pm

      you can send me the code at andymcadam@hotmail.com

      oh, I just saw how old your post is, well if your still interested I’ll take a look.

  12. August 4, 2009 at 6:57 pm

    Hey interested in videos for blitz3D. Ill stop by to check on it!

  13. August 26, 2009 at 4:47 pm

    Hey wasup, great video tutorials man. Keep them coming.
    I think a great tutorial would be for inventory and saving games in the last current position.
    Thanks for the videos man. They really helped me understand alot.

    • Ash
      September 27, 2009 at 4:39 am

      The source Code Files are unavailable for download, Could you please re-upload them?

      • andymcadam
        July 23, 2010 at 2:10 pm

        done, check the descriptions for updated links.

  14. yosimekupelet
    March 3, 2010 at 7:02 pm

    I love your tuts but i have a problem that i have been dealing with for weeks, i use googlesketchup for my 3D graphics and i can’t seem to find i plugin that exports the SKP file in to a B3D file if anyone could pliz help me i’m desperet and i’v checked out the download link for the SKP to B3D plugin in the blitz official forum and the file was taken down 2 years ago. so if any of you know what to do plizplizplizppliz help.

  15. hank
    June 19, 2010 at 3:41 pm

    Hello,
    I just recently started watching your tutorials, and I must say, they are amazing. The platform game and tile map editor series is just what I had been looking for. Please get the source code fixed soon!

    Thanks for all the videos!

    • andymcadam
      July 23, 2010 at 2:10 pm

      source is now fixed, get the latest code for the platform engine here:
      http://db.tt/a3FdE0

      also keep checking the channel for updates, I’ve been off the scene for a while, but I’m coming back!

  16. Derek S.
    June 26, 2010 at 1:57 am

    I’m trying to make my first 3D game, but I can’t get the DeleD plugin for b3d exports to work. Any advice there?

    • andymcadam
      July 23, 2010 at 2:07 pm

      you should just need to extract the plugin zip into the plugins folder in the Deled program folder. I’m planning on writing a short guide to deled soon and will cover this.

      I’ve also noticed Deled is now free, which is awesome!!!

  17. Jeremy
    July 7, 2010 at 6:39 am

    Hey man, you have some great tutorials, but I really want the source code for your platform tile mapper, cuz the links are down, and I cant copy from the video, cuz you dont show everything.

    • andymcadam
      July 23, 2010 at 2:09 pm

      I’ve put the download link to the latest version on the latest video it’s:
      http://db.tt/a3FdE0

      I’m doing an update on it soon so keep checking my blog and youtube channel.

  18. Justin
    July 9, 2010 at 6:49 am

    I’ve been working on a project, what I’m trying to do is hold a mouse pointer over an object and select it, this is using the basic not the 3d commands. I’ve tried ImagesCollide with Mousehit(1) but it doesn’t seem to be registering. If you have any helpful tips or tricks on this it would be greatly appreciated.

  19. George
    October 31, 2010 at 4:24 pm

    Hi,
    I really like your tutorials!
    They helped me a lot.
    I believe they helped to more people than just me(by looking at the
    comments at youtube)
    I’d like to try and make an RPG(and gain some valuable experience by the way), but I have no idea how to make one
    I ask if you can make a video, or two, on this topic. They would really
    help me.
    Thank you so much.

    Sorry for my English.(not perfect yet…)

    Thanks!

  20. Ray
    March 7, 2011 at 1:35 am

    Hello i realy loved your tutoriel very well explained..great job
    was trying to complete your space invader game, by adding a bonus ennemie…for some reason i tried with different codes and i can’t get him to shoot can u please help no rush..thank’s in advence…

    here is the code…

    ; set graphic mode

    Graphics 640,480,32,2
    ;create timer

    timer = CreateTimer (30)

    ;load high score
    If ReadFile (“hscore”) = 0 Then
    hscore = 100
    Else
    file_hscore = ReadFile (“hscore”)
    hscore = ReadInt (file_hscore)
    CloseFile (file_hscore)
    EndIf

    ; load images for game

    AutoMidHandle True

    img_vaisseau = LoadImage (“vaisseau.png”)
    img_bullet = LoadImage(“bullet.png”)
    img_ennemie = LoadImage(“ennemie.png”)
    img_bullet2 = LoadImage(“bullet2.png”)
    img_bonus = LoadImage (“bonus.png”)
    img_bullet4 = LoadImage (“bullet4.png”)

    ;load sound for game
    snd_missilfire = LoadSound (“missilfire.wav”)
    snd_explosion = LoadSound (“explosion.wav”)
    snd_bmbenemi = LoadSound (“bmbenemi.wav”)
    snd_explosion1 = LoadSound (“explosion1.wav”)
    snd_music = LoadSound (“music.wav”)

    ;bullet type missil

    Type bullet
    Field x
    Field y
    End Type

    ;bombes des ennemies
    Type bomb
    Field x
    Field y
    End Type

    ;Bonus ***********************
    Type bonus
    Field x
    Field y
    End Type
    ;fin ajout bonus **************

    Type bullet4
    Field x
    Field y
    End Type

    ; ennemie type
    Type ennemie
    Field x
    Field y
    End Type

    ;set coords for players
    x=320
    y=400

    ;set coordoner pour bonus *********
    G = 10
    H = 30

    ; setlives
    lives = 3

    ; set level of start
    level = 0

    ;set number of ennemies at start
    numennemi = 0

    ;set ennemie speed
    ;amx veux dire allien ennemie on x coordinate
    aspeed = 4
    amx = aspeed
    chdir = False

    ;SCORE
    score = 0

    ;set drawing buffer to back buffer

    SetBuffer BackBuffer()

    ;tounne du jeux
    PlaySound (snd_music)

    ;start main loop

    While Not KeyDown(1)

    ;generate new ennemie after level is done va avec le endif suivant les 2 next
    If numennemi = 0 Then

    ;incrementation des level …exemple..lev1,2,3 ect
    level = level +1

    ;generate ennemie for the first time if u need more gor level chk upper code line
    For z = 1 To 8
    For w = 1 To 3
    a.ennemie = New ennemie
    a\x = 10 + 50 * z
    a\y = 10 + 40 * w
    Next
    Next
    EndIf

    ;clear screen
    Cls
    DrawImage img_vaisseau,x,y

    ;update player position

    If KeyDown(203) Then x=x – 10
    If KeyDown(205) Then x=x + 10
    If x > 625 Then x=625
    If x < 15 Then x = 15

    ;fireing bullets

    If KeyHit(57) Then
    PlaySound (snd_missilfire)
    b.bullet = New bullet
    b\x = x
    b\y = y – 5
    EndIf

    ;update bullets and draw them

    For b.bullet = Each bullet

    b\y = b\y – 5
    DrawImage img_bullet,b\x ,b\y
    If b\y 620 Then chdir = True
    If a\x hscore Then hscore = score
    Exit
    EndIf
    Next
    Next

    ;update And draw bombes
    For bombes.bomb = Each bomb
    bombes\y = bombes\y + 4
    DrawImage img_bullet2,bombes\x,bombes\y
    If ImagesCollide(img_bullet2,bombes\x,bombes\y,0, img_vaisseau,x,y,0) Then
    PlaySound (snd_explosion1)
    lives = lives – 1
    Delete bombes
    ElseIf bombes\y > 500 Then
    Delete bombes
    EndIf
    Next

    ;endgame screen
    If lives = 0 Then
    file_hscore = WriteFile (“hscore”)
    WriteInt (file_hscore, hscore)
    CloseFile file_hscore
    Text 260, 250, “GAME OVER”
    Text 200,300, “PAS FACILE D’ETRE LOOSER…”
    Flip
    Delay 4000
    End
    EndIf

    ;ajout code ********************** entre 2 ************************

    If level = 1 Then
    DrawImage img_bonus ,g,h
    g = g + 3
    h = h + 3
    If g > 500 Then g = 0
    If g < 30 Then g = 30
    If h 100 Then h = 100
    EndIf

    If level = 3 Then
    DrawImage img_bonus ,g,h
    g = g + 3
    h = h + 3
    If g > 500 Then g = 0
    If g < 30 Then g = 30
    If h 100 Then h = 100
    EndIf
    ;fin ajout suplementaire *********************

    ;fin ajout suplementaire *********************

    For bombes.bomb = Each bomb
    bombes\y = bombes\y + 4
    DrawImage img_bullet4,bombes\x,bombes\y
    If ImagesCollide(img_bullet4,bombes\x,bombes\y,0, img_vaisseau,x,y,0) Then
    PlaySound (snd_explosion1)
    lives = lives – 1
    Delete bombes
    ElseIf bombes\y > 500 Then
    Delete bombes
    EndIf
    Next

    ;ajout de code ******************** entre 2 **********************

    ;draw lives
    Text 50,450,”VIE” + lives

    ;draw score
    Text 500,450, “SCORE:” + score

    ;draw level number
    Text 320,460, “LEVEL :” + level,1,1

    ;draw highscore
    Text 320,30,”HIGHSCORE :” + hscore ,1,1

    ; wait game timmer
    WaitTimer (timer)

    ;flip drawing screen onto monitor
    Flip

    ; end main loop
    Wend

  21. July 28, 2011 at 5:54 am

    hey man. great job with the blitz tutorials.. eating them up.. i have a request though.. could u make a simple tutorial for me?.. or at lest explain it in detail.. i want to make a 2d shooter birds eye view.. but instead of just being about to shoot left right up and down.. i want to be able to shoot 360.. i want it so when i left click, the bullet path goes to where the mouse pointer was when it was clicked. i don’t have the math skills to figure this one out.. could you please help?

    thanks man!

    • andymcadam
      September 23, 2011 at 12:05 pm

      Hi, thanks for the comments, I think I sent you some source code for 360 shooting, I may make a video on ti soon though as it seem to be something people want to learn.

  22. Daniel Lincoln
    March 1, 2012 at 1:21 am

    Hey, I was wondering if I could get some help with your level editing code. I was trying to start from the most basic version so I can reverse engineer it and figure out what it is that you did in each area. However since the download for the original file doesn’t work I basically had to copy it by hand from the video, all of it works… except for laying down tiles (a fairly important part of a piece of code centered around laying down tiles.) could you provide the code for the original, very basic map editor?

    Thank you.

  23. Ian
    March 29, 2013 at 11:45 am

    I’m always late to a party. I picked up BlitzPlus a couple of weeks ago and have been messing around with some short demos just to get use to doing different things. I just wanted to say well done on the tutorials, they cover a good range of techniques like collision detection, angles and movement, tiles etc so I’ll definately be knocking up some demos to get use to that. I’m a bit of an impatient coder so all my test demos cover areas of a game I have in my head so I can cook up the game later. Hopefully you might post an update on generally what you’re up to etc would be good, and thanks for taking the time over the years to do this.

  24. Joe
    May 23, 2013 at 6:27 am

    Hi Andy, thank you for your videos and tutorials! Awesome work!
    I’m trying to do the little shooting game off tut 4 (blitz 3D) but when I try to run the program, it tells me Type “b” not found.
    Does anyone here have any idea of what this means?
    I have written my code just like Andy’s, and have checked it again and again..
    I can’t seem to find an answer for this anywhere.
    Thank you guys.

  25. jamesL
    July 20, 2013 at 12:39 pm

    I’ve just discovered your Blitz Basic videos on youtube.
    They’re awesome !

    currently watching
    Blitz Basic Programming for Beginners – Part 5

    I love that you make the fonts large so that it’s easy to read the code and also that you explain things so well

    thanks for the videos !

  26. Rob
    May 31, 2014 at 2:18 am

    Ok, so your space invaders series is great, but I want to know how to drop the aliens down closer to the player when they hit the side. I have it doing this, but the right aliens keep dropping lower than the rest, sort of like the bug you had at first with the side to side aliens. I just can’t figure it out, any help would be appreciate. Thanks!

  27. jason
    October 19, 2015 at 8:31 pm

    Hi I have watched alot of your YouTube videos on blitz basic and learned a great deal from them. Did you ever use blitz basic on the amiga?
    If so have you ever thought of doing a video on the amiga version of blitz basic?
    I still use my amiga 1200 and winaue. There aren’t any videos on coding in blitz basic on the amiga and there aren’t many tutorials either.

    • Andy McAdam
      October 23, 2015 at 2:38 pm

      Hi, I did try Blitz on the Amiga, but mostly used AMOS. I won’t be doing any videos on Amiga Blitz as I don’t know it well enough, but also I don’t think there are many people out there who use it and will watch videos on it if I did do them. It was good for the time, but I have to move with the times, which is why my newer videos are on Android programming.

  28. Mike
    October 9, 2016 at 1:00 am

    Thank you for keeping these online (and on YT)!

    I’ve been trying to get into game programming for some time now, but have found the “usual languages” to be impenetrable for me (at least for now). I remembered having bought BlitzBasic (the original one) some years back and thought “well, I’ll be that would be a perfectly good way to get accustom to it.” I remember learning pretty well the last time I used it.

    Looking on YouTube, I figured I wouldn’t find much of anything. Then I found your videos, and then this blog and am quite excited! So, thank you again for keeping this resource online.. Just never know when someone’s gonna come along heheh.

    Since Blitz3D has gone free, and I notice you using that in your tutorials, I’m using that as well. Never was quite sure about the differences between the versions, so I figured it’s best to use whatever you are.

    Thanks again!

    • Andy McAdam
      October 10, 2016 at 9:19 am

      Hi Mike,
      I’m really glad you like the videos and tutorial blog posts. They took a long time for me to do, so I’m planning to leave them online for as long as Blitz is available and working withe the current version of windows.
      Thanks for the comment, it’s great when new programmers find these tutorials useful.

  29. Gloomshroud
    March 3, 2017 at 9:04 pm

    Here it is, 2017, and I’m returning to my roots of 2002. I started with BASIC and am having a hard time getting back into the swing of it. I am following your tutorials and loving it. I understand what you’re teaching. Very effective and well done! BASIC in 2017, I love it. You’re a hero for making these available still!

    • Andy McAdam
      March 10, 2017 at 11:59 am

      thanks, good to see people are still reading these, it all still works on windows 10 so why not?! 🙂

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: