# 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](https://en.wikipedia.org/wiki/List_of_Sim_video_games), particularly SimSafari, and Chris Sawyer's [Tycoon games](http://www.chrissawyergames.com/info.htm). Its premise more closely resembles [SimPark](https://en.wikipedia.org/wiki/SimPark), but I never played it except for a demo. (Alternatively, watch [1990's Sim Games. SO GOOD!](https://www.youtube.com/watch?v=APFnM6DqtiA)) 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](https://actuallyalys.itch.io/isometric-park-working-title) 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](https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/11.0/mac/11.0) 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](https://github.com/oshogbo/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](https://opengameart.org/content/isometric-64x64-outside-tileset), [Peaceful](https://silivar.itch.io/isometric-asset-pack-peaceful) by Silivar, and various images from the Library of Congress and USDA Forest Service Libraries: [FNA](https://fna-xna.github.io/), [SpriteFontPlus](https://github.com/rds1983/SpriteFontPlus), [Tracery.Net](https://github.com/josh-perry/Tracery.Net), [ImGui.NET](http://imgui.net/), and [Encompass-cs](http://moonside.games/docs/encompass/) Fonts: Droid Sans, [Iosevka](https://typeof.net/Iosevka/) by Belleve Invis, [Typicons](https://www.s-ings.com/typicons/) by Stephen Hutchings, [OCRA](http://luc.devroye.org/fonts-48511.html) 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](https://www.youtube.com/watch?v=90CZ7Q17sls&list=PLRIWtICgwaX1gcSZ8qj8Q473tz7PsNmpR) 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](https://www.youtube.com/user/Thoughtquake/videos) and Cliff Harris' Democracy 4 [video devlogs](https://www.youtube.com/user/cliffski2/videos)). The original versions used art from the [Low Poly Forest Pack](https://devilsworkshop.itch.io/lowpoly-forest-pack) by [Devil's Work.Shop](https://devilsworkshop.itch.io/). (I had converted the models into isometric 2D images, using [this process.](https://www.youtube.com/watch?v=bk0PXMgZgQg)) ## License ## © 2022 Alys S. Brooks I haven't decided on a license.