Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Redxone

SwitchTracker - No more hunting for switches! (Now with a Minimap)

Recommended Posts

Man, I really need this, I think. 50 % of my playtime of every wad is spent hunting switches. :O

Share this post


Link to post

Question: does it work with new switches that get added by SetLineSpecial? And could it be extended to show things on the map which also have specials assigned to them?

Share this post


Link to post
2 hours ago, Nems said:

I need to try this with Eternal Doom one day. :D

 

That was the first WAD that came to my mind as well.

Share this post


Link to post
5 hours ago, Nevander said:

Question: does it work with new switches that get added by SetLineSpecial? And could it be extended to show things on the map which also have specials assigned to them?

 

If a new switch is added to the map you can go into the options menu and press "Apply" to refresh all found switches.

 

Yeah, showing things with specials should be possible (via Actor iterator).

Share this post


Link to post

Nice, this is a great idea for switch-hunt levels.

 

Don't forget to post it on the ZDoom forums as well. XD

Share this post


Link to post

I wonder if you can program guide bots in ZScriot too. By this I mean a way to find which switches are accessible from your position (and also worth pressing, not just doors leading nowhere), and an actor to lead you to them. 

Share this post


Link to post
2 hours ago, printz said:

I wonder if you can program guide bots in ZScriot too. By this I mean a way to find which switches are accessible from your position (and also worth pressing, not just doors leading nowhere), and an actor to lead you to them. 

 

No guide bots as of yet but i just added the option to only show linedefs that do specific things.

Share this post


Link to post

Big 

On 8/28/2018 at 3:04 AM, KVELLER said:

I'm not using this, but it's amusing to me that someone made it.

 

And it took so long until someone made it.

 

Big thumbs up.

Share this post


Link to post

Cool mod! Just to note though, there's a pretty severe and incredibly easy to fix performance problem. On Ancient Aliens MAP12, in the starting shot, I get a drop from ~325 FPS without your mod to ~55 FPS with it. I looked at your code for a bit and this is the culprit:

			for (int i = 0; i < Level.Lines.Size(); i++)
			{
				Line ln = Level.Lines[i];
				if( !(ln.flags & Line.ML_MAPPED) && !CVar.FindCVar("strkr_mapshowall").getBool() ) continue;

This wastes a hell of a lot of time by re-accessing the CVar every single iteration. Since it's not going to change, this will bring a significant FPS boost:
 

			bool dontShowAll = !CVar.FindCVar("strkr_mapshowall").getBool();
			for (int i = 0; i < Level.Lines.Size(); i++)
			{
				Line ln = Level.Lines[i];
				if( !(ln.flags & Line.ML_MAPPED) && dontShowAll ) continue;

On my computer, this brings it from ~55FPS to ~195FPS, so a very significant increase.

Share this post


Link to post
On 8/30/2018 at 7:33 AM, Gutawer said:

Cool mod! Just to note though, there's a pretty severe and incredibly easy to fix performance problem. On Ancient Aliens MAP12, in the starting shot, I get a drop from ~325 FPS without your mod to ~55 FPS with it. I looked at your code for a bit and this is the culprit:


			for (int i = 0; i < Level.Lines.Size(); i++)
			{
				Line ln = Level.Lines[i];
				if( !(ln.flags & Line.ML_MAPPED) && !CVar.FindCVar("strkr_mapshowall").getBool() ) continue;

This wastes a hell of a lot of time by re-accessing the CVar every single iteration. Since it's not going to change, this will bring a significant FPS boost:
 


			bool dontShowAll = !CVar.FindCVar("strkr_mapshowall").getBool();
			for (int i = 0; i < Level.Lines.Size(); i++)
			{
				Line ln = Level.Lines[i];
				if( !(ln.flags & Line.ML_MAPPED) && dontShowAll ) continue;

On my computer, this brings it from ~55FPS to ~195FPS, so a very significant increase.

 

Wow, I had no idea it'd be that easy to fix the performance issue!

Thanks.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×