Jump to content
IGNORED

how is basic what is program help


Scott_B
 Share

Recommended Posts

I'm trying to make a simple game thing in visual bb but noooo :mad:

 

In z26 and Stella it's just a black screen.

 

am I stupid or what because I have NO idea

   gamestart
MainLoop
player0color:
 $40
 $40
 $40
 $40
 $40
 $00
 $06
 $06
 $02
end
motorbike
player0:
 %11100000111
 %10101110101
 %11101000111
 %00011101000
 %00000101000
 %00011010000
 %00000010000
 %00001111100
 %00001000100
end
player
player1:
 %000001100
 %000001000
 %000001000
 %000001000
 %001110000
 %001000000
 %011111000
 %010100000
 %011100000
end
pfheights:
 8
 8
 8
 8
 8
 8
 8
 8
 8
 8
 8
end
pfcolors:
 $9C
 $9A
 $8A
 $88
 $74
 $72
 $C4
 $C2
 $C0
 $00
 $00
end
playfield:
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXX..XXXXX
 XXXXXXXXXXXXXXXXXXXXXXXX...XXXXX
 XXXXXXXXXXXXXXXXXXXXXX.....XXXXX
 XXXXXXXXXXXXXXXXXXX........XXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
set tv ntsc
set kernel multisprite
pfscorecolor = $26
set romsize 4k
   set smartbranching on
    AUDV0 = 6
    AUDC0 = 2
    AUDF0 = 7
    player0x=0
    player0y=0
    player1x=player0x
    player1y=player1x
    if joy0left then player0x=player0x-1:if player0x<10 then player0x=10
    if joy0right then player0x=player0x+1:if player0x>137 then player0x=137
    if joy0up then player0y=player0y-1:if player0y<7 then player0y=7
    if joy0down then player0y=player0y+1:if player0y>99 then player0y=99
drawscreen
goto MainLoop
Link to comment
Share on other sites



here I've rearranged your code to be more to my liking



I moved the kernel options and such to the first thing


I removed the multisprite kernel, it doesn't have the options


I added player1colors to the kernel options


I swapped player0 and player1 'cause player1 has the colors option


I turned on the pfscore bar(s)


I intialized the left score bar


I moved the (setup) stuff that you don't need in the mainloop in

to a subroutine at the end


I initialized the player0 and player1 locations to where they'd be visible when the game starts


I put the player0 and player1 location intialization all on the same

line because they're all getting intialized to the same value and it will

save time and space (in that case) if they're all (consecutively) on the same line


I added actual rem statements to what I took to be rem statements



I did not fix player0 to follow player1 ;)



don't know what I might have messed up (eg not sure what you had in mind)




set tv ntsc
set kernel_options player1colors pfcolors pfheights
set romsize 4k
set smartbranching on


const pfscore = 1


rem gamestart

gosub setup


MainLoop
if joy0left then player1x=player1x-1:if player1x<10 then player1x=10
if joy0right then player1x=player1x+1:if player1x>137 then player1x=137
if joy0up then player1y=player1y-1:if player1y<7 then player1y=7
if joy0down then player1y=player1y+1:if player1y>99 then player1y=99
drawscreen
goto MainLoop



setup

pfscorecolor = $26 : pfscore1 = %11111111
player0x = 32 : player0y = 32 : player1x = 32 : player1y = 32
AUDV0 = 6
AUDC0 = 2
AUDF0 = 7




player1color:
$40
$40
$40
$40
$40
$00
$06
$06
$02
end

rem motorbike
player1:
%11100000111
%10101110101
%11101000111
%00011101000
%00000101000
%00011010000
%00000010000
%00001111100
%00001000100
end

rem player
player0:
%000001100
%000001000
%000001000
%000001000
%001110000
%001000000
%011111000
%010100000
%011100000
end

pfheights:
8
8
8
8
8
8
8
8
8
8
8
end

pfcolors:
$9C
$9A
$8A
$88
$74
$72
$C4
$C2
$C0
$00
$00
end

playfield:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX
XXXXXXXXXXXXXXXXXXXXXXXXX..XXXXX
XXXXXXXXXXXXXXXXXXXXXXXX...XXXXX
XXXXXXXXXXXXXXXXXXXXXX.....XXXXX
XXXXXXXXXXXXXXXXXXX........XXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end

return

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...