Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : Kolby's Challenge Sequel (It might be coming)
New Topic New Poll Post Reply
Poster Message
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1304
Registered: 06-14-2005
IP: Logged
icon Kolby's Challenge Sequel (0)  
I'm thinking of making a sequel to Kolby's Challenge. Can anyone think of a way that I can get more than 2 monsters in a room without huge restrictions on where I can place them? If I make one an NPC and one a monster, that gives me 2. I can't make the NPC find its own coordinates, as the NPC would move as its last action, and I would be unable to know whether the move succeeded or failed.
07-14-2009 at 04:16 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged

File: kolby.txt (213.5 KB)
Downloaded 55 times.
License: Public Domain
icon Re: Kolby's Challenge Sequel (+4)  
I think you were overthinking the solution. There's a very simple brute-force way of doing exactly what you want with as many monsters as you want, and it has the benefit of not suffering from the kind of bugs that cropped up in Kolby's (like The passageway: Twice West). The drawback is that it does involve about 6 to 8 times the length of code. Oh, and you can't use it with NPC monsters unless you want to double the code's size.

I've attached the script. While it is much bigger than the scripts in Kolby's Challenge, it'll do the job, and has about the same impact on DROD's running speed as Kolby's Challenge (which isn't that much in the grand scheme of things).

Alternatively, you can wait until the DROD RPG commands are ported back to TCB sometime in the future (when that'll be is anyone's guess, but it likely won't be the next patch, at least). With that, it'll be very trivial to code what you want. But until then....

EDIT: Here's a slightly smaller version that still does the same job. I'll note that it does actually take a bit longer to run through both the original script and this one, but since it's only one script and not really that complex a script (no hundreds of loops per turn or anything), it's still really not that bad. Running time *could* be improved by adding a "Go to End" after every Monster check, but that'll push the size back up to the original script's level.

EDIT 2: Actually, thinking about it - both this and the original script I attached should be faster than Kolby's: in a worst case scenario, the script will check the player's position up to 70 times (from 70 commands), and check for a monster's position 9 times (from 1 command). A player position check is very fast (it only compares the known position of the player to the boundaries of the rectangle), while a monster position check must check each and every square in the rectangle. By comparison, Kolby's checked for the player's position 70 times (70 commands) no matter what, and checked for a monster's position 2432 times (from 70 commands). And Kolby ran fine, as far as I'm aware. A group of Slayers would have far more of an impact than this lot of scripting.

Can't really do anything more about the script size though, I'm afraid.

[Last edited by TFMurphy at 07-15-2009 08:55 PM]
07-15-2009 at 02:40 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1304
Registered: 06-14-2005
IP: Logged
icon Re: Kolby's Challenge Sequel (0)  
Thanks! I was planning on waiting until the RPG code got ported, but it was taking quite a while, so I figured that there ad to be a way to do it.
07-20-2009 at 12:23 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : Kolby's Challenge Sequel (It might be coming)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.