23 ms·
Show HN: I've added undo and redo to IsoCity
- atum47 2y agoYeah, it's a Friday night and I don't have anything fun to do, so I have just added undo and redo on IsoCity [1]. Hope you like it 1 - https://victorribeiro.com/isocity/ https://victorribeiro.com/isocity/
- deleted 2y ago[deleted]
- mtlynch 2y agoSuggestion if you want people to look at your code (which I'm assuming you do since you linked to the PR): make whitespace changes in a separate commit from functional changes.[0] This PR is a 50-line diff, but only about 8 lines are real changes. The rest are just whitespace changes that seem to have nothing to do with the feature you added. IsoCity's neat. My suggestion for the functionality would be to make it easier for the user to join roads together. I drew roads at a 90-degree angle expecting the game to auto-join them, but it turns out I have to go find the right 90-degree tile to do it manually. [0] https://mtlynch.io/code-review-love/#6-separate-functional-and-non-functional-changes https://mtlynch.io/code-review-love/#6-separate-functional-a...
- elliottcarlson 2y agoYou can also add ?w=1 to a PR to hide whitespace related changes; i.e. https://github.com/victorqribeiro/isocity/pull/26/files?w=1 https://github.com/victorqribeiro/isocity/pull/26/files?w=1
- gurjeet 2y agoThere's a UI element for it now. Click on the gear icon and check the 'Hide whitespace' checkbox, then reload.
- ianbicking 2y agoA UI that might be relatively easy for the road problem: when you right click on an empty tile, in the left hand tile selector show all the tiles that would be "valid" in that position. You'd have to add metadata about how tiles hook up, but you wouldn't need to get all fancy about constraints and stuff, or picking from several valid options.
- playingalong 2y agoRe whitespace: ... or use the w=1 hidden query parameter: https://github.com/victorqribeiro/isocity/pull/26/files?w=1 https://github.com/victorqribeiro/isocity/pull/26/files?w=1
- atum47 2y agoI did push two commits, I think they got squashed on the merge https://github.com/victorqribeiro/isocity/pull/26/commits/678ad5312a92cc941ad3470f73dba6175aa1d63b https://github.com/victorqribeiro/isocity/pull/26/commits/67...
- atum47 2y agoI've started a new city builder in 3D [1], I don't have that much free time as I used to have, but I feel like investing time on that would be better than on isocity. On a full fledged city builder it would be worthed to implement a road algorithm 1 - https://youtu.be/B8jYR33HoRU https://youtu.be/B8jYR33HoRU
- paulgb 2y agoNeat, the URL uniquely encodes the map state. Here's a maze I made: https://victorribeiro.com/isocity/#KQIXEikNDSYlGCQoKScpHB0pFiMDJhYnJgICKCklAyQCAicUGSYFJyIPJg0NDSgJKA== https://victorribeiro.com/isocity/#KQIXEikNDSYlGCQoKScpHB0pF...