Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
KillHour
Oct 28, 2007


anselm_eickhoff posted:

Yes, if you donate via PayPal, because then I have your email address and can send you the alpha when it's ready.

I also don't like preorders, that's why I only offer this indirect way and don't market it as a preorder.

I did this, plus threw in a little extra as a tip. Really loving the way this is shaping up.

Adbot
ADBOT LOVES YOU

KillHour
Oct 28, 2007


I'm sure you'll be able to move the road. Honestly, not having a road to start with doesn't make sense from a programming perspective. With a road, you can bootstrap your city with people and demand from the other cities in the region. If you're trying to start something from nothing, you have to program in fake demand and resources in such a way that it allows you to get started without affecting the game later on - it's clunky and complicated.

Besides, look up a small rural town. They all look like this:







Pit stops on a major road.

KillHour fucked around with this message at 02:44 on May 6, 2014

KillHour
Oct 28, 2007


Crotch Fruit posted:

Well, from a "programming perspective" you just kinda fudge the values a little, let people move in even if the industrial zone is not finished yet. Simcity, SC2K, SC3K, and SC4 all let you build a coal power plant in the desert, then zone a few blocks of houses so you air-drop a few residents to go work in the power plant. Why did you build a power plant? Who were you supplying with power? Doesn't matter, you were just starting the city. That horrible Simcity abomination that shall not be named is more realistic in that in plopped down a highway. . . But I like the old style game play, I think it is smarter to be more like the old good Simcity instead of the new Simcity.

Just because the game was fundamentally broken and unfun doesn't mean you have to do everything different just because. He's already putting in a ton of ideas from the new Sim City, including having roads serve utilities, agents, having different resources, etc. Hopefully he just won't do a terrible job of it. As long as you can move the road to where you want it, I don't think it's a big deal. I mean, you already have to have a road anyways, right?

KillHour
Oct 28, 2007


I made a quick mockup for a possible way to do mixed zoning.



I'm not sure how colorblind friendly it is, but I have an easy time telling them apart. As for how it would work, clicking with the zone selected would add that zone to the area. Ctrl-clicking would remove only that zoning type. Alt-clicking would replace the existing zoning type. The remove zone tool would remove all zoning.

Density could be shown with line thickness or spacing.

KillHour
Oct 28, 2007


drunkill posted:

The mapsize will shrink as the game continues to be made. More detail and things going on will require an artificial limit to the sizes unless simulation is faked on a larger scale.

The only reason for an artificial limit is to avoid people complaining about performance. A farming community could perhaps be 100x the size of a dense metropolis in land area without taxing the system any more.

I don't see a reason to limit based on assumptions about your target hardware, in this case. A warning that large cities may slow the system down would probably be warranted.

KillHour
Oct 28, 2007


I watched a decent chunk of the livestream after it was recorded, and I'm worried about the way you're implementing deliveries. It seems to be very closely tied to the concept of cars, and I have a feeling you'll be completely rewriting it later.

Here's how I would do it:

First, the business that needs the good would request a shipment from the nearest source that has available goods to sell. Then, the source would find a route to the destination via all available transit networks. Lastly, the good would be sent to the destination.

This accomplishes a few things.

- Goods are only sent to places that need them (a business can fail if there is no demand for its products).
- The goods themselves are what is spawned by the shipper, meaning they can take any transit path to their destination - car, train, boat, it doesn't matter. Even taking more than one method of transportation, if needed.
- You can easily define goods that have limitations on how they can be shipped - some goods might be too heavy to ship by truck, for example.
- You can have factories that unload directly to a train, like this:
https://www.google.com/maps/@42.9720729,-78.9256099,206m/data=!3m1!1e3
https://www.google.com/maps/@42.9785925,-78.9250584,240m/data=!3m1!1e3
https://www.google.com/maps/@42.9749998,-78.9304571,514a,20y,180h,41.5t/data=!3m1!1e3

KillHour fucked around with this message at 05:20 on Aug 8, 2014

KillHour
Oct 28, 2007


Avenging Dentist posted:

I say this as a software developer who's been doing it long enough that I feel old when I think about when I started: you're doing exactly the right thing, and never let anyone convince you otherwise. (Just don't forget that it's always fine to throw out code that's outlived its usefulness.)

To each his own. When I'm doing a big project, rewriting the same code over and over is what kills it for me. That's the biggest reason I don't code any more.

KillHour
Oct 28, 2007


After watching your last stream, I thought a little bit about the current problem.

Here's an example of a complex road near where I live:



With a system like this, it's possible that your turn could come up faster than you could merge if you're breaking it up based on stretches of road without lane changes. It might make more sense for the pathfinder to pick a route and then "flood fill" all adjacent lanes that are part of the same road as acceptable for the car to be in. You could have this visualized for debugging by painting allowable end points on the lane segments red or green, depending on whether the car is allowed to go through that point. You would need individual car AI, but it would only be a few lines of code.

Edit: Thought about it a little more, and this is probably simpler.

Say you have this complicated section of lanes, all going in the same direction:



You need to get a car from the purple dot to the green dot.

The first step is to mark all the segment ends you can't go through in red (This is possibly non trivial):



Next, let's say it takes 50M to merge a lane. Draw backwards 50 meters from each red segment:



Next, you have to iterate this to test for segments where two red lines start at the same place. If this happens, you need to extend the "outside" one 50 meters (again, may not be trivial to figure out which one this is):



Now, you have to know which lanes not to merge into. Extend your red lines 50M with a yellow line.



This brings up another test-case - you don't want to extend the top right red line with a yellow line, because it's at a fork in the road. Forks should probably be treated as a separate case and not be included in this algorithm.

You're home free at this point. Your car will always end up at the destination regardless of how it merges as long as you follow two simple rules:

1: ALWAYS merge out of red lanes into a yellow or blue lane.
2: NEVER merge from a blue lane into a yellow or red lane.

KillHour fucked around with this message at 04:52 on Aug 10, 2014

KillHour
Oct 28, 2007


Tres Burritos posted:

Famous last words.

Well, I fixed it.

:colbert:

(Ignore the non-trivial parts)

Edit:

And I even figured out the non-trivial parts! (And they said it was a mistake to drop out of my computer science degree. Sure showed them! :downs:)

You just start at the green dot and work backwards in steps.

Here are some pictures. Start red this time:



50M later:



100M:



150M:



200M:



You get the idea.

This also neatly handles the forking road case and you can save this with the path info, so you only need to calculate it when you're recalculating paths.


Double edit:

I can't think of any edge cases where this wouldn't work, but someone is free to prove me wrong. Looping cases like a roundabout can be tested for and handled pretty easily.

KillHour fucked around with this message at 05:13 on Aug 10, 2014

KillHour
Oct 28, 2007


I was working during the stream, so I missed it live. When I went to watch the recording, it was gone. :(

Edit: It's back! :neckbeard:

KillHour fucked around with this message at 19:52 on Aug 28, 2014

KillHour
Oct 28, 2007



This is great.

I only got to the first bullet point before checking the date, though.

KillHour
Oct 28, 2007


Baronjutter posted:

Ah of course, stuff like the roofs of houses in the sims being auto-generated based on the footprint of the house.
In the drafting program I use at work there's a roof tool that basically does that. You trace a footprint, pick a type of roof and bam, it generates that style of roof for you. You can then fiddle with each eve and poo poo.

You get to play The Sims at work?

KillHour
Oct 28, 2007


Also, given that city simulators go through at least a month per minute on even the lowest speed, everything would be a blur.

KillHour
Oct 28, 2007


Holy fuckballs.

That is seriously slick, dude. Can't wait to see some buildings in those new zones.

KillHour
Oct 28, 2007


One suggestion: You should be able to drag the height restriction down to the ground (0 stories) to say "I don't care - make the Burj Khalifa." Otherwise, you'll be scrolling for a long time to get huge skyscrapers.

Edit: I wonder if there's an elegant way to implement a sky exposure plane without making it over-complicated to use. Then we could have stuff like this be dynamically created, rather than random.

KillHour fucked around with this message at 14:37 on Jun 20, 2015

KillHour
Oct 28, 2007


He's back!

Enjoy Italy.

KillHour
Oct 28, 2007


Baronjutter posted:

Listen dude, as long as you model parking in some respect this is all good.

The literal definition of a single issue voter.

KillHour
Oct 28, 2007


That game has existed for decades.

http://www.gamesfreak.net/games/Traffic-block.html

KillHour
Oct 28, 2007


Normally, I would agree, but sim city always had fantastic music I could never get tired of.

Adbot
ADBOT LOVES YOU

KillHour
Oct 28, 2007


I got an email last week about a "Christmas surprise."

  • Locked thread