Jump to content
IGNORED

1st Game - I Need some Help


Lewis2907

Recommended Posts

AA Team,

I have it sort of working. My issue was that I lost the missiles using "set kernel_options player1colors no_blank_lines pfcolors" so i am using the "ball" in it's place. Player0 is now solid black with no color. I have tried COLUR0, player0color: to change the color but unable to. Also I am trying to incorporate sprites 2-9 to have more enemy and different shapes to fight or innocent bystanders like the car in level 2 driving through. I think if i can work out the above mentioned issues I should be able to add sound then the other stand alone levels I have built.

My plan is to have 5 levels (fairly easy to beat) cut sences (eventually work my way up to using titlescreen kernel for cut scenes) and background music for each level with different sound effects. Then I will try to work on a more difficult game that I have in mind.

Save Earth Complete - Clean Version..txt

Save Earth Complete - Clean Version..txt

Link to comment
Share on other sites

Here is your player color Issue. The Kernal options you selected does not support both player 0 and player 1 colors

 

set kernel_options player1colors no_blank_lines pfcolors

 

You are going to have to make a choice if you want both players to have color or to have no blank lines.

set kernel_options player1colors playercolors pfcolors

 

 

Virtual sprites only work with the Multisprite Kernal or the DPC+ kernal

 

Multisprite allows virtual sprites 1-5

 

DPC+ allows sprites 1-9

Link to comment
Share on other sites

Besides what has already been posted, you are using DIM in a weird way. You seem to be trying to DIM label names. You might want to look at this section of the bB page:

 

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

 

The "if !pfscore1 = 0" should either be "if !pfscore1" or "if pfscore1 = 0", not both.

 

You had an extra end in the program, so I deleted that. The program is still pretty messy, but it will at least compile now with no complaining from bblint:

 

lewis2907_2015y_12m_27d_0638t.bas

Link to comment
Share on other sites

Okay thanks. The issue I have is if I now is that my sprite0 flicker and changes colors. Now that I know most of the limitations I plan to change the Set Kernel options to the screen where I want to use it and when if that is possible. Otherwise if there are some ideas out there to streamline my program and make it better I am welcome to all ideas.

Link to comment
Share on other sites

Besides what has already been posted, you are using DIM in a weird way. You seem to be trying to DIM label names. You might want to look at this section of the bB page:

 

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

 

The "if !pfscore1 = 0" should either be "if !pfscore1" or "if pfscore1 = 0", not both.

 

You had an extra end in the program, so I deleted that. The program is still pretty messy, but it will at least compile now with no complaining from bblint:

 

attachicon.giflewis2907_2015y_12m_27d_0638t.bas

Thanks for cleaning this up. I noticed all the dim where in the beginning of the program. I was not 100% sure on dim. So I used dim hero = player0 to make sure that the program recognizes the hero. I think that what you did to the program makes it flow a little easier and better to understand. Thanks again for your help.

Link to comment
Share on other sites

You might want to look at this part of the bB page when you get a chance:

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


Also, you can't have separate kernel options for each screen unless you use the 256k, 128k, 64k, 32k, Multikernel Frameworks by RevEng.

Link to comment
Share on other sites

You might want to look at this part of the bB page when you get a chance:

 

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

 

 

Also, you can't have separate kernel options for each screen unless you use the 256k, 128k, 64k, 32k, Multikernel Frameworks by RevEng.

okay, that is what I was thinking I can do. The cut scenes I like the no blank lines and for level 1. Level 2 I like the random car in the street driving through and I some other ideas if I am able to use the multi sprite.

Link to comment
Share on other sites

Team,

 

Thanks for the help. I am able to run/play the title screen, cut scenes, level 1 and the game over screen separate.

 

I am able to run level 2 separate and the other levels I have made and a possible Easter Egg similar to Contra/Ikari Warriors (WIP). Just another cut scene and secret level.

 

I tried to merge it all together and I get "Fatal assembly error: Source is not resolvable. Errors were encountered during assembly.". I think that my issue is that the title screen, cut scenes level i and the game over use 32kSC and level 2 is just multi sprite kernel. RT posted above "Also, you can't have separate kernel options for each screen unless you use the 256k, 128k, 64k, 32k, Multikernel Frameworks by RevEng." I am not exactly sure how to incorporate that. if its difficult I will go with level I setting and continue that path.

 

The other issue, which is small is that I am trying to get my missile in level 2 to fire on it's own and rese similar to level I. Currently I have to hold down the button and release it.

 

If I am able to get this working and possibly flowing better I can add sound and the other levels. Then I will have a good foundation to make other small playable games. Also thanks to everyone who has posted in other forums and thier source. If you look hard enough you can see I took their source codes from what I can understand and use them in my game.

 

I have attached what works. The WIP is where I am trying to compile it all. The last option is that the clean version I could revert back to removing the blanks lines and I think I can add multi sprite in, but when I tried that i got an error as well. Thanks again for any help anyone can provide.

Save Earth Level 2 - 3 Jan 16.txt

Save Earth Complete - Clean Version..txt

Save Earth - 3 Jan 16 (WIP).txt

Link to comment
Share on other sites

Also thanks to everyone who has posted in other forums and their source. If you look hard enough you can see I took their source codes from what I can understand and use them in my game.

No need to look hard if you include their usernames and what programs you yanked code from. For example, most of the programs on the bB page have this near the beginning of the code:


   ;  Example program by Duane Alan Hahn (Random Terrain) using
   ;  hints, tips, code snippets, and more from AtariAge members
   ;  such as batari, SeaGtGruff, RevEng, Robert M, Nukey Shay,
   ;  Atarius Maximus, jrok, supercat, GroovyBee, and bogax.
Link to comment
Share on other sites

here's some unsolicited advice unrelated to your problems


the joy sticks are on SWCHA


the SWCHA bits are like this rldurldu

bits 7..4 are joy0 and bits 3..0 are joy1

if a switch is pressed it reads as a 0 eg joy0 right-up would be 01101111

you can invert the bits (so that a pressed switch reads as 1 and an unpressed switch as 0)

by exclusive ORing with 1 eg (in Bb) (SWCHA still right-up) temp1 = SWCHA ^ %11110000 and temp1 will be %10011111

if you divide by 2 you shift the bits to the right filling the upper bits with 0


so (SWCHA still right-up) temp1 = SWCHA / 16 and temp1 will be %00000110

(SWCHA still right-up) temp1 = SWCHA / 16 ^ %00001111 and temp1 will be %00001001

some combinations can't happen eg down-up

right_left corresponds to 12 in decimal there are 16 possible combinations

all of 12..15 correspond to left-right simultaneously ie they can't happen

11 corresponds to %00001011 which would be left-down-up ie can't happen


so the possiblities range from 0..10


rearranging this



rem This section sets a value for the last direction the joystick was pushed
if joy0up then c{1}=1:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0
if joy0down then c{1}=0:c{2}=1:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0
if joy0left then c{1}=0:c{2}=0:c{3}=1:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0
if joy0right then c{1}=0:c{2}=0:c{3}=0:c{4}=1:c{5}=0:c{6}=0:c{7}=0:c{0}=0
if joy0up && joy0left then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=1:c{6}=0:c{7}=0:c{0}=0
if joy0up && joy0right then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=1:c{7}=0:c{0}=0
if joy0down && joy0left then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=1:c{0}=0
if joy0down && joy0right then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=1


so that it's in order



rem This section sets a value for the last direction the joystick was pushed
rem rldu c
if joy0up then c{1}=1:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0 rem 0001 %00000010
if joy0down then c{1}=0:c{2}=1:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0 rem 0010 %00000100
rem down-up rem 0011 %00000000
if joy0left then c{1}=0:c{2}=0:c{3}=1:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0 rem 0100 %00001000
if joy0up && joy0left then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=1:c{6}=0:c{7}=0:c{0}=0 rem 0101 %00100000
if joy0down && joy0left then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=1:c{0}=0 rem 0110 %10000000
rem left-down-up rem 0111 %00000000
if joy0right then c{1}=0:c{2}=0:c{3}=0:c{4}=1:c{5}=0:c{6}=0:c{7}=0:c{0}=0 rem 1000 %00010000
if joy0up && joy0right then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=1:c{7}=0:c{0}=0 rem 1001 %01000000
if joy0down && joy0right then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=1 rem 1010 %00000001


you can put all that into a table



temp1 = SWCHA / 16 ^ %00001111 : c = last_direction_table[temp1]

data last_direction_table
%00000000, %00000010, %00000100, %00000000, %00001000, %00100000, %10000000, %00000000, %00010000, %01000000, %00000001
end


and save a lot of time and bytes


personally I generally translate the switches to something like compass directions

ie c might run from eg 0..10 proceeding clockwise around the compass 1 = up-right, 2 = right, 3 = right-down, etc

(I'm not suggesting you should do that, it's not necessarily the best way, but it's a possibility to consider)

this could be an advantage if you want to use c with on gosub or on goto


also if you want to set or clear a bunch of bits in c at once you can do it all at once


if you want to clear all the bits in c, c = %00000000 (or just c = 0)


ORing a bit with 0 will not affect it

ORing a bit with 1 will result in a 1

ANDing a bit with 1 will not affect it

ANDing a bit with 0 will result in a 0


if c = %hgfedcba and you want to set bits dc then c = c | %00001100 and c will be %hgfe11ba

ie the letters will be unchanged, 0 or 1 whatever they were

c = c & %11110011 c will be %hgfe00ba


I think all this is explained on RT's page
Link to comment
Share on other sites

Dragonstomper,

 

Thanks for the tips. I tried to copy and paste what you sent, but I get an error. I don't fully understand SWCHA. I basically just search the forums for source code I can kind of make sense of or figure out how it works to the best of my ability. I will try still try to incorporate what you sent and do some more research on it. My goal is to have a somewhat working game (glitches are okay) by the time I redeploy from Afghanistan. I have some spare time here so I am able to play with the code. Hopefully I can get this first game completed. My goal is to use this game as a tool to build others. I try my best to put "rem" everywhere so I can go back and look at what I did or for others to try and understand my logic/non-logic. I am always open to and welcome all comments or ideas as I am still learning. Thanks again for your help and comments.

 

here's some unsolicited advice unrelated to your problems
the joy sticks are on SWCHA
the SWCHA bits are like this rldurldu
bits 7..4 are joy0 and bits 3..0 are joy1
if a switch is pressed it reads as a 0 eg joy0 right-up would be 01101111
you can invert the bits (so that a pressed switch reads as 1 and an unpressed switch as 0)
by exclusive ORing with 1 eg (in Bb) (SWCHA still right-up) temp1 = SWCHA ^ %11110000 and temp1 will be %10011111
if you divide by 2 you shift the bits to the right filling the upper bits with 0
so (SWCHA still right-up) temp1 = SWCHA / 16 and temp1 will be %00000110
(SWCHA still right-up) temp1 = SWCHA / 16 ^ %00001111 and temp1 will be %00001001
some combinations can't happen eg down-up
right_left corresponds to 12 in decimal there are 16 possible combinations
all of 12..15 correspond to left-right simultaneously ie they can't happen
11 corresponds to %00001011 which would be left-down-up ie can't happen
so the possiblities range from 0..10
rearranging this
 rem This section sets a value for the last direction the joystick was pushed
 if joy0up then                c{1}=1:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0
 if joy0down then              c{1}=0:c{2}=1:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0
 if joy0left then              c{1}=0:c{2}=0:c{3}=1:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0
 if joy0right then             c{1}=0:c{2}=0:c{3}=0:c{4}=1:c{5}=0:c{6}=0:c{7}=0:c{0}=0
 if joy0up && joy0left then    c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=1:c{6}=0:c{7}=0:c{0}=0
 if joy0up && joy0right then   c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=1:c{7}=0:c{0}=0
 if joy0down && joy0left then  c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=1:c{0}=0
 if joy0down && joy0right then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=1
so that it's in order
  rem This section sets a value for the last direction the joystick was pushed
  rem                                                                                        rldu     c
  if joy0up then                c{1}=1:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0  rem 0001 %00000010
  if joy0down then              c{1}=0:c{2}=1:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0  rem 0010 %00000100
  rem down-up                                                                            rem 0011 %00000000
  if joy0left then              c{1}=0:c{2}=0:c{3}=1:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0  rem 0100 %00001000
  if joy0up && joy0left then    c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=1:c{6}=0:c{7}=0:c{0}=0  rem 0101 %00100000
  if joy0down && joy0left then  c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=1:c{0}=0  rem 0110 %10000000
  rem  left-down-up                                                                      rem 0111 %00000000
  if joy0right then             c{1}=0:c{2}=0:c{3}=0:c{4}=1:c{5}=0:c{6}=0:c{7}=0:c{0}=0  rem 1000 %00010000
  if joy0up && joy0right then   c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=1:c{7}=0:c{0}=0  rem 1001 %01000000
  if joy0down && joy0right then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=1  rem 1010 %00000001
you can put all that into a table
  temp1 = SWCHA / 16 ^ %00001111 : c = last_direction_table[temp1]
 
  data last_direction_table
  %00000000, %00000010, %00000100, %00000000, %00001000, %00100000, %10000000, %00000000, %00010000, %01000000, %00000001
end
and save a lot of time and bytes
personally I generally translate the switches to something like compass directions
ie c might run from eg 0..10 proceeding clockwise around the compass 1 = up-right, 2 = right, 3 = right-down, etc
(I'm not suggesting you should do that, it's not necessarily the best way, but it's a possibility to consider)
this could be an advantage if you want to use c with on gosub or on goto
also if you want to set or clear a bunch of bits in c at once you can do it all at once
if you want to clear all the bits in c, c = %00000000 (or just c = 0)
ORing a bit with 0 will not affect it
ORing a bit with 1 will result in a 1
ANDing a bit with 1 will not affect it
ANDing a bit with 0 will result in a 0
if c = %hgfedcba and you want to set bits dc then c = c | %00001100 and c will be %hgfe11ba
ie the letters will be unchanged, 0 or 1 whatever they were
c = c & %11110011 c will be %hgfe00ba
I think all this is explained on RT's page

 

Link to comment
Share on other sites

 

No need to look hard if you include their usernames and what programs you yanked code from. For example, most of the programs on the bB page have this near the beginning of the code:


   ;  Example program by Duane Alan Hahn (Random Terrain) using
   ;  hints, tips, code snippets, and more from AtariAge members
   ;  such as batari, SeaGtGruff, RevEng, Robert M, Nukey Shay,
   ;  Atarius Maximus, jrok, supercat, GroovyBee, and bogax.

RT,

 

Thanks for the info. I have went back and researched where I borrowed others codes so I can include them in the beginning of the program to give them credit.

  • Like 1
Link to comment
Share on other sites

Dragonstomper,

 

Thanks for the tips. I tried to copy and paste what you sent, but I get an error. I don't fully understand SWCHA. I basically just search the forums for source code I can kind of make sense of or figure out how it works to the best of my ability. I will try still try to incorporate what you sent and do some more research on it. My goal is to have a somewhat working game (glitches are okay) by the time I redeploy from Afghanistan. I have some spare time here so I am able to play with the code. Hopefully I can get this first game completed. My goal is to use this game as a tool to build others. I try my best to put "rem" everywhere so I can go back and look at what I did or for others to try and understand my logic/non-logic. I am always open to and welcome all comments or ideas as I am still learning. Thanks again for your help and comments.

oops, yup I goofed it
try this
 
  temp1 = SWCHA / 16 ^ %00001111
  if temp1 then c = last_direction_table[temp1]
 
  data last_direction_table
  %00000000, %00000010, %00000100, %00000000, %00001000, %00100000, %10000000, %00000000, %00010000, %01000000, %00000001
end
 
here's a comparison (using d for mine and c for yours)
top line is yours, the one below it is mine
the bottom line is just for reference to show which bits are which
the bit of asm at the end tells DASM to show the number of bytes
between the labels
 
 
 var40 = $55
 COLUPF = $55
 
loop
 
 
 rem This section sets a value for the last direction the joystick was pushed
 if joy0up then                c{1}=1:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0
 if joy0down then              c{1}=0:c{2}=1:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0
 if joy0left then              c{1}=0:c{2}=0:c{3}=1:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=0
 if joy0right then             c{1}=0:c{2}=0:c{3}=0:c{4}=1:c{5}=0:c{6}=0:c{7}=0:c{0}=0
 if joy0up && joy0left then    c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=1:c{6}=0:c{7}=0:c{0}=0
 if joy0up && joy0right then   c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=1:c{7}=0:c{0}=0
 if joy0down && joy0left then  c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=1:c{0}=0
 if joy0down && joy0right then c{1}=0:c{2}=0:c{3}=0:c{4}=0:c{5}=0:c{6}=0:c{7}=0:c{0}=1
 
mark1
 
 
 
  temp1 = SWCHA / 16 ^ %00001111
  if temp1 then d = last_direction_table[temp1]
 
  data last_direction_table
  %00000000, %00000010, %00000100, %00000000, %00001000, %00100000, %10000000, %00000000, %00010000, %01000000, %00000001
end
 
mark2
 
  var32 = c
  var36 = d
 
  drawscreen
 
  goto loop
 
 
 asm
 echo (.mark1-.loop)d
 echo (.mark2-.mark1)d
end
 
 

SWCHA_encode.bas

SWCHA_encode.bas.bin

Edited by bogax
Link to comment
Share on other sites

Random Terrain / Dragonstomper,

 

Thanks for the tips on the SWCHA. I have a better understanding now. I plan to change and cleanup the SWCHA Commands using the ex_SWCHA_ongosub example. I was able to understand most of it. I think I can add it. The question I have is:

I am using these settings for level 1:

set tv pal
set romsize 32kSC
set kernel_options player1colors no_blank_lines pfcolors
set optimization speed
set smartbranching on
set optimization noinlinedata
set optimization inlinerandfor

 

 

level 2

set tv pal,

set kernel multisprite

 

I know that Random Terrain said "Also, you can't have separate kernel options for each screen unless you use the 256k, 128k, 64k, 32k, Multikernel Frameworks by RevEng". To be honest that is a lot. But reading everything again above and to keep it simple I need to pick certain settings and keep them for the duration of the program. I am not sure if I can do a soft reset to reset the setting to transition to level 2 or use a bank. I am still learning, but I will say that I have told some friends about Batari Basic and they are very interested and surprised like I was when I stumbled upon this. Wish I would have known about this a few years ago. Thanks in advance for any ideas of help that you may have.

 

Have you looked at the section about it on the batari Basic page?

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

Link to comment
Share on other sites

  • 3 weeks later...

Team,

 

This is what I am working on so far. Thanks to all the code I could find out there. I did compile it together to make it interactive. The issue I ran into so far is "bank 2" "__River_Level". From what I can find in AA Forums is that my data is stored and or taking up space. I tried to mirrior "bank 1" changing screens etc. My goal was to have "if room_shape[room] = 14 then if player0y = 85 then goto __River_Level bank2" goto to the river level and then after driving the boat around for a while exit there and go back to the main screen.

 

What works so far:

Title screen

Cut scene "press fire to go to the next screen"

Drive around all 36 rooms - based off of "Unnamed GTA Style Game"

Enter a room and or can't drive off the screen - based off of "move_around_rooms"

Once in game mode "use the color/bw" to change screens" and bring up location map. (one River Level is working) I plan to include that on the map.

 

you can keep score etc and loose score if the police/enemy touch you.

 

If someone can get the "River Level" working that would be great. I read somewhere/article that most people continue to build and use their first complex game as the blueprint to make others.

 

Also adding sound would be a plus. My thought is to use the "select switch" to change background music / sound. That and the Title screen kernel is a challenge by itself.

 

I am still learning. Thanks to all the stuff I could find online.

 

Thanks in advance if anyone can help.

Save Earth - Works - Except River Level - Room 5 or shape 14.txt

Save Earth - River Level - Works.txt

Edited by Lewis2907
Link to comment
Share on other sites

Team,

 

This is what I am working on so far. Thanks to all the code I could find out there. I did compile it together to make it interactive. The issue I ran into so far is "bank 2" "__River_Level". From what I can find in AA Forums is that my data is stored and or taking up space. I tried to mirrior "bank 1" changing screens etc. My goal was to have "if room_shape[room] = 14 then if player0y = 85 then goto __River_Level bank2" goto to the river level and then after driving the boat around for a while exit there and go back to the main screen.

 

What works so far:

Title screen

Cut scene "press fire to go to the next screen"

Drive around all 36 rooms - based off of "Unnamed GTA Style Game"

Enter a room and or can't drive off the screen - based off of "move_around_rooms"

Once in game mode "use the color/bw" to change screens" and bring up location map. (one River Level is working) I plan to include that on the map.

 

you can keep score etc and loose score if the police/enemy touch you.

 

If someone can get the "River Level" working that would be great. I read somewhere/article that most people continue to build and use their first complex game as the blueprint to make others.

 

Also adding sound would be a plus. My thought is to use the "select switch" to change background music / sound. That and the Title screen kernel is a challenge by itself.

 

I am still learning. Thanks to all the stuff I could find online.

 

Thanks in advance if anyone can help.

Uploaded edited version with rooms blacked out. Next step is to add a way to find money and or police chasing you and you have to find you way out.

Save Earth - Works - Except River Level - Room 5 or shape 14.txt

Link to comment
Share on other sites

Here is an update. Instead of the data for the River (now called Canal Level) I was able to incorporate Mountain King side scroller Gizzlewap code. This works best so far to me as I can add the Sub Level and Jungle Level which I plan to have complete tomorrow. I can now update the helicopter level. I almost have my initial goal complete to have a free roaming world per say. I have included some exits from the Canals. To make it seem like you can move anywhere you want. The code is "messy" and a some "bugs", but you can move around and play it now.

 

I plan to have the above completed and then the map updated to reflect where you are. Then update the sprites and the score to include a game over screen if your points go down to $0.

 

The final piece will be of course sound and using the select switch to change background music. The issue I see is memory and using gosub. Along with incorporating background music and or sound effects.

 

For the title screen I see where people have done overlays of the player sprites to have a better title screen. Plus update the dialog for the cut scenes.

 

If I can complete this I think I will have a good start on programming as this is my first attempt at it. I plan to use what I have learned to attempt an RPG style game,

keeping it simple of course.

 

I am always welcome to comments and suggestions. Hopefully what I have here helps someone else who is learning at my programming level while is low when compared to some of the source code I have seen that is complex and takes time to really learn.

Save Earth - Works - Canal Level Working - 25 Jan 16.txt

Link to comment
Share on other sites

AA Team,

 

Just an update where I am and in the learning process. I would like to say I hope in the beginning of the program I gave credit where credit is due. I did try some cleaning up of the program and moved some items around to have more bank space.

 

What works - I have been playing around with it for bugs / glitches and trying to fix them as I come across them.

 

City Streets - There are 36 rooms

 

City Streets Buildings - If you drive into a building you will go to one of 15 random rooms. Still need to work on this some more to improve it. But you can enter and exit the room - Glitch is that you may/may not end back up where you started from. Most of the time you do.

 

River (Canal) accessed through room 5 or 0. Based upon the map drive the car/boat in the direction you want to go.

 

Earth Level - access at the airport room 15. (WIP may need to reset the game to exit, plan to finish this weekend).

 

Sub Level - accessed from the River (Canal) about halfway through.

 

Helicopter side scroll - accessed from River (Canal) bottom of room 5. For now you can only go to the end of the level. Working on connecting the city/jungle level for an exit.

 

Helicopter top view - WIP hopefully completed this weekend.

 

You can shoot in all levels and the enemy comes back, but at travel from weird angles. I plan to fix that to make it more realistic. Not sure if I can use NUSIZ1 to simulate them spawning from small to the size I want. Was experimenting with it on the Sub level.

 

While driving the car, boat, sub or helicopter you can use the Color/BW switch to pull up your location. So far I have tested every room. What I did find out is that Batari can only handle so many if statements reason I have two Map_Positions. I did try combining some with if with & or || but this caused more glitches and sometimes didn't work at all.

 

Goals / WIP:

 

Title screen / Cut scenes need work and better dialogue - WIP

Use the Select button to change music or sound effects as I am running low on space. Once I learn how sound really works.

Set an overall goal as or points to reach to end the game or start the game over.

put and easter egg in the game if possible, but space is low right now. Had an Idea, but not sure yet.

 

Hopefully to use this program as a basis for the project I would like to accomplish a RPG / Side scroller or something.

 

I hope that this helps the ones who are trying to learn like I am. I am always welcome to suggestion, comments or criticisms.

 

 

 

 

Save Earth - 28 Jan 16.txt

post-44593-0-79195000-1453993283_thumb.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Here is a update to the my first attempt at a game. The map works on all levels now. use the BW/Color switch. I plan to add a few sounds this week from what I found online. There is no basic ending to why for the game. I thought it was different to have multiple screens. After the sound I plan have the enemy (player1) appear instead of coming off screen to make it more realistic. I can only think of a points scenario to have a way to beat or the game end. I plan to clean up the cut scenes.

 

I do have a question: How or is there some example code to switch sprites? I was thinking instead of always having the same sprite for certain levels. You could change sprites. It's more or less what I plan to attempt next. An example is that a sprite can jump a certain height but if you change to another sprite they could jump higher. Something very similar to Mario and Lugi. If you go to a certain point on the game/level and could pass it but knew that another sprite could do it. Go to a certain point and change it. I hope I explained what I would like to do. I was going to try and make something using the "data / room" change that I somewhat understand now to create something multi world but you need certain characters to get to another level or section of the map.

 

I hope this helps other beginners like myself. I have been using BB since Oct 2015. The code is messy but I did try to include comments to what the code does or I intended it to do. I plan to clean this up as well to make more space as I am running low. As always I welcome comments, criticisms as I am trying to learn Batari better, thanks.

Save Earth - 8 Feb 16.txt

Link to comment
Share on other sites

If there will be more than two characters, you can use a variable to keep track. If variable equals this number, use these animations. If variable equals that number, use those animations and so on. If there will be only two characters, you could save a variable by using a bit. If bit is off, use these animations. If bit is on, use those animations.

Link to comment
Share on other sites

AA Team,

 

Here is an update. I added some sound. Very generic in nature. Fixed some glitches I found in the Sub Level. Fixed the map to pull up the position. Running low on space, which I know happens to everyone. Did add the part you with 10 for the score if you go under 0 - Gameover. I did clean up most of the REM to hopefully make it clear as to what I was trying to do.

 

Issue: Space - Not sure why bank 8 is almost gone. I only can assume that the program uses that as well. Maybe for all the gosubs or if. Not sure as to how many if's the program can handle. I had to separate almost all of them instead of using && or ||

 

Next step: Add some sound in the other two levels. Use the difficulty switch to start with 2 or 0 to make it a challenge. Try to incorporate having a certain score to make it to the next level. Possibly fix the title screen and cut scenes. Maybe rename it to another name.

 

As always I welcome comments, criticisms as I am trying to learn Batari better, thanks.

Save Earth - 9 Feb 16v1.txt

Link to comment
Share on other sites

Issue: Space - Not sure why bank 8 is almost gone. I only can assume that the program uses that as well. Maybe for all the gosubs or if.

No need to guess:

 

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

You do not need to specify where sprite graphics go, as they all will be automatically placed in the last bank no matter where you define them (you can just leave all of your animation frames in the same bank that contains your main loop). Also, the kernel will always be placed in the last bank. Typically, bB modules and functions will as well.

 

For the standard kernel, playfield graphics data gets stored in whatever bank you place it in. For the multisprite kernel, playfield graphics data automatically gets stored in the last bank. For the DPC+ kernel, playfield graphics data automatically gets stored in the "graphics" bank.

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