Jump to content
  • Advertisement
Sign in to follow this  
ZenDavis

Generating Random 2D Buildings

This topic is 2643 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[font="arial, verdana, tahoma, sans-serif"]I'm working on a game that requires randomly generated 2d buildings with two textures. The base building texture and then window textures randomly laid on top of the building. The art style is relatively cartoony so the windows don't have to be perfectly generated but I'm having trouble conceptualizing how to go about this. Any help?[/font]

Share this post


Link to post
Share on other sites
Advertisement
[font="arial, verdana, tahoma, sans-serif"][font="arial, verdana, tahoma, sans-serif"]Think of how you would design one of these buildings yourself. It could look something like this:[/font][/font]
[font="arial, verdana, tahoma, sans-serif"][font="arial, verdana, tahoma, sans-serif"] [/font][font="arial, verdana, tahoma, sans-serif"]* Roll a die and pick a width (measured in windows) from this table: {2,3,3,3,4,4}[/font][/font]
[font="arial, verdana, tahoma, sans-serif"][font="arial, verdana, tahoma, sans-serif"]* [/font][/font][size=2][font="arial, verdana, tahoma, sans-serif"]Roll another die and pick a height from this table: {2,3,3,4,4,5}[/font]
[size=2][font="arial, verdana, tahoma, sans-serif"]*[/font][size=2][font="arial, verdana, tahoma, sans-serif"] [/font][font="arial, verdana, tahoma, sans-serif"]Roll yet another die and pick a color: {white, yellow, orange, pink, green, blue}[/font]
[size=2][font="arial, verdana, tahoma, sans-serif"]Etc. [/font][font="arial, verdana, tahoma, sans-serif"]Once you have all the features of the building picked out, just draw it. Does that make sense?[/font]






Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!