HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
SimHacker
micropolis
C2015–2026
SimHacker / micropolis

micropolis

Automatically exported from code.google.com/p/micropolis

7Distinct people
53Mentions
1Explicit recommenders
1.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Automatically exported from code.google.com/p/micropolis

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

I love this article! Great analysis and solutions. It's nice when user interface designers care enough to think through, implement, try out, and refine such important details.…

DonHopkins used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 2:17:07 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year53 dated mentions

Observed mentions: 2015-04-01 11:00:56 UTC to 2026-10-24 12:55:29 UTC.

0510152015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 13 mentions; 1 submissions, 12 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC202
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC202
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC413
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC404
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC606
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC13112
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC505
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC505
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC505
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC404

What Hacker News says

1 sources
FWIW here's the original 68k SimCity "Classic" (open source Micropolis) save function, which I've long since cleaned up and put in byte swapping to make it portable to SPARC and x86, but yes it is just writing out some big buffers of memory with a function that now swaps bytes: https://github.com/SimHacker/micropolis/blob/master/Micropol... Here's some original SimCity 2000 Mac code that saves the city into Mac resources (not the flat part of the file, but the Mac resource fork) -- CompGameWrite actually does some simple run length compression of the raw memory: Boolean DoSave(short VolNum,Byte *name){ long count,CountTotal; short i,j,filnum; short x, y; Byte *SaveText[] = {"\pGame Saved As:",NIL,NIL}; FInfo info; Byte *NotCity[] = { "\pSimCity 2000ª will not save over a non-city file.", "\pTry
Read the rest
to save again using a different name.", NIL, }; if (name[0]>20) name[0] = 20; #ifndef DEBUG if (GetFInfo(name,VolNum,&info)==0 && info.fdType!=CITYTYPE_ID) { MessageDialog(NotCity); return FALSE; } #endif if (FSOpen(name,VolNum,&filnum)!=noErr) { if (GameError(Create(name,VolNum,APPLICATION_ID,CITYTYPE_ID))) return FALSE; if (GameError(FSOpen(name,VolNum,&filnum))) return FALSE; } if (!WriteHeader(filnum,0L)) return FALSE; WriteLength = 4; // includes 'SCDH' but not header //*** Write *** if (!MiscWrite(filnum)) return FALSE; if (!GameWrite(filnum,'ALTM',(Ptr)AltMap[0])) return FALSE; if (!CompGameWrite(filnum,'XTER',(Ptr)TerrainMap[0])) return FALSE; if (!CompGameWrite(filnum,'XBLD',(Ptr)BuildMap[0])) return FALSE; if (!CompGameWrite(filnum,'XZON',(Ptr)ZoneMap[0])) return FALSE; if (!CompGameWrite(filnum,'XUND',(Ptr)UnderMap[0])) return FALSE; if (!CompGameWrite(filnum,'XTXT',(Ptr)TextMap[0])) return FALSE; if (!CompGameWrite(filnum,'XLAB',(Ptr)LabelArray)) return FALSE; if (!CompGameWrite(filnum,'XMIC',(Ptr)MicroRecord)) return FALSE; if (!CompGameWrite(filnum,'XTHG',(Ptr)ThingList)) return FALSE; if (!CompGameWrite(filnum,'XBIT',(Ptr)BitsMap[0])) return FALSE; if (!CompGameWrite(filnum,'XTRF',(Ptr)TrafficMap[0])) return FALSE; if (!CompGameWrite(filnum,'XPLT',(Ptr)PolluteMap[0])) return FALSE; if (!CompGameWrite(filnum,'XVAL',(Ptr)ValueMap[0])) return FALSE; if (!CompGameWrite(filnum,'XCRM',(Ptr)CrimeMap[0])) return FALSE; if (!CompGameWrite(filnum,'XPLC',(Ptr)PoliceMap[0])) return FALSE; if (!CompGameWrite(filnum,'XFIR',(Ptr)FireMap[0])) return FALSE; if (!CompGameWrite(filnum,'XPOP',(Ptr)PopMap[0])) return FALSE; if (!CompGameWrite(filnum,'XROG',(Ptr)ROGMap[0])) return FALSE; if (!CompGameWrite(filnum,'XGRP',(Ptr)GraphData[0])) return FALSE; //*** Close *** WriteHeader(filnum,WriteLength); GameError(SetEOF(filnum,WriteLength+8)); // 8 bytes for file header GameError(FSClose(filnum)); GameError(FlushVol(NIL,VolNum)); BlockMove(name,CityStr,21); DateCashTitle(); FilVolNum = VolNum; //*** SUCCESS! *** SaveText[1] = CityStr; MessageDialog(SaveText); return TRUE; } And here's the Mac SimEarth save function, which looks like it just write out raw uncompressed memory -- the Mac memory manager has a GetPtrSize function that (obviously) tells you the size of the memory allocated for a pointer: DoSave(VolNum,name) int VolNum; Str255 name; { long count,CountTotal; int i,FilNum; if (EqualString(name,"\pSimEarth",FALSE,TRUE)) { MessageDialog( "\pERROR!!", "\pThe name 'SimEarth' is reserved", "\pfor this application.",1); return; } if (FSOpen(name,VolNum,&FilNum)) { if (GAIAError(Create(name,VolNum,'MYCR','SAVE'))) return; if (GAIAError(FSOpen(name,VolNum,&FilNum))) return; } else if (GAIAError(SetFPos(FilNum,fsFromStart,0L))) { GAIAError(FSClose(FilNum)); return; } /**Write**/ CountTotal = (count=GetPtrSize(Map[0])); if (GAIAError(FSWrite(FilNum,&count,Map[0]))) return; CountTotal += (count=GetPtrSize(Life[0])); if (GAIAError(FSWrite(FilNum,&count,Life[0]))) return; CountTotal += (count=GetPtrSize(OcTempMap[0])); if (GAIAError(FSWrite(FilNum,&count,OcTempMap[0]))) return; CountTotal += (count=GetPtrSize(OcCurrentMap[0])); if (GAIAError(FSWrite(FilNum,&count,OcCurrentMap[0]))) return; CountTotal += (count=GetPtrSize(DriftMap[0])); if (GAIAError(FSWrite(FilNum,&count,DriftMap[0]))) return; CountTotal += (count=GetPtrSize(EventMap[0])); if (GAIAError(FSWrite(FilNum,&count,EventMap[0]))) return; CountTotal += (count=GetPtrSize(SAirTempMap[0])); if (GAIAError(FSWrite(FilNum,&count,SAirTempMap[0]))) return; CountTotal += (count=GetPtrSize(SCloudDensity[0])); if (GAIAError(FSWrite(FilNum,&count,SCloudDensity[0]))) return; CountTotal += (count=GetPtrSize(SAirCurrentMap[0])); if (GAIAError(FSWrite(FilNum,&count,SAirCurrentMap[0]))) return; PutParameters(); CountTotal += (count=GetPtrSize(MiscHis)); if (GAIAError(FSWrite(FilNum,&count,MiscHis))) return; /**Close**/ GAIAError(SetEOF(FilNum,CountTotal)); GAIAError(FSClose(FilNum)); GAIAError(FlushVol(NIL,VolNum)); BlockMove(name,EwinStr,256); SetWTitle(editWindow,EwinStr); MessageDialog("\pSave Complete:",EwinStr,"",1); EnableItem(GetMHandle(301),3); /* Save */ FilVolNum = VolNum; }
In PSD is not my favourite file format (2009)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.