You are here

Retro Challenge 2016/01, Week #1 - Drawing the Map

I am working on Three different things, in a Round Robin Que:

#1) Developing a very concise Data Block for Map Plotting, Object Placement and Player Locations.

#2) Developing an Apple ][ program, ( currently in AppleSoft Basic ), to Plot Map Data and Object Data, and Player Locations.

#3) Developing a Server to Send Map Data and Object Data, and Player Locations on a TCP Socket to the Apple ][. Eventually the Server will also develop Random Map Data and Object Data.

Since I don't have the TCP network up and running, here is the Apple Map Data, in DATA Statements:
32000 REM CORNER POINTS DATA, X & Y
32010 DATA 14,30,46,62,78,94,110,126,142,158
32050 REM WALL SEGMENTS DATA, 9 BY 9
32060 DATA 240,204,240,192,192,195,195,195,204
32070 DATA 060,051,192,015,060,240,192,060,012
32080 DATA 051,204,060,252,060,048,000,000,012
32090 DATA 252,060,048,000,012,048,192,192,204
32100 DATA 051,000,003,000,201,048,192,192,204
32110 DATA 240,015,252,051,015,048,015,060,060
32120 DATA 060,252,000,204,192,003,003,003,060
32130 DATA 051,000,015,252,060,048,192,192,012
32140 DATA 051,003,195,003,003,003,195,195,015

This data will eventually be moved across the Network, ( or Internet ), but plotted with the Same Code.

The first line of DATA, with 10 points are the X&Y locations of the corners of the Zones in my map. This is a 9 x 9 Grid.
X&Y locations of the corners of the Zones

The next nine lines of DATA, with 9 points of data per line are the locations of the Edges between the corners of the Zones in my map.

Here is what the Plotted Data looks like:
Plotted Data of the Zones

The Object Placement will require One Byte for Location within the Zone and Object Type, and another One or Two Bytes for the Zone that it is located in..

If I wanted to limit the number of Objects to One per Zone, I could code 81 ( 9 x 9 ) contiguous Bytes for the Object Location and Type, or plan for a Maximum of 8 Items per Zone, and Hard Code 648 ( 81 x 8 ) Bytes, which seems kind of excessive, and makes the 3 Bytes per Object much more efficient.

The Player Placement will be Three Bytes, made up of Player Info and Two Bytes for location.