1.1.02

News about GZDoom.

Moderator: Graf Zahl

User avatar
ChupaReaper
Posts: 202
Joined: Fri Jun 15, 2007 16:35
Location: England
Contact:

Post by ChupaReaper »

So what exactly will his garbage collector do or more how does it do it?
Will it make rendering a large sector full of models any faster?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

No, not at all. All it does is to distribute a time consuming task over a larger period of time so that its impact on performance is less - but you really need lots of actors in a map to see it.
User avatar
ChupaReaper
Posts: 202
Joined: Fri Jun 15, 2007 16:35
Location: England
Contact:

Post by ChupaReaper »

I've tested a map which has a LOT of actors in and though it is quicker, it still lags to hell hen I enter the main area full of models and particles... I'll add a feature suggestion for this! :D
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Of course it lags! If you ignore all design advice for Doom maps don't be surprised if that happens.
User avatar
ChupaReaper
Posts: 202
Joined: Fri Jun 15, 2007 16:35
Location: England
Contact:

Post by ChupaReaper »

I know, I'm bad for when it comes to making huge maps, I've made a map to support an actor with 3840 radius and 2960 height! Not too laggy though and a very fun boss...
User avatar
Rex Claussen
Developer
Developer
Posts: 2600
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

Sector_SetLink - wouldn't this require an updated version of ACS? I just tried to put it into an OPEN script and got the following error message:

$.acs:38: Function sector_setlink is used but not defined.
$.acs:39: Function sector_setlink is used but not defined.
Host byte order: LITTLE endian

I'm not in a hurry to implement this special, but I'm guessing that I'll have to wait until a new ZDooM & ACS release?
Costja
Posts: 59
Joined: Thu Sep 08, 2005 20:02
Contact:

Post by Costja »

User avatar
Rex Claussen
Developer
Developer
Posts: 2600
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

Costja wrote:Use this zspecial.acs - http://mancubus.net/svn/hosted/zdoom/ac ... pecial.acs
Curious. I looked in mancubus.net for a compiled version of the ZDooM SVN but didn't look for the revised ACS code. Thanks for the link; I don't get the script compiling error now.

I'm beginning to think that Sector_SetLink is not intended for 3D sectors. I have tried various combinations of the 'Flat' and 'Type' values, linked different sectors, but to no avail. The sectors move independently when blocked. The worst part is that the real floor or real ceiling (depending on the flat & type values) of the 3D platform sectors move in addition to the platform sectors themselves.

Graf, can this special be used with 3D rising/lowering platforms? If so, it would greatly help me if you (or anyone else reading this post) could whip out a simple example using a 3-sector platform (outer sector is a border, middle sector is the main area of the platform, and inner sector is the "piston" - only the outer and middle sectors are 3D). Thanks.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

You have to link the control sector for the 3D-floors, not the 3D-floors themselves.
User avatar
Rex Claussen
Developer
Developer
Posts: 2600
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

Graf Zahl wrote:You have to link the control sector for the 3D-floors, not the 3D-floors themselves.
That is what I did originally, before I tried linking the in-game sectors to themselves. [Obviously linking the in-game sectors to themselves messes up the in-game floors and ceilings (as I reported above), and is not the way to go.]

What do I do if all the control sectors have the same tag number (which is how I currently have it)? Should I simply give them separate tag numbers and link the various control sectors together? This is where I'm having a problem understanding how this works - am I supposed to link the control sectors to each other, or am I supposed to link the control sector to the in-game sectors?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

You are supposed to link the control sectors for the 3D floors to one master sector that performs the actual movement.

That master sector can be any moving part of your construct or if that doesn't work as intended, even another off-map control sector.
User avatar
Rex Claussen
Developer
Developer
Posts: 2600
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

Well, I've tried everything suggested here and it's just not working for my platform. At any rate, I have created an example wad, which is attached. The platform to the West (i.e., the red-bordered one) works the way intended for a platform, except if it meets an obstruction (i.e., Sector_SetLink is not used). Try ducking under the platform while it is lowering to see what happens. You can crawl out from under it to allow the platform to descend.

The platform to the East (i.e., the blue-bordered one) uses Sector_SetLink and a 'Master" sector that controls the movement. In this case the platform does not move at all. I have tried varying the argument values ('type' & 'flat') but if the platform moves it does so in funky ways.

Would you please modify the wad to demonstrate the proper way to use linked sctors, and post it back? Thanks.
Attachments
GZ_Plat1.zip
Sample wad with moving platforms
(5.8 KiB) Downloaded 268 times
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Sure, when I find the time (should be over the weekend) I'll do.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Ok, here's your script.

Code: Select all

#include "zcommon.acs"

script 1 OPEN 

{ 
	Sector_SetLink (202, 131, 0, 3);
	Sector_SetLink (202, 200, 0, 3);
	Sector_SetLink (202, 201, 0, 3);
	Sector_SetLink (202, 134, 0, 1);
} 

script 11 (void)
{
	FloorAndCeiling_LowerByValue (2, 8, 128);
	Floor_LowerByValue (1, 8, 128);
	Delay(const:35*5);
	FloorAndCeiling_RaiseByValue (2, 8, 128);
	Floor_RaiseByValue (1, 8, 128);
	TagWait(2);
	TagWait(1);
}

script 12 (void)
{
	Floor_LowerByValue (202, 8, 128);
	Delay(const:35*5);
	Floor_RaiseByValue (202, 8, 128);
	TagWait(202);
}
It doesn't do any crushing. For that you have to do a few more changes:

- Link everything to the ceiling instead of the floor
- Change the control sector so that there's enough space for the lowering ceiling
- Replace Floor_LoverByValue with something that lowers the ceiling and can do crushing

And you may want to add some tagwaits here because otherwise your lift will be stuck forever once it gets blocked.
User avatar
Rex Claussen
Developer
Developer
Posts: 2600
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

I tried the new Script 12, and the linked sectors work as one when blocked, and once I crawl out from under the platform. However, once they are lowered they do not rise again. Pressing the switch a second time simply makes them disappear into the floor.

I did add the TagWaits, as follows:

TagWait(200);
TagWait(201);
TagWait(202);
TagWait(131);
TagWait(134);

I modified the script to make it:

FloorandCeiling_LowerByValue (202, 8, 128); and
FloorandCeiling_RaiseByValue (202, 8, 128);

but that did not help. I tried it again with some of the TagWaits commented out (although I would imagine that is contrary to what needs to be done), but that didn't do anything either.

EDIT: Incidentally, 'Type' value 3 is not described in the wiki. Where is that coming from? Is it Type 1+ Type 2? That's the only way I can figure it.
Locked

Return to “News”