[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4752: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4754: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4755: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
ToME: the Tales of Maj'Eyal • View topic - Traps, take five (or thereabouts)

ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Apr 13, 2021 11:50 am

All times are UTC




Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Dec 18, 2015 4:46 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712


Top
 Profile  
 
PostPosted: Fri Dec 18, 2015 6:55 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
(Moved from the original thread because it fits better here:)

Yeah, I'm leaning towards removing traps entirely too. I've removed them entirely (or, rather, prevented them from spawning) in one of my private branches and have played a few (short-ish) games and I can't say I miss'em at all in terms of game play.

My biggest issue with removing them completely is that this leaves a kind of a strange vacuum in terms of there being useless skills[1]/spells. One approach that I've thought about a bit is to allow monsters to create traps (via spell), but to not have any floor traps (perhaps allow inside vaults?). Another approach might be to remove all the instantly-game-ending traps which necessitate 100% detection and simply not have 100% detection in the game -- however, this risks ending up in "a couple of unlucky trap spawns kills character randomly with no possible way to prevent it" territory. But maybe we should just remove *everything* trap-related to give room for a re-think.

I'll be brutally honest that I'm also slightly motivated by the desire to get rid of the thousands(?) of lines of code required to support traps. (This has to do with a probably-overly-ambitious code conversion project that I've sort of embarked upon... but I don't want to get anyone's hopes up too much in case it never goes anywhere.)

[1] ... but let's face it: Any method of finding traps which isn't 100% isn't going to fly in T2, given the extreme nastiness of some of the traps.

EDIT: Fun little addendum: Removing traps leaves Antimagic users with exactly one useful activatable "spell" based on the Anti-magic skill :), namely Continuum distruption. Maybe that should be streamlined such that any player-initiated teleportation automatically succeeds and enemy teleportation automatically fails (or prompts?) -- though I'd hate to be the one to find all the places where code needs to be changed to achieve this effect :).


Top
 Profile  
 
PostPosted: Fri Dec 18, 2015 7:05 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
... and having given it a little more thought: Someone over on the oook forums suggested a few trap ideas, but one that stuck out to me as having great potential was the idea of traps being "static terrain" that was part of the dungeon with timed effects based on player proximity. Those effects could be a timed poison cloud, arrows being fired every turn while you're in line of the trap (or even "one-square-per-turn-speed" radius 1 clouds), maybe a circular "blast" effect whenever you're in a certain radius, whatever.

I think this would could lead to interesting random 'puzzles' if traps were generated randomly in close proximity to one another -- esp. in tight spaces such as vaults.


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 12:08 am 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 1:06 am 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712
Rats... It looks like "special" also includes moated rooms of any sort. :( Guess I'll just have to proceed with ripping out the trap code.


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 6:43 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
I'm quite fond of Anti-magic myself, even if you're right that it's a bit of an odd skill/class...

Yeah, considered Rust, and actually it does look kind of like a reasonable option especially since it would permit a gradual migration/phasing-in. There are a few downsides, though it looks like a pretty nice language overall. (Lack of higher-kinded types, general newness, etc.)

Currently I'm exploring the feasibility of a rewrite in Scala.


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 6:44 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482
Btw, I find QtCreator quite nice as an IDE -- the Find Usages thing is extremely useful when exploring what can be removed without affecting anything.


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 7:05 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 7:12 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712
BTW, I should probably mention, I see two things in the current code base that I think might be problems, as far as porting to another language:

1. HUGE functions. Many functions go on for pages and pages, and should really be split up in some way. (Again, I volunteer!)

2. Code duplication. This seems particularly prevalent in the trap-related code sections; experimenting with deleting stuff today, I often found myself removing the exact same stanzas of code two or three times, including the comments.

... I'll see if I can get any of this squared away today.


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 7:14 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 7:22 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 7:46 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712
Ah, gotcha. In that case maybe I'll also hold off on the complete trap removal?


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 8:03 pm 
Offline
Spiderkin

Joined: Sat Mar 18, 2006 12:48 pm
Posts: 482


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 8:12 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712
Hmm. "Doing it" I can manage, doing it right possibly not. I'll see though.

Edit: this may be harder in QtCreator than I thought. "Find Usages" generates a lot of false positives somehow. :?

Edit 2: yeah, I'm going at this with Vim for now.

Also: argh! There is confusion in the code between 't_info' and 'tr_info'. Sometimes t_info is terrain, other times it's trap info. ARGH.


Top
 Profile  
 
PostPosted: Sat Dec 19, 2015 8:32 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 712
Okay, so, the traps code is not only entangled with Rogues' monster traps, but also with searching, hidden doors, and chest traps.

I am considering removing all of them.
- Searching and hidden doors are pretty useless, especially without traps, and don't add much flavor
- Chest traps are very, very heavily dependent on floor trap code AFAICT

I will try to preserve them for now though.

(But yes, it would be very nice indeed to yank out all that code!)

Edit: I'll keep trapped chests, hidden doors, and searching for now. Monster traps will be gone though.

Edit: or not, because t_info includes chest traps too. BLARGH.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group