Jump to content
IGNORED

Find the wrap around borders for the ball, missiles and sprites


Gemintronic

Recommended Posts

Okay, the starfield idea turned out to be less than ideal. I'll use a Dragonstomper example instead.

 

My quest is to document the proper wrap around coordinates for different sprite sizes. I need to know the exact x/y value that allows seemless transition and and off the screen.

 

The code below uses my custom _ACEKNRSTU score that takes the place of score_graphics.asm

 

If anyone can fill in the blanks then WE ALL WIN. No more jittery bumps when moving things around the screen borders!

 

Standard sized sprite:

When sprite reaches leftmost coordinate ___ then wrap around to x value ___ to the right

When sprite reaches rightmost coordinate ___ then wrap around to x value ___ to the left

When sprite reaches top coordinate ___ then wrap around to y value ___ to the bottom

When sprite reaches bottom coordinate ___ then wrap around to y value ___ to the top

 

Medium sized sprite:

When sprite reaches leftmost coordinate ___ then wrap around to x value ___ to the right

When sprite reaches rightmost coordinate ___ then wrap around to x value ___ to the left

When sprite reaches top coordinate ___ then wrap around to y value ___ to the bottom

When sprite reaches bottom coordinate ___ then wrap around to y value ___ to the top

 

Quad sized sprite:

When sprite reaches leftmost coordinate ___ then wrap around to x value ___ to the right

When sprite reaches rightmost coordinate ___ then wrap around to x value ___ to the left

When sprite reaches top coordinate ___ then wrap around to y value ___ to the bottom

When sprite reaches bottom coordinate ___ then wrap around to y value ___ to the top

score_graphics_ACEKNRSTU.asm

srogue07.bas

srogue07.bin

  • Like 1
Link to comment
Share on other sites

I'm not really convinced either. You could also try something like this. It flickers two missiles all over the screen and kind of resembles a starfield.

 

main

COLUBK=0

COLUP0=8

COLUP1=8

 

a = (rand&127)

b = (rand&63)

 

missile0x=a

missile0y=b

missile1x=b

missile1y=a

 

drawscreen

 

goto main

startest.bin

Link to comment
Share on other sites

Are the stars necessary for something, or are they for aesthetics?

 

This is using the multi sprite kernel so there is no scrolling. I was hoping stars moving in the opposite direction would simulate scrolling. I think my next move is to put back random color cycling for missile0 and 1. No one noticed the jerky effect when the stars hit the left or right border so I don't think I have to worry about that. When I add extraneous prop sprites to the screen the scrolling effect will probably be way more pronounced.

 

The full screen picture of the bottom of a rocket (before you press a key) is actually a glitch! Not sure if it would actually appear in a real cart.

Link to comment
Share on other sites

I'm not really convinced either. You could also try something like this. It flickers two missiles all over the screen and kind of resembles a starfield.

 

main

COLUBK=0

COLUP0=8

COLUP1=8

 

a = (rand&127)

b = (rand&63)

 

missile0x=a

missile0y=b

missile1x=b

missile1y=a

 

drawscreen

 

goto main

I thought of and tried pretty much the exact same thing, though I wasn't too pleased with how it looked. It looks more like a bunch of flies buzzing around than a convincing starfield.

Link to comment
Share on other sites

I'm on my iPhone at the moment so I can't easily post a link, but check jrok's Star Crusade demo for a cool moving starfield effect.

 

It is a cool first person star-field effect. Still doesn't convey much left-right-up-down movement to me. Maybe it isn't clear that the object in the middle of the screen in my game is supposed to be a top-down ship sprite.

Link to comment
Share on other sites

It is a cool first person star-field effect. Still doesn't convey much left-right-up-down movement to me. Maybe it isn't clear that the object in the middle of the screen in my game is supposed to be a top-down ship sprite.

True, it's designed for first person. I didn't mention before (and I'm sorry to say it) but I don't much care for the pfscore flicker either. I know everything is a compromise, and if flickering pfscore is what's needed to put get your ideas into a finished game it's completely worth it. :)
Link to comment
Share on other sites

True, it's designed for first person. I didn't mention before (and I'm sorry to say it) but I don't much care for the pfscore flicker either. I know everything is a compromise, and if flickering pfscore is what's needed to put get your ideas into a finished game it's completely worth it. :)

 

Thanks for pointing that out. I think the pfscore flicker works (i.e. no one complained) in M.M.S.B.C. II due to the closer matching background color. With straight up black it's more obvious that there's a serious color transition going on. The red pfscore bar was gonna be a LIFE meter while the green could be CASH - used to repair or upgrade your unit at shops.

 

If only the 6lives.asm worked on the multi sprite kernel! I'd love for someone to prove me wrong or find a compatible version.

Link to comment
Share on other sites

Okay guys. I decided to partially recycle this topic. The REAL problem is finding the proper coordinates to wrap around sprites and objects. If you notice moving the ball and missiles too far left or right causes weird warping effects. Basically, if we can figure out the x/y coordinates that avoid sprite/object warping we can make better looking pseudo scrolling games like Dragonstomper!

 

As a gift I included my _ACEKNRSTU score font that is ideal for Final Fantasy style games in that you can spell out:

 

ATTACK

USE

CAST

RUN

 

where 0123456789 is _ACEKNRSTU

 

..among other things (curse, turn, taunt, status, scan, start, return, enter, eat, create, cure, cant, ask, etc..)

 

This works for standard and multi sprite kernels. No hacking needed as it uses the standard 10 character score_graphics.asm

  • Like 1
Link to comment
Share on other sites

Not to be pessimistic, but I kind of complained about the flicker in M.M.S.B.C. II I still don't understand how that phosphor effect translates to a real television or how that is meant to disguise flickering.

 

At the time you were using incorrect settings in Stella (HINT: Use ALT+P). You never said if you managed to correct the issue or create a new video.

 

LCD monitors do not have a real refresh rate. Even worse, the actual time it takes to go from pure black to pure white varies from LCD panel to LCD panel. Unlike a TV there is no phosphor coating that retains its glow even when you turn off a pixel. The phosphor mode in Stella attempts to simulate a real TV set this way.

 

The challenge now is to find the best coordinates to wrap things on and off the screen. If we can find a standard set of x/y values to do this making smoothly scrolling shooters, RPGs and other games will become MUCH easier. I'd hate to think each of us is reinventing the wheel every time we start a project.

Link to comment
Share on other sites

Here's another idea for a starfield, I was playing around with it this morning. It's similar to the previous one I posted, but in this one you can move the stars with the joystick to simulate scrolling.

 

main

COLUBK=0

COLUP0=10

COLUP1=10

 

r = (rand&127)

s = (rand&127)

t = (rand&127)

u = (rand&127)

 

if x=1 then a=r : b=u : c=t: d=u

if x=7 then a=s : b=t : c=s: d=r

if x=14 then a=t : b=s : c=r: d=s

if x=21 then a=u : b=r : c=u: d=t

 

x=x+1

if x>21 then x=1

 

missile0x=a:missile0y=b:missile1x=c:missile1y=d

 

if joy0up then b=b-1:d=d-1

if joy0down then b=b+1:d=d+1

if joy0left then a=a-1:c=c-1

if joy0right then a=a+1:c=c+1

 

drawscreen

 

goto main

startest-2.bin

  • Like 1
Link to comment
Share on other sites

You probably should have created a new thread for the border thing instead of renaming this one to keep people's brains from exploding.

 

Since every sprite can have a different height, you can't have a bottom number in the standard kernel that will always be the same. I use this variable testing code to find the border limits for sprites, missiles, and the ball:

 

www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#testvariables

Link to comment
Share on other sites

You probably should have created a new thread for the border thing instead of renaming this one to keep people's brains from exploding.

 

Since every sprite can have a different height, you can't have a bottom number in the standard kernel that will always be the same. I use this variable testing code to find the border limits for sprites, missiles, and the ball:

 

www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#testvariables

 

Yeah. From now on I'll just break down and make a new topic. Thanks for the score/debug code. Hopefully it'll be better than my old method.

 

I use:

score = 0

then

score = score + <var I want to debug>

 

Which is only so helpful because once I reach 127 or so the value rolls over >:-(

Link to comment
Share on other sites

I incorporated R.T.s score debug code when you press fire. This can't be used realtime because as the debug variable reaches 200+ the for .. next loop goes over cycle.

 

I almost had success by doing something like this:

 

score = 0

score = score + debugval

if debugval > 165 then temp1 = debugval - 165 : score = score + temp1

 

Basically, to me it looked like the score rolls over after 165. I figured if I added the part over 165 AFTERWARDs then I'd need just two lines instead of a long for .. next loop.

 

Didn't work completely. :)

Link to comment
Share on other sites

That IS a very nice star field effect. You can barely notice the warping effect when "scrolling" the stars towards the left. The right hand side seems to cut itself short before reaching the rightmost portion of the screen. Hmmmn..

The stars won't appear on the far right because the random number generator only goes up to 127 and the X locations of the right side of the screen go up to 160 or so. A little tweaking could make it better, I wrote that in about 3 minutes. ;)
Link to comment
Share on other sites

Could one specify an & value that's not based on powers of 2? Could one have a & 159 for a value from 0 to 160?

I assume that would work but I haven't tested it. I was looking at RT's documentation on the rand function here: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#rand.
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...