STGraves Posted March 6, 2015 Share Posted March 6, 2015 Hello I would like to know, can I add a sprite to a missile, kind of like making the missile look like a face instead of a projectile. Thanks. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted March 6, 2015 Share Posted March 6, 2015 A missile is just a solid rectangle. Only the width, height, and color can be changed. Sprite data cannot be applied to a missile. Quote Link to comment Share on other sites More sharing options...
Mountain King Posted March 6, 2015 Share Posted March 6, 2015 You'd have to take a sprite and treat it like a missile. Quote Link to comment Share on other sites More sharing options...
Papa Posted March 6, 2015 Share Posted March 6, 2015 (edited) ..like this set kernel_options player1colors playercolors pfcolors set tv ntscbegin if joy0fire then goto ready player0y=50 pfcolors: $88 $88 $88 $88 $88 $88 $88 $88 $88 $88 $88end 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 beginready 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 $02end player0: %11110000 %11100000 %11111000 %11111110 %11001111 %11111110 %11111000 %11100000 %11110000end pfcolors: $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8end if a=1 then playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ................................ ................................ ................................ ................................ ................................ ................................ ................................ X.....X.....X.....X.....X......X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXend if a=5 then playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ................................ ................................ ................................ ................................ ................................ ................................ ................................ ...X.....X.....X.....X.....X.... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXend 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 $0Eend player0: %00000000 %00000000 %00000000 %11110000 %01011111 %11110000 %00000000 %00000000 %00000000end 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 March 6, 2015 by Papa Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 6, 2015 Share Posted March 6, 2015 (edited) 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 In Dark Cavern a number of the enemy are drawn with the missiles: In Super Challenge Football, most of the players are drawn with the missiles. You can use Stella's Fixed Debug Color Mode to see which elements are drawn with which object: See this reply for more info about debug color mode. Edited March 6, 2015 by SpiceWare Quote Link to comment Share on other sites More sharing options...
Papa Posted March 6, 2015 Share Posted March 6, 2015 (edited) But, you probably aren't going to be using assembly, so there are 'other' ways!! Plus, you said you wanted multicolored sprites, so that would look better than most of those exampled games.. 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!! Edited March 7, 2015 by Papa 1 Quote Link to comment Share on other sites More sharing options...
STGraves Posted March 10, 2015 Author Share Posted March 10, 2015 Thanks papa for your reply, I will try to add it to my game, thanks again. Quote Link to comment Share on other sites More sharing options...
STGraves Posted May 23, 2015 Author Share Posted May 23, 2015 But, you probably aren't going to be using assembly, so there are 'other' ways!! Plus, you said you wanted multicolored sprites, so that would look better than most of those exampled games.. 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!! 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.