Krayt88 Posted March 13, 2010 Share Posted March 13, 2010 Is it possible to make sprites larger than 8 pixels? The sprite I'm trying to make is 11x14. bB wont display sprites bigger than 8 pixels but the sprite I'm working on isn't worth using if its not 11 pixels wide. Is it possible to make bigger pixels accepted or do I have to combine two sprites or something? Thanks, Krayt Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 13, 2010 Share Posted March 13, 2010 In order to make an 11x14 sprite, you'd need to combine two characters. 8 pixels is the largest width size, unless you stretch your player to a double size or quad-size using the NUSIZ0 or 1, but even then it's still limited at 8 pixels, it would just have the pixels be larger. Quote Link to comment Share on other sites More sharing options...
Krayt88 Posted March 13, 2010 Author Share Posted March 13, 2010 In order to make an 11x14 sprite, you'd need to combine two characters. 8 pixels is the largest width size, unless you stretch your player to a double size or quad-size using the NUSIZ0 or 1, but even then it's still limited at 8 pixels, it would just have the pixels be larger. Ah, ok, I thought it might be something like that. How do you combine two characters? Are there any good tutorials out there? Thanks Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 13, 2010 Share Posted March 13, 2010 (edited) What I would do is have player0 be half of the sprite (in this case, 6 pixels), and player1 be the other half. Then set player1's x position 6 pixels to the right of player0's (and having the y position be the same). Of course, these would be the only two players on the screen, unless you want to employ flickering (either by the multisprite minikernel or not.) And also, you want to draw the sprites upside down as they flip vertically when displayed on the screen for some reason I don't know. So it would look something like this: player0: (add player0 sprite data here) end player1: (add player1 sprite data here) end main COLUP0=(number between 0 and 255), COLUP1=(same as COLUP0) player0x=70 : player0y=48 player1x=76 : player1y=48 drawscreen goto main Unfortunately, this code thing on the forums doesn't work very well. In my example, every line except the two ends and main should be indented. If you really want to explore what bB can do, I suggest taking a look at Random Terrain's website, which is available if you download vbB (click on batari Basic commands on the front page of vbB.) Edited March 13, 2010 by atari2600land Quote Link to comment Share on other sites More sharing options...
Krayt88 Posted March 13, 2010 Author Share Posted March 13, 2010 Alright, I'm trying that but when I do I get the following error message: DASM V2.20.07, Macro Assembler ©1988-2003 default.bas.asm (1586): error: Syntax Error '#,'. default.bas.asm (1586): error: Syntax Error '#,'. default.bas.asm (1590): error: Syntax Error ''. default.bas.asm (1590): error: Illegal Addressing mode 'lda ='. bytes of ROM space left Unrecoverable error(s) in pass, aborting assembly! Complete. Errors were encountered during assembly. What does this mean? Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 13, 2010 Share Posted March 13, 2010 I made a typo, there should be a colon instead of a comma between COLUP0 and COLUP1. Quote Link to comment Share on other sites More sharing options...
Krayt88 Posted March 13, 2010 Author Share Posted March 13, 2010 I made a typo, there should be a colon instead of a comma between COLUP0 and COLUP1. Ah, that makes sense, but now I'm getting DASM V2.20.07, Macro Assembler ©1988-2003 bytes of ROM space left 2424 bytes of ROM space left 2424 bytes of ROM space left --- Unresolved Symbol List COLUP2 0000 ???? (R ) player2height 0000 ???? (R ) player2pointerhi 0000 ???? (R ) player2pointerlo 0000 ???? (R ) player2x 0000 ???? (R ) player2y 0000 ???? (R ) Fatal assembly error: Source is not resolvable. Errors were encountered during assembly. player2 is the second sprite I want to attach to the first one, obviously. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted March 13, 2010 Share Posted March 13, 2010 The only sprites available are player0 and player1. If you want to use players 2-5, put "set kernel multisprite" in the beginning of the code. Then, remember that the y values are upside down when using it (i.e. 10 is near the bottom of the screen while 80 is near the top.) Quote Link to comment Share on other sites More sharing options...
yuppicide Posted March 15, 2010 Share Posted March 15, 2010 Someone made a demo here.. I forget the post, but I had modified it to work with two sprites as one. It drew a "crosshair" on the screen which you moved around and fired. Quote Link to comment Share on other sites More sharing options...
Impaler_26 Posted March 15, 2010 Share Posted March 15, 2010 Someone made a demo here.. I forget the post, but I had modified it to work with two sprites as one. It drew a "crosshair" on the screen which you moved around and fired. Found your modified demo: http://www.atariage....ost__p__1565491 Take a look at the code Krayt88, hope it helps. Quote Link to comment Share on other sites More sharing options...
yuppicide Posted March 16, 2010 Share Posted March 16, 2010 Thanks. Someone made a demo here.. I forget the post, but I had modified it to work with two sprites as one. It drew a "crosshair" on the screen which you moved around and fired. Found your modified demo: http://www.atariage....ost__p__1565491 Take a look at the code Krayt88, hope it helps. Quote Link to comment Share on other sites More sharing options...
jrok Posted March 16, 2010 Share Posted March 16, 2010 Probably the best way to achieve this is by using flicker to display a player sprite at x during even frames and at x + 8 during odd frames. It's probably not worth using up both player objects to draw a single item in batari's standard kernel. If you want the sprite to move, this will require you to reserve an additional variable for the "big sprite's" x value (i.e "dim myspriteX") , rather than using the predefined player0x/player1x variables. Set the position of the sprite to myspriteX and myspriteX + 8 on alternating frames. You would then manipulate myspriteX in your code to move the 16-wide sprite. I'm actually writing a game in the multisprite kernel that uses a 16-wide sprite, but I still flicker player0 rather than use other combinations (player0+virtual sprite or virtual sprite+virtual sprite) to prevent one half of the character from flickering or disappearing when the spritelines overlap other player1 virtual sprites. 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.