Show More
Commit Commit message Age Author Refs
r710:d6b7c42f17f8
Add missing component and message.
r709:5f524df034cf
Fix issue with simulation. Previously, if there was more than one tick being advanced at once, it would overshoot how many ticks it covered. So if it was covering 5 ticks and each tick happens every 100 units, rather than recording that it had simulated through t= 500, it would increase the cumulative time for each tick, recording that it had simulated through t=2500. Add error message, too.
r708:06aeecdacbba
Fix build errors.
r707:2232128d52fb
Add issue.
r706:113838aba785
Tweak money earned from donations.
r705:4cfd861fdeb9
Fix reference to max.
r704:a2765e9341f6
Tweak calculations. Prevent a negative number of visitors and separate visitors from donors.
r703:799ee25dcb9d
Calculate entry fees and apply to budget. Incorporate simplistic model of fees.
r702:2414646ae694
Allow setting an entry fee. Just the structure for setting the fees.
r701:e329751f83ba
Add very basic visitor simulation. Simulate visitors as a direct linear function of trees. This is very simplistic and looks simplistic (it's pretty easy to see visitors are always 1/10 of the trees).
< 1 2 3 4 5 .. 72 >

isometric-park-fna

As the director of a small state park, your job is to balance conservation, leisure, and fiscal sustainability. Gameplay is still being added.

This is inspired by Maxis' Sim series of games, particularly SimSafari, and Chris Sawyer's Tycoon games. Its premise more closely resembles SimPark, but I never played it except for a demo. (Alternatively, watch 1990's Sim Games. SO GOOD!)

I rewrote the core of this game for Procjam 2020, but the majority of the game has been added since.

Controls

Use the arrow keys or move the mouse to the edges to scroll around on the map. The plus and minus keys zoom in and out. 0 toggles pause. F opens the Forest Policy. B opens the budget. N opens News. Escape opens the in-game menu.

Accessibility

To change the font or font size:
1. Open the in-game menu (with Escape)
2. Click Options.
3. Change Font and Size as necessary.

You can also change the scaling, but this should be a last resort if other
options aren't sufficient.

Currently, there are no options for adjusting the difficulty beyond the settings
that appear on the initial selection when you begin a game.

System Requirements

The requirements are pretty modest. It runs pretty well on a 2010 MacBook Pro. Here's my estimated minimum:

  • ~2 Ghz Core 2 Duo or equivalent
  • 2 GB of memory
  • Nvidia GeForce 200 series

If you have a more typical machine with, say, 8 GB of memory, an NVIDIA GeForce GTX, and an i5, you should have no trouble running the game.

Relationship to past work

This game is a total rewrite of the original version in C#. I honestly like the original language and library more (Clojure and Quil), but Quil was starting to struggle with the amount of drawing, and I was hitting the limit of my optimization abilities and available information online. (Another drawback: I'm also giving up the browser version, unless people get FNA in the browser working.)

Installing and Running

  • macOS users need to do an extra step the first time because the app is unsigned.
  • Windows and Linux users should be able to double-click the EXE and run it.
  • BSD users can try using fbsd-fnaify, although I have yet to confirm it works with Isometric Park. (If you do try it, let me know!)

Developing

To run from the command line, make run.

You can build and run the project using VSCode actions.

You can debug the project using the Debug pane in VSCode.

Updating implot

This is a huge pain. The last thing I tried:

  1. Download the latest version of ImGui.Net, corresponding to DearImGui 1.86.
  2. Removed the ImGui folder: rm -r ImGui.NET/
  3. Copied cp -r /tmp/ImGui.NET/src/ImGui.NET .

Architecture

This game uses an ECS structure, with significant parts of the simulation done in the Simulation class and some drawing in the FNAGame class. I use Encompass, which calls systems engines. It also adds messages, which last only one frame and are ideal for updates.

I call engines that connect the ECS and non-ECS parts bridge engines. It works reasonably well, although I'm trying to add new code to the ECS rather than to the Simulation and FNAGame classes.

File Structure

.
├── *encompass-cs* ECS library (vendored)
├── **FNA** Graphics and media library
├── **ImGui.NET** GUI library
├── **isometric-park-fna**
│   ├── **bin**
│   │   ├── **Debug** Debug version
│   │   └── **Release** Release version
│   ├── *Camera.cs*
│   ├── *CellMap.cs*
│   ├── **Components** Components that store data on entities.
│   ├── **Content**
│   │   ├── **DejaVuSerif-BoldItalic.ttf**
│   │   ├── **DejaVuSerif-Bold.ttf**
│   │   ├── **DroidSans.ttf**
│   │   ├── **grammar.json**
│   │   ├── **images** images
│   │   ├── **iosevka-medium.ttf**
│   │   ├── **iosevka-term-extendedmediumitalic.ttf**
│   │   ├── **iosevka-term-extendedmedium.ttf**
│   │   ├── **iosevka-term-medium.ttf**
│   │   ├── **news_items_pregenerated.yaml**
│   │   ├── **news_items.yaml**
│   │   ├── **part4_tileset_alt.png**
│   │   ├── **part4_tileset.png**
│   │   ├── **part4_tileset.xcf**
│   │   ├── **photos_converted3.png**
│   │   ├── **photos_converted.png**
│   │   ├── **solid_tileset.png**
│   │   └── **typicons.ttf**
│   ├── *DllMap.cs* (vendored)
│   ├── *DrawVertDeclaration.cs*
│   ├── **Engines** Engines
│   ├── *FilledRectangle.cs* Class for drawing a filled rectangle.
│   ├── *FNAGame.cs* Primary game class.
│   ├── **fnalibs** Compiled native libraries.
│   │   ├── **lib64**
│   │   ├── **osx**
│   │   ├── **x64**
│   │   └── **x86**
│   ├── *ImageMap.cs* Map of images.
│   ├── *ImGuiRenderer.cs* Renderer backend for ImGui. (vendored)
│   ├── **isometric-park-fna-core.csproj**
│   ├── *isometric-park-fna-core.sln*
│   ├── **isometric-park-fna.csproj**
│   ├── *Line.cs* Class for drawing a line.
│   ├── *Logging.cs* Logging class.
│   ├── **Messages** Message classes.
│   ├── *Quad.cs* Draw a quadrilateral.
│   ├── **Renderers** Renderer classes.
│   │   ├── *AreaRenderer.cs*  Renders areas on the map.
│   │   ├── *BudgetWindowRenderer.cs* Renders the budget window.
│   │   └── *ImGuiWindowRenderer.cs* Renders ImGUI windows.
│   ├── *Simulation.cs* Primary simulation class.
│   ├── **Sources.md** List of sources.
│   ├── *Tile.cs* Draws tiles.
│   ├── **UI** User interface code, one for each window.
│   │   ├── *StyleSet.cs* Utility class for setting multiple style variables and colors at once.
│   │   ├── .
│   │   ├── .
│   │   └── .
│   └── **Utils**
│       ├── *Extensions.cs* Extension methods.
│       ├── *MathUtils.cs* Math utility mentions.
│       └── *Node.cs* Simple tree.
├── *isometric-park-fna-core.sln* .NET Core solution.
├── *isometric-park-fna.sln* .NET Framework solution.
├── **README_future.mkd**
├── **README.mkd**
├── **scripts** Helper scripts.
│   ├── *add-branches.sh* Creates a Mercurial bookmark for each branch
│   ├── *gitmirror.sh* Mirrors this Mercurial repository to a Git repository
│   ├── *LoadInk.csx*  Loads Ink file, ensuring its validated
│   ├── *LoadYaml.csx* Loads and validates YAML
│   ├── *package.py* Creates packaages.
│   └── *UpdateYaml.csx* Adds missing entries to the YAML file.
├── **SpriteFontPlus ** Font library. (Vendored)
└── **TODO.taskpaper** Tasks, feature ideas, requests, and bugs.

Right now, the largest parts of the code are UI/, Engines/, FNAGame.cs (which
still contains a lot of drawing code), and Simulation.cs.

Acknowledgements

Art: Isometric 64x64 Outside Tileset by Yar, Peaceful by Silivar, and various images from the Library of Congress and USDA Forest Service

Libraries: FNA, SpriteFontPlus, Tracery.Net, ImGui.NET, and Encompass-cs

Fonts: Droid Sans, Iosevka by Belleve Invis, Typicons by Stephen Hutchings, OCRA designed by American Type Founders and converted by Matthew Skala

Sounds: Bell, hammering, and jackhammer sounds by InspectorJ; Switch clicking by qubodup

Sources for the procedural generation are documented in Sources.md.

Watching ThinMatrix's video devlogs for Equilinox and his subsequent games inspired me to press on. :) Despite some similarities, the design of this game wasn't really inspired by Equilinox. (I've also enjoyed Thoughtquake's video devlogs and Cliff Harris' Democracy 4 video devlogs).

The original versions used art from the Low Poly Forest Pack by Devil's Work.Shop. (I had converted the models into isometric 2D images, using this process.)

License

© 2022 Alys S. Brooks

I haven't decided on a license.