Jump to content
IGNORED

Best way to setup a starfield using the ball in a space game?


LatchKeyKid

Recommended Posts

Pretty much the title.   I'm toying around with a space game idea and was trying to figure out how to make a twinkling starfield using only the ball in batari basic (specifically the multisprite kernel since it has its own limitations).   I first tried just assigning a random number across most the playspace for both the ballx and bally values but it unsurprisingly looked more like random static than a twinkling/moving starfield.   What would be the best way for a relative n00b like myself to program this?   A series of random ballx value that travel down the screen from top to bottom? I fear that method might be very memory intensive in terms of variables as each location would have to be stored in one.   A table of values that repeat and travel down the screen before wrapping again up top?   Is there a guide to setting up tables in batari basic as I'm unfamiliar with the process beyond cutting/pasting existing tables and pointers.   Thanks again in advance.   The Solaris pic is more as an advanced example of the perspective of the player sprite and general effect I'm looking to emulate.

 

 

image.thumb.png.1b2e62fa1c7ebfc426c612480085f7a2.png

Edited by LatchKeyKid
Link to comment
Share on other sites

If this is for bB, then have you seen RevEng's starfield effect post in the bB forum? He uses missile0 in his example, but you can substitute the ball using HMBL in place of HMM0 in the assembly snippet in the sample code.

 

It works by exploiting a bug in the TIA that is activated by writing an invalid value to the appropriate horizontal move register for the object in question.

  • Like 1
Link to comment
Share on other sites

On 4/30/2017 at 1:43 AM, RevEng said:

Sad but correct. The multisprite kernel does a bunch of mid-screen hmoves that reset the effect, messing it up.

 

Hmm...  (pun intended!)  It looks like it unfortunately may not work with the multisprite kernel that I'm using.   I tested it out and didn't get the intended effect.  

 

I also tried using rand and unrand (both the 8 bit and 16 bit versions posted in a thread) to see if limiting the star pattern to only 16-32 positions might be enough but the effect was less than optimal though at least not completely random all the time.

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