Tuesday, February 26, 2019

Game Play Test!

Game play test with cars, power ups, customers, and progressive difficulty. Needs tweaking but it is getting there!




I had also modified bottom-most x-coordinate for position, adjusted collision between lot customer and cart towards the bottom of the screen for playability, and modified the code for car movement.


Will be adding a second player option soon. The second joystick will operate the customer and cart, where the second player can alternate between the two with the press of the button.  I may have to work out some gameplay details so that the second player just torpedo the cart into the bottom cart every time.

Thursday, February 21, 2019

Power-Ups!

Finally!

I got the power-ups not only spawning but also disappearing when either touched by Bag Boy or on their own after a short duration!

Still working out the details but this will definitely speed things along... sort of.

Still gotta work out things like color, sound, effect, etc. but getting their existence right is a start and an important step.

I also shrunk them down for a couple reasons.  The first is because my wife wanted smaller power-ups because they were bigger than the car.  The second reason is to reduce flicker.  Once I tighten the spawning I will try to minimize overlapping of y-coordinates.




Power-Ups Almost Fixed!

I have almost solved the lingering power-up problem. Previously the power-up would spawn and when Bag Boy would collide with it it would stay. I had finally realized that with each loop I had a variable continually adding up. So at a particular value the variable would go to the generation subroutine but that variable would continue adding which seemed to negate the collision. To solve this I placed an if then line before the variable value that checked to see if it was the generation value. If yes it skipped the generation code and go to the collision detection. Then, once collision is detected it resets the value.

Once the bugs are worked out I will give each power up a specific ability and hammer out the randomization code to make it balanced. 

Saturday, February 16, 2019

Power Ups!


Originally I had the power up generator code initiate every time the timer hit a certain number.  This worked great but collision detection never worked.  After wracking my brain I recall that sometimes when the score goes below a certain number the cars added for difficulty stop moving and collision detection ceased to work in those instances as well.

So instead of tying power up generation to the timer I tied it to the score, with it initiating at greater than or equal to zero.  Then in the bank where the code was, I created another variable to mirror the timer variable.  Now the power ups generate as they should but with one small problem - I am having a problem getting rid of them promptly.

For instance, the energy drink appears. If the player sits over the drink at the time it eventually disappears they get the benefit (for testing purposes this is just 500 points).  I assume this has something to do with the timing.  I will investigate this further at a later time
 

Bugs fixed!

With some help on the AtariAge forums, it was pointed out that an error in my code was causing the screen to jump. It also came to my attention that the game was not capable of running on hardware, possibly due to the formatting of comments.

So with those changes implemented I had moved onto power-ups.

I had decided to place them in a separate bank and after trial and error think I had gotten their appearance and disappearance to work well.

Using the timer variable, I have the power-ups checked at one point each cycle. At that point anotger variable is randomized. It has the chance of becoming a few things:


  • A watch - that provides more time on the timer. 
  • An energy drink - that will allow for increased speed. 
  • Money - increased score. 
  • 1up - an extra life. 

There is also a slight possibility no power-up is picked. When the variable corresponds to one the others are pushed off screen. The variable then continues to increase. Once it reaches a certain point it disappears.

The timer then goes through it's next cycle and performs it's check again. Depending on how tings work, there may be greater chance for no power-up.

I may also add another power-up  - an umbrella.

I hope to add a couple more things for progressive difficulty, with the big thing being rain. I think I can implement this by randomising the ball Sprite for the appearance of rain and modifying movement. I was thinking an umbrella could be used to minimize movement issues.

Obviously I would be utilizing more than 9 virtual sprites so I plan on having player9 switch what it is depending on the situation.

I have also not determined the color and size of the power-ups. Part of me want each Sprite to have it's own colors while I also want ten to flash. I also don't know if they should appear as large as the player0 sprite or if I should make them smaller to minimize flickering. 

Thursday, February 14, 2019

Status Bar!



I got the status bar and life counters working thanks to some help from the AtariAge forums.  While the mini kernel would not work, Tony the 2600 pointed me in the right direction with some sample code he had used to implement simple bar and counters, which is perfect since it fills the graphic void on the bottom of the screen and provides me with a stepping stone to continue gameplay elements.

Now that the life counters are implemented, I will work on making them decrease when a collision is detected between Bag Boy and a car.  I may also have a loss of life when the counter runs down.

As for the counter, I plan on having it slowly decrease until you get the cart to the customer, when the counter will be replenished.  Customer #2 and collisions between the cart and the cars will also cause incremental decreases.

Because of this gameplay elements I will have added random power-ups - a 1UP and a clock for more time.  The only other power up I was considering at the moment was an energy drink that when consumed speeds up Bag Boy's movement.  I may also have a double energy drink that can speed him up and freeze the clock but that has yet to be determined. 

Wednesday, February 13, 2019

Progress on Difficulty

I freed up some variables in the movement section being that Bag Boy's X and Y movement are the same value. I then used those variables for the additional cars so that I may link their movement to a separate one as difficulty progresses. I will next try and determine how to best adjust values as score progresses to make it more difficult.

Once I have the mechanics figured out I will work on a power up or two,  like an energy drink that allows for faster movement when the button is pressed but I do not want to implement that until I can figure out a status bar because I will undoubtedly want some kind of timed element to keep the game moving.

I had also did some minor housekeeping and improved on the playfield graphics. 

Saturday, February 9, 2019

Virtual sprite reflection.

Was playing around with audio and title screens. I couldn't seem to get either to work so I decided to play around with some little things like reflection of the virtual sprites so now te second customer flips direction and no longer moonwalks and the shopping cart faces the car it follows.

I still have some work on cart direction when captured by Bag Boy but it is slightly better.

I was also trying to set up life counters or status bars but don't think I am able to get it to work with this kernel so I was considering creating a separate screen (like the game over screen in my original game). 

Car Spawning Continued


Got the second on third car spawning with different movements each.
  • The red car on top moves at an average speed.
  • The yellow truck moves at a slow speed.
  • The pink car moves quickly and alternates between the two lanes above and below the truck.  

They spawn at different score intervals.  This variable speed allows for the Bag Boy to weave in and out with the shopping cart with moderate difficulty.  There is also the added element of the second customer who attempts to take the shopping cart from you and eventually the customer waiting at the top will have random movements so that one cannot simply head to the top and wait or predict the position with great reliability.

The shopping cart will also chase the red car to keep it constantly moving upwards but it would be able to collide with the other cars so you cannot just sit at the top and wait for the cart to arrive.

Friday, February 8, 2019

Car Spawning!

I have finally moved onto car spawning!

While I had the one car at the top of the screen that always passed, I have started to experiment in getting other cars. 

First I tested utilizing other banks.  I wasn't quite sure how to put code in another bank and have it interact with the rest of the program.  It didn't really take long and wasn't quite difficult.  I have plenty of open space in a few banks so I was planning on trying to use each bank for a purpose to be determined at a future time.

Once I got the code I used the score to initiate a new gameplay element but had trouble figuring out how to do so.  I eventually learned how by defining the segments of the score and then having the game check when a value is met.

So now once the score reaches 100 a yellow truck appears.  I will of course have to determine how the second customer and cart interact with these new obstacles but the game is looking more and more like a game so I am excited!

Teleportation fixed!

Flipped some order of the code regarding collision checks and changed the line that verified if the sprites were not touching and lo and behold the teleportation was fixed and collision detection worked! 

Thursday, February 7, 2019

Stumped On Cart Teleport

Still stumped regarding the teleportation of the shopping cart but I did solve the wandering cart problem - when collision between Bag Boy and the shopping cart occurs I told the game to skip over the chase code for the shopping cart so that it wouldn't pull away and go after the car. I will have to fix the spawning of the second customer because I have noticed that they now meet off screen so I may make the second customer appear only when the cart hits a particular y-coordinate.  I still have not touched the car spawning code.  Once I do I will introduce other cars and determine how the cart will interact with the other cars.

I am thinking I may just have the cars alternate lanes at first but when the difficulty increases, I will have the cart chase the car with the greatest distance between them to provide more of an opportunity for Bag Boy to intercept.  I think I may also let the second customer get hit by the cars.

Wednesday, February 6, 2019

Cleaning code, fixing things...

I had cleaned up about 500 bytes of code. Still trying to figure out why the cart teleports when touching the virtual sprites. I did create a purpose for the second customer. Should he grab the shopping cart he will hold onto it and sap your score. 

Tuesday, February 5, 2019

Added Customer/Collision Detection

Still working with collision detection causing the shopping cart to jump to the location of the Bag Boy when he lingers over a virtual sprite. I am sure I am probably missing something simple since I am not 100% finished updating my collision detection.

And just for fun I had added another customer Sprite who will chase the shopping cart in the parking lot. If he touches the cart it will deduct points. You must touch that customer to get rid of him (or grab the cart and out run him). I had considered introducing him should a player take too long or just to add a little difficulty by making a moving obstacle. If this works out I may revisit the dog idea I had when I first started making this game, where the dog will chase the player.

Monday, February 4, 2019

Collision Detection

I was confused why everytime I would detect collision between Bag Boy and the customer or car and the shoppimg cart but after reading that since they were all virtual sprites and technically copies of each other I had to do a different method of collision detection. With help from the AtariAge forums I made code that essentially creates a box around the sprites and when the x or y coordinates overlap in a given 8x8 pixel sprite area collision is detected. I also included a line that if pixels do not touch in this box than to ignore.

This method seemed to have worked. Now the cart doesn't seem to linger or hip around. I went ahead and programmed collision between Bag Boy and the car but did not make ant loss of life - I had a hard time utilizing life counters or life bars with this kernel and am not certain whether or not they would be compatible. If not I might be able to utilize a missile to serve this purpose. Unlike in the original Bag Boy!, where the car had a health bar, I have considered making the bar act as a timer for getting the cart to a customer in addition to the score. This may help provide difficulty and some other strategies.

But before I start on the life counters I want to work on car spawning. I have considered keeping a particular car for each lane, each with their own movement. For this I may add a global counter with each car reacting differently to it.

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 ...