Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : General : Mathematical modelling of briar growth
New Topic New Poll Post Reply
Poster Message
12th Archivist
Level: Smitemaster
Avatar
Rank Points: 789
Registered: 12-07-2008
IP: Logged
icon Mathematical modelling of briar growth (+6)  
Timers are a great way to make a room more challenging and clever. While tarstuff and roach queens work very well and predictably, the architect needs to put in some mechanism to kill the mother and babies or queen and roaches, which can be messy or even impossible to put in a room. A much simpler timer is just a briar root in a long, one-tile corridor far away from the goal. The player must reach the goal in time or else the briar will have blocked it or destroyed it.

It's a useful and simple system, to be sure. The briar doesn't need to die at the end, and it's obviously a timer and not some other room mechanic. But the problem with briar timers is two-fold: not using pits means the briar grows too quickly, while using pits means the briar doesn't grow in a predictable pattern. For example, with a tar mother growing to block something, it's easy to see her progress and how much time is left at any point: you have thirty times the length of the corridor turns left. But briar doesn't grow linearly, making it much harder to predict off the top of one's head.

Fortunately, there is a pattern, and a fairly simple one, too. It is:
t(d) = 0.5d^2 - 0.5d + 1
where t is turns left and d is distance of the corridor. With this equation handy, it shouldn't be too hard for a player to figure out how much time they have to beat a timer, or for an architect to figure out how long a timer corridor should be.

I hope this was a bit helpful to anyone who read this. It certainly helped me make a timer without guessing the corridor length.

____________________________
It was going well until it exploded.
~Scott Manley

Check out the DROD Wikia project here!

[Last edited by 12th Archivist at 11-24-2013 07:27 PM]
11-24-2013 at 07:25 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Godot23
Level: Master Delver
Rank Points: 114
Registered: 02-28-2013
IP: Logged
icon Re: Mathematical modelling of briar growth (0)  
Ah beautiful math makes everything easier!

____________________________
Roses are red
Violets are red
Everything is red
My house is on fire
11-24-2013 at 09:25 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 4590
Registered: 02-20-2007
IP: Logged
icon Re: Mathematical modelling of briar growth (+2)  
That formula is correct for briar in a one-tile-wide corridor with pit on one or both sides. (If wall is on both sides, the briar grows one tile every turn.)

It's equivalent to saying that t(d) is the (d - 1)th triangular number, plus 1. But what if you want a timer for some number of turns that's not triangular?

* Find out which triangular numbers your target number lies between. For instance, if the target is 100, this lies between the triangular numbers 91 and 105.
* Build the timer as if the target were the higher triangular number. So, for 105 (the 14th triangular number) you would build a one-tile-wide corridor of length 15, with pits on one or both sides.
* Subtract the target from this number and add 3 (105 - 100 + 3 = 8). Replace the pits orthogonally adjacent to the 8th square from the end of the corridor with walls.

____________________________
50th Skywatcher
11-24-2013 at 10:51 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Kallor
Level: Master Delver
Rank Points: 277
Registered: 04-02-2007
IP: Logged
icon Re: Mathematical modelling of briar growth (+1)  
I made two secret rooms like this for the first level of Gigantic Jewel Lost, a user made hold we made with Zch.

One of them has briar in a corridor like this so the growing time is arithmetic sum as you calculated. The player removes some trapdoor (over pit) to manipulate this sum a little. The other one has the briar on a diagonal grid, so the growing time is almost like the sum of squares (a third degree polynomial I don't remember just now).

I think they turned out to be a little too diffcult or at least weird... Maths is fun woohoo :smile

-Kallor

____________________________
Kallor
11-25-2013 at 08:23 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Pearls
Level: Smitemaster
Avatar
Rank Points: 767
Registered: 12-21-2009
IP: Logged
icon Re: Mathematical modelling of briar growth (0)  
Hey those rooms were awesome.

____________________________
Hey, w-wait, that's the guy who shamelessly promotes his own...

Click here to view the secret text

11-25-2013 at 03:18 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : General : Mathematical modelling of briar growth
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.