Commit ff64bff
committed
Update brogue generator algo
The Brogue algorithm is something along the lines of:
Build the first room (wether it be the standard first floor room, a cave,
or a rectangle.)
Try 600 random wall spots
on each spot try 15 times to build a corridor+room(.8 random chance) or
room(forced on last 215 iterations.)
That reliably takes three seconds in my code. Whether because I'm bad at
this or whatever.
changing that to try 1000 wall spots once each cuts the time down to about
a half second. That's what this commit does.
I'll keep trying to speed up the room and corridor building (those eat up
most of the time), but for now this is a significant improvement and the
level doesn't really suffer for it.1 parent d3a0cf1 commit ff64bff
2 files changed
Lines changed: 53 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3768 | 3768 | | |
3769 | 3769 | | |
3770 | 3770 | | |
3771 | | - | |
| 3771 | + | |
3772 | 3772 | | |
3773 | 3773 | | |
3774 | 3774 | | |
| |||
3777 | 3777 | | |
3778 | 3778 | | |
3779 | 3779 | | |
3780 | | - | |
3781 | | - | |
| 3780 | + | |
| 3781 | + | |
3782 | 3782 | | |
3783 | 3783 | | |
3784 | 3784 | | |
3785 | | - | |
3786 | | - | |
3787 | | - | |
3788 | | - | |
3789 | | - | |
3790 | | - | |
3791 | | - | |
3792 | | - | |
3793 | | - | |
3794 | | - | |
3795 | | - | |
3796 | | - | |
3797 | | - | |
3798 | | - | |
3799 | | - | |
3800 | | - | |
3801 | | - | |
3802 | | - | |
3803 | | - | |
3804 | | - | |
3805 | | - | |
3806 | | - | |
3807 | | - | |
| 3785 | + | |
| 3786 | + | |
| 3787 | + | |
| 3788 | + | |
| 3789 | + | |
| 3790 | + | |
| 3791 | + | |
| 3792 | + | |
| 3793 | + | |
| 3794 | + | |
| 3795 | + | |
3808 | 3796 | | |
| 3797 | + | |
3809 | 3798 | | |
3810 | 3799 | | |
3811 | | - | |
| 3800 | + | |
| 3801 | + | |
3812 | 3802 | | |
3813 | 3803 | | |
3814 | 3804 | | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
3815 | 3814 | | |
3816 | 3815 | | |
3817 | 3816 | | |
| |||
3853 | 3852 | | |
3854 | 3853 | | |
3855 | 3854 | | |
3856 | | - | |
| 3855 | + | |
3857 | 3856 | | |
3858 | 3857 | | |
3859 | 3858 | | |
3860 | | - | |
| 3859 | + | |
3861 | 3860 | | |
3862 | 3861 | | |
3863 | 3862 | | |
| |||
3869 | 3868 | | |
3870 | 3869 | | |
3871 | 3870 | | |
3872 | | - | |
3873 | | - | |
| 3871 | + | |
| 3872 | + | |
3874 | 3873 | | |
3875 | 3874 | | |
3876 | 3875 | | |
| |||
3882 | 3881 | | |
3883 | 3882 | | |
3884 | 3883 | | |
3885 | | - | |
3886 | 3884 | | |
3887 | 3885 | | |
3888 | 3886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
| 178 | + | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
192 | 191 | | |
193 | | - | |
| 192 | + | |
194 | 193 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | 194 | | |
| 195 | + | |
207 | 196 | | |
208 | 197 | | |
209 | | - | |
| 198 | + | |
| 199 | + | |
210 | 200 | | |
211 | 201 | | |
212 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
213 | 211 | | |
214 | 212 | | |
215 | 213 | | |
| |||
0 commit comments