Author Topic: Blitz2D, first program HELP!  (Read 27110 times)

0 Members and 1 Guest are viewing this topic.

Offline billy bob

  • C= 64
  • **
  • Posts: 36
  • Karma: 10
    • View Profile
Blitz2D, first program HELP!
« on: July 04, 2009 »
Hello!

I have encountered a problem in my game >:( :'(!
(with blitz 2D)

The aliens are supposed to come back when I shoot them with bullets, but it isn't working, they just don't come back (and the levels aren't going up either).

Does anyone know what I have done wrong?

And as a bonus does anyone know how to make borders so you can't go off screen because you can cheat.......

(The sound and images and DATs are correct because they work.)

Here is the game code so far:


Code: [Select]
;Graphics
Graphics 640,480,16,2

;Timer.
timer = CreateTimer(30)

;load highscore
If ReadFile("score.dat") = 0 Then
highscore = 100
Else
file_score = ReadFile("score.dat")
highscore = ReadInt(file_score)
CloseFile (file_score)
EndIf

;Images.
AutoMidHandle True
img_alien = LoadImage("alien.png")
img_smile = LoadImage("smile.png")
img_bullet = LoadImage("bullet.png")
img_bomb = LoadImage("bomb.png")

;Load sounds.
snd_Bulletsound = LoadSound("Bulletsound.wav")
snd_Loselife = LoadSound("Loselife.wav")
snd_Bombsound = LoadSound("Bombsound.wav")
snd_Aliendeath = LoadSound("Aliendeath.wav")

;Bullet.
Type bullet
Field x
Field y
End Type

x= 300
y= 400

;Bomb.
Type bomb
Field x
Field y
End Type

;Alien.
Type alien
Field x
Field y
End Type

;Lives.
Lives = 3

;Level to start on
level = 0

;set number of aliens at start.
numaliens = 0

;Set alien speed.
aspeed = 2
amx = aspeed
chdir = False

;Reset score.
score = 0

;Buffers.
SetBuffer BackBuffer()


While Not KeyDown(1)

If numaliens = 0 Then

level = level + 1
;Alien number.
For z = 1 To 9
For w = 1 To 2
a.alien = New alien
a\x = 100 + 50*z
a\y = -70 + 120*w
Next
Next
End If

Cls

DrawImage img_smile,x,y

;Keys.
If KeyDown(200) Then y = y - 6
If KeyDown(208) Then y = y + 6
If KeyDown(203) Then x = x - 6
If KeyDown(205) Then x = x + 6
If KeyHit (207) Then End
If KeyDown(2) Then Flip
If KeyDown(3) Then Flip
If KeyDown(4) Then Flip
If KeyDown(5) Then Flip
If KeyDown(6) Then Flip
If KeyDown(7) Then Flip
If KeyDown(8.) Then Flip (ignore the dot after the eight it was only there to disable a smiley.)
If KeyDown(9) Then Flip
If KeyDown(10) Then Flip
If KeyDown(11) Then Flip
If KeyDown(17) Then y = y - 6
If KeyDown(30) Then x = x - 6
If KeyDown(31) Then y = y + 6
If KeyDown(32) Then x = x + 6
If KeyHit (57) Then

;About bullets
PlaySound (snd_Bulletsound)
b.bullet = New bullet
b\x = x
b\y = y - 5
EndIf

;More about bullets
For b.bullet = Each bullet
b\y = b\y - 5
DrawImage img_bullet,b\x,b\y
If b\y < 0 Then Delete b
Next

;Extra alien movement.
If chdir = True Then
amx = -amx
EndIf
chdir = False

numalien = 0
;Alien movement.
For a.alien = Each alien
;Count aliens
numaliens = numaliens + 1
;Main alien movement.
a\x = a\x + amx
If a\x > 620 Then chdir = True
If a\x < 20 Then chdir = True

;Aliens drop.
If Rand(200) = 25 Then
PlaySound(snd_Bombsound)
bombs.bomb = New bomb
bombs\x = a\x
Bombs\y = a\y
EndIf

;Images collide "bullet" with "alien".
DrawImage img_alien,a\x,a\y
For b.bullet = Each bullet
If ImagesCollide (img_bullet,b\x,b\y,0,img_alien,a\x,a\y,0) Then
PlaySound (snd_Aliendeath)
Delete b
Delete a
score = score + 10
If score > highscore Then highscore = score
Exit
EndIf
Next
Next

;About bombs.
For bombs.bomb = Each bomb
bombs\y = bombs\y + 4
DrawImage img_bomb,bombs\x,bombs\y
If bombs\y > 500 Then Delete bombs

;Images colide "bomb" with "smile".
If ImagesCollide (img_bullet,bombs\x,bombs\y,0,img_smile,x,y,0)
PlaySound(snd_Loselife)
Delete bombs
lives = lives - 1
ElseIf bombs\y > 475 Then
Delete bombs
EndIf
Next

;What happens when less lives.
If lives=0 Then

;save highscore
file_score = WriteFile("score.dat")
WriteInt(file_score,highscore)
CloseFile file_score

Text 320,100,"GAME OVER",1,1
Text 320,115,"Try again!",1,1
Flip
Delay 3000
End
EndIf


Text 50,420,"LIVES: " + Lives

;Draw score.
Text 530,420,"SCORE: " + score
Text 510,430,"Nice score! "

;Draw highscpre.
Text 320,50,"HIGHSCORE: " + highscore,1,1

;Draw level number.
Text 320,440,"LEVEL: " + level,1

;Wait game timer.
WaitTimer(timer)

;Flip screen monitor.
Flip

Wend

;End game.
End

[Tags Added - Sw.]
« Last Edit: July 04, 2009 by Shockwave »

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Blitz2D, first program HELP!
« Reply #1 on: July 04, 2009 »
Four things :)

1: First of all, a warm welcome to DBF :)
2: I will have to move this into the Blitz part of the forum in a bit, I'll leave it here for now so you can find it.
3: It would help if you upload the images and sounds for your game too (just put them in a zip file and attach them to your post (additional options tab on the post form) ).
4: And once again, a warm welcome to DBF.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline billy bob

  • C= 64
  • **
  • Posts: 36
  • Karma: 10
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #2 on: July 04, 2009 »
OK, here is the blitz pictures and sounds and DAT. ;)

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Blitz2D, first program HELP!
« Reply #3 on: July 04, 2009 »
I am sure that one of the Blitz guys here will help you out, if you don't get any replies by tomorrow afternoon I'll reinstall blitz and fix it for you :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline ferris

  • Pentium
  • *****
  • Posts: 841
  • Karma: 84
    • View Profile
    • Youth Uprising Home
Re: Blitz2D, first program HELP!
« Reply #4 on: July 04, 2009 »
Fixed :)

1. Returning aliens & level up: You had a typo before the aliens are counted. "numalien = 0" was supposed to be "numaliens = 0" ... you forgot the "s" ;) .
2. "Borders": To do this, you really only have to check if the player has gone too far to the left or right, and if they have, move them back on screen.

A couple of typos were fixed too, and all the fixes are commented:

Code: [Select]
;Graphics
Graphics 640,480,16,2

;Timer.
timer = CreateTimer(30)

;load highscore
If ReadFile("score.dat") = 0 Then
highscore = 100
Else
file_score = ReadFile("score.dat")
highscore = ReadInt(file_score)
CloseFile (file_score)
EndIf

;Images.
AutoMidHandle True
img_alien = LoadImage("alien.png")
img_smile = LoadImage("smile.png")
img_bullet = LoadImage("bullet.png")
img_bomb = LoadImage("bomb.png")

;Load sounds.
snd_Bulletsound = LoadSound("Bulletsound.wav")
snd_Loselife = LoadSound("Loselife.wav")
snd_Bombsound = LoadSound("Bombsound.wav")
snd_Aliendeath = LoadSound("Aliendeath.wav")

;Bullet.
Type bullet
Field x
Field y
End Type

x= 300
y= 400

;Bomb.
Type bomb
Field x
Field y
End Type

;Alien.
Type alien
Field x
Field y
End Type

;Lives.
Lives = 3

;Level to start on
level = 0

;set number of aliens at start.
numaliens = 0

;Set alien speed.
aspeed = 2
amx = aspeed
chdir = False

;Reset score.
score = 0

;Buffers.
SetBuffer BackBuffer()


While Not KeyDown(1)

If numaliens = 0 Then

level = level + 1
;Alien number.
For z = 1 To 9
For w = 1 To 2
a.alien = New alien
a\x = 100 + 50*z
a\y = -70 + 120*w
Next
Next
End If

Cls

DrawImage img_smile,x,y

;Keys.
If KeyDown(200) Then y = y - 6
If KeyDown(208) Then y = y + 6
If KeyDown(203) Then x = x - 6
If KeyDown(205) Then x = x + 6
; Limit player movement {
tiw = ImageWidth(img_smile) / 2
If x < tiw Then x = tiw
If x >= 640 - tiw Then x = 640 - tiw - 1
; }
If KeyHit (207) Then End
If KeyDown(2) Then Flip
If KeyDown(3) Then Flip
If KeyDown(4) Then Flip
If KeyDown(5) Then Flip
If KeyDown(6) Then Flip
If KeyDown(7) Then Flip
If KeyDown(8) Then Flip
If KeyDown(9) Then Flip
If KeyDown(10) Then Flip
If KeyDown(11) Then Flip
If KeyDown(17) Then y = y - 6
If KeyDown(30) Then x = x - 6
If KeyDown(31) Then y = y + 6
If KeyDown(32) Then x = x + 6
If KeyHit (57) Then

;About bullets
PlaySound (snd_Bulletsound)
b.bullet = New bullet
b\x = x
b\y = y - 5
EndIf

;More about bullets
For b.bullet = Each bullet
b\y = b\y - 5
DrawImage img_bullet,b\x,b\y
If b\y < 0 Then Delete b
Next

;Extra alien movement.
If chdir = True Then
amx = -amx
EndIf
chdir = False

numaliens = 0 ; You had a typo here....you had "numalien = 0" without the "s" ;)
;Alien movement.
For a.alien = Each alien
;Count aliens
numaliens = numaliens + 1
;Main alien movement.
a\x = a\x + amx
If a\x > 620 Then chdir = True
If a\x < 20 Then chdir = True

;Aliens drop.
If Rand(200) = 25 Then
PlaySound(snd_Bombsound)
bombs.bomb = New bomb
bombs\x = a\x
Bombs\y = a\y
EndIf

;Images collide "bullet" with "alien".
DrawImage img_alien,a\x,a\y
For b.bullet = Each bullet
If ImagesCollide (img_bullet,b\x,b\y,0,img_alien,a\x,a\y,0) Then
PlaySound (snd_Aliendeath)
Delete b
Delete a
score = score + 10
If score > highscore Then highscore = score
Exit
EndIf
Next
Next

;About bombs.
For bombs.bomb = Each bomb
bombs\y = bombs\y + 4
DrawImage img_bomb,bombs\x,bombs\y
If bombs\y > 500 Then Delete bombs

;Images colide "bomb" with "smile".
If ImagesCollide (img_bullet,bombs\x,bombs\y,0,img_smile,x,y,0)
PlaySound(snd_Loselife)
Delete bombs
lives = lives - 1
ElseIf bombs\y > 475 Then
Delete bombs
EndIf
Next

;What happens when less lives.
If lives=0 Then

;save highscore
file_score = WriteFile("score.dat")
WriteInt(file_score,highscore)
CloseFile file_score

Text 320,100,"GAME OVER",1,1
Text 320,115,"Try again!",1,1
Flip
Delay 3000
End
EndIf


Text 50,420,"LIVES: " + Lives

;Draw score.
Text 530,420,"SCORE: " + score
Text 510,430,"Nice score! "

;Draw highscpre.
Text 320,50,"HIGHSCORE: " + highscore,1,1

;Draw level number.
Text 320,440,"LEVEL: " + level,1

;Wait game timer.
WaitTimer(timer)

;Flip screen monitor.
Flip

Wend

;End game.
End

Good job on your first game, and hope all other projects go well :)
http://iamferris.com/
http://youth-uprising.com/

Where the fun's at.
Challenge Trophies Won:

Offline billy bob

  • C= 64
  • **
  • Posts: 36
  • Karma: 10
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #5 on: July 04, 2009 »

    Thanks so much!!

    I am real pleased now....

    I would be totally stuck without your help.

   Thanks! :kewl:

   If I have anymore problems I will definitely post them on this useful forum.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Blitz2D, first program HELP!
« Reply #6 on: July 04, 2009 »
   If I have anymore problems I will definitely post them on this useful forum.

Stick around you're welcome here :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline ferris

  • Pentium
  • *****
  • Posts: 841
  • Karma: 84
    • View Profile
    • Youth Uprising Home
Re: Blitz2D, first program HELP!
« Reply #7 on: July 05, 2009 »
Glad to help :D More is always welcome here.
http://iamferris.com/
http://youth-uprising.com/

Where the fun's at.
Challenge Trophies Won:

Offline billy bob

  • C= 64
  • **
  • Posts: 36
  • Karma: 10
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #8 on: July 06, 2009 »
Hey, another question: "How do I put backgrounds in my game?".



« Last Edit: July 06, 2009 by billy bob »

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #9 on: July 06, 2009 »
If you want just an image for your background, then you'd simply have a variable ( Global if it's to be used in Functions ) called for example my_background=loadimage("namoffile.ext") and draw that first before any of your other gfx stuff.

if it's something more exotic and interactive then, I would suggest you post in the Blitz area about a specific thang, btw also do a search as there's quite a few different ways of doing starfields that might be of help to you, as always do please ask.

Happy Coding,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline billy bob

  • C= 64
  • **
  • Posts: 36
  • Karma: 10
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #10 on: July 06, 2009 »
Thanks clyde, but after writing that no background has shown up.

I am expecting that their is more code To be written To make this background show up.

Please tell me what To do Or what I am doing wrong.

And also what size And extention do you suggest?☺

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #11 on: July 07, 2009 »
in Blitz i would recommend a png image file as they are much smaller.

make sure you draw the image after the cls ( clear screen ) command, also make sure your image is the same size as your Graphics width,height setup, or if you have a smaller image you can use tileimage.

btw, if you need help with the calls to any commands, press F1 at the beginning of the command, press F1 again for some examples that might give you a hand, if not post back.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline billy bob

  • C= 64
  • **
  • Posts: 36
  • Karma: 10
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #12 on: July 07, 2009 »

    Thanks clyde, now its working! :)

Offline billy bob

  • C= 64
  • **
  • Posts: 36
  • Karma: 10
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #13 on: July 07, 2009 »
    Although starting to lag a lot now, here is the new code:

Code: [Select]
   
;Graphics
Graphics 640,480,16,2

;Timer.
timer = CreateTimer(30)

;load highscore
If ReadFile("score.dat") = 0 Then
highscore = 100
Else
file_score = ReadFile("score.dat")
highscore = ReadInt(file_score)
CloseFile (file_score)
EndIf

;Load Images.
AutoMidHandle True
img_alien = LoadImage("alien.png")
img_smile = LoadImage("smile.png")
img_bullet = LoadImage("bullet.png")
img_bomb = LoadImage("bomb.png")
img_power = LoadImage("power.png")

;Load sounds.
snd_gameover = LoadSound("Gameover.wav")
snd_Bulletsound = LoadSound("Bulletsound.wav")
snd_Loselife = LoadSound("Loselife.wav")
snd_Bombsound = LoadSound("Bombsound.wav")
snd_Aliendeath = LoadSound("Aliendeath.wav")

;Load background.
img_background = LoadImage("background.png")

;Bullet.
Type bullet
Field x
Field y
End Type

;power
Type power
End Type

x= 300
y= 400

;Bomb.
Type bomb
Field x
Field y
End Type

;Alien.
Type alien
Field x
Field y
End Type

;Lives.
Lives = 3

;Level to start on
level = 0

;set number of aliens at start.
numaliens = 0

;Set alien speed.
aspeed = 2
amx = aspeed
chdir = False

;Reset score.
score = 0

;Buffers.
SetBuffer BackBuffer()


While Not KeyDown(1)

If numaliens = 0 Then

level = level + 1

;Alien number.
For z = 1 To 9
For w = 1 To 2
a.alien = New alien
a\x = 100 + 50*z
a\y = -70 + 120*w
Next
Next
End If


Cls

backdrop=LoadImage("background.png")

TileBlock backdrop

DrawImage img_smile,x,y

;Keys.
If KeyDown(200) Then y = y - 6
If KeyDown(208) Then y = y + 6
If KeyDown(203) Then x = x - 6
If KeyDown(205) Then x = x + 6
; Limit player movement {
tiw = ImageWidth(img_smile) / 2
If x < tiw Then x = tiw
If x >= 640 - tiw Then x = 640 - tiw - 1
If y < tiw Then y = tiw
If y >= 485 - tiw Then y = 485 - tiw - 1
; }
If KeyHit (207) Then End
If KeyDown(2) Then Flip
If KeyDown(3) Then Flip
If KeyDown(4) Then Flip
If KeyDown(5) Then Flip
If KeyDown(6) Then Flip
If KeyDown(7) Then Flip
If KeyDown(8.) Then Flip (ignore the dot after the eight it was only their to disable a smiley)
If KeyDown(9) Then Flip
If KeyDown(10) Then Flip
If KeyDown(11) Then Flip
If KeyDown(17) Then y = y - 6
If KeyDown(30) Then x = x - 6
If KeyDown(31) Then y = y + 6
If KeyDown(32) Then x = x + 6
If KeyHit (57) Then

;About bullets
PlaySound (snd_Bulletsound)
b.bullet = New bullet
b\x = x
b\y = y - 5
EndIf

;More about bullets
For b.bullet = Each bullet
b\y = b\y - 5
DrawImage img_bullet,b\x,b\y
If b\y < 0 Then Delete b
Next

;Extra alien movement.
If chdir = True Then
amx = -amx
EndIf
chdir = False

numaliens = 0
;Alien movement.
For a.alien = Each alien
;Count aliens
numaliens = numaliens + 1
;Main alien movement.
a\x = a\x + amx
If a\x > 620 Then chdir = True
If a\x < 20 Then chdir = True

;Aliens drop.
If Rand(200) = 25 Then
PlaySound(snd_Bombsound)
bombs.bomb = New bomb
bombs\x = a\x
Bombs\y = a\y
EndIf

;Images collide "bullet" with "alien".
DrawImage img_alien,a\x,a\y
For b.bullet = Each bullet
If ImagesCollide (img_bullet,b\x,b\y,0,img_alien,a\x,a\y,0) Then
PlaySound (snd_Aliendeath)
Delete b
Delete a
score = score + 10
If score > highscore Then highscore = score
Exit
EndIf
Next
Next

;About bombs.
For bombs.bomb = Each bomb
bombs\y = bombs\y + 4
DrawImage img_bomb,bombs\x,bombs\y
If bombs\y > 500 Then Delete bombs

;Images colide "bomb" with "smile".
If ImagesCollide (img_bullet,bombs\x,bombs\y,0,img_smile,x,y,0)
PlaySound(snd_Loselife)
Delete bombs
lives = lives - 1
ElseIf bombs\y > 475 Then
Delete bombs
EndIf

Next

;What happens when less lives.
If lives=0 Then

;save highscore
file_score = WriteFile("score.dat")
WriteInt(file_score,highscore)
CloseFile file_scored
PlaySound(snd_Gameover)
Text 320,100,"GAME OVER",1,1
Text 320,115,"Try again!",1,1
Flip
Delay 3000
End
EndIf

Text 50,420,"LIVES: " + Lives

;Draw score.
Text 530,420,"SCORE: " + score
Text 510,430,"Nice score! "

;Draw highscpre.
Text 320,50,"HIGHSCORE: " + highscore,1,1

;Draw level number.
Text 320,440,"LEVEL: " + level,1

;Wait game timer.
WaitTimer(timer)

;Flip screen monitor.
Flip

Wend

;End game.
End

And here is the new attachments (some of them will need overwriting).
« Last Edit: July 07, 2009 by Jim »

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #14 on: July 07, 2009 »
Hi Billy Bob, Thanks for your code, and welcome to the forum!
I've just edited your post to add the [ code] [ /code] BB tags.  These mean that the forum doesn't ruin your code formatting and break a bunch of things.  It's a bit like using the < pre> tag in html.

Jim
Challenge Trophies Won:

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #15 on: July 07, 2009 »
You are loading the background image each frame in the main loop, that is why it is lacking. You only need to load the image once, outside the loop, and then draw it when needed.

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #16 on: July 07, 2009 »
that what zawran mean

Wrong - You are loading the background image each frame in the main loop, that is why it is lacking.
Code: [Select]
const Press_Esc=1
Graphics 640,480,16,2
Setbuffer Backbuffer()

; Main Loop
While not keydown(Press_Esc)
      My_Background=Loadimage("MyBackground.png")
      Drawimage MY_Background,0,0
      flip
wend

Corrections
========

Right - You only need to load the image once, outside the loop, and then draw it when needed.
Code: [Select]
const Press_Esc=1
Graphics 640,480,16,2
Setbuffer Backbuffer()   

; Loading the Background Once  :)
My_Background=Loadimage("MyBackground.png")

; Main Loop
While not keydown(Press_Esc)
      Drawimage MY_Background,0,0
      flip
wend


Hope that give you good understanding  :)
« Last Edit: July 07, 2009 by Hotshot »

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #17 on: July 07, 2009 »
Billy Bob, you are only making the same mistakes that we all went through whilst learning, so good on you for sticking at it. Typos I still do to this very day. Also the word you are looking for is lagging.

Just a tip. I would suggest that you put in comments and use the tab key to indent your code. Reason I suggest this, as from a couple months time when you go to look over things, you'll probably not know what things are doing, especially usefull for when your projects get bigger and you start progressing and have alot of programs on your hard drive.

Cheers and have a blast with learning and looking forward to your future projects and questions,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline billy bob

  • C= 64
  • **
  • Posts: 36
  • Karma: 10
    • View Profile
Re: Blitz2D, first program HELP!
« Reply #18 on: July 07, 2009 »
Thanks!

it is working now, and it seems really fast. :kewl:

Sorry I didn't reply in a while, it was because I was reloading page 1, and I didn't know that you were posting on a different page!

Thanks again! :kewl:

Offline ferris

  • Pentium
  • *****
  • Posts: 841
  • Karma: 84
    • View Profile
    • Youth Uprising Home
Re: Blitz2D, first program HELP!
« Reply #19 on: July 09, 2009 »
Quick tidbit: If your background fills the whole screen, why do you need your 'Cls' command at all ;) ?

Also DrawBlock is faster than DrawImage because it doesn't support pixel transparency, which is unnecessary for a background unless multiple (parallaxing?) images are used for the background.
http://iamferris.com/
http://youth-uprising.com/

Where the fun's at.
Challenge Trophies Won: