プレイ日記
Bonzargoes cactusfriend
My overlap checking code is frustratingly only working SOMETIMES. Can't quite figure out why.
6そうだね
プレイ済み
返信[1]
親投稿
Bonzargoes cactusfriend
Here's the bottom screen. I am starting to think that it'd be a better idea to abstract this out into a 2 dimensional array and do the checks there before drawing at all. That's just going to take another rewrite.
0そうだね
プレイ済み
返信[2]
親投稿
Bonzargoes cactusfriend
By the above I mean: I'm just doing an overlap check using chkchr$() on the literally-drawn stuff. Someone elsewhere gave me the idea to put it all into a two-dimensional array first.
0そうだね
プレイ済み
返信[3]
親投稿
PChicken NerdChicken
Chr is for the console, am I right? Character? I don't know much but I'm pretty sure it doesn't work like that.
0そうだね
プレイ済み
返信[4]
親投稿
Bonzargoes cactusfriend
Yes, you can use chkchr$() to check what character is at a certain position in the console. It does indeed work like that. I rely upon that for a lot of other redraw functions elsewhere but it's not working too well here.
0そうだね
プレイ済み
返信[5]
親投稿
PChicken NerdChicken
is that text on the screen?
0そうだね
プレイ済み
返信[6]
親投稿
Bonzargoes cactusfriend
Yep! This is a text console game.
0そうだね
プレイ済み
返信[7]
親投稿
ĦHarry Ramstrong
You're doing a lookahead, right? 1.Set room origin and dimension randomly. 2. Use chkchr to see if it's free. 3. If not, reduce dimension, repeat from 2 until too small. 4. If too small, try again from step 1 until MaxN tries. Goto 7. 5. Draw room. 6. Repeat from 1 until MaxN tries. 7. Done. Something like that?
1そうだね
プレイ済み
返信[8]
親投稿
PChicken NerdChicken
gonna make something like this.
0そうだね
プレイ済み
返信[9]
親投稿
ĦHarry Ramstrong
This is actually an Artwork Demo of Colored Boxes. Hey, with a little mod, it'll work as dungeon room generator! :D HTH
1そうだね
プレイ済み
返信[10]
親投稿
PChicken NerdChicken
test, reedited about fifty times
1そうだね
プレイ済み
返信[11]
親投稿
PChicken NerdChicken
wow, ~50 lines of code in 30 min. Im bored
0そうだね
プレイ済み
返信[12]
親投稿
PChicken NerdChicken
I realize now that you meant for it to not overlap, but I made it integrate.
2そうだね
プレイ済み
返信[13]
親投稿
PChicken NerdChicken
lol, i forgot to save the program.
0そうだね
プレイ済み
返信[14]
親投稿
Bonzargoes cactusfriend
Nice, thanks for the ideas! I'll give these tips a try and let you know what I come up with.
2そうだね
プレイ済み
返信[15]
親投稿
Bonzargoes cactusfriend
Sweet! Here's where I'm at right now; didn't get much chance to work on this over the weekend. I want to alternate the grid between room origin checks so that they don't 'line up' so much, then use a tunneler to make the hallways between them. Thanks again for the help!!
2そうだね
プレイ済み
返信[16]
親投稿
PChicken NerdChicken
if that's what you call help then help is fun.
1そうだね
プレイ済み