21 January 2013, 10:54 | #1 |
Global Caturator
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
|
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! |
21 January 2013, 11:03 | #2 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,523
|
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 ... |
21 January 2013, 11:07 | #3 |
Global Caturator
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". |
21 January 2013, 11:15 | #4 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,523
|
I think I found the problem http://eab.abime.net/showthread.php?t=44415
The brackets should be {} not () |
21 January 2013, 11:20 | #5 |
Global Caturator
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
|
LOL!
Damn those low quality scans! Thanks. |
21 January 2013, 11:40 | #6 |
Global Caturator
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. |
21 January 2013, 11:43 | #7 |
move.l #$c0ff33,throat
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.
|
21 January 2013, 11:46 | #8 |
Global Caturator
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... :/ |
21 January 2013, 14:02 | #9 |
move.l #$c0ff33,throat
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.
|
21 January 2013, 14:08 | #10 |
Global Caturator
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.
|
21 January 2013, 14:33 | #11 | |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Quote:
Code:
Use Palette 0 LoadBitMap 0,"System:Programs/BlitzBasic2/Games/BlitzOut/background.iff" Code:
Use Palette 0 : LoadBitMap ,"System:Programs/BlitzBasic2/Games/BlitzOut/background.iff" |
|
21 January 2013, 14:42 | #12 |
Global Caturator
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... |
21 January 2013, 14:53 | #13 |
HOL/FTP busy bee
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,523
|
|
21 January 2013, 15:04 | #14 |
Global Caturator
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... |
21 January 2013, 23:11 | #15 | ||
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Quote:
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:
Last edited by BippyM; 21 January 2013 at 23:23. |
||
22 January 2013, 11:17 | #16 |
Global Caturator
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). |
22 January 2013, 11:37 | #17 |
Global Moderator
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..
|
22 January 2013, 12:28 | #18 |
Global Caturator
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.
|
22 January 2013, 12:38 | #19 |
Global Moderator
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
|
22 January 2013, 12:44 | #20 |
Global Caturator
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. |
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 |
|
|