Jump to content

starting off..


4 replies to this topic

#1  

    Star Raider

  • 78 posts
  • Joined: 09-December 05

Posted Wed Dec 21, 2005 1:08 PM

ok, for batari basic... i downloaded the compiler...

1.) i assume when programming for the atari 2600 that the way it is programed from top to bottom horizontally... correct?

2.) i also assume that the very first lines of code are:

processor 6502
include "vcs.h"
nclude "macro.h"


ok i got this far :(

Edited by Ruffsta, Wed Dec 21, 2005 1:15 PM.


#2  

    Chopper Commander

  • 109 posts
  • Joined: 06-September 05

Posted Wed Dec 21, 2005 1:30 PM

#1 is correct

#2 is not needed.

for example:

consider the following program:

  rem sets player0's X and Y location on screen
5 x = 50 : y = 50

  rem sets color for the playfield, background and player sprite
10 COLUPF = 190
20 COLUBK = 40
30 COLUP0 = 65

  rem 8 x 8 sprite defined from Atari 2600 IDE sprite editor
50 player0: 
  %01111110
  %01111110
  %01011010
  %00111100
  %00011000
  %00111100
  %00100100
  %00011000
end   rem this ends the sprite definition and must be here

  rem this places the player at the X and Y corrds.
65  player0x = x : player0y = y

  rem display items on the screen
66 drawscreen   

70 goto 5  rem complete the loop

same program without the line numbers:
  topofloop  rem must not be indented
  x = 50 : y = 50 rem must indent one space min.

  COLUPF = 190  rem must indent 1 space min.
  COLUBK = 40   rem ditto
  COLUP0 = 65   rem ditto
 
  player0: rem must indent 1 space min.
  %01111110 rem ditto
  %01111110 
  %01011010
  %00111100
  %00011000
  %00111100
  %00100100
  %00011000
end  rem must be not be indented.

  player0x = x : player0y = y  rem must be indented 1 space min.
  drawscreen
  goto topofloop

both examples do the same thing as long as you respect indent rules you do not have to use line numbers.

note: most lines must be indented at least one space if not using line numbers
Hope this helps.

RA

Edited by Retro Archaeologist, Wed Dec 21, 2005 1:33 PM.


#3  

    Star Raider

  • 78 posts
  • Joined: 09-December 05

Posted Wed Dec 21, 2005 1:46 PM

:( and i thought vb6 was hard when i first started out... compared to this vb6 is a breeze!

i appreciate yer reply.. but i'm only on session 5 i still have NO idea even how to make a black screen, or a black screen with a word in it, or anything... am surprised with all the technology we have there isn't a better way to write code for an atari.

i know... putting text in atari is one of the hardest things to do, but when somebody puts in my cartride i want them to see a black screen with text (like KANGAROO or CENTIPEDE) - as i mentioned this before.. when they click the fire button then the screen changes to the game..


please be patient with me fellas.. atari is something i want to learn to program... i am walking into something brand new altogether. so you'll have to start at the beginning with me.

MSN: elruffsta1@yahoo.com if anybody cares to help me through msn - i find it would be faster and easier.

Edited by Ruffsta, Wed Dec 21, 2005 1:49 PM.


#4  

    Visual batari Basic User

  • 20,528 posts
  • Joined: 23-April 01
  • Controlled Randomness

    Replay Value

    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Dec 21, 2005 4:44 PM

It's easier if you check out the code for various games and experiments that have been posted in this forum. You can run it, look at the code, then run it again and figure things out a lot faster than starting from scratch.

In case you didn't know, there is an IDE for batari Basic that makes programming even easier. You can download it from here:

http://alienbill.com/2600/basic/

#5  

    Star Raider

  • 78 posts
  • Joined: 09-December 05

Posted Wed Dec 21, 2005 5:13 PM

yeah i have it..

just haven't figured out what to do with it yet :( waiting to see if my buddy joins the forum - he knows exactly what to ask and how to ask for it...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users