jbs30000
Members-
Content Count
486 -
Joined
-
Last visited
Content Type
Profiles
Member Map
Forums
Blogs
Gallery
Calendar
Store
Everything posted by jbs30000
-
OK, so I'm working on making an Atari version of the Tron arcade game (I've completed the tank and light cycle games so far). I'm in the middle of the cone game where you shoot away the rotating blocks and enter the MPC cone. I have 4 rows of rotating blocks, the first and third rotate towards the right, and the second and fourth towards the left, but right now the block rotation is very fast and needs to be slowed down. However, whenever I try a for next loop it doesn't work, and if I use multiple for nexts then the screen flickers horribly. I can't put a drawscren inside the loops as the whole game just freezes and putting one before and one after just slows down moving the player, but the blocks still rotate too fast. All help and suggestions are welcome. Thank you. Oh, and for some reason, when you shoot, if you move your player, the missile changes direction until you stop TestBas.bas
-
Great, I was thinking it had to be something like that. Thanks.
-
I'm writing a game and as I go along, I compile it to make sure that there aren't any errors. One of the outputs I get is X bytes of ROM space left. For example, compiling now gives me 897 bytes of ROM space left. Is this number out of the 4K bank limit? If I'm at, or around 0, and I want to add more code, do I have to specify 2 or more banks? Thanks.
-
I compiled with the -l option to get a full compile listing, but I don't see any problem-- although the L023 line label is ending up at address $F523, not $F520, so it may just be a "bogus" error message (or warning) from DASM that isn't getting removed by the sed program. Since I'm not familiar with the sed program, I'll leave it for batari to figure that one out! What's line label L023, you may ask? When the bB compiler converts your bB statements into 6502 assembly code, it creates line labels as needed for the 6502 assembly code that corresponds to your bB code, and L023 (or actually .L023) is one of the line labels that it created. Each program line with bB statements on it gets numbered from 0 to whatever, as follows: .L00, .L01, .L02, .L03, etc. That doesn't include any blank lines, lines that have line labels but no actual statements, or lines that are part of a single statement. Thus, the line that says "imageLoop" doesn't get counted as a statement, and everything from "player0:" through "end" gets counted as a single statement. So line .L023 is the line that says "if JStickAngle = 8 then tankright." By the way, I liked your original code better-- it looked cleaner and easier to understand (at least to me). If you look at the changed version that I posted, you'll see that I didn't have to change very much to get it working. Michael Thank you very much for all your help. This dialect of Basic is different from others I've used, but I'm getting the hang of it. With the help already provided, and better reading of the documentation, I think I'll get this down in no time. Thanks again.
-
Did you get a chance to read the part about Duplicate Labels under Troubleshooting/Assembler Errors: http://www.randomterrain.com/atari-2600-me...troubleshooting Oops, no, but I will. Thanks.
-
The code you originally posted looks pretty good except for a few problems, some of which it sounds like you've already figured out or been told: (1) You need to put at least one space in front of your bB program statements. (2) You can't put a "rem" after a "dim" on a line. I wish you could, but the bB compiler doesn't like it. Move each "rem" statement to the line after the "dim" statement. (3) If you're going to use the "player0color:" statement, then you need to use "set kernel_options player1colors playercolors" (both are required). That means you'll lose both missile0 and missile1. But in your case, player0 is a single solid color, so unless you plan to eventually add some multicolor sprites to your program, it would be better to leave out the "set kernel_options player1colors playercolors," and replace the "player0colors:" statement with "COLUP0=34." (4) You need to set the player colors within the loop so they will always get set (or reset) before or after each "drawscreen" statement, otherwise the player colors that you've specified will get wiped out, and the players will end up using the "scorecolor" color. I would move "COLUP0=34" to just after the "AdjustLoop" label, then move the first "drawscreen" statement to the line after that, and then take out the "drawscreen" statement that's at the end of the program (because it would not be needed anymore). (5) Bit operations use the set brackets-- {}-- not the square brackets-- []. At the beginning of your "AdjustLoop" routine, change the "JoyStickAngle[0]" through "JoyStickAngle[3]" statements to "JoyStickAngle{0}" through "JoyStickAngle{3}." Make those changes, and everything will work as you had expected. It sounds like maybe you've already figured out and fixed everything except for the kind of brackets used for bit operations. Michael Actually, I fixed my routine and it seems to be working fine now. As for the Bit Operations, I thought I was using {} Oh well. Anyway, I did away with those and used | and & instead (if joy0up then JStickAngle = JStickAngle | 1 else JStickAngle = JStickAngle & 14 for example). One question remains. Everything compiles and runs OK, but I get this message "Possible duplicate label: Lo23 f520" Any idea what it could be talking about? TestBas.bas
-
Yeah, I did that. I also put in the spaces where needed and now I get a program that displays my tank, but won't move it. I'm in the middle of putting the sprite images after labels and after the if then going to the label, change the sprite, draw the new screen, and return to the loop.
-
Yes, I understand. I've been going through my code and indenting what needs to be indented and making sure that end and my labels aren't indented. I think I'm getting the hang of it now. I'm making progress anyway.
-
I think I'm figuring it out. I compiled sample.bas successfully, looked at the program, and saw that set smartbranching on had a space in front, where my code didn't. added spaces and now I'm getting an error about my first sprite definition. I'll tab those over and see if that helps also.
-
Whoops, sorry about posting in the wrong forum. I don't think it's my code since the sample files that compiled last night won't do so today, but I'll link it if you like, just don't laugh at my coding, that's all I ask TestBas.bas
-
Hello. I'm brand new to Batari Basic. Last night I downloaded the bB package, installed everything, added the path to the Environment Variables (I'm running Windows XP) as well as setting the bB variable, and used the sample programs to test everything out. I got everything working, either by going to a DOS box and running 2600bas directly, and by using a couple of IDE's (Crimson Editor and 2600IDE). I was able to create .bin files no problem. So, today I decide to write a test program. It doesn't do anything yet, other than change player 0 sprite depending on which way the joystick is being pressed. I try to compile it. At the beginning of the program is set kernel_options no_blank_lines. I get an error message that it doesn't recognize kernel_options. Strange, it recognized it before, so I tried to compile one of the sample programs that compiled before. Hey, it's not compiling now . I rebooted and even re downloaded Batari Basic, but nothing. Each time I put a rem in front of something, the next line isn't recognized. It doesn't recognize set smartbranching on, and when I define my first sprite, it doesn't recognize the first line (%00111100). So, anybody have an idea of what's going on? And also, sorry if this was kind of long, but I wanted to give all the information I could. Thank you.
