Pages: [1]
  Print  
Author Topic: The status of func_train  (Read 3711 times)
sago007
Posts a lot
*

Cakes 61
Posts: 1648


Open Arena Developer


WWW
« on: December 04, 2016, 10:16:13 am »

Some years ago Akom74 posted this: http://openarena.ws/board/index.php?topic=4957.0

At that point I was a bit busy but now I have followed up on it. The latest nighle gamecode build now has improved func_train usage.

If you want to test it you can try this modified version of Akom74's test map.

The train can now kill you and it will not get stuck.
There is a small prediction problem if you are standing on the train and the wall is pushing you back. Properly not notable in a fast paced match.

To see it in action you will need a nightly build from 2016-12-03 or later from here: https://files.poulsander.com/~poul19/public_files/oa/dev088/gamecode_nightly/ like this
Logged

There are nothing offending in my posts.
Akom74
Member


Cakes 9
Posts: 906


Q3A/OA Mapper


WWW
« Reply #1 on: December 04, 2016, 04:15:09 pm »

Thanks Sago.


 Wink


« Last Edit: December 04, 2016, 04:19:00 pm by Akom74 » Logged

...sorry for my English, i'm Italian... Tongue



Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #2 on: December 05, 2016, 02:27:18 am »

It should however be noticed that the (very welcome) fix will not apply to any existing mod.

PS: Sago, do you plan to also add trains the ability to emit sounds, maybe?
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #3 on: December 05, 2016, 04:06:37 am »

Sago, I just tried your version of the test map, with OAX nightly build 2016-12-03.
I can "spectate", but when I try to join a team, the server crashes with "ERROR: Bad cgame system trap: 112".

Uhm... it looks like the error happens with ANY map, not only this one, with 0.8.8 binaries (and the gamecode mentioned above). It seems to work correctly with nightly builds binaries, instead...
I'm confused...

UDPATE: Now that I think about it, may it be because I had cg_leiEnhancement active? That is not related to trains, and the oa3 version of it requires a new particle system Fromhell developed in engine, IIRC. I cannot test it now...

There is a small prediction problem if you are standing on the train and the wall is pushing you back. Properly not notable in a fast paced match.
Do you refer to the fact that the train still seems to be "shaking" a little when it's pushing you?
« Last Edit: December 07, 2016, 01:03:08 am by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #4 on: December 05, 2016, 07:15:23 am »

Done a few more tests.
- When the train kills you, for the time the train occupies the same space as you(r deathcam?), your screen shakes.
- One has to be careful when making the path of the train: if it's not perfectly horizontal (going also a very little down while moving), the train will squish you instead of pushing you (if you are in front of it). But the warning was also true before the changes: simply, before you blocked the train instead of being killed. Proably it's ok this way.
- When there are two players on the train and they touch each other, it is very likely than one of the two will be squished. But again, before this caused the train to freeze.

I attach a copy of my testbox.map including a very simple train to check it. The train goes perfectly horizontal for the first part, then a path_corner is slightly above the other two.
Side note: while doing these tests, I noticed had an old testbox.pk3 in my basepath/baseoa folder. While having sv_pure 0 in both cases, for some reason OA 0.8.8 engine loaded the one from the pk3, while nightly build engine loaded the "new" .bsp outside from it. Is this expected?
« Last Edit: December 05, 2016, 08:30:18 am by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 61
Posts: 1648


Open Arena Developer


WWW
« Reply #5 on: December 05, 2016, 01:09:59 pm »

UDPATE: Now that I think about it, may it be because I had cg_lenhancements active? That is not related to trains, and the oa3 version of it requires a new particle system Fromhell developed in engine, IIRC. I cannot test it now...
cg_lenhancements requires a binary with support for the particle system and the new traps.

- When the train kills you, for the time the train occupies the same space as you(r deathcam?), your screen shakes.
This seems to be caused by your low train. I believe the game tries to move you on top of the platform because it sees it as a low step.

- One has to be careful when making the path of the train: if it's not perfectly horizontal (going also a very little down while moving), the train will squish you instead of pushing you (if you are in front of it). But the warning was also true before the changes: simply, before you blocked the train instead of being killed. Proably it's ok this way.
- When there are two players on the train and they touch each other, it is very likely than one of the two will be squished. But again, before this caused the train to freeze.
Is this not the case with a normal crusher?

Side note: while doing these tests, I noticed had an old testbox.pk3 in my basepath/baseoa folder. While having sv_pure 0 in both cases, for some reason OA 0.8.8 engine loaded the one from the pk3, while nightly build engine loaded the "new" .bsp outside from it. Is this expected?
I find the load order completly unexpected although most of my disagreement are a result of the homepath implementation.
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #6 on: December 05, 2016, 04:13:08 pm »

UDPATE: Now that I think about it, may it be because I had cg_lenhancements active? That is not related to trains, and the oa3 version of it requires a new particle system Fromhell developed in engine, IIRC. I cannot test it now...
cg_lenhancements requires a binary with support for the particle system and the new traps.
Isn't it possible to somehow detect the problem and automatically turn off cg_leinhancement in that case? Or somehow provide an error message telling user to turn it off? Otherwise people with third party binaries (iirc, some Linux distros start from ioquake3 engine instead of oa engine) would get a crash with very little clue about its reason.
Quote
- When the train kills you, for the time the train occupies the same space as you(r deathcam?), your screen shakes.
This seems to be caused by your low train. I believe the game tries to move you on top of the platform because it sees it as a low step.
I'll try with an higher train in the next days. However a thin platform train is something that may happen.

Quote
- When there are two players on the train and they touch each other, it is very likely than one of the two will be squished. But again, before this caused the train to freeze.
Is this not the case with a normal crusher?
Probably. But while it's more expected when the train is "pushing" you, maybe  it's less expected when the train is just "carrying" you (from a player pov). However I can guess that modifying this behavior may be hard. Doesn't matter.

Quote
Side note: while doing these tests, I noticed had an old testbox.pk3 in my basepath/baseoa folder. While having sv_pure 0 in both cases, for some reason OA 0.8.8 engine loaded the one from the pk3, while nightly build engine loaded the "new" .bsp outside from it. Is this expected?
I find the load order completly unexpected although most of my disagreement are a result of the homepath implementation.
Do you mean you will give a quick look to that? Maybe it has got sense to use a .bsp instead of a .pk3 (with sv_pure off, of course)...
« Last Edit: December 07, 2016, 05:44:43 am by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 61
Posts: 1648


Open Arena Developer


WWW
« Reply #7 on: December 06, 2016, 12:16:07 pm »

Isn't it possible to somehow detect the problem and automatically turn off cg_leinhancement in that case? Or somehow provide an error message telling user to turn it off? Otherwise people with third party binaries (iirc, some Linux distros start from ioquake3 engine instead of oa engine) would get a crash with very little clue about its reason.
No. Also it is not our problem that people use different engines.

Quote
I'll try with an higher train in the next days. However a thin platform train is something that may happen.
Fixing it might break it for trains moving up and down.
Come to think of it... I have only tested on horizontal trains... testing vertical trains could be relevant.

Quote
But while it's more expected when the train is "pushing" you, maybe  it's less expected when the train is just "carrying" you (from a player pov). However I can guess that modifying this behavior may be hard. Doesn't matter.
It will be hard but it may be fixable. The reason I asked about the normal crusher is that fixing this will likely effect other movers as well.
Does it happen in any directions?

Quote
Do you mean you will give a quick look to that?
No. The day I look at the load order system is the day I rewrite it and I don't have the resources for that.
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #8 on: December 06, 2016, 02:38:47 pm »

Isn't it possible to somehow detect the problem and automatically turn off cg_leinhancement in that case? Or somehow provide an error message telling user to turn it off? Otherwise people with third party binaries (iirc, some Linux distros start from ioquake3 engine instead of oa engine) would get a crash with very little clue about its reason.
No. Also it is not our problem that people use different engines.
Oh. But then, what's with those things about pairing engine and gamecode being a bad thing we were discussing a few weeks ago? :-/

For the other things, I will try helping the little I can by doing some more tests... (e.g. what happens when two players touch each other while standing over an horizontally bobbing platform).
« Last Edit: December 06, 2016, 02:52:07 pm by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 61
Posts: 1648


Open Arena Developer


WWW
« Reply #9 on: December 06, 2016, 03:23:04 pm »

Oh. But then, what's with those things about pairing engine and gamecode being a bad thing we were discussing a few weeks ago? :-/
I don't like it and I hope that there won't be more of those.
They are expensive to maintain.
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #10 on: December 07, 2016, 05:20:37 am »

Quote
I'll try with an higher train in the next days. However a thin platform train is something that may happen.
Fixing it might break it for trains moving up and down.
I tried making the platform thicker, and the deathcam shake problem did not happen then. Thin platforms may exist and cause this odd effect, but if you say that fixing it may cause further problems...

Quote
Quote
But while it's more expected when the train is "pushing" you, maybe  it's less expected when the train is just "carrying" you (from a player pov). However I can guess that modifying this behavior may be hard. Doesn't matter.
It will be hard but it may be fixable. The reason I asked about the normal crusher is that fixing this will likely effect other movers as well.
Does it happen in any directions?
With some more testing:
- It looks like two players standing on the train do cause one of them to die if they touch each other (not always at first touch) in these cases:
-- If they are near to a lateral wall of the train, even if the train is going perfectly horizontally (which wall becomes dangerous depends from the direction of movement in that moment. This also applies to the roof of the train if the train is going vertically down and you try to jump over the head of the other player).
-- If the train is moving both horizontally and vertically at once (up or down seems to be the same), also in case they are far from a lateral wall of the train.

I haven't checked if a player blocks another one against a normal wall the train passes near, but I can guess the results would be similar...
UPDATE: I tried adding a solid bar on the path the train follows, in the horizontal part of the movement. When the players on the train, touching each other, reached that bar, it looks like both become pushed by it (or to say differently, "sliding" on the train), falling from the train at the end if the train had no wall behind them; or first become pushed by the bar (sliding on the train) and being crushed at the end if the train included a wall behind them. I don't know if I've been clear enough. However, I can guess this behavior is correct. If the bar instead is placed in a place where the train is moving both vertically and horizontally at the same time, even a single player becomes immediately crushed as soon as he touches it (even if touching it by the lateral side! However, with previous gamecode, it caused the train to stop, so this is a result of that). That bar is not in testbox.map I attached here this morning, however you can add one very quickly if you wish to test.

Then I tried with an x-axis (horizontally) moving func_bobbing:
- If they are near to a lateral "wall" of the bobbing, a player can kill the other one by blocking him against that wall (depending from current direction of movement).
- If they are not near to lateral "walls", it looks like they can touch each other safely. Unlike func_train, func_bobbing cannot move both horizontally and vertically at the same time, so the most "dangerous" part does not apply.

I also tried with a func_pendulum. If player A blocks B against it, B immediately dies. Side note: I noticed that the pendulum "pushes" dropped weapons, and passes through them if it can't (just for completeness).

I also tried with a func_door (door had "start open" and "crusher" spawnflags... and placed so the only way of crushing someone is blocking him personally). If player A blocks B against it, B dies, but it is not so immediate: the door "shakes" for some time before crushing the player.

If you wish, you can use the testbox.map attached to this post: stuff relevant for these tests (the train, the bobbing, the pendulum and the door) do have the orange/black texture. The train now moves horizontally and then vertically. If you wish to test horizontally+vertically at the same time, you can just move the corner named "target2a".

Then, what more to say? Just some random thoughts:
- Maybe having the train stopping (without shaking) when blocked by players and the crusher feature being optional may have been a possibility (e.g. considering existing documentation reports that trains are stopped by players), but I think on the Discord server you said something about some problems with its spawnflags, I don't remember exactly. (If spawnflags are not available, maybe an "unstoppable/1" key/value pair? Just a thought!).
- This is more a "note" than a "thought". Searching for more "crusher" entities, I found a note (probably I wrote) about "rotating" objects (func_rotating):
Quote
Like it happens with "trains", the rotating object will push a player if he's in its way, but if a player in front of it is blocked by a wall or by another player, the rotating object will stop there, shaking (player will not be crushed).
- I hope I have not been too much boring...
« Last Edit: December 07, 2016, 07:15:46 am by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 61
Posts: 1648


Open Arena Developer


WWW
« Reply #11 on: December 07, 2016, 02:27:20 pm »

- I hope I have not been too much boring...
It was quite interesting. It gives me an idea of how things work and possible where I can look for solutions.
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #12 on: December 07, 2016, 03:30:47 pm »

- I hope I have not been too much boring...
It was quite interesting. It gives me an idea of how things work and possible where I can look for solutions.
When considering if and how to fix something about this stuff, we should also consider that fixing "too much" may cause even more problems when playing "new" maps with old mods.
Example: it looks like there are some problems with items spawning along the path of the train (maybe not re-spawning later), but since there are also problems with previous gamecode (maybe blocking the train), it may be better to do not fix that, to not encourage maps with items spawning in the path of trains...
« Last Edit: December 07, 2016, 04:40:22 pm by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 61
Posts: 1648


Open Arena Developer


WWW
« Reply #13 on: December 07, 2016, 03:56:16 pm »

Example: it looks like there are some problems with items spawning along the path of the train (maybe not re-spawning later), but since there are also problems with previous gamecode (maybe blocking the train), it may be better to do not fix that, to dot encourage maps with items spawning in the path of trains...
Yes, the spawn point are properly deleted once hit by the train. Should return the CTF flags though that is the most important.
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #14 on: December 07, 2016, 04:42:03 pm »

Example: it looks like there are some problems with items spawning along the path of the train (maybe not re-spawning later), but since there are also problems with previous gamecode (maybe blocking the train), it may be better to do not fix that, to dot encourage maps with items spawning in the path of trains...
Yes, the spawn point are properly deleted once hit by the train. Should return the CTF flags though that is the most important.
And what's with other kinds of entities, such as player spawn points and obelisks?
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #15 on: December 09, 2016, 02:51:30 am »

Tested behavior of func_bobbing with dropped weapons... it pushes them, and if they are blocked by something, it passes through them.
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 61
Posts: 1648


Open Arena Developer


WWW
« Reply #16 on: December 09, 2016, 10:34:15 am »

The thing about func_bobbing was quite interesting. It uses a different approach (also with instant death) that might be closer on how func_trains should work.
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #17 on: December 09, 2016, 12:31:17 pm »

The thing about func_bobbing was quite interesting. It uses a different approach (also with instant death) that might be closer on how func_trains should work.
If you want a func_bobbing which passes through a wall to do a test, you can use my testbox map here: http://openarena.ws/board/index.php?topic=1908.msg54494#msg54494 (you have to compile it)...
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 61
Posts: 1648


Open Arena Developer


WWW
« Reply #18 on: December 11, 2016, 02:33:34 pm »

I have changed the train to work more like func_bobbing. Should be available from a nightly build soon.

I do believe that all bugs remain (I know that the moving down train still kills you) but items are now pushed or passed through instead of destroyed. Plus it uses fewer code lines.
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #19 on: December 12, 2016, 07:10:15 am »

I'll give it a try in the next days.. :-)
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #20 on: December 13, 2016, 01:27:34 am »

Tried, it looks like it's okay for me.  Smiley

About players instead, I'm still not 100% sure that making it "crusher" by default (without the mapper specifying it) is the best way to deal with it: on one hand, bobbing already works that way; blocked trains may be not so nice looking even if not shaking; crushing avoids trains to be late Grin... on the other hand, documentation reports that trains are blocked and do not crush people; rotating objects do not crush; not sure if it may be considered "nottodo" stuff or not. I don't know... I would like to hear opinions from other people. Is someone out there? Neon Knight? Akom74? Fromhell? 1pixel? Anyone?

About the problem of becoming killed somehow too easy when the mover is moving both horizontally and vertically at the same time, I don't know what to tell you: it may be possible to fix it, but however existing mods will be broken forever, so maybe it's better do to not encourage making "diagonally" moving trains too much....
« Last Edit: December 13, 2016, 02:49:49 am by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Pages: [1]
  Print  
 
Jump to: