Jump to content
IGNORED

Really undecided about bAtari BASIC


Recommended Posts

I've been getting back into all things Atari lately, including taking a look at bAtari BASIC a little more in-depth than I have before. For context, I'm an old-timer who grew up with the 2600 on its go-around, programmed in BASIC on various Commodore computers, and eventually took up a career in the game industry, where (although my job focus has not required it much) I've scripted various things here and there. Point being, I'm old and grumpy, but not totally clueless.

 

After several days of tinkering with bB (with the Visual bB IDE), I'm really undecided about whether I want to invest much more time in it. Much of it feels inconsistent or illogical to me. I'm unsure if that's by necessity because of how the 2600 works "under the hood," or just a symptom of a tool having its development abandoned prematurely in 2014 (or whatever year).

 

For example: Following a very basic beginner's tutorial on setting the background color and laying out a playfield and sprite, I figured out on my own how to keep the sprite confined to the screen by setting limits on the navigable coordinates; something like:

 if player0y < 8 then player0y = player0y + 1
 if player0x < 4 then player0x = player0x + 1
 if player0y > 89 then player0y = player0y - 1
 if player0x > 150 then player0x = player0x - 1

 

That worked fine for my purposes at that moment, so I moved on to setting collision detection on the playfield. I was unable to figure that out on my own, but found an example somewhere here on the AA forums that I was able to use. However, I soon discovered that in a playfield with a few collidable obstacles - but open screen borders - my code above for confining the player does not work anymore.

 

Other stuff I'm coming across:

- Sprites created larger than 8x8 pixels are cut off in the game.

- Composing music in Visual bB: certain notes sound different between the VbB UI and emulation preview. Also, have not been able to find anything very informative about adding the music code to the game (it seemed to mess up the draw calls when I tried).

- Assorted other weirdness with missiles and god-knows-what-else on stuff generated with the Project Wizard.

 

The attached file has pretty much everything I'm griping about. I don't want to throw up my hands in utter frustration just yet. I'm reading through randomterrain.com, hunting around YouTube, and finding out what I can, but it's not feeling as "fun" as I've seen people claim it is. As a game artist, I can offer to barter a little graphic work (in-game or packaging) to someone who might be willing to mentor me some on this.

buggy vbdwizcode.bas

Link to comment
Share on other sites

I'm terrible at dissecting other peoples' code, but I noticed a couple of things that jumped out at me.

 

On 10/30/2023 at 6:06 PM, Artist_AL said:

Sprites created larger than 8x8 pixels are cut off in the game.

Atari 2600 sprites can only be 8 pixels wide. Those pixels can be made 2x or 3x wider using NUSIZ to create a wider but lower resolution sprite.

It looks like you're using player0color but you haven't set the playercolors kernel option. And using playercolors takes away the missile.

Instead of having to check if your random x and y starting positions are less than 150 and looping until it creates one that is, you could combine ranged rand calls to get something close to what you need. x = (rand&127) + (rand&15) + (rand&7) would get you a number between 0 and 149.

Generally speaking, I find that it works best to have things like missile height, REFP0 and NUSIZ within the main game loop.

 

I've never used Visual bB, so I can't say anything about the music editor or any other vbB specific problems you're having. I read enough bad things about it to not even want to bother with it. I just typed code in a text editor and compiled using command line prompts until Atari Dev Studio (and I still use command line to compile).

 

Honestly, I doubt I would have gotten into 2600 development without bB. I've learned some assembly over the years but never stuck with it enough to be able to actually make a game. bB made it very accessible. RT's site is a great resource. Everything I know I've learned there or from searching the bB forums here. Hopefully I was able to help you at least a little.

  • Like 1
Link to comment
Share on other sites

I keep hoping to try out bB but haven't taken the plunge so take everything I saw with a heaping tablespoon of salt given the utter n00bness of the source.  Kaeru has already covered the important details in his response so I'll just add one little tidbit as I can't look at your code without having installed bB and can only go off of your post and his.  I've found this link on random terrain's website to be very helpful in figuring out what might be possible with the various unrealized game ideas I have clanging around inside my head.

 

https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#kernelopchart

 

It basically tells you what the trade offs are when enabling certain features of bB using the basic kernel.  The only thing I'll add is that you can enable sprite stretching in ASM (not sure about bB though) on a per line basis via the nusiz register mentioned above.  The goto example I found for this is in the Kung Fu game port for the 2600 when the character kicks and his leg needs to be stretched out beyond 8 pixels.  I don't know if that helps you with your particular sprite but figured I'd mention it.  Again, I haven't programmed anything beyond a simple hack myself but I'm constantly entertained by what folks are able to do with both ASM and bB on the limited hardware of the 2600 and wish you luck with your project if you decide to continue it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...