Author Topic: Beginners Game Programming with NaaLaa  (Read 880 times)

cvirus

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Beginners Game Programming with NaaLaa The Return of the Enemies

johnno56

  • Guest
Re: Beginners Game Programming with NaaLaa
« Reply #1 on: July 11, 2014 »
The document mentions a 'previous' and that this document is 'part 2'. Is the previous document still available, and if so, where can I obtain a copy?

Cheers

J

cvirus

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Beginners Game Programming with NaaLaa
« Reply #2 on: July 11, 2014 »
I just upload it but the forum is unstable at the moment and it keeps destroying the things that i have done, so when stable i upload the rest.

John

  • Sr. Member
  • ****
  • Posts: 362
    • View Profile
Re: Beginners Game Programming with NaaLaa
« Reply #3 on: July 11, 2014 »
I think it's safe to upload now. The site has been moved to a better server.

johnno56

  • Guest
Re: Beginners Game Programming with NaaLaa
« Reply #4 on: July 11, 2014 »
I have a slight problem with the "green tank" tutorial. I get an Illegal Statement error on line 31.

hidden:
   rem Set window and turn off automatic redraw.
   set window 16, 16, 640, 480
   set redraw off
   rem Load enemy image, split it into 4 columns and make the black color
   rem transparent.
   load image ENEMY_IMAGE, "data/green_tank.bmp"
   set image grid ENEMY_IMAGE, 4, 1
   set image colorkey ENEMY_IMAGE, 0, 0, 0                   rem <================ LINE 31

I thought it might have been related to the bitmap file. Checked to make sure it was a 24bit bmp. I even changed the "transparent" colour from black to magenta (ENEMY_IMAGE, 255, 0, 255) and still got the same error.

Note: the entire program was "cut and paste" from the tutorial. I tried my best to format the text with indentations etc...

I will try to attach the listing... cross fingers.

J

cvirus

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Beginners Game Programming with NaaLaa
« Reply #5 on: July 11, 2014 »
Sorry J, to use color key they must have an RGB(255,0,255), and then use set image color key image, true.

If you use a transparent background just comment the color key line, it should be more cause i did have no time to chage all of that, the proc color key changed from NaaLaa 5 to 6, it accepts only 255,0,255 as a true color key.

Thanks

johnno56

  • Guest
Re: Beginners Game Programming with NaaLaa
« Reply #6 on: July 11, 2014 »
I am sorry to have wasted your time. I should have done my homework completely before posting. I checked the previous single tank tutorial and noticed, as you have rightly pointed out, that the parameter should have bee 'true'. With that little error out of the way, the program ran like a charm.

Many thanks.

J