bliprob
Members-
Content Count
14 -
Joined
-
Last visited
Content Type
Profiles
Member Map
Forums
Blogs
Gallery
Calendar
Store
Everything posted by bliprob
-
Fred -- Thanks for Batari basic! I never would have done any of this if not for your basic. Here's a screenshot of my game in progress. It uses: - an array for the worm segment coordinates - for... next loops to iterate the array and erase/draw the segments with PF blocks - of course, labels instead of line numbers I've got to spend some time on collision detection and figuring out why my PF blocks sometimes turn off without warning... but overall it's coming along nicely. It's already kind of fun to play.
-
I am having trouble with reverse loops. The code below is a loop that DIDN'T work, and (I think) the logic is fine, but it doesn't work. (Note: the initial value of z is 4.) for x = z to 1 step -1 y = x + 1 a[y] = a[x] v = x + 10 y = v + 1 a[y] = a[v] next I later wrote the same loop as an if/then version of the same thing, and it does work: x = z + 1 loopstart rem x = x - 1 y = x + 1 a[y] = a[x] v = x + 10 y = v + 1 a[y] = a[v] if x > 1 then goto loopstart At some point I'll check out the assembly and see what's up, but for now, I'm just glad it's finally working. I was banging my head against that wall for hours yesterday.
-
Just realized something else. Sorry for the large number of posts. if !collision(player0,playfield) then gosub hitself It appears that, to detect a collision, I have to use the not operator. As in, if NOT a collision goto my collision code (as above). This is pretty weird, and I'm chalking it to my inexperience, but in case it's some weird thing (i.e. I'm on a Mac, maybe it's endian-related?) I thought I'd mention it.
-
Fred, thanks, that was quick! Although that's the one new feature I'm not using. A few more things I've learned through many code/compile/debug cycles: - a label with no line content fails -- all my labels have a blank "rem" after them. - the blank line with one space thing is a huge pain, but it's my own fault. BBEdit almost always adds this, so part of my coding cycle is to grep the \r \r to \r\r. Also, here's a tip -- if you run your file through 2600bas directly with stdout to the console, you can see exactly what lines your compilation is barfing on. So my game is almost really work. I'm out of variables... and I need one more temp var for a calculation. if I can find an unused byte somewhere, I'll finish it and post it.
-
Fred, I had to make a few minor fixes for Mac OS X - spaces instead of tabs, or the other way around, I can't recall. Re whitespace -- another annoying thing, if you have vertical whitespace, the line can't have spaces. My editor of choice (BBEdit, until my own IDE is ready!) adds blank lines already indented with whitespace to match the above line. Thanks for the tip on array index, I figured out the workaround myself and I've got my game working mostly! (Uses almost all of your new language features... why thanks!) One new thing I've run into: .L025; if x=2 goto moveworm LDA x CMP #2 Bus error It doesn't matter what variable is on that line or what it's compared to. Pretty weird!
-
Am I doing something wrong? In the .asm file, it has compiled into: .L020; pfpixel a[u] a[x] off LDX a[u] LDY a[x] I don't know anything about 2600 programming, but I have some creaky 6502 assembly somewhere in my brain, so I'll take a look at the C file and see.
-
This is what I'm aiming for: for u=0 to z x = u + 10 pfpixel a[u] a[x] off next
-
I've got another problem here. Firstlt -- my compliation error above was caused whitespace AFTER a keyword (i.e. "return " and "x = rand "). That was hugely frustrating to figure out. Watch out for extra whitespace! New problem is with arrays. Attempting to access a[x] and so on. Output from DASM: /Users/rob/desktop/rand-2.bas.asm (888): error: Syntax Error 'a'. /Users/rob/desktop/rand-2.bas.asm (889): error: Syntax Error 'a[x]'. /Users/rob/desktop/rand-2.bas.asm (989): error: Syntax Error 'a'. /Users/rob/desktop/rand-2.bas.asm (990): error: Syntax Error 'a[x]'. I sort of expected to be able to use a variable as an array index -- am I off base here?
-
Fred -- I'm having trouble with .2 without line numbers. The first line of my program is: rem smartbranching on ...and it throws a compilation error: Error: cannot parse line rem Then I got the same thing here: player0x = 50 Error: cannot parse line player0x So I added a space in front of every line that didn't have a label or line number. Is that right? I'm still getting compilation errors. Do you have some sample code for the new features?
-
Take a look at this basic interpreter file. It's been floating around the net for a while (I first compiled in 1993 or so). It's very compatible in some respects (26 vars, etc.) but has loops and a complete expression parser for math. And, it's short enough and simple enough to understand in an hour, something lexx and yacc will never be. I'm happy to help if I can. BAS_INT.txt
-
Maybe you're right - it might me good to at least wait until this is good enough to call it beta instead of alpha. 892419[/snapback] Slashdot wasn't enough publicity? But yeah, probably would want to wait for the multiple kernels option... or a mad rush of new users will ask over and over about two scores.
-
Jeff -- a Mac port is back on page 8 of this thread. After I compile the new release, I'm going to give it to Kisrael to host on the official page.
-
Batari, I'm eager for the next release. I've run into a problem in my current game and I'm curious to see if the new compiler makes things any easier for me. Also, I've made a little IDE for Mac users, to go along with my Mac-compiled 2600bas and dasm files. I made it in RealBasic so I can build it for Linux and Windows too. Here's a screenshot.
-
This may not interest most of you, but I've made a Mac OS X compilation of 2600bas and written a shell script (like the bat file) that performs the necessary compiling/concatenating/assmbling for a final output. You may need to "chmod a+x 2600basic.sh" to make the shell script execute. 2600basic_mac.zip
