Jump to content
SlowCoder

Getting started with batari Basic

Recommended Posts

I'm not new to coding. I understand command structure and procedure, and I programmed in BASIC for years. So batari Basic almost comes in 2nd nature to me. Right now I'm just goofing, learning the batari system.

 

- I understand that the resolution is supposed to be 88 (V) x 159 (H). Why, when I set the ship at the supposedly center coordinates (44x80) it isn't centered?

 

- I'll admit I haven't read through the entire documentation for batari (I'm not much of a manual reader), and that's probably why I'm a little confused about my next question ... From what I can tell, there are 2 sprites, player 1, and player 2. How do games like Space Invaders (6x6 invaders, 3 shields, and the player cannon) manage so many sprites on the screen at one time? At first guess, I'd think maybe just swapping sprites between each iteration of drawscreen, but if that was the case, each sprite would only get drawn 2 times a second (if I'm understanding things right), which would make hellish flicker. So how is this accomplished?

Share this post


Link to post
Share on other sites

All kinds of magic can be done with assembly language. You might want to read Racing the Beam:

 

http://www.amazon.com/gp/product/026201257X/ref=as_li_ss_tl?ie=UTF8&tag=atariage&linkCode=as2&camp=217145&creative=399369&creativeASIN=026201257X

 

 

You might also want to watch this video:

 

http://www.youtube.com/watch?v=MBT1OK6VAIU&rel=0&fmt=35

 

 

batari Basic is amazing because it lets average people who only know BASIC style languages get the beginnings of a game up on the screen in minutes instead of days or months. The speed and ease of use come at a cost, though. There are a lot of things we can't do, but those limitations are shrinking. For example, the DPC+ beta version of bB lets us have 10 multicolored sprites on the screen at the same time.

  • Like 1

Share this post


Link to post
Share on other sites

I found that video to be quite interesting to watch. While he didn't go into really great detail on game design, I got a good feel for what went into the process. Thank you for that link.

 

I will take a look at the ASM.

Share this post


Link to post
Share on other sites
- I understand that the resolution is supposed to be 88 (V) x 159 (H). Why, when I set the ship at the supposedly center coordinates (44x80) it isn't centered?

bB follows the usual convention, where the X/horizontal coordinate to go first, then the Y/vertical coordinate.

 

If you set your ship to 80,44 it will be approximately centered. The coordinate actually locates the left+top corner of the player.

 

 

From what I can tell, there are 2 sprites, player 1, and player 2. How do games like Space Invaders (6x6 invaders, 3 shields, and the player cannon) manage so many sprites on the screen at one time? At first guess, I'd think maybe just swapping sprites between each iteration of drawscreen, but if that was the case, each sprite would only get drawn 2 times a second (if I'm understanding things right), which would make hellish flicker. So how is this accomplished?

One method is flickering, as you indicate. Pacman uses this technique.

 

Another is to enable a register that creates 1 or 2 copies of a player beside the regular one. Combat uses this one, in the modes where there are 3 planes side by side.

 

As RT alludes, if you write your own display kernel you can also reuse these same players in different horizontal sections of the screen, like Pitfall, Keystone Kapers, and many others.

 

You can also have your custom kernel strobe the reset registers, like galaxian does.

 

Lots of techniques, lots to learn. :) If you're ready for asm, check out Andrew Davie's Tutorials and the Stella Programming Guide.

Share this post


Link to post
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.

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...