4 ms·
Is anyone else building a ton of police stations but still getting the notification "Crime Very High"?
by Kortaggio 12y ago
Is anyone else building a ton of police stations but still getting the notification "Crime Very High"?
- lotsofmangos 12y agoSounds about what you'd expect. Try building parks and industrial.
- allworknoplay 12y agoyeah it's insane, I had 2x3 blocks with a police station in every single one -- 60K people and 19 police stations -- and still persistently high crime. I shouldn't expect anything from random things on the web, but that was just traumatic.
- icefox 12y agoHere is where it is computed in the source: https://github.com/lo-th/3d.city/blob/6d206e4df362444d4c2a36bf3582b343f5afe93c/src/utils/BlockMapUtils.js#L219 https://github.com/lo-th/3d.city/blob/6d206e4df362444d4c2a36... An initial glance suggests reducing the populationDensityMap is the real solution (aka don't put so many houses next to each other, but spread it out?)? Feel free to dig into it and reply below with findings.
- aaronharnly 12y agoLooks to me like a bug -- they do a value -= policeStationMap.worldGet(x, y); when they probably meant to do value -= policeStationEffectMap.worldGet(x, y); otherwise, crime is reduced only if there's a police station right there. That's just a guess based on a cursory look, though.
- icefox 12y agohttps://github.com/lo-th/3d.city/blob/6d206e4df362444d4c2a36bf3582b343f5afe93c/src/utils/BlockMapUtils.js#L204 https://github.com/lo-th/3d.city/blob/6d206e4df362444d4c2a36... Before the for loop it "smooths" the policeStationMap 3 times. And this is reset every 15 cycles and in the first 8 cycles it re-populates the policeStationMap before performing the crimeScan. (https://github.com/lo-th/3d.city/blob/5827c3be180c6b7b39076dde27f02492e9022681/src/game/Simulation.js#L168 https://github.com/lo-th/3d.city/blob/5827c3be180c6b7b39076d...). So a cursory investigation it doesn't look good and any policeStation needs to be within 3 to have any effect. What the simulation should do is never clear the policeStationMap. The policeStationMap is constantly cooling and diffusing and it is only by refreshing where the police stations are is how new energy is introduced into the system (policeStationMap). The simulation doesn't even need to reset the spot on the map when a Tile.POLICESTATION is removed because the value will on its own cool. As an added bonus the simulation doesn't need to waste cpu cycles calling smoothStationMap three times in a row, but only needs to do it once.
- ivanca 12y agoYou know, the only place where you find so many policemen in real life is called a prison. Create jobs so people don't have to commit crimes, mmkay? (Probably the simulation is not that good but lets pretend)