RevEng Posted November 13, 2016 Share Posted November 13, 2016 I was able to recreate the famous starfield effect from Cosmic Ark in bB. If you're not acquainted with it, the effect exploits a TIA bug to repeatedly re-trigger one of the display objects, without any additional cycle time required in-kernel. This is particularly cool for bB, since certain kernel options take away missile0, and this hack gives you another way to use missile0. In the demo I've enabled no_blank_lines, to demonstrate. The demo cycles through different adjustments to "missile0x", which affects the starfield speed and direction. The starfield is a bit regular, but it's better than nothing. Feel free to take the routines and copy or adapt to your games. Enjoy! bbstarfield.bas.bin bbstarfield.bas 13 Quote Link to comment Share on other sites More sharing options...
RevEng Posted November 13, 2016 Author Share Posted November 13, 2016 It looks like it's possible to do a very good starfield scroll in all directions! I originally used +17/-17 for up/down, but it was a bit slow, so I substituted +34/-34. That's slightly fast, so it might be better to alternate 17 and 34. Looks like alternating the angle directions (16, 18) is better for up and down, because the star formation matches the other directions better. bbstarfield.alldirections.bin bbstarfield.alldirections.bas Not sure if this will work universally on all TIA releases. I hope it does, as it's pretty useful. [edit] DPC+ version attachments. These should be universal, since they don't rely on the TIA bug: DPCplus.Bb.starfield.all.directions.bas DPCplus.Bb.starfield.all.directions.bas.bin [edit - removed the DPCplus_kernel.asm file. This is no longer required if you're using a recent updated bB.] Quote Link to comment Share on other sites More sharing options...
bogax Posted November 13, 2016 Share Posted November 13, 2016 or you could actually do it in bB vblank rem ** Enable the TIA bug that causes missile0 to be repeated ; asm ; lda #$ff ; sta HMM0 ; lda #$c0 ; sta WSYNC ; sta HMOVE ; sleep 5 ; sta HMM0 ; end HMM0 = $FF WSYNC = $C0 : HMOVE = $C0 aux1 = $C0 : HMM0 = $C0 return 6 Quote Link to comment Share on other sites More sharing options...
RevEng Posted November 13, 2016 Author Share Posted November 13, 2016 or you could actually do it in bB Nicely done! Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted November 13, 2016 Share Posted November 13, 2016 People should consider this for "grasslands" for a Dragonstomper type game as well Meaning, a green background turns this effect from stars in space to grass on land. 3 Quote Link to comment Share on other sites More sharing options...
RevEng Posted November 13, 2016 Author Share Posted November 13, 2016 People should consider this for "grasslands" for a Dragonstomper type game as well Meaning, a green background turns this effect from stars in space to grass on land. I was thinking light blue or white on dark blue would be good for underwater action. Stay Frosty uses the effect for snow, and I think it could decently represent rain too. Not sure if this will work universally on all TIA releases. I hope it does, as it's pretty useful. The Cosmic Ark effect is a bit different on TIAs made in China after 1989, which means a fairly small percentage of consoles may have trouble. The effect loses some dots on these units, so you get diagonal stars instead of diamond clusters. I think sideways scroll on these decks would be fine, albeit with stars in line formation. No idea if diagonal scroll or up+down scroll works - it might just be more flickery, or it may destroy the effect. If those directions don't work on those units, we might get it to work again doubled missle0x adjustments, though that would double the scroll speed too. If someone with a PAL 7800 deck could test the current version, we'd have an answer. 2 Quote Link to comment Share on other sites More sharing options...
Lewis2907 Posted November 14, 2016 Share Posted November 14, 2016 RevEng, I like the program that you made. It does open up some interesting possibilities for games. I personally like to program in DPC and I was trying to convert this program over to DPC and ran into the vblank issue. Currently the program will compile and run as it, but is missing the starfield. Not sure if there is a work around to have something similar to what you created for DPC, thanks. ;*************************************************************** ; vblank will not work in DPC. Maybe there is another solution. ; ; Per http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#dpc_vblank ; ; The DPC+ kernel itself uses vblank to do its own setup, so there ; would only be a few free cycles left in vblank for your program. ; In the the DPC+ kernel, vblank would need to go in bank 1, but ; improvements to the DPC+ kernel have used up almost all available ; space in the first bank, so there is virtually no room for vblank ; code. As of March of 2016, the DPC+ kernel has 524 cycles available ; in vblank, but that could shrink significantly as more changes are ; made to the kernel. In other words, if you are using the DPC+ kernel, ; avoid vblank. DPC+.Bbs.tarfield.all.directions.bas DPC+.Bb.starfield.all.directions.txt Quote Link to comment Share on other sites More sharing options...
RevEng Posted November 14, 2016 Author Share Posted November 14, 2016 Just took a look, but it appears this won't be a viable technique with the bB DPC+ kernel. It hits HMOVE pretty much every line as part of the virtual player positioning, and this messes up the starfield bug. Quote Link to comment Share on other sites More sharing options...
Lewis2907 Posted November 14, 2016 Share Posted November 14, 2016 Oh okay thanks. It was worth a shot. Quote Link to comment Share on other sites More sharing options...
RevEng Posted November 16, 2016 Author Share Posted November 16, 2016 Ok, I looked at the DPC+ problem from another angle. Instead of utilizing the HMOVE bug, this one just repositions missile0 every scan line, since the DPC+ kernel is already spending the cycles to hit HMOVE for other reasons.A DPC+ version of the starfield scroll is now attached in the second post above.I needed to very minorly tweak the bB DPC+ kernel (also in the second post) because it originally ran the user's vblank routine prior to object positioning, instead of after like the standard kernel. Other than that the DPC+ kernel didn't change and is 100% compatible with non-starfield projects.I'll update the "reveng" bB dist with this kernel when I get a sec. [the reveng bB dist was updated. With it there's no need for any extra assembly files] 2 Quote Link to comment Share on other sites More sharing options...
Lewis2907 Posted November 16, 2016 Share Posted November 16, 2016 RevEng, Thanks. This does open up a lot of interesting ideas for people to make something. 1 Quote Link to comment Share on other sites More sharing options...
Mountain King Posted November 22, 2016 Share Posted November 22, 2016 (edited) I was just messing around a bit. I slowed the star field down and pointed it in the downward direction and added the Gizzle Wap to make it look like he was playing in the Snow. gizzlesnow1.bas.bin Edited November 22, 2016 by Mountain King 5 Quote Link to comment Share on other sites More sharing options...
Mountain King Posted November 23, 2016 Share Posted November 23, 2016 (edited) Snow storm using a scrolling effect. Move the Gizzle Wap left or right through the storm. gizzlesnowVer21.bas.bin gizzlesnowVer21.bas Edited November 23, 2016 by Mountain King 5 Quote Link to comment Share on other sites More sharing options...
Mountain King Posted November 26, 2016 Share Posted November 26, 2016 I'm still messing around with this: Added different tree species Added sun movement Varied the tree appearance Added a position counter reflected in the score Added the Gizzle Wap's friend the Moum Moum gizzlesnowVer26.bas gizzlesnowVer26.bas.bin 4 Quote Link to comment Share on other sites More sharing options...
Lewis2907 Posted November 26, 2016 Share Posted November 26, 2016 That's pretty cool. I was planning on using your info here and the use the move around rooms below as a tunnel or caves etc. Quote Link to comment Share on other sites More sharing options...
Mountain King Posted November 27, 2016 Share Posted November 27, 2016 Last one. I think I'll move this on to its own topic after this. A big thank you to RevEng for figuring this out. The Moum Moum is more animated. He will land on the Gizzle Wap when inactive and take off when he is active. gizzlesnowVer28.bas gizzlesnowVer28.bas.bin 3 Quote Link to comment Share on other sites More sharing options...
Lewis2907 Posted December 24, 2016 Share Posted December 24, 2016 Bb Team, I have 2 questions so far. How do you remove the "starfield effect" when moving to another screen or level. Also for the code that Mountain King has for a scrolling background. How would you know where to start it and end it? So it's not just a continuous scrolling effect? I'm thinking it could be used as something similar to Mario Bros where you have pipes / openings to explore and return to. Not sure if I am taking on more that I know so far about Bb. If you step on the white opening you fall to the underground level. While in the underground level if you go all the way to the right you will return to the top level. Thanks again for any help anyone can provide. The Quest 24 Dec 16.txt The_Quest.bas.bin Quote Link to comment Share on other sites More sharing options...
Mountain King Posted December 24, 2016 Share Posted December 24, 2016 (edited) Well, I can answer one of your questions. Since you are looking at my code, I am using the ball object as a marker. You may not see it since I have it match the color of the back ground. But when it hits one edge or the other it activates a counter. (variable P). As you move right it counts up and as you move left it counts down. the intention was to create unique events that could happen when P reaches a certain value. As for stopping the snow, I had no intention of stopping in my game. I can get it to freeze and stop falling, but I can't get it to completely disappear. Sorry. Edited December 25, 2016 by Mountain King Quote Link to comment Share on other sites More sharing options...
Mountain King Posted December 25, 2016 Share Posted December 25, 2016 Duh, Change Missile0height=0 That gets rid of the starfield. 2 Quote Link to comment Share on other sites More sharing options...
Lewis2907 Posted December 25, 2016 Share Posted December 25, 2016 Ah okay. I was over thinking it for the missile. Now the counter makes sense. I removed it to see what effect it has. Now the counter sparks some ideas on object placement. Thanks for the answers to my questions. Quote Link to comment Share on other sites More sharing options...
Yosikuma Posted January 2, 2017 Share Posted January 2, 2017 Ooooh this opens up several possibilities!! This is exciting! Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted January 4, 2017 Share Posted January 4, 2017 Is it possible to decide where the object appears, to write something with it like LIVES or PAUSE? Quote Link to comment Share on other sites More sharing options...
RevEng Posted January 4, 2017 Author Share Posted January 4, 2017 Nope Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted January 4, 2017 Share Posted January 4, 2017 The exact opposite of the answer I was hoping for. You will make yourself eat those words one day! Quote Link to comment Share on other sites More sharing options...
RevEng Posted January 4, 2017 Author Share Posted January 4, 2017 Nope 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.