Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Procedural Generation (Using Predefined Pieces)  (Read 2067 times)
0 Members and 1 Guest are viewing this topic.
Offline UprightPath
« Posted 2013-05-15 23:57:10 »

Hello! I'm looking to do something involving Procedural Generation, primarily 'tile dungeons' of various types. I'm planning to use a sort of templating method for this. Basically, I would define a set of 'masking' templates that would indicate whether a tile is a wall, a floor, or a door (The interiors of rooms would be filled in using a different algorithm such that while you might have a lot of rooms of the same shape, you'd have 'different' rooms). The algorithm would be something like:
1) Select a starting room and position.
2) Place the room on the map. (Remove any 'open' doors that have just become closed.)
3) Add all of it's 'open' doors (Meaning doors that haven't had a room attached to them) to a list.
4) Check 'open' doors size > 0
4.1) true: Select a room that can be attached to it. Then go to 2.
4.2) false: Check if certain gen requirements are met (Number of rooms, tile coverage, whether certain required rooms were placed, etc.)
4.2.1) true: Gen complete.
4.2.2) false: Backtrack and to last room addition and attempt to add a different room.

Anyway, I'm trying to figure out an efficient way of doing this. Beyond writing up all of the different room types, there's an issue that crops up when I attempt to add in doors of variable thickness: Like an opening into a hallway that is two tiles (Or if I can extend this to three dimensions two wide and several high). Any ideas/advice would be appreciated!

Pages: [1]
  ignore  |  Print  

EgonOlsen (58 views)
2018-06-10 19:43:48

EgonOlsen (40 views)
2018-06-10 19:43:44

EgonOlsen (60 views)
2018-06-10 19:43:20

DesertCoockie (225 views)
2018-05-13 18:23:11

nelsongames (141 views)
2018-04-24 18:15:36

nelsongames (140 views)
2018-04-24 18:14:32

ivj94 (882 views)
2018-03-24 14:47:39

ivj94 (143 views)
2018-03-24 14:46:31

ivj94 (794 views)
2018-03-24 14:43:53

Solater (158 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!