Jump to content
Sign In to follow this  
boformer

Help Needed! Growable Spawn Algorithm

20 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Right now I'm working on the algorithm that places the new large growables on the zoning grid.

Here is my concept:

  • Before the plots are calculated, the mod will check which buildings are actually available for placement. This is limited by zone type, density, district style and wealth level
  • It will also create a list of buildings that are very close to the spawn point to avoid repetition
  • The initial building list is sorted based on different factors (avoid repetition, promote buildings with similar plot width and similar architecture style)
  • A priority list of plot sizes is calculated based on the building list
  • Now the algorithm tries to divide the available area into plots. The goals:
    • Prefer plot sizes with a high priority
    • Leave no unoccupied space
    • Create similar sized plots
    • Prioritize corner buildings (those have their own lists)
    • Avoid very narrow plots

The last step is very complex. That's why I need your help!

Print out this zoning map and draw the plots how you would want them. You can also do it in paint or photoshop ;)

You can also try to visualize different scenarios: Imagine a building style would only contain 5x3 and 8x8 buildings, or only small 1x2 buildings.

The most important thing is that you mark the cells which are not used in a different colour.

Upload the results!

0AYVDja.jpg

Here is a quick example:

SWqzNQZ.jpg

Have fun drawing!

  • Like 6

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

:D

The orange areas would be part of the nearby yards, I try to use plants and walls etc to expand yards so it looks like they go all the way to the road.  I usually leave even more empty but this is close to what id do.

0AYVDja.321jpg.jpg

  • Like 2

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Uh, this is something I can help with! :D  I'm on it and will make a few different ones today. 

  • Like 1

My workshop items

Catch my latest project and future plans on my Patreon page

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Yup. :D When it comes to this project I'd say this also seems like something I can actually help with. I'll print out a few and get drawing/scanning. Uh no. Illustrator. Here's a few for starters and a template that will make doing it digitally easier?

Spoiler

PRKAPRKI

PRREPRRMPRRQPRRSPRRW

 


  Edited by pxljce  

Update
  • Like 2

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

wow thats a lot!, lol I quickly used photoshop and my giant waycom pen tablet :D

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Giant tablet envy. :D I'm mouse-bound and anything in illustrator = happy. Hmmmm maybe I should make some more. :yes:

  • Like 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Woop, I'm in the wacom tablet club :P It's a bit old, but I love it and have had so much use of it. Anyways I made a bunch. If you need more or some specific shapes just say. I'm up for making more if needed :) 

Album here

  • Like 1

My workshop items

Catch my latest project and future plans on my Patreon page

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I treat my Surface like a laptop but I'm great with GIMP. I will do a "3-tile deep" version if it hadn't been done by the time I start.

 

Never mind, studying for Linear Algebra final


  Edited by OcramsRzr  
  • Like 1

Ocram's Razor: Though "more things shouldn't be used than are necessary," they're just too fun to pass up! Expect many verbose arguments from me. I will try to write abstracts before or short summaries after from now on.

Words to live by:
"Now there are varieties of gifts, but the same Spirit. But to each one is given the manifestation of the Spirit for the common good. For to one is given the word of wisdom through the Spirit, and to another the word of knowledge according to the same Spirit; to another faith by the same Spirit, and to another gifts of healing by the one Spirit... But one and the same Spirit works all these things, distributing to each one individually..." 1 Corinthians 4-11

"Do not worry about tomorrow; for tomorrow will care for itself. Each day has enough trouble of its own." Matthew 6:34
"Do not judge so that you will not be judged. For in the way you judge, you will be judged; and by your standard of measure, it will be measured to you." Matthew 7:1-3

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    The width is more important than the depth.

    the depth should also be maximized for backyards, just like the default algorithm handles it.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I did one with 2 and 3 width only - I'll do more with similar width if this is more what you need. Or should it be more varied in the width? Should I try and go for similar area sizes (wide when the grid isn't that deep, narrower when it's all 8 deep) instead/aswell?


    My workshop items

    Catch my latest project and future plans on my Patreon page

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    wow, the one you made looks really nice! That will be quite useful.

    A version without size restrictions would be great. Maybe with a min size of 2x2.

    surprisingly the amount of wasted space decreases with larger zones...

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Here's 1 from me.zones.thumb.jpg.3d97689dd20eacf90293fea2

    zones.jpg

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 hours ago, boformer said:

    wow, the one you made looks really nice! That will be quite useful.

    A version without size restrictions would be great. Maybe with a min size of 2x2.

    surprisingly the amount of wasted space decreases with larger zones...

    I'll make a few more tomorrow then :)


    My workshop items

    Catch my latest project and future plans on my Patreon page

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I will be on vacation until Sunday in the Netherlands!

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I read the topic title as "Growable Sperm Algorithm".

    Kids, this is what the internet does to you. It twists your very mind into seeing perverted, terrible things.

    GET OFF BEFORE IT'S TOO LATE! For my part, soon, I will degenerate into a Gollum-like creature and slip into the darkest caves of <Imageboard so astonishingly terrible it ends up automatically censored>, never to see the warmth of day again...

    Edit: People are liking this post and following my account as a reaction to its existence. Requesting immediate banhammer before the infection spreads.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I'm sorry if this was discussed before, but I didn't read all posts and threads related to this mod development. Anyways, I was wondering if the algorithm is going to 'produce' all possible plot sizes? For 4x4 plots we got 4² = 16 possible sizes, but with 8x8 plots we're having a maximum of 64 combinations already... am I right? That would make it hard for both modelers and players to design or grow a certain building. For example, if I wanted to grow a 7x8 building, I'd have to zone exactly this area to make sure the zoning algorithm doesn't divide the plot differently. Also, having more plot sizes means less variation for each individual size. This might lead to very monotonous looking cities.

    So, wouldn't it make much more sense to have the algorithm zone a smaller set of standardized plot sizes, for example even numbers ( 6x4, 6x6, 8x4, 8x6, 8x8 ) wherever it is possible?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    3 hours ago, Dubai Skyscraper said:

    I'm sorry if this was discussed before, but I didn't read all posts and threads related to this mod development. Anyways, I was wondering if the algorithm is going to 'produce' all possible plot sizes? For 4x4 plots we got 4² = 16 possible sizes, but with 8x8 plots we're having a maximum of 64 combinations already... am I right? That would make it hard for both modelers and players to design or grow a certain building. For example, if I wanted to grow a 7x8 building, I'd have to zone exactly this area to make sure the zoning algorithm doesn't divide the plot differently. Also, having more plot sizes means less variation for each individual size. This might lead to very monotonous looking cities.

    So, wouldn't it make much more sense to have the algorithm zone a smaller set of standardized plot sizes, for example even numbers ( 6x4, 6x6, 8x4, 8x6, 8x8 ) wherever it is possible?

    I'm planning something special to solve this problem:

    The backyard expansion that is already present in the game will be extended to the sides. In the asset editor you have to define a plot size range for your asset.

    Most importantly you are defining a width range. Then the editor will allow you to create a separate prop building decoration for every width in the range. The depth of the area displayed in asset editor will be 8 cells.

    • So first you would define the minimum size with the existing dropdown menu, e.g. 2x2
    • Then you would define the maximum width with a new dropdown menu, e.g. 5
    • Now the asset editor would tell you to decorate the house for every width: First it would display a 2x8 plot, then 3x8, 4x8, 5x8

    The asset you created would spawn on any plot that is at least 2x2 and not wider than 5 cells. A lower land value means that bigger plots are preferred, in high land value areas it would spawn in smaller versions (especially low-wealth low-density buildings follow that rule). When the land value is too high, the mod would prefer higher density buildings.

    • Like 4

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    22 hours ago, boformer said:

    I will be on vacation until Sunday in the Netherlands!

    Enjoy! I'll prob add a bunch more to the album I linked earlier. Some are a little funny, but hopefully some are useful too. :)

    • Like 1

    My workshop items

    Catch my latest project and future plans on my Patreon page

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 5/3/2016 at 10:59 PM, boformer said:

    I'm planning something special to solve this problem:

    The backyard expansion that is already present in the game will be extended to the sides. In the asset editor you have to define a plot size range for your asset.

    Most importantly you are defining a width range. Then the editor will allow you to create a separate prop building decoration for every width in the range. The depth of the area displayed in asset editor will be 8 cells.

    • So first you would define the minimum size with the existing dropdown menu, e.g. 2x2
    • Then you would define the maximum width with a new dropdown menu, e.g. 5
    • Now the asset editor would tell you to decorate the house for every width: First it would display a 2x8 plot, then 3x8, 4x8, 5x8

    The asset you created would spawn on any plot that is at least 2x2 and not wider than 5 cells. A lower land value means that bigger plots are preferred, in high land value areas it would spawn in smaller versions (especially low-wealth low-density buildings follow that rule). When the land value is too high, the mod would prefer higher density buildings.

     

    Sounds like a brilliant solution to me.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Here's my 50 cents :P

    TC1LmhS.jpg

    This is for low density residential with low land value. The idea is that roadsite tiles could be thought of as more valuable than tiles that have no road connection. In this scenario the land value is low so cims would prefer to get a property with more tiles in it that are next to a road. The spawn algorithm would look at the chunks of tiles at first and try to fit in squares that are as big as possible, with as many squares that vary in size as little as possible. In this case 1xX and Xx1 lots wouldn't be developed. If this were an area with high desirability and/or higher density one would of course try to make the lots deeper instead of wider, and divide very wide lots into narrower ones. However I'm not sure about that because that would, for example, prevent skyscrapers with large footprints in R-HD zones from spawning, so lot sizes would have to get bigger with increased land value. In a highly attractive low-density area where only richer cims would live the lot scheme would look similar to the one for low-density low-value, except deeper lots would have priority over wide lots.

    However I can't say if this would be easy to do! Hope this wasn't too much talking :P

    • Like 2

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections