Jump to content
IGNORED

1-pixel-high sprite scale examples


nitrofurano

Recommended Posts

I were looking for all examples possible, and i found none with 1-pixel-high scaled sprites - the smaller one seems to be 2-pixel-high (the most usual)

Is there some limitation of batariBasic, or there is some way to define x and y sprite scales, and having as well 1-pixel-high sprites available?

If possible, please answer also with working snippets (i'm a newbie! =) )

Thanks! =)

Link to comment
Share on other sites

I were looking for all examples possible, and i found none with 1-pixel-high scaled sprites - the smaller one seems to be 2-pixel-high (the most usual)

Is there some limitation of batariBasic, or there is some way to define x and y sprite scales, and having as well 1-pixel-high sprites available?

If possible, please answer also with working snippets (i'm a newbie! =) )

Thanks! =)

 

When you say "sprite scale", are you referring to the TIA registers NUSIZ0 and NUSIZ1? If that's the case, you might want to consider using either the missiles or the ball to create the graphic you need. For instance:

  NUSIZ0 = $10;(missile is 2 pixels wide)
 NUSIZ0 = $20;(missile is 4 pixels wide)
 NUSIZ0 = $30;(missile is 8 pixels wide)

 

Or you could use the CTRLPF register to reshape the ball:

  CTRLPF = $11;(ball is 2 pixels wide) 
 CTRLPF = $21;(ball is 4 pixels wide) 
 CTRLPF = $31;(ball is 8 pixels wide)

 

If all you want to do is scale a single pixel, it seems like a little bit of a waste to use up a whole sprite, unless that is essential to your game. What is the effect you would like to achieve?

 

If you want to learn more about TIA registers in bB, here's a link.

 

Cheers,

Jarod.

Edited by jrok
Link to comment
Share on other sites

about widht scale you answered a question i'd ask later - but thanks for the advance! =)

What i were asking were about height scale...

 

for example, from this picture:

http://img243.imageshack.us/img243/8263/ex...sicspritpo2.png

 

most of the examples i'm seeing about using batariBasic is using the sprite 5 (1x width and 2x height) - and what you said were about sprites 5, 6, 7 and 8

 

but what i'm looking for is the sprite 1 (1x width and 1x height), or the sprites 1, 2, 3 or 4 - are they possible?

 

would be this a limitation of batariBasic, which seems to the compiled result being too 'slow' for having sprites smaller than 2x height?

 

thanks! =)

Link to comment
Share on other sites

about widht scale you answered a question i'd ask later - but thanks for the advance! =)

What i were asking were about height scale...

 

I'm not quite sure I follow you. As far as I know, there is no TIA register that would "scale" a sprite's height, whether you are coding in batariBasic or pure Assembly... and there actually doesn't need to be. You can write as many lines as you want in a sprite's shape table. It could be 3 pixels high, 8 pixels high, 100 pixels high, etc. You are only limited by the amount of ROM the sprite uses. In other words, there is no such thing as "1x height" or "2x height." The height of a sprite is just the number of rows in it's shape table. For instance, the following draws a sprite that is 16 pixels tall:

 

 
 player0:
 %00000000
 %00100100
 %00000000
 %00100100
 %00100100
 %00100100
 %00111100
 %00111100
 %10111101
 %00111100
 %10111101
 %10011001
 %01011010
 %01100110
 %01011010
 %00011000
end

 

for example, from this picture:

http://img243.imageshack.us/img243/8263/ex...sicspritpo2.png

 

most of the examples i'm seeing about using batariBasic is using the sprite 5 (1x width and 2x height) - and what you said were about sprites 5, 6, 7 and 8

 

but what i'm looking for is the sprite 1 (1x width and 1x height), or the sprites 1, 2, 3 or 4 - are they possible?

 

I'm not sure what the person who created that picture was specifically doing to achieve 4, but you can easily make sprites 2 and 3 by using the TIA registers scale a sprite's width to either 200% or 400%:

 

 
 NUSIZ0 = $05;(double-width player) 
 NUSIZ0 = $07;(quad-width player)

 

Same thing goes for all the pictures underneath 5-8. For example, image 9 isn't a scaled version of image 5, it's just that the person drew a taller sprite, than altered it's width it using a NUSIZ register. Hope that helps.

 

Cheers,

Jarod.

Edited by jrok
Link to comment
Share on other sites

I were looking for all examples possible, and i found none with 1-pixel-high scaled sprites - the smaller one seems to be 2-pixel-high (the most usual)

Is there some limitation of batariBasic, or there is some way to define x and y sprite scales, and having as well 1-pixel-high sprites available?

If possible, please answer also with working snippets (i'm a newbie! =) )

Thanks! =)

If i understand your question right you wanna know if you can use 1 pixel high sprites in batariBasic?

 

AFAIK bB uses 2 pixel high sprites and you can't use 1 pixel high sprites with it - see the last post in this thread.

Link to comment
Share on other sites

about widht scale you answered a question i'd ask later - but thanks for the advance! =)

What i were asking were about height scale...

 

for example, from this picture:

http://img243.imageshack.us/img243/8263/ex...sicspritpo2.png

 

most of the examples i'm seeing about using batariBasic is using the sprite 5 (1x width and 2x height) - and what you said were about sprites 5, 6, 7 and 8

 

but what i'm looking for is the sprite 1 (1x width and 1x height), or the sprites 1, 2, 3 or 4 - are they possible?

 

would be this a limitation of batariBasic, which seems to the compiled result being too 'slow' for having sprites smaller than 2x height?

 

thanks! =)

 

Ah! My apologies. After reading Impaler's reply below, I think I understand your question now. Yes, that is true, batari's standard kernel uses double-height pixels to draw the player sprites. But it's possible someone have written a batari kernel mod that uses single-height pixels... you might want to search through this thread and maybe make a request.

 

Good luck,

Jarod.

Link to comment
Share on other sites

yes, http://www.atariage.com/forums/index.php?showtopic=125014 and http://www.atariage.com/forums/index.php?s...1&hl=kernel answered me, and it were what i imagined - asymmetrical background seems to be the reason of the single height sprites lack - thanks! =)

 

A suggestion would be if in the code start, we could use commands like 'define' for choosing if we have symmetrical or assymetrical backgrounds, and gain as result single height sprites or not - stuff like this, just like defining a 'display mode', or something like...

 

Maybe all of this is affecting the asymmetrical background being made of 16 horizontal blocks and not 20 in the whole display wide (without that side borders), 16 pixel high background blocks, etc.

 

Thanks, all the late answers explained better how batariBasic works, information i think is vital in the batariBasic documentation as well (it's very important we knowing what we can count with, even in batariBasic! =) )

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