Jump to content
KevKelley

[WIP] CROSSDOCK

Recommended Posts

Posted (edited)

UPDATED .bin 8/26/2020!  

 

Fixed issue with minigames.

Fixed issue with obstacles when exiting Bonus screen.

 

GAME: Crossdock

 

Play the sensational supply chain simulation, where you are Dock Boy, the dedicated depot worker who diligently disperses delivered product from the designated area onto pallets, piled perfectly and primed to be packed into waiting trucks. There is no rest for Dock Boy.  The conveyor belt never shuts down so you must keep loading those pallets into the open bays before the time runs out so no dillydallying!

 

GAMEPLAY: 

 

The game has 5 gameplay options that you can select from the title screen by having Dock Boy use a jack to grab a pallet and put it into one of the five bays above.  They are in the following order, from left to right:

 

1. Throw boxes - This allows you to toss a box that is in your possession onto the ground.  If it touches the ground the box becomes damaged and cannot be put onto the pallet.  

 

2. Random jack - This randomizes the pallet jack placement after each time a pallet is loaded into a bay.  

 

3. Smaller pallets - This reduces the maximum size of pallets from 10 boxes to 5 boxes.

 

4. No obstacles - This eliminates the spawning of the obstacles. 

 

5. Bays in order - This requires the bays to be loaded in order, from left to right. 

 

The switches can only be accessed from the title screen (except the reset switch).

 

Reset - Resets the game back to the title screen. 

Game Select - This allows you to increase the number of starting lives.

Color/BW - This does... something... 🐰

Left Difficulty - A: Faster conveyor belt speed. B: Regular conveyor belt speed.

Right DifficultyA:Faster Dock Boy speed. B: Regular Dock Boy speed.

 

These options can be chosen in any particular order in any particular combination.

 

As the game progresses there are 3 different obstacles that will appear during a stage.  These are as follows -

 

Swipe - A bar will move from left to right and then back again.  If it hits dock boy or the pallet it will push it in the direction it is going.

Following Swipe - Just like above but now as you head to the bay doors it will move up or down with Dock Boy.

Bouncing Ball - This will ricochet off of walls and boxes.  If it touches a box in your hands the box will disappear.  If it hits the pallet it will start reducing the number of boxes on the pallet.  There is a way to destroy the bouncing ball though...

 

The conveyor belt and Dock Boy's speed will eventually get faster.  Right now those two things will occur at 500 and 1000 points.

Also, after an interval of time you will get an extra life.  

 

Have Dock Boy pick up one of the boxes that come off of the conveyor belt and put it on the pallet.  When the pallet is full (as indicated by a change in the jack color), push the pallet into one of the open bays up top.  Each time a bay door is closed you will get a little time added onto the timer and some bonus points.  Close all the bays and you get even more bonus points.  The faster you go the quicker you build the timer back up.

 

Attached is the latest .bin file.

 

Enjoy!

 

 

CROSSDOCK MAIN B.jpg

 

CROSSDOCK_16k_07_04_20.bas.bin

CROSSDOCK_16k_07_06_20_a.bas.bin

 

CROSSDOCK_16k_08_26_20_a.bas.bin

Edited by KevKelley
Updated files.
  • Like 5

Share this post


Link to post
Share on other sites
Posted (edited)

We'll be playing Cross Dock on tomorrow's (Sun May 17) ZeroPage Homebrew stream LIVE on Twitch at 11AM PT | 2PM ET | 6PM GMT! Hope everyone can watch!


Games:

 

 (SET VIDEO TO 1080P60 FOR FULL QUALITY)

 

 

 

Edited by ZeroPage Homebrew
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)

Thank you for playing the game.  I can see there are a couple of issues I need to fix but I hope everyone enjoyed it.  I am trying to keep this game at 8k for a variety of reasons but I think the fixes necessary are doable!  I think I might be able to save some space with some so hopefully I will have an update soon.

 

And I just wanted to mention a couple of the comments from the show that I enjoyed, and forgive me if I do not remember who originally made the comment.

 

Someone made a comment about how this game is in the same vein as early video games like Lost Luggage, where seemingly normal tasks are turned into a game to some varying degree of success.  There was also a comment about how this game contains similar elements as other games, like Pressure Cooker.

This is kind of by design.  This game started as a practice program for me.  I wanted to get a better understanding of things like bit operations and pfpixel commands.  I settled on a warehouse game because this was a game idea I had come up with 20 years ago along with Bag Boy.  I drew upon as inspiration some of my favorite games growing up and tried to take a creative twist.  In particular, Defender (grabbing things), and Frogger (putting things in compartments). I also love taking mundane tasks and making them into games.  Perhaps these were a precursor to modern games like The Sims? I just hope it translates well to where you can tell what is going on.

Edited by KevKelley
  • Like 1

Share this post


Link to post
Share on other sites

So I just tried my latest  build on a television. Due to work scheduling, much of my testing is on a mix of Stella and AFP. I can see what everyone was saying in the ZPH show.

 

The colored background in Stella is nice and crisp while on the TV I can definitely see how the colors can become an interference. I am considering a couple fixes - utilize the color switch to turn them on or off, reduce the colors to only a couple non-conflicting color schemes, or try to alter the playfield colors instead. The latter may be more difficult since I am using pfcolors and pfheights.

 

The pacing of the game seemed really fast on ZPH. But then I realized that for the sake of getting through stages quickly, I tend to use the small pallet option to test. The problem is that I then load the bays and get points quicker than not.  The fixes I am considering is to either change the points gained from a bay or offer a powerful somehow. Perhaps use the ball when not in use. 

 

I saw plenty of the border glitches where the jack or pallet would become out of reach. This is from some poorly implemented collision detection. I rarely would notice because whenever I would play around I would stick to the middle. I will rework the collision detection. Some of the issues I found were when Player0,player1, and missile0 (Dock Boy, jack, pallet) all collide with the wall. 

 

I noticed on the game over screen it made a horrific sound. Low on space, the sound was some of the last things I had added and didn't quite test as much. 

 

Walking around the title screen. I kind of like the joke about being the rare game where you can die on the titlescreen. This issue stems from when I first made 2 banks, I broke up the code and added a titlescreen. When it came to the movement code, I didn't need much of the main gameplay code for moving so at the time I just made a simple movement just for the titlescreen. I'll double check to see if I can fix this up a bit if it doesn't take up too much space. Otherwise I may keep it, especially since when my son was watching he thought it was awesome. Actually he loved every time James or Tanya broke the game so he might not be the best judge 😄.

 

As for the wonky jack moving when it would touch a box, I will have to check some of that code. If a pixel generates under the jack, it will shift. But if you are holding a box you shouldn't be allowed to push the jack and load the pallet at the same time to prevent a person from ramming through a bunch of boxes for a quick pallet. I'll see if I screwed it up somewhere along the way.

 

Diagonal moving. I originally didn't plan on diagonal moving because Jack's don't move like that... But I'll see if I can rework the movement code to keep it 4 directional.

 

I think that covered all the "glitches."

  • Like 3

Share this post


Link to post
Share on other sites

It definitely looked like a fun game! As far as freeing up space goes, one easy way to free up a bit of space would be to make use of an includes file, and omit the playfield scrolling module from the standard includes. Let me know if you need more specifics on that. 

Share this post


Link to post
Share on other sites
12 hours ago, Karl G said:

It definitely looked like a fun game! As far as freeing up space goes, one easy way to free up a bit of space would be to make use of an includes file, and omit the playfield scrolling module from the standard includes. Let me know if you need more specifics on that. 

I am curious as to what you mean by all of that. I think I have a general idea but not quite sure what to do with it. Lol.

 

From watching everyone play, I saw some places I can free up. I know my code is probably not the most efficient and trying to squeeze out more space I have had fun reworking lines to get things to fit. That is why my sounds are pretty simple. I saved them for the end.

Share this post


Link to post
Share on other sites

In the includes subdirectory of your bB directory is a file named defaults.inc which specifies what assembly modules should be loaded into your project if you are using the standard kernel.  You don't want to modify this file, but you can copy it to your project directory with a different name (e.g. myincludes.inc), and then edit the copy to comment out any unnecessary assembly modules to save space. You can then tell your game to use the custom includes file with the includesfile command.

 

Below is the content of the standard defaults.inc file.  In your case, I don't think your game does playfield scrolling, so commenting out the pf_scrolling.asm module in your custom includes file should be an easy way to free up some space.

 

; Provided under the CC0 license. See the included LICENSE.txt for details.

;
; Inclues go below - order is crucial, since this is also the order in which
; they will appear in the generated assembly file
;


; header file
2600basicheader.asm

; standard startup routine.
startup.asm

; standard kernel: two players, two missiles, a ball and an asymmetric playfield.
std_kernel.asm


; below are collections of subroutines and functions
; if you have any more to add, put them immediately below this line.

pf_drawing.asm
pf_scrolling.asm
std_routines.asm

; The overscan routine goes below.  it sets up sprites for the std_kernel.
; if you have any routines that will not run until the overscan period,
; put them immediately below this line.
std_overscan.asm


; below is the generated batari Basic file

bB.asm


; score graphics.
score_graphics.asm

; below is the footer, which contains the score digits and startup vectors.
; If you want to create your own custom score digits, you may hack the file below,
; but first you should rename it to something else.

2600basicfooter.asm

 

Share this post


Link to post
Share on other sites

You might only need to copy defaults.inc to your project folder and comment pf_scrolling.asm in it,

bB is surprisingly good at finding any custom files in that folder.

  • Like 1

Share this post


Link to post
Share on other sites
On 5/17/2020 at 10:39 PM, Karl G said:

 

I had tried copying the default.inc into the game directory. Commented out scrolling and renamed the file. I put an includesfile in my code and it appeared to make no difference in size. 

23 hours ago, Lillapojkenpåön said:

You might only need to copy defaults.inc to your project folder and comment pf_scrolling.asm in it

 

Share this post


Link to post
Share on other sites

The compile output should tell you if it found an alternate defaults.inc file in the working directory if you do it that way instead. I don't know that it would give any different results than providing your own filename and an includesfile directive, though. I'm not sure why it's not freeing up any space in your case, though. 

Share this post


Link to post
Share on other sites

I had also tried that as well as . Didn't make an impact. I also changed the original, tried different names, tried different placements in the code (which would sometimes cause an issue). The only time it showed something different was when I moved default.inc in the folder and did includesfile default.inc. Bank 1 then shot in the negatives by about 1000 bytes.

 

I will try again later to see if I missed something. Internet was down so I was going off my phone.

 

Share this post


Link to post
Share on other sites

So I went back and tried again to no luck.  I also tried messing with the one in the batari basic folder to no luck.  I even deleted the pf_scrolling.asm  along with editing the default to test, which then ate up more bytes. 

Space isn't too much of a big deal. I was going to add a .bas file up top. 

 

I also think I fixed the issues with the pallet exiting the playfield - I had a collision detection between the playfield and the pallet.  I think if it jumped too far it would go out of bounds... and since grabbing the pallet also affected the player0 and player1 sprites, I think it would make things go crazy.  

 

I also noticed that when I got rid of the collision detection in favor of boundaries, I hadn't experienced any scanline issues over 262.  I still got some more things to mess around with tonight but at least I got one thing fixed.

Share this post


Link to post
Share on other sites

I think the sound issue from the Game Over screen was a result of some old code that I had never deleted (and I don't know why I had it in the first place). It was a collision code between player1 and Player0 but I also had a variable in there that was also used in the game over screen when I had originally used the shakescreen command. But I opted to get rid of that and I guess I never deleted the other associated code. So if you were holding the jack when you died, at the right time the sound would stick...

 

I think. I made the fix late last night and didn't check to see if that was the cause. 

Share this post


Link to post
Share on other sites

Hey @KevKelley, did you ever play the old (1982) Taito arcade game Dock Man?  I love that game, and always wished that someone would make an updated version of it with improved graphics, additional stages and maybe a little tighter controls/gameplay.  Maybe I should float that idea on the 7800 portion of the forum?  :ponder: :!: 

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, NostAlgae37 said:

Hey @KevKelley, did you ever play the old (1982) Taito arcade game Dock Man?  I love that game, and always wished that someone would make an updated version of it with improved graphics, additional stages and maybe a little tighter controls/gameplay.  Maybe I should float that idea on the 7800 portion of the forum?  :ponder: :!: 

I had never heard of that game but it looks fun and similar to some of the concepts I was considering for this series of games.  It looks doable, although may be beyond my skill.  I was planning on a forklift game with similar ideas but haven't gotten that far yet.  I never intended to work on Cross Dock as much as I did but I learned a lot doing it so I figured it was worth it.

 

I have also come to realize there are many classic arcade games I have never even heard of.  I really do need to get a little MAME set up for my tv.

  • Like 1

Share this post


Link to post
Share on other sites

I have updated the first post with a new .bin and .bas.

 

Since the Zero Page Homebrew show, I think I squeezed as much as I can out of the 8k.  I have 2 bytes free in Bank 1 and 27 bytes free in Bank 2.

 

I had fixed the collision issues, changed the color selection, and added bonus features.

 

As mentioned in the previous post, I had gotten rid of my problematic and poorly written collision detection for a simple boundary.  The pallet or jack shouldn't leave the playfield anymore and Dock Boy shouldn't be able to grab the wall and turn it into a box!

 

Also, as some had pointed out about the background color, now the default is a black background but if you switch to BW, the background changes color when you load a bay.

 

The first bonus feature appears at a particular interval.  It is indicated by the player and pallet flashing.  The status bar does not decrease during this period giving you a grace period to place boxes on the pallet and getting it into the bays (which will give you more time thus slowing your demise). 

 

The second comes during another interval and is currently only in a couple of the stages with no obstacles.  A flashing box will appear by the bays for a short period of time.  Grab it and you fill up your status bar and get a box in hand.

 

I am currently testing to see if the first bonus lasts long enough to be a benefit, if the second bonus appears frequent enough to be a benefit, and if the game is still balanced.  I will be tweaking the values, as well as seeing if there is any other way I can squeeze more code as I have one more minor fix I want to work on but it is only really noticeable when I am on Stella on my laptop.

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

These are the areas I will be tweaking to see what combination of effects work:

 

Pallet size 

Theeasy small pallet setting is pretty much all right for now. It was intended for my kids. For an adult, there is sufficient time to load the pallet and bays. Where as my kids like to walk a lot and goof off.

 

The large pallet size (10 boxes) might be too big, as I had noticed the timer depletes faster than I can fill the bays and replenish it. I may look at something smaller, like 8 boxes to see if that small change makes a difference.

 

Conveyor/counter speed

The conveyor belt may need to speed up a bit, as I had found times where I was too fast and was waiting for boxes (as the conveyor belt is not that reliable), losing time in the process. But I believe I have the statusbar tied to the counter but I have ideas to slow it down or maybe check every other frame... Or improve the status bar code.

 

Right now the two bonuses appear under different conditions. The first shows up after about every 100 boxes comes off the conveyor belt and last for about 20 boxes, or two pallets worth of no timer and possibly some gains.

 

The second I haven't gotten to yet so I'll wait and see for that one. That comes after 200 boxes off the conveyor but only on a couple non-obstacle stages. 

 

Statusbar

I had played with different increments of the statusbar in the past when I first started it. 

 

Also if any other programming issues pop up. As I have used up most of the space I may have to get creative or learn some new things.

 

I welcome any constructive feedback as I feel this is close to being complete and I would very much like to make this into a cartridge when I'm done. I think this would be a cool one to see on a shelf.

Edited by KevKelley

Share this post


Link to post
Share on other sites
Posted (edited)

New binary.  Obstacles should appear.  Adjusted timer a little.  Also fixed issue with too many lives causing a game over and obstacles maxing out your status bar.

Edited by KevKelley
  • Like 2

Share this post


Link to post
Share on other sites
On 5/25/2020 at 12:35 PM, nooly said:

It's good! And funny idea ;)

Thanks!  It is fun to make these games out of work-related tasks or operations, like loading boxes on a pallet.  Imagine if games progressed down this line.  We would be playing Warehouse Loader 3D instead of Duke Nukem

  • Haha 1

Share this post


Link to post
Share on other sites
Posted (edited)

Started working on some optimization to free up some space and get more out of it.  Lined up all my like valued variables and reworked some code to simplify some things. Also fixed a couple mistakes, like the counter going down when the bonus time occurs.

 

I added jack randomization after a certain amount of points, modified some of the sounds, and changed the bay color to green when a pallet is full (some of the feedback I had received mentioned that when the pallet jack gets covered by the pallet it can be difficult to tell if it is maxed out).

 

Updated binary in first post.

Edited by KevKelley

Share this post


Link to post
Share on other sites

Started playing the new version and noticed you can grab and move around the +5 after you unload your jack. It'll turn into a MASSIVE jack for about a second and then go back to normal.

 

Not sure if this is a new thing or was in other versions because I've never tried that before.

 

- James

  • Thanks 1

Share this post


Link to post
Share on other sites
30 minutes ago, ZeroPage Homebrew said:

Started playing the new version and noticed you can grab and move around the +5 after you unload your jack. It'll turn into a MASSIVE jack for about a second and then go back to normal.

 

Not sure if this is a new thing or was in other versions because I've never tried that before.

 

- James

Ooh. That's a good one.  When I upped it to 8k I moved the code for the jack direction into Bank 2.  That bank is tight on space so while I can stop the grabbing, I gotta find a fix for the number from changing to a giant jack.

 

Thanks!

Share this post


Link to post
Share on other sites
Posted (edited)

So I came up with two possibilities for a fix.

 

E

In the first I rewrote some of the code for the collision between your player and the jack by assigning each direction a value and then choosing the sprite based on that .  Doing this helped save some space in Bank 2 to where I can make the code to skip over drawing the jack until after the "+5" is drawn.  I was also able to add a check at start up and after a jack spawns to have the jack in a particular preferred orientation.

 

The only problem with this one is that I created a new problem that escapes me at the moment: when you move diagonally with a pallet your player may face left or right but the pallet may face a different direction.

 

This leaves me with the following:

 

      7 bytes of ROM space left in bank 1
      52 bytes of ROM space left in bank 2

 

The other fix is less complicated:

 

F

 

I basically skip the movement of the player until the "+5" is done being drawn. The only downside is that I would still like to re-spawn the jack to where it faces a different direction and THAT fix escapes me at the moment.

 

This leaves me with the following:

 

      6 bytes of ROM space left in bank 1
      27 bytes of ROM space left in bank 2

 

I was playing around with this all night to try and find a good fix but it seems that I plug one hole and I get another.

CD_05_27_2020_E.bas CD_05_27_2020_F.bas CD_05_27_2020_E.bas.bin CD_05_27_2020_F.bas.bin

Edited by KevKelley

Share this post


Link to post
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.

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

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...