Timeline for Generate a map for a roguelike
Current License: CC BY-SA 3.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 17, 2020 at 9:04 | history | edited | CommunityBot |
Commonmark migration
|
|
Dec 16, 2016 at 0:37 | history | edited | Titus | CC BY-SA 3.0 |
$q=$p+1 did never appear: arrays are 0-indexed, but rand(1,4) was not. fixed & golfed. added a note.
|
Dec 15, 2016 at 23:39 | history | edited | Titus | CC BY-SA 3.0 |
border check modulo trick copied from walking function to "place special" (-5 bytes)
|
Dec 15, 2016 at 23:31 | history | edited | Titus | CC BY-SA 3.0 |
decrease $h after creating the map (-4 bytes)
|
Dec 15, 2016 at 23:24 | comment | added | Titus | @Pavel now complete and everything fixed. | |
Dec 15, 2016 at 23:23 | history | edited | Titus | CC BY-SA 3.0 |
added random paths (+64)
|
Dec 15, 2016 at 21:52 | comment | added | Titus |
@Pavel no need for <?php tags (and no need for a file) if you use php -nr 'code'
|
|
Dec 15, 2016 at 21:51 | history | edited | Titus | CC BY-SA 3.0 |
clearing right and bottom is overkill; left and top suffices (-106 bytes)
|
Dec 15, 2016 at 17:12 | comment | added | Pavel | •Every possible combination should have some chance of occurring, there should be 1 to 3 Es, and 2 to 4 Cs. You might want to read the spec. | |
Dec 14, 2016 at 17:47 | comment | added | Pavel |
Ok, I did that, and I noticed that the walls are generated in regular rectangular chunks. It should be able to generate something like the example map. It also doesn't always generate E s.
|
|
Dec 14, 2016 at 17:38 | comment | added | Dada |
@Pavel you need to surround the code with <?php .... ?>
|
|
Dec 14, 2016 at 17:05 | comment | added | Pavel | Outputs it's own source code when I tried in on Try it online | |
Dec 14, 2016 at 15:23 | history | edited | Titus | CC BY-SA 3.0 |
renamed $z to $a; assignment $b=$a-$w (=$w*($h-1)) saves 2 bytes
|
Dec 14, 2016 at 15:10 | comment | added | Titus | @Pavel fixed; thanks for noticing | |
Dec 14, 2016 at 15:07 | history | edited | Titus | CC BY-SA 3.0 |
fixed breakdown, golfed 4 bytes at initialization
|
Dec 14, 2016 at 15:02 | history | edited | Titus | CC BY-SA 3.0 |
edited body
|
Dec 14, 2016 at 14:49 | comment | added | Pavel | In your explanation you're generating height and width to 37, not to 39. | |
Dec 14, 2016 at 14:14 | history | answered | Titus | CC BY-SA 3.0 |