Hello, all, As promised, here is the pseudocode for figuring out what happens to each square in the city. It is not complete, but you can see what will need to go into the actual program. Again, to make it look alright, you'll want to copy and paste it into a fixed font word processor. Any comments, questions or suggestions are gladly accepted. Take care all. ------ Cut here ------ SimCity Calculations done twice for each month (hopefully not too slow!) The main city dimensions are: 128 x 128 = 16384 total squares each square uses two bytes (total bytes = 32768, 1/2 bank) Pseudocode for figuring out what happens to each square: Loop1 0 - 127 Loop2 0 - 127 if (Loop1,Loop2) = empty or water or forest/grass goto endloops if (Loop1,Loop2) = non-growth square (power plant, etc.) if (Loop1,Loop2) = Coal power plant, pollute(Loop1,Loop2) = pollute + 52 add 1 for each surrounding forest/grass/park if totplants > 5, pollute = pollute / 2 if totplants > 10, pollute = pollute / 2 goto endloops if (Loop1,Loop2) = Nuclear power plant and lengthplaced > 49, goto explode goto endloops if (Loop1,Loop2) <> residential goto nextcheck1 if residential = low,low and tax < 5, if surrounding squares > low,low respop = respop + 10% temp1 = distance to police station temp2 = distance to fire station if temp1 > 10, crime = crime + 4 if 5 < temp1 < 11, crime unchanged if temp1 < 6 then crime = crime - 2 if temp2 > 10, needs(fire) = needs(fire) + 1 if 5 < temp2 < 11, needs(fire) unchanged if temp2 < 6, needs(fire) = needs(fire) - 1 if surrounding squares have no roads, respop = respop / 2 if surrounding squares = low,low respop = respop + 5% temp1 = distance to police station temp2 = distance to fire station if temp1 > 10, crime = crime + 4 if temp1 < 11 and temp1 > 5, crime unchanged if temp1 < 6 then crime = crime - 2 if temp2 > 10, needs(fire) = needs(fire) + 1 if 5 < temp2 < 11, needs(fire) unchanged if temp2 < 6, needs(fire) = needs(fire) - 1 if surrounding squares have no roads, respop = respop / 2 if residential = low,low and 4 < tax < 10 if surrounding squares > low,low respop = respop + 10% temp1 = distance to police station temp2 = distance to fire station if temp1 > 10, crime = crime + 4 if temp1 < 11 and temp1 > 5, crime unchanged if temp1 < 6 then crime = crime - 2 if temp2 > 10, needs(fire) = needs(fire) + 1 if 5 < temp2 < 11, needs(fire) unchanged if temp2 < 6, needs(fire) = needs(fire) - 1 if surrounding squares have no roads, respop = respop / 2 (Include checks for res,com,ind {low,low} {low,med} {low,hi} {med,low} {med,med} {med,hi} {hi,low} {hi,med} {hi,hi} {top}) endloops: if needs(fire) > 100 display "Citizens demand more fire protection" if crime > 120 display "Citizens demand more police protection" if totres < 10 display "More residential zones needed", graphres = graphres + 2 if totcom < 10 display "More commercial zones needed", graphcom = graphcom + 2 if totind < 10 display "More industrial zones needed", graphcom = graphcom + 2 if totcompercent > 20 and year < 30 then graphcom = graphcom - 5 if totindpercent > 80 and year < 30 then graphind = graphind - 5 if totres < totcom + totind then graphres = graphres + 5 if year < 30 and totcom > totind / 2 then graphcom = graphcom - 5, graphind = graphind + 5 if 29 < year < 61 and totcom <> totind then if totcom > totind, graphcom = graphcom - 2, graphind = graphind + 2 if totcom < totind, graphcom = graphcom + 2, graphind = graphind - 2 if year > 60 and totcom < totind then graphcom = graphcom + 5, graphind = graphind - 5 if totcom > 256 and airport = 0, then display "Commercial needs airport" if totind > 256 and seaport = 0, then display "Industrial needs seaport" Next Loop2 Check keyboard for keypress if keypress, goto handle keypress if boat exists, do move boat if airplane exists, do move airplane if helicopter exists, do move helicopter Next Loop1 My guess is that the above routines will take about half of a bank 0000.7FFF Arrays used: 7F x 7F (128 x 128) = Main grid of city (32768 bytes) 7F x 7F (128 x 128) = Grid for pollution (Hi nibble), traffic (Lo nibble) (16384 bytes) 7 x 8 = Bitmap for each square displayed one residential square = 3 bytes wide x 2 deep (21 pixels x 16 pixels) Actual bitmaps for display take up a separate file, so they can easily be replaced if a different set wants to be used (medieval, future, etc.) Scrolling is hard-coded to be as quick as possible Each up,down,left or right scroll is one square at a time Scroll routines in bank 02 (might need whole bank for them) Inside city display, cursor is a square for whatever tool is selected Outside city display, cursor is standard arrow Any dialog boxes displayed: Move page one to page two, display box, and accept input When dialog box closed, return to display page one, no need to erase page two