Friday, January 25, 2019

Movement!



I have been hard at work programming. Got some simple movement programmed for the player, customer, cart, and car.

While playing around with the code, I changed up a game play aspect involving the cart. In the previous standard kernel Bag Boy the player would basically intercept a cart before it hit the car. In this version the player grabs a cart and returns it to a customer walking in front of the grocery store.  Once delivered the cart re-spawns.

A couple issues I am having are that the car constantly spawns on the bottom aisle, the player has a hard time holding the cart, and when the cart touches the customer it can sometimes linger gaining extra points or bounce around, get loose, and head back to the car.

I had also shortened Bag Boy's legs by one line.  I had thought he was looking rather tall, especially when compared to the cars.  I am still looking to see if I can stretch out the cars a bit so they don't seem so disproportionately small but I kind of like the way they look. 

Thursday, January 24, 2019

DPC+ Sprites

Still working on reprogramming the original Bag Boy over to the DPC+ kernel and have been working on new sprites.

Here is what I have gotten so far:


I have a player, cart, customer, and 2 cars.

My thoughts on game play is having difficulty get progressively more difficult with the cars going down the various lanes while the shopping cart may move towards one of them.  I am thinking as things get harder the cars may present more obstacles.  I was also considering using the customer as either a hazard, as in he will chase after you if the cart is in play for too long or possibly have a wave where the cars are parked and you must get to the customer first from when they leave the store to when they get to the car. Once you touch them they turn into a cart that you return to the store.

These are just all thoughts that are floating around right now and is way in the future but I feel that I have more opportunities with the DPC+ kernel than the standard one, which I found I reached 8k rather fast and it had very simplistic graphics.

Saturday, January 19, 2019

DPC+ Experimentations


Progress has been slow on my game due to life but I have been slowly working on it but if my understanding is correct I will need to rewrite a lot of the code to try and keep it at or under 8k.  Plus I had used up all of my variables early on when I used them a lot when I had first started not understanding the Atari's limitations fully. 

Because of these reasons, and my wife's insistence that the square car better resemble a car it had led me to try and experiment with other kernels, such as the multi-sprite or DPC+ kernel.  While I was doing alright with the multi-sprite kernel, I had felt that the DPC+ might provide with more opportunities for the game that may cater better to my skill level and desire.  I would still like to finish up Bag Boy! using the standard kernel but I think while I work on rewriting the code I can plug it into the DPC+ kernel with some graphical improvements and some game play tweaks that might be positive. 


So the standard kernel would be "Bag Boy!" but I am considering the DPC+ version be something like "Bag Boy Plus!" or something along those lines to differentiate the two.  I think doing a standard kernel version would be a great challenge and learning tool.

Anyway, here is a simple screenshot of what the new playfield and sprite for Bag Boy looks like at the moment:

This could be seen as an improvement over this:


Saturday, October 6, 2018

Bag Boy Walks!

I have been working on the power up system now for a little bit and cannot seem to wrap my head around why I cannot get it to stick.  The power ups generate.  I don't know why it flashes around for a little, which I don't really mind because I do kind of like the appearance of it.  I would like it to where you cannot benefit by clicking on the flickers for points but again, that is not a big deal because it disappears when you grab the next cart and it also is an added plus - risk the cart hitting the car for a few points or grab the cart.  The issue is that while the power up generates, I cannot seem to get it to change color, and by extension I cannot get each color to have an attribute that change's Bag Boy's properties.

Once I get the power up system figured out the next step is creating the two other playfield "levels," which is Ice Parking Lot and Rainy Parking Lot.  I have the code kind of down for the appearance of rain or snow:

 rem SNOW
 COLUBK=14
 missile1x=(rand&100)
 missile1y=(rand&100)

or:

REM RAIN
COLUBK=156
 rem rain
 NUSIZ1=$10
 missile1height=
 missile1x=(rand&124)-1
 missile1y=(rand&100)-1

While this code isn't perfect, I find it provides for the appropriate aesthetic for this game in the simplest way.  I use the missile1 instead of the ball because the color of missile1 would be the same as the shopping cart, which would work well on as snow or rain and show up on a blue (rainy) or white (snowy) background.

I have also been playing around with the titlescreen.  I have yet to figure out how to use the titlescreen kernels but I was bothered by my original appearance of the game name, which I thought looked like a ghost.

I also added sprite animation for Bag Boy although I cannot quite figure out why he moves like Gumby every once and a while.  I suspect it has something to do with joy0fire being held down and needing to be reset but not sure how to implement that.



UPDATE:

Fixed animation and power up spawning!


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.


Friday, August 24, 2018

Reflected Player and Missile

After some reading numerous examples online and practicing some code, I had decided on using missiles for the cars, or at least until I come up with a better idea if one does exist.  I am still working on the other sprites, like the Fake Service Dog.  So far I have figured out how to make the missile as an 8x8 square.  While it requires some imagination to think of it as a car, right now it is better than nothing and gives me a starting point.  I am considering make a car that sustains damage from the carts by changing the size of the missile with each collision.

For example, start with a 8x8 missiles side by side to make a "car."  With each collision, the missile will half in size.  When the missile is reduced to zero a new "car" will generate, or maybe a life is lost.

Or I may have a car health bar on the bottom of the screen by the score.

Not sure.

Currently I have the Car generate on the right side of the screen and scroll to the left, attracting the shopping cart. When the car reaches the left side of the screen it randomly generates back onto the right side of the screen with new y-coordinates.  So far it keeps going after a collision.

In this latest update I had also added sprite reflection so that the shopping cart always faces the car and player 1 changes direction, but I would much rather animate player 1 in the future.


Friday, August 3, 2018

Attack Of The (Fake) Service Dog!

I was trying to figure out how to use some of the missile and ball sprites when a friend of mine made a joke after seeing the last uploaded video showing the Bag Boy and cart sprites.  They had mentioned that I should make a sign on the carts that said "no dogs," a reference to a local grocery store recently putting notifications that only service dogs were allowed and no animals were permitted in the shopping carts.  This had got me thinking about the sometimes unruly "service" dogs that customers bring into grocery stores and so I found some inspiration - the fake service dog enemy!



While I am still trying to figure out the mechanics to have a cart sprite head towards a car graphic, the fake service dog (FSD) works perfectly for randomizing events.  The FSD will chase the Bag Boy instead of a car and the Bag Boy can utilize the missile, which will represent something like a candy bar or cookie.  Shoot the dog before he gets you and receive some points.  Get bit and you may lose some points or a life - I still haven't quite figured out how to do the life thing yet.  I may opt for a health bar or have each level timed instead of hitting a score goal, like advancing in levels every 25 or so points. I am having difficulty switching from the cart sprite to the dog sprite but will focus on this development since this provides greater variation.

I had also improved on the cart spawning by using a similar method to my playfield collision, essentially randomizing numbers for the cart x,y within the boundaries of the parking lot.



Thursday, August 2, 2018

Added Sound And Improved Cart Randomization

I had finally gotten my new laptop and started up where I left off several days ago.  I am still getting familiarized with programming and using the Visual bB interface.  I worked on improving the randomization of the cart spawning and added sound to play at the moment of collision with Player 1.

I also created a simple collision detection with Player 1 and the playfield by just restricting movement based on pixel.


I am still trying to figure out how to contain the spawning within the playfield, as well as improve collision detection with Player 1 and the playfield in the most efficient manner but currently the setup works.



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