Jump to content
IGNORED

First project


Secamline

Recommended Posts

Maybe instead of having the gun constantly move to the left, you could incorporate some momentum, have it keep moving the last direction you pushed for a little bit after you release the joystick or try to move the other direction. That would be a much better way to add that little bit of challenge to the controls.

  • Like 1
Link to comment
Share on other sites

Like this?

 

Yep. While you're at it, you might want to fix it so holding down the reset switch doesn't freeze the game. Here's an example program that might be helpful:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#sprite_missile_bankswitching_example

Link to comment
Share on other sites

However this template doesn't work ..

 

If you compile it without adding anything to it, you'll get a blank screen. Here is a version with playfield data and colors added:

 

template_2015y_04m_19d_1755t.bin

 

template_2015y_04m_19d_1755t.bas

Link to comment
Share on other sites

oh, here it is

I just can't figure out how it works

 

You need to convert COLUBK, COLUPF, COLUP0, and COLUP1 to what the DPC+ kernel uses. Here is a link to the DPC+ section of the Table of Contents:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpc_toc

 

If this was in your other program, I missed it:

_

   if COLUBK=240 then if f=0 then . . .

_

COLUBK is write-only. For example, a = COLUBK will not work properly. Be sure to change that in your non-DPC+ program and make whatever adjustments you need for the DPC+ version.

 

 

You also had "set DPC+" instead of "set kernel DPC+." It's usually best to copy and paste things so it's harder for human error to creep in.

 

 

All I mostly did was rem out things that won't work in the DPC+ kernel and made a few adjustments just to get the program working:

 

dpc_scode_2015y_04m_20d_0246t.bas

 

You'll need to adjust the placing of your sprites, update the lines I commented out, and go to the DPC+ section of the bB page and learn more about the playfield and whatever else you need.

 

Link to comment
Share on other sites

That template is actually very useful once you get used to all the new names for resizing and background color schemes and what not. Very fun. I have ported over my latest work (Run Out) into this template and it helped sort out some little setbacks I was having with this particular game. FUN!!

Link to comment
Share on other sites

You declare the resolution of the playfield..

 

DF6FRACINC = 64 ; (These are your background colors. It can be 0 and make the whole background behind the playfield one color or it can match the playfield rows.)

DF4FRACINC = 64 ; (These are your playfield colors. input 16, 32, 64, 128, or 255. There are many more. 255 would be 88 rows with 2 scanlines each, and so on.)

DF0FRACINC = 32; ( this is Column 0)
DF1FRACINC = 32; (this is Column 1)
DF2FRACINC = 32; (this is Column 2)
DF3FRACINC = 32; (this is Column 3)

 

drawscreen

 

The above sets up your resolution for the background and draws the screen.

 

Player0 is the same for resizing..

 

NUSIZ0=0 (normal size)

NUSIZ0=5 (double sized)

NUSIZ0=7 (quad sized)

 

..player1 is different!!

 

_NUSIZ1=5 (double sized) using the underscore.

 

Reflecting the player0 sprite is the same..

 

REFP0=8 (mirrors the player0 sprite)

 

Other than player0 is different..

 

_NUSIZ1{3} = 1 (mirrors 1-9 with the number after 'Z' defining the sprite and 1 or 0 after "=" setting the bit on or off.)

SO. REFP doesn't work on anything past player0 because all the extra sprites use the player1 sprite.

Only player1 needs the underscore, so NUSIZ2{3} = 1 would flip the reflect bit on for the player2 sprite. This is the same for 3-9, no underscore required.

 

Player colors are done like this..

 

(This is a tree..)

 

tree

player1color:
$E6
$E4
$E8
$E8
$E6
$F6
$F8
$F8
$F8
$F6
$F6
$F6
end

player1:
%01010101
%10100010
%01010101
%10101010
%01010101
%01111111
%00111110
%00011100
%00011100
%00011100
%00111110
%01111111
end

 

"Player1color: " is declaring the colors for each row of the sprite,in order. (replace the 1 with any number between 0-9 to define the colors for those sprites. You can also use the same colors for sequential sprites. If sprites 1 and 2 use the same colors than "Player1-2color:" would do the job.

 

Sprites are flipped in DPC+, so if you port work from earlier you will want to load the sprite into an editor and flip it before pasting it into the program.

 

Certain things have to be alone in the code, without "if" or anything else in front of them. This doesn't mean you can't use it with a variable, you just may need to gosub it from somewhere else.

 

NUSIZ

COLUBK (replaced in DPC+ with "bkcolors:" and then a row of colors (or one) that matches your rows defined above with "DF6FRACINC =")

REFP

 

These are examples of write-only. They flip a bit in the hardware that zooms, reflects, or recolors something. (Atari has HARDWARE ZOOMING!?!) :cool:

 

RT made a non-flashing list of commands for DPC+l!! :P :-o

 

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpcplus

 

(I just chopped up bits from it I use and made my own little manual, as I don't program on an internet computer)

 

:thumbsup:

Link to comment
Share on other sites

mmh... I guess i should have thought of this before actually making the game, it would have been easier, I'll try to make it work properly anyway, just wondering, why the colors of player0 and player1 are messed up?

Edited by Secamline
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...