ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/pod/random_maps.pod
(Generate patch)

Comparing deliantra/server/pod/random_maps.pod (file contents):
Revision 1.1 by root, Tue Jun 29 18:19:01 2010 UTC vs.
Revision 1.2 by root, Tue Jun 29 18:27:02 2010 UTC

120 120
121 121
122 Layout Style: Parameter: Effect: 122 Layout Style: Parameter: Effect:
123 123
124 124
125 maze maze_type 0: rooms (open space with some walls) 125 maze maze_type 0: roomy (open space with some walls)
126 1: sparse (maze with some larger open spaces) 126 1: sparse (maze with some larger open spaces)
127 2: braided (few dead ends) 127 2: braided (few dead ends)
128 3: closed (complete maze) 128 3: closed (complete maze)
129 default: random 129 default: random
130 130
234 16 Trap the treasure. A trap from /styles/trapstyles/traps 234 16 Trap the treasure. A trap from /styles/trapstyles/traps
235 is selected and inserted into the treasure chest. 235 is selected and inserted into the treasure chest.
236 32 sparse treasure. 1/2 as much treasure is generated. 236 32 sparse treasure. 1/2 as much treasure is generated.
237 64 rich treasure. 2x as much treasure is generated. 237 64 rich treasure. 2x as much treasure is generated.
238 238
239 If option 1 is not set, options 2-16 are ignored. Options 239 If option 1 is not set, options 2-16 are ignored. Options
240 may be added together: treasureoptions 3 means treasure 240 may be added together: treasureoptions 3 means treasure
241 optons 1 and 2 are set. 241 optons 1 and 2 are set.
242 242
243=head2 Map Layout styles 243=head2 Map Layout styles
244 244
245=head3 Onion Maps 245=head3 Onion Maps
246 246
247Onion rooms are like this: 247Onion rooms are like this:
277 277
278=head3 Maze Maps 278=head3 Maze Maps
279 279
280Maze maps are like this: 280Maze maps are like this:
281 281
282A "roomy" maze:
283
284 ########################################
285 # #
286 # # # # # # # # #
287 # ## ## # ### # # ## #
288 # ### # # # ## # #
289 # ## ## # ## # # ## #
290 # ## # # ## # # # # # ## ## #
291 # # ## # # #### # #### # # #
292 # ## ## ## ## # # # ## ## # #
293 # # # ## # # # # #
294 # ## ### ### ## #### ## #
295 # ## #### ### # #
296 # ## ### ### # # ## #
297 # ## ### # ## # # # #
298 # ### ### # ### # #### #
299 # # ## ## ##### # ## #
300 # # ## # # ##### ## # #
301 # ## ## ## # # # ## #
302 # ## ### # ## ## # ##### #
303 # #### # # # ### # # #
304 # # ### ## ## # # # # #
305 # ## ## # # ## # #
306 # # #### ## #### #
307 # ##
308 ########################################
309
282A "sparse" maze: 310A "sparse" maze:
283 311
284 ######################################## 312 ########################################
313 # # # # # # # # # # # # # # #
285 # # # # # # # # # # # # # # 314 # # # # # # # # # # # # # #
286 # # # # # # # # # # # # 315 #### # # ## ### # # # ## ## #
287 #### ## ## # # ### # ## # # # ## 316 # # ### # ## # ## ## #### ##
288 # ##### # ## # # # ## ### ## ### # 317 ## # ## # ## # # # #
289 ## ### # # # # 318 # ## #### ## ## # ## # ## ####
290 # ### # # #### ### # 319 #### # ## ### # ## # #
291 # # ## ## ## # # ### 320 # ## ## ## ## # #### #
292 # ###### # ### # # ## # # 321 #### # ### ## ## ## ## #
293 # # ## #### ## # # # # # 322 # # ### # # # # ###
294 # # ## ## ## ### ## # # # # # 323 # ##### #### # #### ### ### #
324 ## # # ### # ####
325 # ## # ## ## ### #
326 ## ## ### #### ##### # #
327 # # # ## # # ## #
328 #### #### ## ### #### # # #
329 # # ## ## ## # # #
330 ### ##### # #### #### # ## # ## #
331 # # # ## ## # ## # # #
295 #### ## ## ## ## ### # ### ### 332 ##### ## ## # ## ## ## # ## # # #
296 # # ## ##### # ### # 333 # # # # # # ## # ## # # ###
297 ## ## # ### # ## ##
298 # ## ## ## # ## # ### #
299 ## # # # # # # # ## #
300 # ### ### ## # ## ## #### ## # #
301 ## # # # # # # # #### # ###
302 # ### ## ## # ## ## ## # ### #
303 ## # ## # # # # # # ## # ##
304 # ##### ## ## #### ## # # # ## # 334 # #### # # ## ### # ## # # ## ## # #
305 ## # # # # ## # ### #
306 # # # # # # # # # # # # # # 335 # # # # # # # # # # # # #
307 ######################################## 336 ########################################
337
338A "braided" maze:
339
340 ########################################
341 # # # # # # # # # # # # # # #
342 # # # # # # # # # # ##
343 # ## # # ## # # #
344 # ## ## # ## # ## # ## #######
345 # ### # # # # # # ## # #
346 # # # # # # ### ### #### ## #
347 ### #### ## ### # # # ## ##
348 # # # # # ## # #
349 # ## ## ###### ## ### ## #### ####
350 #### # ### # ## # # #
351 # ## # # # ## # ####### ## ####
352 #### # # ### # # # # #
353 # ## ### # ## # ## ### # ##
354 # # ## ##### # # ### ## # # #
355 ## # # ## ### ## ## #
356 # # # # # #### # ### ###
357 # # # ## ##### # # # ## # # #
358 # ## ## # # ## ## # ### # #
359 # # ### ###### # # # # # #
360 ## # ## # # # ## ## # ### #
361 # # ### # ##### # # # ## # #
362 # ## ## ### # ## # # # # ### #
363 # # # # # # # # # # # #
364 ########################################
308 365
309A "full" maze: 366A "full" maze:
310 367
311 ######################################## 368 ########################################
312 # # # # # # # 369 # # # # # # # # # # # #
313 # # # # # # # # # # # # # # #
314 ### ## ## ######## ### ### ### # #
315 # # # ## # ### ### # ### ##
316 # ##### ### ##### ## ## ## # #
317 # # # ## # # ## #### # # # ##
318 # #### ## ### #### # ## ## ### # # #
319 # # # # # ### # # # #
320 # ### ## ## ### #### #### ## # ###
321 # # # # # # #### ## # # ## # #
322 # # ## #### ## # ## # ## # #
323 # #### ## # ### #### # ### # #### #
324 # # # # # # # # ## #### # #
325 # ##### #### ## ### # # ## #
326 # ## ## # ## ## ## ##### # # #
327 # # # # ## # # # ## # # ### # #
328 ## ### # ## # # #### ### # # # ## #
329 # # # # ## # # # ## ### # #
330 ## # #### ## # # ###### # # #### #
331 # # #### # ###### ## ### # #
332 ### # ## ## # # # ## #
333 # # # # # # # # # # # # # 370 # # # # # # # # # # # # # # #
371 ## #### ### #### #### #### ## ### # #
372 # ## # # # # ### ### #
373 #### ##### #### ## # # #### # #
374 # ## # # ## # ## # ### ## ## #
375 # ### ## ## # # # # # #
376 # ### ## ## # ### # ##### ##
377 # ## ## ###### ## # ## #### # # #
378 ### # # # # ## # # ########
379 # ####### # ## # ### #### # #
380 # # # # #### ## # ### ##
381 #### # # # ## ## #### #### # # #
382 # ### # ## ## # ### ### ##
383 # # ## ### # ### ### # # #
384 #### #### #### # ## # # # ### #
385 # ## # ## # # # ## ## # ## #
386 # #### #### # ## ### # # ## # ###
387 # ### ## # # # #### ##### #
388 # #### #### ### ### # # # #
389 # ## # # ### # # ##### #
390 # ### #### ###### ##### ####### # #
391 # # # # # # # # #
334 ######################################## 392 ########################################
335
336 393
337=head3 Spiral Maps 394=head3 Spiral Maps
338 395
339 A Spiral Map:: 396 A Spiral Map::
340 397
366 423
367 0 pick random options 424 0 pick random options
368 1 Regular spiral: distance increases constantly with angle 425 1 Regular spiral: distance increases constantly with angle
369 2 Fine spiral: most coils possible are fit in 426 2 Fine spiral: most coils possible are fit in
370 4 Fit Spiral: scale spiral to fit rectanglar region 427 4 Fit Spiral: scale spiral to fit rectanglar region
371 (i.e., the spiral will look elliptical) 428 (i.e., the spiral will look elliptical)
372 429
373=head3 Rogue-like Maps: 430=head3 Rogue-like Maps:
374 431
375A Rogue-like Map: 432A Rogue-like Map:
376 433
528 decorstyle furniture 585 decorstyle furniture
529 floorstyle dirt 586 floorstyle dirt
530 wallstyle wooden 587 wallstyle wooden
531 symmetry 1 588 symmetry 1
532 589
533
534=head2 Below is the original proposal
535
536 Random Maps
537
538 The major thing still missing from Crossfire, I think, is a good facility
539for generating random maps:
540
541 1. They can be used by map creators to create a basic layout for his
542quest or whatever, so that he need not start from a blank canvas.
543
544 2. Buildings with nothing else in them can have a random map in them.
545In fact, we could have the same random map generated every time someone
546enters a particular building (pick the seed off of the parent map name
547and the entrance location!) This would transform the world from finite
548to infinite.
549
550 Needed Features:
551
552 Styles:
553
554 Random maps would need to be "styled": walls, doors, monsters, and other
555decor should be picked from certain subsets of the total object set. An inn
556has a very different style than a castle, and from a dungeon, in both walls,
557decor, and monsters.
558
559 Ubiquity: (map configurable: unspecified==no random maps)
560
561 Any exit which does not have a destination specified should lead to
562a random map, but WITH a sign saying "this is a random map".
563
564 Identifiability: (configurable)
565
566 Random maps includes a sign
567which states that the map is random.
568
569 Recursion:
570
571 Random maps should optionally have another entrance to a random map of
572the same style. The depth of recursion should be specifiable.
573
574 Difficulty:
575
576 Difficulty should be specifiable. Also, whether the map advances in
577difficult with recursion should be specified.
578
579 Quests:
580
581 It would be cool if random quests could be implemented, too. I won't
582put this in immediately.
583
584 Standalone operation:
585
586 It'd be cool if the random map generator operated standalone, so that
587map designers could use it easily as well as the server could at exits.
588
589 Size:
590
591 Random maps should be sized. A big, multi-square exit should have a bigger
592random map to it, while a small house should have a small interior.
593
594 Inheritance:
595
596 The type and location of the exit should imply something about its random
597interior. A shop exit should have a shop interior, a house should have a
598home interior, etc, a difficult map should have difficult sub-maps.
599
600 Directedness:
601
602 Buildings should have random maps with stairs up to the next random map,
603dungeons with stairs down, etc.
604
605 What does everyone think? Anyone willing to help? Has anyone already
606 made so much progress on this that I should just help them instead of
607 starting one myself?
608
609
610 Algorithms:
611
612 Maze algorithm: start from a wall point, move forward left or right
613or start from a new wall point, at random, recursively. If blocked,
614pop the stack until you can walk again. If you return all the way,
615a maze is generated.
616
617
618 Specs for a room algorithm:
619 Can you write for a function:
620
621 char **room_gen_corridored(int xsize, int ysize, int option);
622
623 which allocates and returns a char[xsize][ysize], with # being a wall
624 and a char value of 0 indicating nothing.
625 like::
626
627 ######################
628 # # # #
629 # # # #
630 # #
631 # # # #
632 ######### ##########
633 # # # #
634 # #
635 # # # #
636 # # # #
637 ######### ##########
638 # # # #
639 # #
640 # # # #
641 ######################
642
643 Some suggested options:
644 option:
645 0 random choice of one of the other options below *
646 1 vertical centered corridor *
647 2 horizontal centered corridor *
648 4 vertical corridor on the right-hand wall *
649 8 vertical corridor on the left-hand wall
650 16 horizontal corridor on the bottom wall *
651 32 horizontal corridor on the top wall
652
653 The *'d ones are the important ones.
654
655 Options 4 and 16 are important so I can easily create reasonable
656 bilaterally and 4-way symmetric maps, as in a castle.
657
658 If you're really ambitious, you could make it so you could ADD the
659 options to get something like 10: centered vertical corridor and right-hand
660 corridor.
661
662 One restriction you must satisfy, however, is that every place on the map
663 be accessible from everywhere else.
664
665 Feel free to contact me with any questons.
666
667 peterm@langmuir.eecs.berkeley.edu
668
669=head1 AUTHORS 590=head1 AUTHORS
670 591
671The original document was taken from Crossfire and subsequently modified by Marc Lehmann. 592The original document was taken from Crossfire and subsequently modified by Marc Lehmann.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines