English Amiga Board


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

 
 
Thread Tools
Old 21 January 2013, 11:54   #1
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
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  
AdSense AdSense  
Old 21 January 2013, 12:03   #2
TCD
Registered User

TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 39
Posts: 24,032
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, 12:07   #3
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
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, 12:15   #4
TCD
Registered User

TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 39
Posts: 24,032
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, 12:20   #5
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
LOL!

Damn those low quality scans!

Thanks.
Shoonay is offline  
Old 21 January 2013, 12:40   #6
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
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, 12:43   #7
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 5,591
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, 12:46   #8
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
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, 15:02   #9
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 5,591
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, 15:08   #10
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
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, 15:33   #11
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 42
Posts: 8,621
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, 15:42   #12
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
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, 15:53   #13
TCD
Registered User

TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 39
Posts: 24,032
http://amiga.sourceforge.net/amigade...&action=Search ?
TCD is offline  
Old 21 January 2013, 16:04   #14
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
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 22 January 2013, 00:11   #15
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 42
Posts: 8,621
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; 22 January 2013 at 00:23.
BippyM is offline  
Old 22 January 2013, 12:17   #16
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
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, 71 views)
Shoonay is offline  
Old 22 January 2013, 12:37   #17
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 42
Posts: 8,621
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, 13:28   #18
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
But how do I do that? There are no options in the shapesmaker for anything.
Shoonay is offline  
Old 22 January 2013, 13:38   #19
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 42
Posts: 8,621
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, 13:44   #20
Shoonay
Global Caturator
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Posts: 6,034
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  
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Plague (by CLS) resets after walking a few steps apachacha support.WinUAE 34 18 July 2011 21:13
How to play - Millennium 2.2 - AKA my very first baby steps in the game Shoonay Retrogaming General Discussion 62 07 July 2010 16:47
scsi cdrom steps MrFluffy support.Hardware 9 21 May 2009 00:06
Painting your Amiga in 10 easy steps. Mick_AKA Hardware mods 37 01 February 2008 15:31
Basic steps to emulate a hardrive in WinUAE vroom6sri support.WinUAE 2 19 September 2006 10: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 16:02.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.41380 seconds with 13 queries