Jump to content
IGNORED

batari PAINT - simple painting program


freehabitat
 Share

Recommended Posts

Hello,...

 

how can i use the function of a missile as a paint brush?!

 

the program is already running, i just do not get the missile doing a dot on it´s position.

 

if i press fire it should simply do a dot in missile size.

if i hold fire it should be possible to draw by moveing the crosshair.

 

 

one simple thing i don´t understand is the position of the missile,...

i used the same value for both playersprites & missiles but at player1sprite(right one) the center is not matching with the missile like the player0sprite (left one), how does it comes?

crosshairs.bas

crosshairs.bas.bin

Edited by freehabitat
Link to comment
Share on other sites

Not sure about the difference is x/y coordinates. I know there was a bug in multisprite kernel that made one of the sprites offset by some amount, but not sure about missiles, and it doesn't look like you are using multisprite kernel.

 

One other thing is that the only way I know to paint is by setting playfield via pfpixel. You can look at the insane painter game for more about that: http://www.atariage.com/forums/index.php?showtopic=111513 I never got to the point where I put the sprite where it was painting but the ball collision code may help a little (also look at the translation from pfpixel x/y to player/missile x/y coordinates in Delta Force Sniper http://www.atariage.com/forums/index.php?showtopic=118973

 

Good luck. I am really interested in seeing a good painting program in bB!

Link to comment
Share on other sites

HI,.. probably the offset is something to do with half lines of a monitor,.. but i really don´t know...

 

i´ll check out that insane painter,.. maybe it helps...

 

.

.

.

 

now i have played insane painter,.. really insane : ) probably that´s what i am looking for.

 

is there a way to paint finer pixel than pfpixel?!

 

 

thanx

 

thomas

Edited by freehabitat
Link to comment
Share on other sites

one simple thing i don´t understand is the position of the missile,...

i used the same value for both playersprites & missiles but at player1sprite(right one) the center is not matching with the missile like the player0sprite (left one), how does it comes?

There are slight variations in the horizontal and vertical positioning of the players, missiles, and ball in batari Basic. In fact, the variations are different depending on which kernel you're using, and may also be different depending on which version of batari Basic you're using (I don't remember, and I haven't compiled with any of the earlier versions lately).

 

The following program draws a 1-pixel player0 and player1 sprite, along with missile0, missile1, and the ball, all of which are 1 line tall and set to single-width size.

 

test_all_sprites_positioning.bas

test_all_sprites_positioning.bas.bin

 

As long as you aren't pushing the joystick in any direction, all five sprites have the same coordinates, and should ideally be drawn directly on top of each other, but they aren't.

 

post-7456-1200874426_thumb.jpg

post-7456-1200874456_thumb.jpg

 

If you push the joystick left or right, the sprites will spread apart horizontally (i.e., same y values, but different x values), so you can see how their vertical positions vary. From left to right, they are player0, player1, missile0, missile1, and ball.

 

post-7456-1200874483_thumb.jpg

post-7456-1200874511_thumb.jpg

 

If you push the joystick up or down, the sprites will spread apart vertically (i.e., same x values, but different y values), so you can see how their horizontal positions vary. From top to bottom, they are player0, player1, missile0, missile1, and ball.

 

post-7456-1200874531_thumb.jpg

post-7456-1200874553_thumb.jpg

 

As you can see from these screenshots, if you want missile0x, missile1x, and ballx to coincide with player0x and player1x (which is the *leftmost* pixel's position of an 8-pixel player), then you need to add 1 to missile0x, missile1x, and ballx. The reason for this has to do with the TIA itself-- if you strobe RESP0, RESP1, RESM0, RESM1, and RESBL all at the same exact cycle of the scan line (which of course means you'd be strobing each one on a separate scan line), the missiles and ball will be drawn exactly 1 color clock to the left of the players.

 

The reason for the differences in the y positions has to do with batari Basic's kernel. The ball's y position already matches the y positions of the players (i.e., the *bottommost* scan line of the players), so no adjustment is necessary. Missile1's y position is exactly 1 double scan line higher than the players (remember, bB uses a two-line display kernel), so if you want missile1y to coincide with player0y, player1y, and bally, then you need to add 1 to missile1y. (The multisprite kernel's y axis is reversed; but this post deals only with the standard kernel). Unfortunately, you can't make missile0y coincide with player0y, player1y, missile1y, and bally, because missile0y is exactly 1 scan line higher, which is one *half* of a double scan line, and there's no way to move the sprites up or down that much, since changing y by 1 will move the sprite up or down *2* scan lines-- that is, 1 *double* scan line, see?

 

Michael

Link to comment
Share on other sites

Hello,..

 

You can also take a look at paint the town red.

 

that comes close to my idear,... thanx, i´ll check the code and will reply later.

 

 

 

 

@ Michael,...

 

your examples are every time so exact and in a practical kontext! good work what you do.

Link to comment
Share on other sites

You can also take a look at paint the town red

 

ok,.. i checked the code now,... but i am afraid it´s to complex for me to understand how the pfpixels chenge the color by moving the playersprite/missel/whatever...

 

also it´s a superchip? asm. file includet but i thought about writing a 4k file,... omph.. :|

 

anyway... it smells in a right direction..

 

tom

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.

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