Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: I've added undo and redo to IsoCity (github.com/victorqribeiro)
42 points by atum47 4 months ago | hide | past | favorite | 9 comments



Suggestion 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-a...


I did push two commits, I think they got squashed on the merge

https://github.com/victorqribeiro/isocity/pull/26/commits/67...


You 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


There's a UI element for it now. Click on the gear icon and check the 'Hide whitespace' checkbox, then reload.


I'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


A 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.


Re whitespace: ... or use the w=1 hidden query parameter: https://github.com/victorqribeiro/isocity/pull/26/files?w=1


Neat, the URL uniquely encodes the map state. Here's a maze I made:

https://victorribeiro.com/isocity/#KQIXEikNDSYlGCQoKScpHB0pF...


Yeah, 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/




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: