Hmm do you think it might be possible to specify a .bss section that is at the address of where the magic key lives so that the compiler avoids allocating it to something else?
Not reliably @dxb tried, see here
Untill the new board package is out, you could add the new wiring.h to your sketch folder to add the bootloader and reset button features. Pressing LEFT+UP+A+B for 2 seconds will put Arduboy in bootloader mode.
How is this better than using flashlight mode?
You donāt have to turn Arduboy off and on again to use it.
But the timing becomes tricky because the uploader isnāt doing the reset.
Further discussion of boards files should move to itās own thread.
Working on getting this game featured on the front page next week!
Thatās awesome! Iāll have to get that version 1.1 uploaded soon then!
Looks cool! Havenāt gotten a chance to try it yet, but I did have a question as I was browsing the code.
"typedef struct
{
uint16_t year; // Starts at 1900
uint8_t month;
uint8_t simulationStep;
int32_t money;
// 2 bits per tile : road and power line
uint8_t connectionMap[MAP_WIDTH * MAP_HEIGHT / 4];
uint8_t terrainType;
Building buildings[MAX_BUILDINGS];
uint8_t taxRate;
uint16_t residentialPopulation;
uint16_t industrialPopulation;
uint16_t commercialPopulation;
int32_t taxesCollected;
uint8_t policeBudget;
uint8_t fireBudget;
uint16_t roadBudget;
uint16_t timeSinceLastDisaster;
} GameState;"
I havenāt seen a struct being used this way. What is the benefit of declaring a structure type like this?
Do you mean the typedef
thing?
If so, itās a C thing.
C requires the keyword struct
in front of all structs unless you use typdef
, in which case struct
isnāt needed.
In C++ and Arduino usage itās pretty pointless.
Interesting, I hadnāt seen the syntax written that way so I was wondering if it had any efficiency bonus. Thank you!
Ah yes just a habit I have from writing things in C. No efficiency bonus or anything, purely old fashioned syntax!
Absolutely amazing.
Disasters? DO NOT INCLUDE THEM. I was tumbled all over the place by that stupid Dr. Vu. Now you have club wars. Great.
Will be as big a hit here as it is on Apple mobile devices.
The only disaster I am currently planning to include is fire outbreaks. If there is a fire department nearby then it will be put out automatically (this is how the original SimCity worked). It makes there an actual reason to build fire stations!
I have just released version 1.1 of MicroCity on Github
New features:
- Added fire system with random outbreaks. Nearby fire departments will put out fires.
- New tiles for water edges and rubble from bulldozer / destroyed buildings
- Auto-budget system which skips the end of year budget screen when there is a positive cash flow and positive funds (on by default but can be disabled)
- Tweaked population growth algorithm which makes the game more challenging
- Greater capacity for placing buildings: up to 30% more
Note that save games are not compatible with version 1.0 so if you update you wonāt be able to load your old city.
Thank you again for microcity! Everything seems to work great, i do have a question though. When I start my city, i donāt see buildings until around the 5th or 6th year and even then itās only one. after 20 or so years i might have half a residential filled. Iām assuming this might be in part to time being rather fast. Iāts also likely i suck at building. Is the building ratio similar to the original simcity?
@HercTNT @CDR_Xavier
Version 1.1 is a bit more challenging so here are some tips for building a good city:
- Buildings need to be connected to the power station and have roads built next to them to function
- The balance should be roughly 50% residential zones, 25% commercial zones and 25% industrial zones
- Industrial zones and power stations generate pollution so avoid placing your residential zones too close to these areas.
- Lowering the tax rate in the budget will encourage population growth so can be a good idea when first starting your city. Once you have a stable population, raise the taxes again.
- Building parks has a small positive influence on nearby residential areas
- Crime will increase as your city grows. High crime will discourage growth. Build police departments to reduce crime in the surrounding area, but donāt build too many as it will cost too much in the yearly budget!
- Occasionally buildings will catch fire. Nearby fire departments will help put the fire out but if you havenāt built any in the area then the fire will spread.
Hope that helps, have fun!
Thank you
Thank you! Microcity may just become a permanent fixture on my arduboy. Itās looking like I should buy another one to play anything else.
I have now packaged up MicroCity in the .arduboy format to make it easier for those using a game loader like @craitās Arduboy Manager.
It is now included in the Github release page
Or directly download MicroCity.arduboy
I was in fact quite busy with the 1.0. VERY, VERY good game. Easily comparable to the one on iOS, and perhaps a bit more fun.
You canāt watch cars and traffic going around. There is simply not a high-resolution colored display, and not enough RAM and processing power. Very nice game still. I had fun just looking at the lake.
BUT:
There is this bug where you canāt put two power stations. (strange.) If you put another one down, the other one will simply be dead and stops generating. In fact itself would be out of power. (strangER) That happens both when it is connected to another one via buildings or āwireā, or when not connected. Stadium is interesting. But does it do anything?
There is also bugs where you can put road on top of water (seems to be a visual glitch, it turns normal when it went off-screen and reappears. You can also NOT place building on it although I wanted(POLICE STATION!). Placed road in this manner looks properly.) No bridges so that is the only way I can place road on water (bridge)
You took the park from ROYAL GARDEN. Cool. Nicely done.
Whereād you take the others?
Edit:
Tax rate was reasonable in the 1.0 version. In the 1.1 version the announcement of disasters was good, but things like tax rate was awful. OR, it was problem with pollution. (You cannot do much with pollution if you demand a industrial area for every two residential area)
And yes, less industrial and commercial building requirements. (My SimCiry have 75 residential and only 8 factories and 8 āindustrialā areas.)
Instead of the stadium, consider a government. (a city need a government, and itād better be a good one.)
Consider the City Hall when making the sprite. (the greek temple-like building where you collect tax)