• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
TheChubu

Procedural buildings?

3 posts in this topic

I was thinking about how someone would set up an algorithm to generate semi-procedural buildings.

 

The example I'm thinking of would be The Elder Scrolls II Daggerfall. While I didn't played it myself (saw a number of videos/read about it), I know it had procedural generated cities, with buildings sprouting here and there, while also spawning special buildings that weren't quite procedurally generated (ie, guild halls, quest related stuff).

 

Now, Daggerfall had buildings that weren't really complex. So I want to add a twist to it. Say that instead of spawning entire buildings I have a list of specific room types. Say, a list of 10 kitchens, 10 living rooms, 10 dormitories, etc.

 

All pre-authored stuff. So an artist would design a kitchen and add it up to the kitchens list for example. The kitchen could be of any size, maybe having several entrances/exits.

 

A house needs a bare minimum of room types to "function", ie, a certain number of dormitories depending on how many people live there, an entrance, a kitchen, a storage room, etc. Maybe even if we're dealing with an upper class house, we have guest rooms, several kitchens, dinning room, a library, etc. So each "house tier" has its own basic requirements, maybe a size limit (so you don't have a massive lower class house or such things).

 

Now, the idea would be feed these room lists to an algorithm that could randomly select a room of some room type list, and build up the house from there, selecting more rooms as it goes, placing them according to their entrances/exits.

 

I know that FPS from Wolfire constructed its scenes in a similar way. It has entire places predefined, and it constructs a level from those. My idea would be "micro manage" this procedure by having only predefined rooms instead.

 

Ideas are all fine and good but I have problems imagining how the algorithm would work IF it could work. Maybe I'd need to severely restrict door sizes and their position so the algorithm is simpler. But it still sounds like I'm missing a lot of things, like bounds checking, some sort of "sense" checking (not entering a dormitory from the bathroom for example) and probably many particular limitations the algorithm would need.

 

So I don't know if it's actually too complex to do. Have in mind that it shouldn't necessarily work in real time. It could be a "pre-pass" at world creation or something like that.

 

0

Share this post


Link to post
Share on other sites
I would start by designing a few houses by hand. You will probably find that you are using some sort of algorithm, and if your introspection skills are good you might be able to program it.

The way I think of these problems is by looking at design as a top-down process. If someone gives you the boundaries of the house and you have to put rooms there, think of how you would divide the house into rooms, and then think of the design of each individual room later on. Similarly you may need code that turns the problem of designing a town into several instances of designing a neighborhood, a neighborhood into blocks, a block into buildings... This hierarchical approach divides the design process into manageable chunks.

A relevant classic paper in architecture is "A city is not a tree", by Christopher Alexander. The main thesis of the paper is that a purely hierarchical approach can never produce a reasonable city, because there are relationships between elements at the same level of detail. I believe one can avoid the difficulties described in the paper by incorporating enough context when dividing the design problem into sub-problems. For instance, instead of "design a kitchen in this space", the task would be "design a kitchen in this space that connects to the dining area through this door, to the pantry through this other door and which has a view of the river through this window". That's what I mean by "enough context".

If you think of one design step (e.g., house -> rooms) as having to fulfill a bunch of preferences, you can encode those preferences in a utility function that needs to be maximized. You can then use some approximate optimizer (e.g., simulated annealing) to find a desirable configuration. Your utility function can encode things like the undesirability of having to enter a dormitory through the bathroom.

You can try to stop the design-refinement process at some level, for instance by using pre-authored rooms. You can either inform how you design the house of what pre-authored rooms are available and just assemble them, or you can make your pre-authored rooms somewhat flexible so you can change a couple of parameters and adjust it to the room you want to make. Edited by Álvaro
2

Share this post


Link to post
Share on other sites

I would start by designing a few houses by hand. You will probably find that you are using some sort of algorithm, and if your introspection skills are good you might be able to program it.

Hm, I hadn't thought it that way. Well, i actually played quite a bit of Sims before :D I often started doing the 4 walls of the biggest room in the house, usually the living room, then added rooms from there (living, then kitchen, then dorm, then bathroom).

 

That sounds more easier to design. You have the living room as the center piece of the house, and then design the rest of the rooms on top of that. Easier to assemble too I guess.


The way I think of these problems is by looking at design as a top-down process. If someone gives you the boundaries of the house and you have to put rooms there, think of how you would divide the house into rooms, and then think of the design of each individual room later on. Similarly you may need code that turns the problem of designing a town into several instances of designing a neighborhood, a neighborhood into blocks, a block into buildings... This hierarchical approach divides the design process into manageable chunks.

A relevant classic paper in architecture is "A city is not a tree", by Christopher Alexander. The main thesis of the paper is that a purely hierarchical approach can never produce a reasonable city, because there are relationships between elements at the same level of detail. I believe one can avoid the difficulties described in the paper by incorporating enough context when dividing the design problem into sub-problems. For instance, instead of "design a kitchen in this space", the task would be "design a kitchen in this space that connects to the dining area through this door, to the pantry through this other door and which has a view of the river through this window". That's what I mean by "enough context".

 That's the thing I hoped to avoid by having pre authored rooms. If I start with the boundaries of the house, subdividing it into rooms, then I can no longer have pre authored stuff and I would need to code a way to furnish the house which sounds waaaay more complex than just assembling a house out of a room list.

 

I thought about it as neighborhoods, divided by lower, middle and upper class. First Assassin's Creed cities were divided and unlocked by lower, middle and upper neighborhoods. With each type of neighborhood comes a "tier" of rooms. Lower class have fewer room types, with less furniture and such. Middle class have more or less the same room types, but with more furniture, costly things and such. Upper class have several room types (libraries, spas, "piano room", etc) with more complex houses.

 

But, with that there comes the problem of position. Neighborhoods have limits, roads, houses should accommodate to those limits. And while I can imagine more or less a way to assemble houses (via bounding boxes, "access portals" and some rules for positioning), I have no idea if you could actually create roads and blocks procedurally in a way that makes sense and it isn't boring (ie, no massive grid layout). Sounds pretty complex.

0

Share this post


Link to post
Share on other sites

If the point is to simplify things by pre arranging individual rooms, why not do that with buildings as well.  It shouldn't be overly difficult to template up a whole bunch of different designs and arrange your rooms to fit into your templates in some way that allows some variance and randomization.  Say you have a template that says this house will have four rooms.  One room is 4x5, one is 2x3, one is 8x6 and one is 5x6, and they are arranged in "this" manner. 

 

So you write an algorithm that will run through the list of rooms you've made and will randomly choose 4 rooms that fit those size requirements.  Maybe you always want the living room to be the 8x6 room but the 4x5 and 5x6 rooms could be interchangeable between kitchen and bedroom for example.  From there you can just predifine a whole bunch of house templates and build some simple rules like the bathroom can't be bigger than any other rooms or whatever.  This has the advantage of being relatively easy to code, and you could add as many templates as you think you need once you have an algorithm that works.  You could even code up a utility where you could quickly simulate through a whole bunch of buildings and just add templates 2 or 3 at a time until the level of variation seems good to you.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0