[b35] massive computer slowdown with confusion

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
jaega1
Posts: 4
Joined: Fri Dec 02, 2011 3:48 am

[b35] massive computer slowdown with confusion

#1 Post by jaega1 »

Forgive me if this has already been reported but with b35 (and no addons) I am having a significant problem.

When an enemy hits my player character with confusion the game runs insanely slowly until it wears off. It likely is caused by the whatever makes the screen blur. The graphical change is pretty neat but the slowdown in the game is very unpleasant. It sometimes takes ten seconds for the game to register a single key press. This makes the game almost unplayable whenever this happens.

Does this happen to anyone else?

Laerte
Halfling
Posts: 88
Joined: Sat Sep 11, 2010 12:23 pm

Re: [b35] massive computer slowdown with confusion

#2 Post by Laerte »

Happens to me too. Invisibility also makes the game very slow.

I'm using Linux (Arch) with an ATI card and the radeon opensource drivers.

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: [b35] massive computer slowdown with confusion

#3 Post by tiger_eye »

Yeah, this has bothered me too. My gfx card isn't that great, and it kinda falls short with these particular effects. So, here is a patch (also attached) that adds an option do disable blurring effects:

Code: Select all

Index: game/modules/tome/load.lua
===================================================================
--- game/modules/tome/load.lua	(revision 4706)
+++ game/modules/tome/load.lua	(working copy)
@@ -61,6 +61,7 @@
 end
 if config.settings.tome.gfx.tiles == "mushroom" then config.settings.tome.gfx.tiles="shockbolt" end
 if type(config.settings.tome.weather_effects) == "nil" then config.settings.tome.weather_effects = true end
+if type(config.settings.tome.blur_effects) == "nil" then config.settings.tome.blur_effects = true end
 if type(config.settings.tome.smooth_fov) == "nil" then config.settings.tome.smooth_fov = true end
 if type(config.settings.tome.daynight) == "nil" then config.settings.tome.daynight = true end
 if type(config.settings.tome.hotkey_icons) == "nil" then config.settings.tome.hotkey_icons = true end
Index: game/modules/tome/dialogs/GameOptions.lua
===================================================================
--- game/modules/tome/dialogs/GameOptions.lua	(revision 4706)
+++ game/modules/tome/dialogs/GameOptions.lua	(working copy)
@@ -131,6 +131,15 @@
 		self.c_list:drawItem(item)
 	end,}
 
+	local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables or disables effects that blur the screen.\nDisabling it should gain a performance increase while under the effect of confusion, invisibility, etc.#WHITE#"}
+	list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Blur effects#WHITE##{normal}#", status=function(item)
+		return tostring(config.settings.tome.blur_effects and "enabled" or "disabled")
+	end, fct=function(item)
+		config.settings.tome.blur_effects = not config.settings.tome.blur_effects
+		game:saveSettings("tome.blur_effects", ("tome.blur_effects = %s\n"):format(tostring(config.settings.tome.blur_effects)))
+		self.c_list:drawItem(item)
+	end,}
+
 	local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Select the interface look. Metal is the default one. Simple is basic but takes less screen space.\nYou must restart the game for the change to take effect."}
 	list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Interface Style#WHITE##{normal}#", status=function(item)
 		return tostring(config.settings.tome.ui_theme2):capitalize()
Index: game/modules/tome/class/Player.lua
===================================================================
--- game/modules/tome/class/Player.lua	(revision 4706)
+++ game/modules/tome/class/Player.lua	(working copy)
@@ -281,14 +281,14 @@
 		end
 
 		-- Blur shader
-		if self:attr("confused") then game.fbo_shader:setUniform("blur", 2)
+		if self:attr("confused") and config.settings.tome.blur_effects then game.fbo_shader:setUniform("blur", 2)
 --		elseif game:hasDialogUp() then game.fbo_shader:setUniform("blur", 3)
 		else game.fbo_shader:setUniform("blur", 0) -- Disable
 		end
 
 		-- Moving Blur shader
-		if self:attr("invisible") then game.fbo_shader:setUniform("motionblur", 3)
-		elseif self:attr("lightning_speed") then game.fbo_shader:setUniform("motionblur", 2)
+		if self:attr("invisible") and config.settings.tome.blur_effects then game.fbo_shader:setUniform("motionblur", 3)
+		elseif self:attr("lightning_speed") and config.settings.tome.blur_effects then game.fbo_shader:setUniform("motionblur", 2)
 		else game.fbo_shader:setUniform("motionblur", 0) -- Disable
 		end
 	end
Attachments
no_blur_option.txt
(3.31 KiB) Downloaded 91 times

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [b35] massive computer slowdown with confusion

#4 Post by darkgod »

Why not use the option already existing to disable shaders ?
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: [b35] massive computer slowdown with confusion

#5 Post by tiger_eye »

darkgod wrote:Why not use the option already existing to disable shaders ?
Because there are other shaders that don't slow my computer down at all, and the low hitpoint shader is extremely useful and is something I don't want to do without.

eronarn
Thalore
Posts: 161
Joined: Sun Jan 02, 2011 8:38 pm

Re: [b35] massive computer slowdown with confusion

#6 Post by eronarn »

I get this with just the confusion and invisibility shaders on Ubuntu.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [b35] massive computer slowdown with confusion

#7 Post by darkgod »

THen you can instead edit the shaders themselves, comment/remove the if controlling blur/invis/... from the, so your game wont invalidate.
It's in data/gfx/shaders/main_fbo.frag
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: [b35] massive computer slowdown with confusion

#8 Post by tiger_eye »

darkgod wrote:THen you can instead edit the shaders themselves, comment/remove the if controlling blur/invis/... from the, so your game wont invalidate.
It's in data/gfx/shaders/main_fbo.frag
Yeah, I know. The above patch was faster to make and test (about 2 minutes) than the addons attached below (about 5 minutes).

So, if you want to use shaders but don't want the fullscreen blurring effects that occur with confusion and invisibility, then download one of the attached addons below (for b35 or for b36), unzip it, then put the resulting folder in "game/addons/". Viola! That's it! This will most likely work for future versions too, you'll just need to modify the version number in the file "tome-no_screen_blur/init.lua".

One final note: if you turn off shaders completely, then the game will most likely feel "snappier", but you'll miss out on some useful shaders like the low hitpoint warning (which I view as a lifesaver!).
tome-no_screen_blur-b35.zip
(2.99 KiB) Downloaded 86 times
tome-no_screen_blur-b36.zip
(2.98 KiB) Downloaded 93 times

malboro_urchin
Archmage
Posts: 393
Joined: Thu Dec 12, 2013 7:28 pm

Re: [b35] massive computer slowdown with confusion

#9 Post by malboro_urchin »

I know this thread is ancient, but I'm having issues with the game's confusion shader; whenever I get confused, my frame rate tanks. I have yet to use Lightning Speed or Invisibility, but those would probably cause similar issues. I don't want to invalidate my game, but after finally figuring out how to access the shaders, I can't figure out which lines to comment out for invisibility, lightning speed, & confusion.
Mewtarthio wrote:Ever wonder why Tarelion sends you into the Abashed Expanse instead of a team of archmages lead by himself? They all figured "Eh, might as well toss that violent oaf up in there and see if he manages to kick things back into place.

Post Reply