Friday, September 28, 2018

Progress In Programming

Over the past couple of weeks, through trial and error, I have become more comfortable programming with Batari Basic and the Visual Batari Basic software.  Some changes I have made boggled my mind and some corrections I made I still don't fully understand but I have noticed that with each passing day I am able to rectify much of the past day's mistakes and achieve a goal similar to what is in my mind.

With that being said, I have made some progress and have an update to my game!

Since the last update, I have added a couple of things.

I had finally figured out how to enter in variables and so I have been able to correct the acceleration of the shopping carts.  I also realized why the cart would sometimes exhibit erratic behavior - in creating code for a potential second player, I accidentally gave the first player some control.  This in addition to my simplistic AI would give the shopping cart a huge speed boost.  Now that that has been corrected, the game is kind of playable.  The cart randomization still needs some tweaking but for the most part the cart can be captured.

I had also added a screen shake.  I had originally added it for whenever the player gets hit by the car but for some reason it activated whenever the cart hit the car.  I kind of liked it so I left it alone.  I will probably change it once I take care of more important programming issues.

I had also added the basis for the power ups by utilizing the ball sprite and randomizing it's location every set amount of cart grabs.  I kept the number low so I can witness it spawn but will eventually change it to a random range.  Ideally I would love the power ups to appear as a different color from the background, possibly with it having different colors with each color changing different attributes but I am not sure how to implement such a thing or if it is at all possible.

I had also started playing around with the different stages of the game.  To provide varied game play and added challenges, I was going to add a rainy and icy playfield.  Essentially the background color would change to either blue or white, respectively.  In the snowy stage I randomize the Missile1 sprite and plan to change the inertia of Bag Boy so that he may slide a bit.  In the rainy stage the missile sprite has a height of 4 and goes from top to bottom.  I also mirror the sprites so that there are additional carts on the playfield making it more challenging.  I may try to implement wind as well but that is miles away.

In this latest change I had also played around with the title screen a bit.  I am still trying to figure out how to use the title screen editor and want to eventually make a better title screen that allows you to select difficulty and number of players.  While this can be achieved with the switches, I think it would be cooler if it was an onscreen menu.

I also fixed that whole player/car collision issue.  It seemed that when I rearranged the order of the code for collision it seemed to fix the issue. 


Wednesday, September 12, 2018

Custom Game Cartridges

I just got 2 custom 3D printed cartridges for Bag Boy!

I cannot remember if they were nylon or polyester but I had found the files on Thingiverse and wanted to check out their services for making some prototype carts to teat on actual hardware. I don't have anything like one of those SD card cartridges but I also liked the idea of having a different type of cartridge. I love seeing the different colors ony shelf from companies like Tigervision and thought this was too neat to pass up.

I may try to play around with these designs and make my own original cartridges with an imprint or special shape but for now these things are awesome. I chose the dark green color because of my favorote color and how it also relates to my game and real life employment.

It might need to be polished down, especially to make the labels adhere to the plastic. May try different materials in the future.

Saturday, September 8, 2018

Added Life Counter, Health Bar, and Game Over Screen

I am still working out my understanding of fixed math variables and what not so that I can reprogram the cart/car collision so that I can create a difficulty option and implement power ups.  My original goal tonight was to work on the fixed math and variables, as well as the spawning of the cart.  I don't know if I did something by accident but it seemed like the cart movement was a bit wonky.  At times it pauses and at other times it seems to speed up if moving in the same direction as the player.  This wasn't too big of a deal for me since I need to rework that section anyway so instead I decided to add a little more to the game by way of a life counter, status bar, a "Game Over" screen, and some music.

The additions are as follows:


  • When a collision is detected between the player and the car a life is lost.
  • When a collision is detected between the cart and the car the status bar is incrementally decreased.
  • Currently, if all lives are lost or the status bar is depleted, game is over.
  • The game over screen was added by making another playfield with varied colors.  I also threw in some sound for fun.

I am still trying to determine if the loss of the status bar should equate to game over or a loss of life.

The purpose of the game over screen was an exercise. 

The game needed a logical conclusion but I also wanted to figure out how to change playfields.  This was a good way for me to practice coding that.  I also wanted to try flashing colors because when I eventually add power ups I want the pixels to be flashing so that they stand out in the playfield.  Same reason for adding music.  Since I had a variable for the flashing colors, I decided to use that same variable for the duration of the sounds and see how that would work.  I had originally tried programming a game over song (as well as a titlescreen song) but had a hard time getting it to work.  For some reason I could get the music to play but the playfield would not draw.  I assume I probably forgot a "drawscreen" command somewhere. 



Saturday, September 1, 2018

Added Player/Car Collision and Sounds

I am still working on figuring out the code for slowing down the shopping cart and making it gradually accelerate.  I also want to learn how to use constants better so that I can utilize a difficulty setting in the title screen but for now I am working on general game play.

I still haven't animated the sprites (I cannot seem to get the code to work when I inject it into my program).  I am going to have to find some other examples.  What I did add was a collision detection between the player and the car.  This results in the loss of 10 points, randomly regenerated player one, and a noise.  I have also added sound for the collision between the cart and the car, with a different noise, and then a rumbling sound for the sound of the car.  I may try to add a kind of Doppler effect on the car noise to kind of give it a bit of dimension. I had also realized that all the collision sounds were the same because I had used the same variable. 

I had also added a function for the fire button to reverse the direction of the car to test out possible "power ups" or second player features. What I may do is randomly generate playfield pixels of different colors at different intervals.  These pixels may improve various aspects, like increasing the speed of the player, mirroring the player sprites, or give functionality to the fire button. I may also try to add second player functionality by allowing the second player to control the cart and the car.

I had also found a pretty cool screen capture software to play around with to provide better video.


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