Saturday, March 16, 2019

Fixed Collision Code

I had a lot of unnecessary or wrong code in my program from when I first learned it. I had collision statements between player1 and the virtual sprites. I simplified things immensely by consolidating like code and deleting the offending statements.

Overall I freed up about 700 bytes in the last few edits. This definitely helps. As I work on the rain stage (I just made the umbrella and am working on how it is initiated) I will hammer out the details on the remaining power-ups, mainly the energy drink. 

As for difficulty progression, the big thing I need to figure out is best way to collide with NUSIZ copies, how to incrementally increase speed the best way, and when to start changes.

If I figure out the rain stage easily, I will maybe do a snow stage too... 

Monday, March 11, 2019

Rain and Lightning

I was having trouble creating rain using either the ball or missile sprites as they would take on the color of the virtual sprites as they crossed y-coordinates but I had considered using another virtual Sprite for lightning. Player8 will be used and will flash when the playfield flashes. The lightning stays at the top of the screen but randomly appears on the x-axis and disappears.

I am not sure of the consequences but this would act as a deterrent for lingering around the top while cars pass. I had also played around with mirroring some of the car sprites and will stagger some of the duplication at different difficulty intervals.

This is something rather simple. The hard part I have been dealing with was music and Titlescreens. I had tried adding some sound effects to the lightning and could only manage a simple noise.  I was wanting to play a little series of notes whenever hit by a car to give the player some time while the car passes to prevent rapid life losses. I also want a transition screen for rain so that it doesn't immediately change colors and flash. 

Saturday, March 9, 2019

Fixed Car Spawning Again!

I haven't checked the cycle issue on hardware yet but in my search for a fix I discovered why my car spawning was off on a couple of the cars.

For power ups I utilize virtual Sprite player7 for all of the power ups since only one is on the screen at a time so I have a variable pick which Sprite will he player7. Before I did that I used several virtual sprites, each associated with a power-up.

When I had made the change to player7 I had forgotten to delete the redraw for a couple sprites so when I wrote the code using those virtual sprites for something else, when I ran the program it would seemingly redraw the placement of the cars in the course of the power up generation. I finally erased this code and now the car movement works fine.

I will update the movement of the cars for increased difficulty soon, especially since I freed up some space. 

Friday, March 8, 2019

Fixed Over Cycles?

This issue has boggled my mind for the last week and I have been stumped at every turn.  I had decided to consolidate some redundant code and move things around to make things more efficient.  Since actions like Bag Boy touching the various car sprites have the same result I moved all like code together and had each collision jump to the same spot and share the same code.  When I ran a test everything seemed to work but I also noticed the game didn't run over in cycles.

I entered "breakif {_scan>#262}" in the Stella debugger as well as monitor the cycle count on the top left of the screen in real time and didn't experience any overages. I am not sure if I had actually fixed the issue but it seems to have gone away. I will test on hardware soon but in the meantime I will continue to clean up code in Bank 2. This will give me space to add a couple things in the future if necessary. My changes on the player/car collision freed up 200 bytes so I am sure there are more opportunities to make space. 

Thursday, March 7, 2019

Screen Rolling

I had recently acquired a Harmony Cart and when I played my game on actual hardware it was amazing. Gameplay using an actual joystick added a whole new challenge but then something happened - the screen started rolling.

After some pointers on AtariAge I discovered my scanlines would go to 263 for a brief moment that was seemingly unnoticeable in emulation without proper viewing. After watching the scanline count it seemed random but tere was another odd situation. The top car would disappear after a bit and never return.

The only thing in common with the rain playfield and the car were they were both activated by an if/then statement tied to the score. I had deleted the whole car code and seemed to not experience a scanlines increase but my laptop battery was dying so testing will continue tomorrow.

Another thing I had an issue with was the rain. I tried using my code from before but it didn't work the same. I figured it was probably due to the fact that I am using the DPC+ kernel so the pixels are smaller and with multiple sprites and colors it was not as simple as before. The sprites appeared farther apart. To solve this I instead used a virtual sprite. It still didn't work the way I wanted but it kind of looked like lightning so I was thinking in the rain stage the lightning will come from the top of the screen and head toward the cart. You have to get the cart to the customer ASAP or risk getting fried. I may put in an option for the joy0fire button to release the cart to avoid shocking Bag Boy.

Depending on all this testing and what I want done with gameplay,  I may move the difficulty back to a separate bank to provide more gameplay code in bank 2, like player 2 control.

Manatee Madness!

Stage work is coming along nicely, with the foundations laid down for the Rain, Snow, and Volcano stage. The Black Friday stage is proving ...