Jump to content
IGNORED

Need help on a game I'm making


JackOfhearts

Recommended Posts

I thought it would be fun to make a Atari game so, I downloaded Bb, Stella, and VisualBb. I got my level, and my two sprites. When I to code the movement, or missiles Stella will just display a black screen. I have the draw_loop going on, so it isn't that. It does display my sprites and map when I dont have the code in, so i don't know were this is coming from. I think it might just be Stella durping about. I don't have any errors, and it compiles just fine. So why am I having this problem? how can I fix it? Also, is there any way I make some "cover"? I want to have some walls to duck and move around but I don't think they will have collision detection. Then again how should I know if they have it or not, I cant even make them walk :P. Thanks for any help. Goodbye!

Link to comment
Share on other sites

playfield:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

X.........X..........X.........X

X.........X..........X.........X

X....X....X..........X...X.....X

X....X...................X.....X

X....X...................X.....X

X....X...................X.....X

X....X....X..........X...X.....X

X.........X..........X.........X

X.........X..........X.........X

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

end

 

COLUBK = $0E

COLUPF =$00

player0x=25:player0y=50

player1x=130:player1y=50

missile0height=4:missile0x=255

NUSIZ0 = 16

 

sprites

 

player0:

%00111000

%00100000

%01101100

%01111110

%01100000

%01111000

%00101000

%00111000

end

 

player1:

%00011100

%00000100

%00110110

%01111110

%00000110

%00011110

%00010100

%00011100

end

 

if missile0x>240 then goto skip

missile0x=missile0x-2 goto draw_loop

skip

if joy0fire then missle0x = player0x-2:missile0y=player0y+4

 

if joy0yp then player0y = player0y-1: goto jump

if joy0down then player0y=player+1: goto jump

if joy0left then player0x = player0x-1 goto jump

if joy0right then player0x = player0x+1 goto jump

 

jump

goto sprites

 

draw_loop

drawscreen

goto sprites

Link to comment
Share on other sites

LOL

 

I suggested you post your code because,

while there maybe common newbie mistakes

that might be suggested, it's much more

difficult to diagnose things without seeing the code.

 

but ...

 

(mis)spelling missile as missle is somerthing I'm constantly doing

I wonder how common that is. (it's not that I don't know how to

spell missile it's just that my fingers somehow miss that second i )

Link to comment
Share on other sites

(mis)spelling missile as missle is somerthing I'm constantly doing

I wonder how common that is. (it's not that I don't know how to

spell missile it's just that my fingers somehow miss that second i )

 

I copy and paste from the bB page or use Visual batari Basic's autocomplete to make sure I'm not screwing up. When I create variables and labels, I copy and paste those too or use VbB's autocomplete. At one time VbB didn't remember variables and labels for use with autocomplete, but it does now.

Link to comment
Share on other sites

Still getting a black screen after applying the corrections. I think it might be Stella. I can run other games though so this really confuses me.

 

You can download the .bas file I posted and just use it. There is nothing for you to apply. You should be able to download it, compile it, and run it.

Link to comment
Share on other sites

The ROM that RT posted works fine in Stella and on the Harmony cart. You should try downloading the ROM and running it, and if it works, then you know Stella isn't the issue.

 

When starting out with programming and getting weird results, the first thing a lot of people do (myself included when I started many years ago) is blame the tools, the compiler, the emulator, etc. And while it's of course possible that it's one of those things, it's much more likely to be a simple logic/syntax error by the programmer.

Link to comment
Share on other sites

I did download it. I think my computer is just durping out on me

 

Did you download it, not make any changes to it, then compile it? If you tried to compile it without messing with the code and it wouldn't compile or it compiles and you get a black screen, something is wrong. Have you looked at this yet:

 

How to 'Install' Visual batari Basic on a Windows PC

Link to comment
Share on other sites

post your code

 

Basically your code is a mess

 

After you fix the miss spellings and put in the missing

colons you don't actually draw the screen unless

missile0x is <= 240 and that only happens when you

press joy0fire and doesn't last

 

 playfield:
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 X.........X..........X.........X
 X.........X..........X.........X
 X....X....X..........X...X.....X
 X....X...................X.....X
 X....X...................X.....X
 X....X...................X.....X
 X....X....X..........X...X.....X
 X.........X..........X.........X
 X.........X..........X.........X
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end

 COLUBK = $0E
 COLUPF =$00
 player0x=25:player0y=50
 player1x=130:player1y=50
 missile0height=4:missile0x=255
 NUSIZ0 = 16

sprites

 player0:
 %00111000
 %00100000
 %01101100
 %01111110
 %01100000
 %01111000
 %00101000
 %00111000
end

 player1:
 %00011100
 %00000100
 %00110110
 %01111110
 %00000110
 %00011110
 %00010100
 %00011100
end

 if missile0x>240 then goto skip
 missile0x=missile0x-2 : goto draw_loop
skip
 if joy0fire then missile0x = player0x-2:missile0y=player0y+4

 if joy0up then player0y = player0y-1 : goto jump
 if joy0down then player0y = player0y+1 : goto jump
 if joy0left then player0x = player0x-1 : goto jump 
 if joy0right then player0x = player0x+1 : goto jump

jump
 goto sprites 

draw_loop
 drawscreen
 goto sprites

Edited by bogax
Link to comment
Share on other sites

post your code

 

Basically your code is a mess

 

After you fix the miss spellings and put in the missing

colons you don't actually draw the screen unless

missile0x is <= 240 and that only happens when you

press joy0fire and doesn't last

 

All of that has been fixed here:

 

http://atariage.com/forums/topic/212912-need-help-on-a-game-im-making/#entry2764818

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