Jump to content
IGNORED

jwierer's Blog - 7800 Jr. Pac-man Construction Set Build 2


RSS Bot

Recommended Posts

Now that the Memorial Day holiday is over I took a fresh look at this again. To understand this blog post you need some basic grasp of how mazes, dots, and energy dots are stored.

 

Mazes

To begin, the 8 mazes are stored as a series of 8 bit codes. Decoded into binary, from lowest to highest bit they are read horizontally. Since the maze is symmetric only half of the maze is stored in the binary. In the editor you will see both sides for ease of development, but placing dots is mirrored so a change on the left half will automatically be reflected on the right side. It is also important to understand that there are 5 empty bits on the left and right side of the maze that are outside of the bounds of the viewable range. For that reason I made the editor to only show the bits that can be modified. If you were to examine the viewable portion of the first maze in binary, within the actual rom, it would look like this.

 

01111111111111111111111111111
01000000000000001000000000001
01000000000000001000000000001
01001001111001001001001111001
01001000000001000001000001001
01001000000001000001000001001
01001001111001001111001001001
01000000000001001000001000000
01000000000001001000001000000
01001001111001001001111001111
01001000001000000000000000000
01001000001000000000000000000
01001001001001001111001001111
01000001000001000000001001111
01000001000001000000001001111
01001111111001001111001001111
01000000000001000000000000000
01000000000001000000000000000
01001001111001001001111001111
01001000001001001000000000001
01001000001001001000000000001
01001111001001001111001111001
01000000000000000000000000000
01000000000000000000000000000
01001001111001111001001001111
01001001000000000001001000001
01001001000000000001001000001
01001001001111001001001001001
01000000000000001000000001000
01000000000000001000000001000
01111111111111111111111111111
01111111111111111111111111111

Dots

While dots are also stored as a series of 8 bit codes, decoded from lowest to highest bits, they are decoded horizontally, from left to right. Additionally, while Pac-man dots are symmetrical, all the dots are stored, not half like mazes. Technically speaking this would allow you to create a different dot pattern on the left and right hand sides of the maze. For Build 2 I’ve changed the editor so the user can enable/disable mirror, or reflecting, dots. For 99% of the cases I would guess reflection is the desired effect? If you were to decode the first maze into binary it would look like this.

 

011111111111110011111111110011111111110011111111111110
010010000010010010000000010010000000010010010000010010
010010000010010010000000010010000000010010010000010010
010011111110011110011110010010011110011110011111110010
010010000010010000010010010010010010000010010000010010
010010000010010000010010010010010010000010010000010010
010011111110010011110011111111110011110010011111110010
010010000010010010000000000000000000010010010000010010
010010000010010010000000000000000000010010010000010010
010011110010011111110000000000000011111110010011110010
010010010010010000010000000000000010000010010010010010
010010010010010000010000000000000010000010010010010010
011110011110011111110000000000000011111110011110011110
010000000010010000010000000000000010000010010000000010
010000000010010000010000000000000010000010010000000010
010011111110011111110000000000000011111110011111110010
010010000010010000000000000000000000000010010000010010
010010000010010000000000000000000000000010010000010010
010011110010010000011111110011111110000010010011110010
010000010010010000010000010010000010000010010010000010
010000010010010000010000010010000010000010010010000010
011111111111111111111111110011111111111111111111111110
010010000000000010010000000000000010010000000000010010
010010000000000010010000000000000010010000000000010010
010010011111110010010011110011110010010011111110010010
010010010000010010010010010010010010010010000010010010
010010010000010010010010010010010010010010000010010010
011111111111110011111110011110011111110011111111111110

Energy Dots

Energy Dots are stored using a row and column designation that follows the row and column settings of the dots.

Because these items are stored separately my first attempt had the mazes and dots on separate screens. While this worked I found myself constantly toggling between the maze and dot editor trying to align the correctly. Then I would keep emulating it to see if I got it right. It worked a lot better than using Hack-o-matic III, but still a bit cumbersome.

 

Yesterday was a slow day so I started playing with putting them on the same screen and creating an editor mechanism that would display them side by side. Because of the length that these are stored it’s not possible to have maze and dot parts side by side in a grid, therefore there needs to be an empty cell to the right and below maze pieces, though maze pieces can be side-by side, same with energy dots. Anyway after a few hours I now have a single interface for modifying the maze. When you place a game piece on the maze it will automatically enforce the rules just described. I also added some additional functionality for clearing all dots and automatically filling the maze with dots based on valid placements. I found this dramatically decreases design time!

 

 

 

 

 

blogentry-5778-1243700916_thumb.jpg

 

 

 

 

 

 

//

 

 

 

http://www.atariage.com/forums/index.php?a...;showentry=6140

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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