Jump to content
IGNORED

missile sprite


STGraves

Recommended Posts

..like this

 

set kernel_options player1colors playercolors pfcolors
set tv ntsc

begin

if joy0fire then goto ready

player0y=50

pfcolors:
$88
$88
$88
$88
$88
$88
$88
$88
$88
$88
$88
end

playfield:
................................
..XXXXX..X..X..XX...XXX.XXXXX...
.X.......X..X.X..X.X......X.....
.X...XXX.XXXX.X..X..XX....X.....
.X....XX.X..X.X..X....X...X.....
..XXXXX..X..X..XX..XXX....X.....
................................
..X.X..X.XXX.XXX.X.X..XXX.......
.X.X.X...XX..XX....X..X.........
.X...X.X...X...X.X.X..XX........
.X...X.X.XX..XX..X.XX.XXX.......
end
drawscreen
goto begin

ready

player0x=30
a=a+1
if joy0up then b=b+1 else b=0
if joy0down then c=c+1 else c=0
if joy0fire then f=f+1 else f=0
if b>3 then player0y=player0y-1
if c>3 then player0y=player0y+1
if f=5 then m=1
if player0y<17 then player0y=17
if player0y>63 then player0y=63

player0color:
$02
$04
$02
$02
$02
$02
$02
$04
$02
end

player0:
%11110000
%11100000
%11111000
%11111110
%11001111
%11111110
%11111000
%11100000
%11110000
end

pfcolors:
$B8
$B8
$B8
$B8
$B8
$B8
$B8
$B8
$B8
$B8
$B8
end

if a=1 then playfield:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
................................
................................
................................
................................
................................
................................
................................
X.....X.....X.....X.....X......X
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end

if a=5 then playfield:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
................................
................................
................................
................................
................................
................................
................................
...X.....X.....X.....X.....X....
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
drawscreen
if m=1 then gosub blastoff
if a=10 then a=0
goto ready

blastoff

g=g+1
if g=5 then player0x=40
if g=7 then player0x=60
if g=11 then player0x=80
if g=15 then player0x=100
if g=17 then player0x=120

player0color:
$0E
$0E
$0E
$1E
$1C
$1E
$0E
$0E
$0E
end

player0:
%00000000
%00000000
%00000000
%11110000
%01011111
%11110000
%00000000
%00000000
%00000000
end
drawscreen
if a=10 then a=0
if g=18 then g=0:m=0
return

 

 

 

 

..this is a little demo called Ghost Missile that gives you color for both sprites and a missile that is another graphic of your player0 sprite. (It also gives a little background animation..)

 

GhostMissile.bin ..or download it just to play around!

Edited by Papa
Link to comment
Share on other sites

Using the missiles (and ball) as a sprite is possible, but it's an advanced technique that would require you to switch to 6507 assembly to use. Some examples:

 

In Hunchy II all bells are drawn with missile0, the blue "bullets" you need to avoid are missile1

post-3056-0-21826400-1425669920_thumb.png

 

In Dark Cavern a number of the enemy are drawn with the missiles:

post-3056-0-53618600-1425670126_thumb.png

 

In Super Challenge Football, most of the players are drawn with the missiles.

post-3056-0-90428000-1425670216_thumb.png

 

You can use Stella's Fixed Debug Color Mode to see which elements are drawn with which object:

post-3056-0-47005000-1425670261_thumb.png

 

See this reply for more info about debug color mode.

Edited by SpiceWare
Link to comment
Share on other sites

But, you probably aren't going to be using assembly, so there are 'other' ways!! :P

Plus, you said you wanted multicolored sprites, so that would look better than most of those exampled games.. :thumbsup:

 

Here's the demo WITH a multicolored player0 'sprite' missile..

 

GhostMissile2.bin

 

I will probably use this code to make another game, as I wrote it in about a half hour today in between feeding a 4 month old and napping a 1 1/2 year old..

 

I would use the score counter to change animated backgrounds, widen the movement field but utilize playfield collisions. I would add an explosion animation for player0 and player1, a life counter, and a bunch of different badguys!!

 

If you're gonna use assembly, though..more power to ya!!

 

I was under the impression you were just learning basic and Bb, so assembly might be a bit down the road yet!?!

 

I LOVE Batari Basic!! :lust:

Edited by Papa
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

But, you probably aren't going to be using assembly, so there are 'other' ways!! :P

Plus, you said you wanted multicolored sprites, so that would look better than most of those exampled games.. :thumbsup:

 

Here's the demo WITH a multicolored player0 'sprite' missile..

 

attachicon.gifGhostMissile2.bin

 

I will probably use this code to make another game, as I wrote it in about a half hour today in between feeding a 4 month old and napping a 1 1/2 year old..

 

I would use the score counter to change animated backgrounds, widen the movement field but utilize playfield collisions. I would add an explosion animation for player0 and player1, a life counter, and a bunch of different badguys!!

 

If you're gonna use assembly, though..more power to ya!!

 

I was under the impression you were just learning basic and Bb, so assembly might be a bit down the road yet!?!

 

I LOVE Batari Basic!! :lust:

After all this time I tried again to add it to the newest version of my game, but it turns out it's not possible, because I'm already using the two sprites provided by batari basic, player0 and player1 I read that there is a way to add more sprites but using the multi sprite kernel makes the classic kernel useless, or at least that's what I'm aware of, I tried using both but couldn't be done, also it's impossible to use pfclear on the code, and my game NEEDS it, it is necessary to reset the playfield otherwise I get bugs on it all the time

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