Timer Delay Test - Processing Speed On Other Levels

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Timer Delay Test - Processing Speed On Other Levels

Post by Batty »

I convinced Rufus the Ratling to participate in my study. I promised him cheese. Ratlings are not the brightest race in Grimrock.

This is to test the priority that the engine gives in processing the different levels. The game, as we know from LoG1, processes levels other than the current level at a slower rate.

Here's Rufus in the testing chamber:
SpoilerShow
Image
This is what the entire layout looks like, notice the different time intervals for the timers:
SpoilerShow
Image
The timer on each level calls this script in the testing chamber:

Code: Select all

function currentLevel()
	hudPrint("Timer test chamber triggered.")
	spawn("fireball_large", 1, 17, 15, 3, -1)
end

function oneLevelAway()
	hudPrint("Timer one level west triggered.")
	force_field_test_chamber.controller:deactivate()
end

function twoLevelsAway()
	hudPrint("Timer two levels west triggered.")
	spawn("fireball_large", 1, 17, 15, 3, -1)
end
When the timers expire they will either remove the force field thus giving Rufus cheese or blast him with a fireball from the daemon head.

Here's the result:
SpoilerShow
Image
Rufus gets his cheese but he receives two nasty fireballs as well. The timers all triggered at about the same time although there's still an order as you can see by the hudPrints.

Going from current level to next level to 3rd level, the ratio for processing time in my test was approximately 10 : 1.5 : 0.5. Big differences! So, plan your mods accordingly.

*Also, the automap zoom doesn't work in the editor. I tried everything to make it work, searched the forums, all keys, etc. Maybe it only works for compiled games? (or mine is busted :( )
Last edited by Batty on Sun Oct 26, 2014 6:11 pm, edited 1 time in total.
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: Timer Delay Test - Processing Speed On Other Levels

Post by cromcrom »

This is really bad to set up a global timer. Hopefully we will find a way around.
A trip of a thousand leagues starts with a step.
Post Reply