Captain Spazer Posted January 18, 2021 Share Posted January 18, 2021 I'm having a bit of trouble with DPC+, I am making 2 big sprites for player 1 and 2 composed of 2 sprites each. Sprites 0-1 for player1 and sprites 2-3 for player 2. When I move player2's joystick sprites 2-3 are not in unison, destroying the illusion of 1 sprite by leaving a gap. What can I do? DPC_Big_Sprites.bas Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 18, 2021 Share Posted January 18, 2021 The problem here is that you are using one real sprite (player0) to draw one half of one player, and virtual sprites to draw the other half of the player, plus both halves of the second player. Since only 1 virtual sprite is displayed on the same horizontal line at a time, that means for each frame, the left half of the first player is shown, and one of the 3 other player halves is shown, cycling through them every frame. You can see this for yourself if you hit the backtick key (`) in Stella, then hit the Frame +1 button to see how each frame is drawn. Unfortunately, there isn't really a good solution using high-res players like you are trying to do. Probably your best bet would be to use players 0 and 1 for the respective players, and make them double width to eliminate the flicker. Quote Link to comment Share on other sites More sharing options...
Captain Spazer Posted January 18, 2021 Author Share Posted January 18, 2021 Mm, I was afraid of that. Quote Link to comment Share on other sites More sharing options...
ScumSoft Posted January 18, 2021 Share Posted January 18, 2021 I'm currently looking into your issue, I think there might be a way to do it without major flicker. 1 Quote Link to comment Share on other sites More sharing options...
ScumSoft Posted January 18, 2021 Share Posted January 18, 2021 Okay I have a working solution with minimal flicker for both players, I've copied your code into my DPC+ template layout and making some optimizations. I'll post the new code here once I've got it all fixed up. Quote Link to comment Share on other sites More sharing options...
ScumSoft Posted January 19, 2021 Share Posted January 19, 2021 (edited) I might have gone a bit too far with this. I know you're new to 2600 programming, so I implemented lots of stuff that you could learn from. Run the precompiled binary in the bin folder to check it out. Runs on the Harmony cart just fine also. You can edit the build.bat and point it to your installation of bB, then just run it to compile the game. rem ***** MAKE SURE ENVIRONMENT VARS ARE PRESENT ***** set bB=C:\Atari\bB path=%path%;C:\Atari\bB I split all my DPC+ projects into separate bank files, it makes it easier to work with larger games. Feel free to use whatever format you're comfortable with, copy and paste the code into your own, or continue on with my updated template style. Ask away if you have any questions! [edit] Posted a newer version with player colors and some typo fixes Karate_Game_DPC+.7z Edited January 19, 2021 by ScumSoft Update with Colors and typo fixes 1 1 Quote Link to comment Share on other sites More sharing options...
Captain Spazer Posted January 20, 2021 Author Share Posted January 20, 2021 Thank you, very kind of you to take your time helping out! 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.