LatchKeyKid Posted Friday at 11:25 PM Share Posted Friday at 11:25 PM (edited) 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. Edited Friday at 11:30 PM by LatchKeyKid Quote Link to comment Share on other sites More sharing options...
+Karl G Posted 11 hours ago Share Posted 11 hours ago 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. 1 Quote Link to comment Share on other sites More sharing options...
LatchKeyKid Posted 8 hours ago Author Share Posted 8 hours ago Thanks and I'll take a look as I wasn't aware of that thread! Yes, this is definitely for bB. While I can understand some (but definitely not most) ASM, I definitely can't program from scratch in it at all. Quote Link to comment Share on other sites More sharing options...
LatchKeyKid Posted 3 hours ago Author Share Posted 3 hours ago 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. 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.