Hacker News

atum47
Show HN: I've added undo and redo to IsoCity github.com

mtlynch3 days ago

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

atum47op3 days ago

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

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

elliottcarlson3 days ago

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

gurjeet3 days ago

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

atum47op3 days ago

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

ianbicking3 days ago

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.

playingalong3 days ago

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

paulgb3 days ago

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

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

atum47op5 days ago

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/

[deleted]3 days agocollapsed

hn-front (c) 2024 voximity
source