Jump to content
IGNORED

Some Atari BASIC Questions


Recommended Posts

Hi All,

 

I have been out of practice when it comes to programming in Atari BASIC. As well, I have been trying to discover new ways to produce graphics in Atari BASIC. Is there an easier way to produce graphics in a bit format without having to invoke the PMG of the computer? Is there a way to use portions of assembly to incorporate graphics in a BASIC game program? I am wanting to use real hardware I have on hand (XEGS & a just acquired 810 drive from V61).

 

Reason why I ask is because I have a game I developed for Windows PCs using DarkBASIC and I would like to try and port it over to the 8-bits. I want to use the best graphic method possible that the machine will allow without going into Assembly too heavily. I know BASIC can do most of what I need, I just need a way to do better graphics. I am including a screenshot of the Windows version to show kind of what I am trying to do. I know the 8-bits won't be able to perform on this level, but if I can make the paddle and blocks more like what is in the image it would help the game. Oh...game will use joystick controllers.

 

Thanks in advance!

post-18904-0-83755100-1325618357_thumb.jpg

Link to comment
Share on other sites

Well there are several methods available to you, but each with it's own drawbacks and advantages.

 

1. Using Antic 4 character mode, and using PMG overlays on the bricks. This will give you 4 color by 5 level shading. You would also use missiles for your balls and a DLI on player 0 to create an extra paddle on the bottom.

 

2. Using Graphics 10 in char mode. With Graphics 10 you can get anywhere from 9 individual colors to 4 colors by 2 level shading. Disadvantages are lower horizontal resolution, and you can't use Player 0 as that is the background color.

 

3. Using Graphics 9 in char mode, and using PMG overlays on the bricks, combined maybe with color DLI's on the background. You get 16 level shading, plus with PMG overlays you can get 5 colors of bricks per line. I believe you can use priority blending on mode 9 to get the extra colors. Use a DLI again on player 0 to make your paddle on the bottom, Disadvantage is again lower resolution than Antic 4.

 

4. Using Super IRG ... you basically alter your character set every VBLANK to get 14 colors in ANTIC 4. The disadvantage here is it can get really flickery if you don't choose your colors right, but you can dither to reduce the flicker and create solid color fields. You could also do the character set change on every scanline rather than having to flip the character set on the whole screen.

 

All of these use Char mode. You can also adapt some of these methods to bitmap mode (Graphics 7, 9, 10, or 15) as well, with varying results.

Edited by Synthpopalooza
Link to comment
Share on other sites

Thanks for the reply Synthpopalooza. I don't have to worry about a ball as this game doesn't have one :D. Once the BASIC code is finished, I plan to convert it to binary using Atari DOS functions to create a stand-alone, self-loading disk. I plan to use Atari DOS' function for saving the program as a binary.

Link to comment
Share on other sites

I also need to add that once the game is complete, I plan to put it in cartridge form as well. So far, I have this much completed:

 

Working paddle

Joystick controls

Playfield

Player's block changes colors when fire button is pressed

Score & Left text

 

I still need to complete:

 

Randomly colored and placed blocks in playfield

Player's block to be placed in playfield

working score

working left

title screen

working start button

 

The game is using Graphics mode 9 mainly for the amount of colors that can be used. Project is coming along smoothly. However, I've lost or misplaced the source code to the Windows version so I am having to perform the game's logic from scratch again. I will post pics as soon as I get them off my cell phone.

Link to comment
Share on other sites

I can't seem to remember how, but I do remember there is a memory location using POKE that disables the screen saver on Atari 8-bits. Does anyone remember that location?

If I am not mistaken though, you have to continually strobe this register, as it gets updated during the VBI. Just poking to it once will not turn the color cycling off.

Link to comment
Share on other sites

Attract mode takes little over 9 minutes NTSC, about 11 minutes PAL.

 

If your levels expect to take less time, hitting it once per level will be enough. If you have a pause system, then just reset it when pause mode is exited.

If the game uses keyboard for anything, then hitting a key resets it anyway.

 

Re Basic - if you're using Atari Basic you won't get much joy without needing to resort to Assembler routines. Turbo Basic will give somewhat more leeway.

Edited by Rybags
Link to comment
Share on other sites

Hmmm...never heard of Turbo BASIC. I stuck with Atari BASIC mainly because it is built in. And I can use Atari DOS to convert to binary when my project is finished. I had done this one years ago when I first obtained a used XEGS with 2 floppy drives and a modem. It also came with one of the books on Atari Archives I think was 101 Microcomputer Games (the yellow one). One of my favorite text games in the book was Bombardment. So I converted it using graphics instead of text. I also strictly used the joystick. If I remember correctly, I used Autoexec to load the binary file created once the project was finished. I couldn't believe the speed difference from a BASIC file and a BINARY file.

 

Sadly, I'm using a 810 Single Density drive now as all that other Atari stuff I had my ex kept and sold off. So, I'm having to start over but it's been years since I have programmed this way. I'm a little rusty :D But, I'm having fun doing it again.

 

My only issue is I'm using Graphics Mode 9 and am having to come up with a way to place the score on the screen along side the playfield. I've got the numbers already mapped out and they display OK. I'm not doing so well coming up with a way to keep the score display accurate. I'm trying to use an array for it.

 

DIM SC(6)

 

This would allow for all 6 numbers (possible score is 999,999). The thought was that once the ones place hits 10, subtract 10 from it and add one to the tens place and so forth and place the remainder back into the ones place. Good news is that I have managed to get some blocks placed in the playfield at random positions and of random colors (can only be one of 5 colors). Due to the speed of BASIC, however, the game is almost unplayable due to slow responses from the interpreter. I am hoping that this will be eliminated when converted to binary.

Link to comment
Share on other sites

There is a command in Turbobasic which will display text in bitmap mode:

 

TEXT X,Y,"TEXT"

 

One thing to keep in mind: Characters will display as 8 pixels wide unless you precede the command with POKE 87,8. Doing this method, you can design a custom character set using 2x8 pixels and then write it to the Graphics 9 screen. You will have a 20 column wide character display.

 

Keep in mind you can also use Graphics 9 from text mode by doing POKE 623,64 while in GRAPHICS 0 and then using a custom character set.

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