Jump to content



Recommended Posts

So I decided to explore Option F.  I found a line that was left in from some previous code so I had removed that and then reworked and consolidated some of the code in the intro/game select menu freeing up enough space to accomplish the goals of redrawing the jack. I now have 58 bytes free in Bank 1 so I will try and work in a little more sound and hopefully seek out any other glitches.  


New binary will be posted in the first post!

Link to comment
Share on other sites

So when I made my fix to the massive jack bug, I made a new bug - the 671 point bug, where the bay doors would not reopen at 671 points.  At first I thought this was a glitch with my Atari Flashback Portable because I also experienced a colorswitch glitch (or fat finger fumble) and loosely associated the two together.  I later replicated the bug on hardware but not Stella (but that is because I changed the score value effectively circumventing 2 other variables). You can read about the problem here.

After looking into the code, I believe I fixed the issue.  I essentially inserted the movement check code from the massive jack bug fix into the bay door code.  I switched out 2 bits for 2 unused bits (e{5} and e{6} for s{5} and s{6}) and things should be cool now.


Updated binary in the first post!

Link to comment
Share on other sites

  • 2 weeks later...

I was just getting ready to post an updated binary when I was testing on hardware but I had to get up from the couch for a moment and when I came back I had noticed a couple odd things that I think are probably related to one little change I made. I had noticed the screen was on Game Over when it probably should have paused when I lost a life.


The second thing I noticed was that when I got points it seemed to change the timer from maxed out to really low... And then when I continued on my last life the life sprites changed color (and would flicker) and the timer stopped going down.


So... I will fix that.


Right now the main things going on with Crossdock is that I am trying to find a balance in game play to where the timer does not run out too fast. I will get it okay but then when the counter speeds up the timer depletes much too fast. I have been trying to move little things in the code to make more room for better adjustments but when I change one little thing another one pops up. I keep thinking of trying to level kitchen counters - I get one leg right only to mess up the other 3. 


If I can get the pacing at both speeds right, Crossdock will be almost ready for release.


...I just got my son down so I started to play around with the code.  I think I found the issue.


My last adjustment involved me increasing time rewarded for a bay filled.  While I had a check for statusbarlength>224, since I increased the reward it would push that number over 255.  That issue was actually present in the past but I never got close to a full status bar.  So I consolidated some code freeing up more space and I added that the time reward is only if your status bar is under a certain length.  So far it seems to work but I will do some more testing so I don't prematurely post a broken game.


I had changed this

  if z{6} && f=69 then statusbarlength=statusbarlength+40 
  if !z{6} && f=69 then statusbarlength=statusbarlength+80
  if statusbarlength>224  then statusbarlength=224
  if z{1} && f=69 then player1x=(rand&63)+20 : player1y=(rand&31)+15 

into this:

  if f<>69 then goto BAR_CHECK
  if z{1} then player1x=(rand&63)+20 : player1y=(rand&31)+15 
  if z{6}  && statusbarlength<215 then statusbarlength=statusbarlength+40 
  if !z{6} && statusbarlength<175 then statusbarlength=statusbarlength+80 
  if statusbarlength>224  then statusbarlength=224


Edited by KevKelley
Added code...
Link to comment
Share on other sites

  • 2 weeks later...

Over the last month I had tweaked this game and tried to weed out any glitches or bugs.  I found a few from changing values, extended play, letting my kids do whatever they wanted to try and break it.

I kept the limit to 8k to see if I can do it.  It was a challenge but I was able to make the appropriate fixes with just enough space to spare.  I had added the file to the first page and am proud to say that with maybe some minor tweaking it may be done... 




I was playing around with some concepts and had started work on a 16k version!


I had originally wanted to keep it 8k but was playing around with the idea of special editions with additional features that got me wondering what exactly I could add to this.

While the gameplay for the main game is essentially the same, the 16k version essentially expands on the bonus level.  In the 8k version there are 2 bonuses you can receive.  The first is a bonus box that appears under certain conditions for a brief amount of time.  You grab that box and you are rewarded with some time and a box in hand.  The second bonus is a time bonus.  The timer stops and starts flashing giving you some time to load up pallets.

In the 16k version the second bonus is an opportunity to go to a bonus screen, where you are met with different gameplay.  When the statusbar starts to flash, you have a a limited amount of time to go past the conveyor belt to an outside truck bay.  There, you operate a forklift and you must remove boxes from a truck and place them on the conveyor.  You must do this while dodging the snakes and birds.  Each box unloaded successfully will get you extra points.  There are some rules in the bonus round - the birds (or their poop cannot touch you) and the snake cannot touch the box.  You also cannot move the box while the forks are raised or it will fall off the forklift but you can raise it up if you are not moving.


Currently I have 6 different bonus screens that cycle randomly and am still working out the details but I think this is working out pretty well.  By upping to 16k, I added 2 banks and moving things around I added some space here and there so the bonus screen will occupy pretty much one whole bank.  I am considering using the other bank for a possible surprise...


And if some are wondering how this ties into the theme, if you had ever worked a loading dock in Florida, you may have had to deal with swarms of birds from bread vendors feeding them their stales, raccoons and cats hanging around the dumpster, snakes slithering around pallets, or even an alligator waddling out of a retention pond... Many of these scenarios inspired the bonus screen.  I was tempted to add bats (which I had also had to deal with) because of bats thrown as enemies in pretty much every early video game but I chose birds instead...


BUT until I finish I figured I would offer up the 8k version and see what people think about the modifications from the last update!





Edited by KevKelley
Added info
  • Like 1
Link to comment
Share on other sites

3 hours ago, KevinMos3 said:

I've been kinda wondering if you were planning to put that picture from your label mockup in as a title screen at some point.

I'm not sure if I will mess with the titlescreen at all. With what I was working on I don't think I would have enough space. I had a hard time trying to figure out the titlescreens with images before so I had put off learning that so it may be possible down the road.

Link to comment
Share on other sites

Little status update.


Found a little bug when playing the 16k version.  When playing with faster Dock Boy speeds it is possible to grab parts of the playfield.  This is undoubtedly in the 8k version.  It just requires me to change the bottom boundary but it doesn't really impact gameplay too much. 


I had just finished up the bonus section with about 500k to spare so I may add a few more things.  There are a couple little details I need to check out before I release it for testing but here is a quick video of what the bonus screens look like.  I had adjusted the variables so that bonus access appears quickly for demonstration purposes.  As a note, once the conveyor belt speeds up, it essentially halves the time you have to get to the conveyor belt.  


When you get to the bonus screen there are various animal obstacles you may face:


Birds - These will fly around and get in your way.  Some will poop while some will not.  Avoid both birds and poop.

Snakes - These will slither back and forth.  Keep them away from the box.  When they see your box they will slither faster.

Ants - An anthill will pop up. You can squish the anthill or the ants.  Don't let them in the boxes or they will start eating the product, decreasing its size.

Spiders - These will slowly lower and sway in your direction briefly when they reach the bottom.  Upon raising up they will spit some venom because why not.

Rain - Avoid the couple drops of rain that continually fall!


You have the potential to earn 224 total points from the bonus screen based on how many boxes you successfully unload, as indicated by the status bar, and a full timer when you return.  Depending on if the game is too hard or easy I may opt to reduce the timer bonus.




Link to comment
Share on other sites

1 hour ago, KevKelley said:

I had just finished up the bonus section with about 500k to spare so I may add a few more things.  There are a couple little details I need to check out before I release it for testing but here is a quick video of what the bonus screens look like. 

The bonus section looks really fun, it could almost be a stand alone game in itself!


- James

Link to comment
Share on other sites

31 minutes ago, ZeroPage Homebrew said:

The bonus section looks really fun, it could almost be a stand alone game in itself!


- James

I was hoping to give some variation to the gameplay. I was thinking with the different screens, chosen randomly, and the potential for extra points, it would be more fun than just loading pallet after pallet. The 8k version was more an exercise for me so while this version may have some code bloat, I think this achieves my goal. I also looked at a way of integrating some of the ideas I had for my Forklift game idea as a way to play around and see what may work.


Many of the screens were a result of me asking my son what he wanted me to try and program.


I was just testing it on my AFP and only encountered one bug so far and it is a minor fix. May also change the random generation on a "extra" bonus screen, as I think the probability it appears would be about once every 4000 screens. Should have a chance to work on it tomorrow so hopefully i can get closer to finishing it. ?

Edited by KevKelley
Link to comment
Share on other sites

In Crossdock I had started playing around with playfield variables to save space and cycles. I had a thought about using this tool.


You load bays in the top of the screen. Once each bay is filled a line is drawn "closing" the bay. I had originally used pfhline but changed to using playfield variables. 


When I added a second screen for the bonus and switched back and forth between the two, I experienced an issue - the bays would be reset because the whole playfield will draw. Another issue is that I would have liked to try and save the values of the bay doors but I was out of variables. 


I had the thought of redrawing the entire playfield using playfield variables and in my second screen I don't use the top row. Since I use pfheights and pfcolors, I was considering using the top row color bug to save the values of the doors using the playfield variables and then change the color to black to conceal them and when it is time to return I swap the values, essentially saving your progress.


This tool looked to make that task easier in drawing the playfield.  I want to test this out as I think it could be an interesting way to not only redraw parts of the screen but also using those variables. I could also see this being useful in other ways

Link to comment
Share on other sites

  • 2 weeks later...

So I had thought I had finished 98% of the game, with most if not all main bugs rooted out leaving just some tweaking.  And for the most part everything runs fine leaving me the tweaking to do... but then I let my son play the game and found a few more bugs but I will still share most recent build!


As I had mentioned in previous posts, I had expanded to 16k and added a bonus round that featured Dock Boy unloading a truck on an outside loading area while avoiding various animal and environmental obstacles.  After James' comment regarding the bonus round looking almost like a stand alone game, it got me thinking how difficult it would be to insert a few lines here and there and make a separate minigame.  I thought that sounded like a fun challenge to see if I can figure it out and to my surprise it wasn't that hard.  




Since the lines of code that I needed to make a standalone minigame were only a couple hundred bytes, I had plenty of space so I had a couple other game ideas that were simple that I thought I could implement reusing some of the code from the maingame, such as sprites or movement code.  This was something I used to love in old games growing up, like being able to play the Melee in Star Control so I thought it would be cool to add. 


I added 2 other minigames - one where I took the code from my first Batari Basic game (the original Bag Boy), cleaned it up, and then added some things that were from my notes from 2 years ago, as well as a couple elements similar to what was in Crossdock and the new Bag Boy.  The other game a "pong" game.


Here is a brief description:


Carts - grab a cart, dodge the cars, and return the cart to the moving cart corral at the top of the screen.  As you play some varying obstacles will appear.
Trolley Volley is a pong game.  I originally was going to call it Cart Pong but remembering what was mentioned about Joust Pong, I looked for a retail themed alternative.  Seeing my Pong clones had many Volley Ball and Tennis variations, and some call shopping carts Trolleys, I found the name fitting and fun.  This is a 2-player only game.  Each player controls a bar.  While the cart trolley bounces back and forth, Dock Boy can be seen dropping boxes.  If you hit the box with the cart the box kind of enters the play and will bounce back and forth.  If a player misses the box their bar will shrink.  The statusbar shows which player is winning the round and will change color based on who is in the lead. You can also grab the trolley, move up or down, and release it. 
Dock Boy! is the ZPH-inspired stand alone that is basically the bonus round from Crossdock, but with some minor changes.  Basically you have never-ending trucks to unload from an outside dock.  I think each truck has about 14 boxes on it that you must unload but you must avoid the various animal and environmental nuisances. 
And now the bugs my son found (FIXED 7/2/20):
1. After playing minigames and then playing the main game, the conveyor belt stopped working.
2. With box throwing and small pallets selected, after playing the minigames, when the boxes were thrown they made no sound and did not move down - just to the side.
3. With the same options as #2 DockBoy stopped moving, even after the timer ran out.
4. Also it seemed the statusbar had stopped working and remained full.
5. When moving down and hitting a box, the life color changed colors. 
My guess is that I did not reset all the variables used in the minigames for the first 4.:thumbsup:
 - All but the lifecolor is fixed and updated.  Looks like a variable might have been responsible for the statusbar so when my son scored points in Carts it flipped a bit in the main game that locked in the statusbarlength.
Here is a gameplay video on YouTube.
Anyway, I will add a new binary in the first post.
Edited by KevKelley
  • Like 2
Link to comment
Share on other sites

We'll be checking out Crossdock on tomorrow's (Friday July 3) ZeroPage Homebrew stream LIVE on Twitch at 6PM PT | 9PM ET | 1AM GMT! Hope everyone can watch!







Edited by ZeroPage Homebrew
  • Thanks 1
Link to comment
Share on other sites

Thank you again for playing Crossdock!


As I had mentioned there are still some tweaking needed.  As it is the game seems too easy.  It is kind of a race-against-the-clock game where the timer is constantly going down while you must complete tasks (loading pallets and bays) but so far the game kind of just goes on forever with little challenge.  The obstacles and speeding up do change the gameplay but I am still trying to find that balance but it was fun to see how differently it is played, whether running around with the jack or parking it and loading it.  


I also saw the screen jump a little when being played.  It is odd that I didn't get that on my hardware or TV.  I have to check my settings in Stella, as I had only seen any screen movement over 263 scanlines.  Over time I would tweak the code and I would get the jump to occur less frequently but after last night I looked through the code.  I had noticed that it only occurred on the bottom half of the screen so I took a look at the code and I think I found the issue.  Originally I had thought I just had too much stuff going on at once so before I would shift code around here and there which seemed to only make minor changes in frequency or I would make a change, seemingly fixing the issue, only to have it return when I added more code. So I rewrote this little bit of code this morning:

 if !d{0}  then goto THROW_BALL
 if d{0} then ballheight=3:ballx=player0x+6:bally=player0y-5
 if d{0} && joy0left then ballx=player0x 
 if d{0} && s{7} && joy0up then ballx=player0x+3:bally=player0y-7
 if d{0} && s{7} && joy0down then ballx=player0x+3:bally=player0y+3
 if d{0} && !joy0left && !joy0right && !joy0up && !joy0down then ballx=player0x+3:bally=player0y-3

to this:

 if !d{0}  then goto THROW_BALL

 if d{0} then ballheight=3:ballx=player0x+6:bally=player0y-5
 if joy0left then ballx=player0x 
 if !s{7} then goto SKIP_UPDOWN
 if  joy0up then ballx=player0x+3:bally=player0y-7
 if  joy0down then ballx=player0x+3:bally=player0y+3
 if  !joy0left && !joy0right && !joy0up && !joy0down then ballx=player0x+3:bally=player0y-3

and so far (fingers crossed) and it seemed to have stopped.


There was also that bug when they went from the minigames to the main game and it was back on the bonus round with the rain dropping.  While I added variable resets, I had forgotten that in that particular minigame it also uses the code from the bonus round so I forgot to reset the variables from that part of the code.  I think that might have been the issue so I added a couple more resets.


I updated the .bin with the fixes in the first post, which also has some other minor fixes to the mini-games. I thought I had updated it yesterday but it looked like I never added the newer file.





Edited by KevKelley
  • Like 1
Link to comment
Share on other sites

I spent some time playing the latest version, and I'm enjoying it quite a bit. I agree about tweaking the timing to add more challenge, though. 


I also got my palette stuck on the conveyor belt at one point, and couldn't retrieve it.


Edit: I also didn't notice any screen jumps with this version. 



  • Like 1
Link to comment
Share on other sites

Wow. Haven't seen the jack get stuck in there before. I don't think I had any checks for if the pallet jack x-coordinates were to be greater than whatever the conveyor belt is.  I'll probably put something in there to stop it from going there.  Thanks!


I am also glad to hear no screen jumps!  That problem has been with me for probably a couple months and it confused me why I didn't experience any on any of my TVs or systems.  I find it hard watching the corner of Stella for that red number to appear while playing and seeing under what conditions it jumps. I've tried putting in breaks in Stella to stop the program when it occurs but I admit I have a hard time processing the information in the debugger but watching ZPH play helped immensely, as I was able to narrow down the cause.


I'll go back to tweaking!  I feel like it is almost there.  Before this latest version it seemed to decrease too fast whenever the game sped up so I added the statusbar replenishment after the first ZPH playthrough when James commented about the bar not filling back up after all bays were filled.  But now it seems it is too easy.  It is reminds me of when I tried to level a counter top - adjust one leg and then you got to adjust 3 more.  


I thank everyone for the time playing as this helps greatly.  Plus I have other projects I want to work on and am trying very hard not to start multiple things at once!

Link to comment
Share on other sites

Yeah in Stella you can add a line in the debugger to have it stop execution when you go over 262 scanlines so that you don't have to watch it. Open the Stella debugger with the backtick/tilde key, then type:


breakif _scan>#262


Then hit the backtick/tilde key again to resume execution. If you go over 262, you will know immediately, and you can see where it happened.

Link to comment
Share on other sites

On 7/4/2020 at 9:10 PM, Karl G said:

I spent some time playing the latest version, and I'm enjoying it quite a bit. I agree about tweaking the timing to add more challenge, though. 


I also got my palette stuck on the conveyor belt at one point, and couldn't retrieve it.


Edit: I also didn't notice any screen jumps with this version. 


So I went back through the code to see if I can add another check so that there is no chance to get the pallet stuck in the conveyor belt. As I was trying to replicate it I noticed a brief moment where the scanlines jumped to 263 so I went back through the code to see if I can fix the issue AND find room for the check.  I initially tried to add it to where I have my other boundary code but it kept interfering with the pallet drop code. I was extremely limited in space so after looking at it I reworked the movement code and slipped in the check which also freed up some space.


I changed this:

 if joy0right && joy0fire && collision(player1,player0) then player1x=player0x+5:player1y=player0y:goto SKIP_JACK
 if joy0left && joy0fire && collision(player1,player0) then player1x=player0x-5:player1y=player0y:goto SKIP_JACK
 if joy0up && joy0fire && collision(player1,player0) then player1x=player0x: player1y=player0y-5:goto SKIP_JACK
 if joy0down && joy0fire && collision(player1,player0) then player1x=player0x: player1y=player0y+5
 if joy0right && joy0fire && collision(player1,player0) && collision(player1,missile0) then missile0x=player0x+8:missile0y=player0y-1:goto SKIP_MISSILE_COLLISION
 if joy0left && joy0fire && collision(player1,player0) && collision(player1,missile0) then missile0x=player0x-6:missile0y=player0y-1:goto SKIP_MISSILE_COLLISION
 if joy0up && joy0fire && collision(player1,player0) && collision(player1,missile0) then missile0x=player0x: missile0y=player0y-8:goto SKIP_MISSILE_COLLISION
 if joy0down && joy0fire && collision(player1,player0) && collision(player1,missile0) then missile0x=player0x: missile0y=player0y+5

into this:

  if joy0fire && collision(player0,player1) && player0x<110 then goto _JACK else goto SKIP_JACK
 if joy0right  then player1x=player0x+5:player1y=player0y:goto SKIP_JACK
 if joy0left  then player1x=player0x-5:player1y=player0y:goto SKIP_JACK
 if joy0up then player1x=player0x: player1y=player0y-5:goto SKIP_JACK
 if joy0down then player1x=player0x: player1y=player0y+5
 if joy0fire && collision(player1,player0) && collision(player1,missile0)  && player1x<110 then goto _MISSILE_COLLISION else goto SKIP_MISSILE_COLLISION
 if joy0right  then missile0x=player0x+8:missile0y=player0y-1:goto SKIP_MISSILE_COLLISION
 if joy0left then missile0x=player0x-6:missile0y=player0y-1:goto SKIP_MISSILE_COLLISION
 if joy0up  then missile0x=player0x: missile0y=player0y-8:goto SKIP_MISSILE_COLLISION
 if joy0down then missile0x=player0x: missile0y=player0y+5

That seemed to take care of the scanline issue (I think) and now if your player goes into area of the conveyor belt he will let go of the pallet jack. This will also prevent the pallet from getting stuck in that area as well. After some testing the new code seems to have the same interactions as the old code so it should not change gameplay any. 


There were also a couple of other things from the ZPH show that I liked.  One was having the box move on the conveyor belt in the bonus round/minigame (TheDTrain37 mentioned this).  This was something I had planned on doing but then kind of forgot about so I slipped some code in there so that the box moves down the conveyor belt and a new one reappears in the truck once the other box disappears.


The other ZPH-inspired idea was someone mentioned the possibility of not knowing what bay doors you had filled, so that you must remember which doors are closed off (Tanya had mentioned this).  I really liked this idea as I have been trying to come up with a different difficulty setting for one of the switches (or swap random jacks with the switch and make this a door option).  Currently one switch sped up the conveyor belt and the other sped up Dock Boy (which I felt caused more annoyance than difficulty).  I decided to add this setting to the speed setting, reducing the fast speed by a bit as well.  So now if selected there is zero indication which doors you had already filled making for a nice game of memory.  


I updated the .bin on the first post.  


Hope people like these changes as I continue to dial in the balance of the game!

Edited by KevKelley
Link to comment
Share on other sites

  • 3 weeks later...

What I have been finding is that there isn’t as much time as you want between drawscreen as you would like.the current way I have been handling it is to  handle collisions on a rotating basis. Since my objects are currently using sub-pixel movement, and most of the objects don’t move faster than 1 pixel, I don’t really need to perform collision detection every frame. Instead, you can stagger your collision handlers over several frames such that each object is checked at least once every 4 frames. (Example below).


You can also make it more complicated, and only try to schedule the handlers over multiple frames if you have 2 or more simultaneous collisions (I.e. of collision(player0, playfield) and collision(player1,playfield) are both true then use the temp1 frame value to decide which handler to call this frame, otherwise always handle a single collision instantly.)


    ; frame counter. useful for animating player
    ; objects every so often or handling collisions
    ; on a regular schedule
    _frame = _frame + 1

    ; joystick handlers here
    if joystick0right then goto __rightMove
    if joystick0left then goto __leftMove
    if joystick0up then goto __upMove
    if joustick0down then goto __downMove

    ; other game stuff
    ; draw screen so pixel perfect collisions can be detected

    ; get frame remainser div by 4. range 0-3
    temp1 = _frame & %00000011

    ; schedule collisions on a regular 4 frame basis
    if !temp1 then goto __handleP0collision ; P0 on zero frames
    if !(temp1 - 1) then goto __handleP1collision ; P1 on 1 frames
    ; missile0 on 2 frames and missile1 on 3 frames
    if !(temp1 - 2) then goto __handleM0collision else goto __habdleM1collision

    ; all handlers have goto __returnCollisions
    ; to skip the rest of the other checks above
    goto __mainLoop 



Link to comment
Share on other sites

  • 2 weeks later...

It has been a really busy month so I had barely had time to work on anything.  My work had experienced its annual inventory process so that was time consuming (maybe inspirational for another game? lol).  There had also been pandemic related inconveniences that have impacted my programming time but I had finally gotten a chance to play around with the code.  I kept the invisible bay doors as I really liked playing with it and plan on swapping it with the jack randomizer bay on the titlescreen but I didn't have the time. I tweaked the timer a bit after a bay is filled to see how that works with pacing, as before it seemed like it was the timer never really diminished. I still have to tweak the bonus from the bonus round but kept it so far if the changes to the timer balance things out a bit, making the bonus round a bit of a reward, especially when things speed up.


I also caught the last ZPH episode and I loved Trashmania: Remix and I kind of saw some similarities in gameplay to Crossdock and apparently some of you did too.  I really enjoyed some of the elements and liked how the player got slower when he picked up trash and got me thinking.  I changed Crossdock to where when you touch the pallet jack you move slower to attempt balancing out the game some more.  As things speed up it is possible to mow down boxes with the pallet jack so this can help calm things down a bit.  It also makes it a little easier to load the corner bays.  I just did a simple collision detection line so I am not sure if I want it to act any different but I want to test it on something other then my computer keyboard, but it did seem promising.  


Anyway, I thought I would add the update in the first post.  I'll continue to test out gameplay and hope to work on it some more in the coming weeks.

  • Like 2
Link to comment
Share on other sites

A couple of the things I am looking at are:


tweaking the timer (still)

moving setting selections on titlescreen and switches

possibly adding a little 2nd player functionality to the main game (kind of like the Trash Mania: Remix option)

maybe add door instead of fire button to access mini games


Some space is very limited so I will see how much I have when I move things around.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...