English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 21 January 2013, 10:54   #1
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Floppy disk Help with BlitzBasic2 first steps

Hi, I'm Shoonay and I've never programmed anything before, so just for the heck of it found them pdf tut's on Vairn's site here on EAB, read the AF_Blitz2_Tutorial4.pdf file and decided to try it.

Just typed-in the BlitzOut souce code and it no work. Why it no work?

I think I've done everything right, used DPaint to quick draw those files needed, used Shapes to convert them to sprites, and I *think* I've "manually xeroxed" the whole source code right, but it still says there's a Syntax Error and points at the very first Statement.



Help?

PS: This is why I've never programmed anything even if I tried to step in many times with many different tutorials for many different languages, there's always that silly first try problem I don't know how to solve... it's a course I tell ya!
Shoonay is offline  
Old 21 January 2013, 11:03   #2
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,518
I don't know Blitz, but if it complains about the very first line, try to write the variables each in one line (not two in one line). In your example:
Code:
bx=16
by=96
bdx=4
bdy=2
...
TCD is offline  
Old 21 January 2013, 11:07   #3
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Nono, not the very first line, the Statement, in my case it points to Statement PrepareScreen() and that's it, I've no single clue how to interpret it.
I tried copying the files to RAM: and changing the paths because that's the only difference in my case from the original tutorial, but it still says "Syntax Error".
Shoonay is offline  
Old 21 January 2013, 11:15   #4
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,518
I think I found the problem http://eab.abime.net/showthread.php?t=44415
The brackets should be {} not ()
TCD is offline  
Old 21 January 2013, 11:20   #5
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
LOL!

Damn those low quality scans!

Thanks.
Shoonay is offline  
Old 21 January 2013, 11:40   #6
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Great, a second later: another problem.

Now it points to my background.iff file at this line:
Use Palette 0 LoadBitMap 0,"System:Programs/BlitzBasic2/Games/BlitzOut/background.iff",0
And says "Garbage at End of file"

The tutorial said I can use any IFF ILBM picture as long as it's low-res 320x256 and 16 colors, so what's the problem now? The pic was created in Deluxe Paint V.
Shoonay is offline  
Old 21 January 2013, 11:43   #7
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Might be you saved it as compressed IFF and BB2 doesn't handle it (or the other way 'round, i.e. saved as uncompressed IFF but BB2 only handles compressed IFF's). Try saving it as uncompressed IFF and see if that helps.
StingRay is offline  
Old 21 January 2013, 11:46   #8
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Yes, I though about that, I remember having such problems when creating some maps for Worms in Personal Paint, I always forgot to turn the compression off.
But, this time I specifically created the pic in Deluxe Paint V and either I'm blind or there is no "compression off" option in that... :/
Shoonay is offline  
Old 21 January 2013, 14:02   #9
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
I'm not 100% sure (it's been years that I last used DPaint) but I think DPaint always saves compressed IFF's. Try loading the picture in PPaint and save it again, PPaint has options to save (un)compressed IFF's.
StingRay is offline  
Old 21 January 2013, 14:08   #10
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Same thing, no matter if I unselect compression alone or unselect both compression and screen format during saving in PPaint.
Shoonay is offline  
Old 21 January 2013, 14:33   #11
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
Quote:
Originally Posted by Shoonay View Post
Great, a second later: another problem.

Now it points to my background.iff file at this line:
Use Palette 0 LoadBitMap 0,"System:Programs/BlitzBasic2/Games/BlitzOut/background.iff",0
And says "Garbage at End of file"

The tutorial said I can use any IFF ILBM picture as long as it's low-res 320x256 and 16 colors, so what's the problem now? The pic was created in Deluxe Paint V.
It should either read

Code:
Use Palette 0 
LoadBitMap 0,"System:Programs/BlitzBasic2/Games/BlitzOut/background.iff"
or

Code:
Use Palette 0 : LoadBitMap ,"System:Programs/BlitzBasic2/Games/BlitzOut/background.iff"
I'll let you figure out the error
BippyM is offline  
Old 21 January 2013, 14:42   #12
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
So basically that first Use Palette 0 command is not needed if the exact same one is located 2 lines lower?

That fixed it alright, thanks, I had a few typos in there later too but managed to fix them myself.

Now it says in a separate screen that "Shape does not have a cookie cut" so I *think* it's my fault...
Shoonay is offline  
Old 21 January 2013, 14:53   #13
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,518
http://amiga.sourceforge.net/amigade...&action=Search ?
TCD is offline  
Old 21 January 2013, 15:04   #14
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
I have no idea what that means, I'm only following the tutorial.

I thought the problem was with how I drew them sprites in DPaint, forgot to locate them at 0:0, but I must be doing something wrong or the tutorial skipped a few steps.

It just mentions the sprites were drawn in DPaint and then converted using shapesmaker. That's all the info I have.

I found the program in examples/tools, loaded the iff of them sprites, clicked covert and saved the file as shapes. That's it. Don't see any extra options I could've missed...
Shoonay is offline  
Old 21 January 2013, 23:11   #15
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
Quote:
Originally Posted by Shoonay View Post
So basically that first Use Palette 0 command is not needed if the exact same one is located 2 lines lower?

That fixed it alright, thanks, I had a few typos in there later too but managed to fix them myself.

Now it says in a separate screen that "Shape does not have a cookie cut" so I *think* it's my fault...
The first Use Palette sets the screen to 0, then the image is loaded and displayed, then the correct palette is set to actually show the image..

The shape missing the cookiecut is probably the code trying to use a shape that doesn't have anything allocated to it, you have allocated 5 shapes I believe (0-4). Are there 5 in the shapes file?

Quote:
Originally Posted by TheCyberDruid View Post
This has nothing to do with what Shoonay is trying to do, this let's you include a shape in the program, and save it as part of the main executable. This will then show the program where to look for it.

Last edited by BippyM; 21 January 2013 at 23:23.
BippyM is offline  
Old 22 January 2013, 11:17   #16
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Could someone perhaps look at the attached archive that contains everything I created with the tutorial, and tell me what is wrong?

For now my only suspect is the shapes file created from the shapes.iff file (both attached).
Attached Files
File Type: lha BlitzOut.lha (16.6 KB, 186 views)
Shoonay is offline  
Old 22 January 2013, 11:37   #17
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
The problem is you have saved them as 1 shape and not 5 seperate shapes in the shape file..
BippyM is offline  
Old 22 January 2013, 12:28   #18
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
But how do I do that? There are no options in the shapesmaker for anything.
Shoonay is offline  
Old 22 January 2013, 12:38   #19
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
I'm currently at work but you can write a small program to do it for you using the shape grabbing commands. I use the tools from the newer version of blitz. Download my archived install. Its within the link you posted above. Use the redshapesredshapesmaker
BippyM is offline  
Old 22 January 2013, 12:44   #20
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Woah, woah, easy there Bips, I'm only following the tutorial and it hasn't said anything about that.

Great, just my luck, I hate those tutorials that first teach you like a baby (for your first lesson we will learn the letter P, P is for Print, Print is for Print "Hello World") and the 2nd lesson assumes you already know everything and make you type 500 lines of code.
Shoonay is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Painting your Amiga in 10 easy steps. Mick_AKA Hardware mods 39 29 November 2018 19:00
The Plague (by CLS) resets after walking a few steps apachacha support.WinUAE 34 18 July 2011 20:13
How to play - Millennium 2.2 - AKA my very first baby steps in the game Shoonay Retrogaming General Discussion 62 07 July 2010 15:47
scsi cdrom steps MrFluffy support.Hardware 9 20 May 2009 23:06
Basic steps to emulate a hardrive in WinUAE vroom6sri support.WinUAE 2 19 September 2006 09:18

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:58.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10870 seconds with 14 queries