Buckaroo Posted May 15, 2017 Share Posted May 15, 2017 I'm trying to make a rhythm game in Visual BB where the player presses the direction on the joystick in time to music. As Batari Basic can have really high sprites I want to scroll down the screen and hold multiple arrows in one player sprite. The workflow I'm aiming for is: X The example on the left is a sprite 8x40 pixels. ↑ X starts outside of the screen area. → The sprite scrolls down by 8 pixels then X becomes a new arrow direction. ↓ ← I'm using the playfield to draw graphics so can't use the multisprite kernel and I'm trying to keep the game to 4k. In asm using GRP0 seems to be editing the data for player0 graphics but when I switch back to using Visual bb the data does not exist in player0. I'm still new to programming for the Atari so making this in pure asm would be too difficult at the moment but if it's the only way then I'll pursue it. I've tried multiple methods including player0pointerlo and player0pointerhi but these only seem to be able to choose a set segment of sprite data. Quote Link to comment Share on other sites More sharing options...
bogax Posted May 16, 2017 Share Posted May 16, 2017 I'm not sure what you are trying to achieve (why scroll ?) you can scroll through the sprite data or you can just point at different data here's some sprite-pointer-animation stuff might give you some ideas Quote Link to comment Share on other sites More sharing options...
Buckaroo Posted May 16, 2017 Author Share Posted May 16, 2017 (edited) Sorry Bogax, maybe I wasn't clear enough. Forget the scrolling, essentially what I'm trying to do is join 2 pieces of data together into player0. In the example below I want to copy lines a,b,c and h,i,j to make player0 become a,b,c,h,i,j Lines e,f,g are ignored The examples you shared are great but all seem to use one segment (unless I've missed something) Hope this makes more sense Edited May 16, 2017 by Buckaroo Quote Link to comment Share on other sites More sharing options...
Buckaroo Posted May 18, 2017 Author Share Posted May 18, 2017 I'm not sure what you are trying to achieve (why scroll ?) you can scroll through the sprite data or you can just point at different data here's some sprite-pointer-animation stuff might give you some ideas Did the last post I made make it any clearer? Quote Link to comment Share on other sites More sharing options...
+Karl G Posted May 18, 2017 Share Posted May 18, 2017 It's clear to me, and I wish I had an answer. I could see how doing this could be useful in a project I'm working on, Hopefully there's a way to do it! 1 Quote Link to comment Share on other sites More sharing options...
bogax Posted May 19, 2017 Share Posted May 19, 2017 Did the last post I made make it any clearer? yes you want to scroll one part of the sprite while the other stays (more or less) constant the obvious thing is to use two sprites if you can you could flicker the a single sprite ie multiplex the sprite in bB, display the two parts seperately on alternate frames you could put the sprite in ram not sure you could find 40 bytes you wouldn't have room for much else I can't think of any other way to do it with the standard kernel 1 Quote Link to comment Share on other sites More sharing options...
Buckaroo Posted May 19, 2017 Author Share Posted May 19, 2017 (edited) Thanks, I thought this was going to be an awkward one. you could flicker the a single sprite ie multiplex the sprite in bB, display the two parts seperately on alternate frames I need the other sprite for the second players graphics and I really don't like the flicker. I did find a way to do it but it took up pretty much all of the variables in the file. I pointed player0pointerlo at variables a-g, and was able to edit each line of the player graphic individually. Practically, that won't work for the game as there's going to be little variable space left for anything else. The RAM stuffing could be an option though, I'll look into it. Dynamic sprite.bas.bin Dynamic sprite.bas Edited May 19, 2017 by Buckaroo Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted May 23, 2017 Share Posted May 23, 2017 You could use the multi sprite kernel to mix-and-match player0 and a virtual sprite to make one combined image http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#multikernel You'd still have to design your game to not allow two virtual sprites to be on the same horizontal line to avoid flicker. But, yeah. 1 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted May 23, 2017 Share Posted May 23, 2017 You could use the multi sprite kernel to mix-and-match player0 and a virtual sprite to make one combined image http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#multikernel You'd still have to design your game to not allow two virtual sprites to be on the same horizontal line to avoid flicker. But, yeah. Or the DPC+ Kernel. 2 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted May 23, 2017 Share Posted May 23, 2017 Or the DPC+ Kernel. Yep. Both multispsrite and DPC+ have the same problem with flicker and virtual sprites on the same horizontal line. But, at least you get better graphics with the DPC+ 1 Quote Link to comment Share on other sites More sharing options...
Buckaroo Posted May 24, 2017 Author Share Posted May 24, 2017 Thanks for the info, I've been trying to stick to the standard kernel and only use 4k because I bought an EPROM programmer and chips. As I use Visual BB more I'm coming to realise the DPC+ is the way to go. I still think I can finish this game in the standard kernal by flipping the sprites on their side and using NUSIZ to duplicate in the same way the score does. Once I've go it working I'll upload, but at the moment it's still a mess. Quote Link to comment Share on other sites More sharing options...
Buckaroo Posted May 25, 2017 Author Share Posted May 25, 2017 Made a new solution for this but it's a bit convoluted and I can only really see it working for this example. Each possible combination of two arrows is put into a Data Array, e.g. ↑↑, ↑→, ↑↓, ↑← etc.. (16 possible combinations) When the bottom point is reached the two players adjust the pointerhi and pointerlo for each player to update for the next arrow. ------------------------------------------------------------ Scroll arr.bas: Use the joystick to pick the next arrow direction if nothing is pressed then a random arrow is picked Scroll arr.bas.bin Scroll arr.bas 1 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.