07-01-15, 20:39 | #1091 |
Member
Joined: Aug 2010
Posts: 1,810
|
Thank you very much guys, I have added a patch which should fix console input. I've chosen Tonttu's solution, as it seems SO simple, and SDL already supports raw text input... much cleaner and easy solution!
Also, I have done a simple patch which should give you an idea what I'm going to do with OpenTomb trigger system. You remember that in TRs, almost all sector properties were originally stored as a chain of FloorData functions, and beforehand, OpenTomb used this legacy system. Now I'm going to change that; instead of storing deprecated FloorData chain, we're migrating sector properties (as climb flags, death flag, minecart left/right, trigger triggerer and beetle marks, footstep sounds etc.) to flag bitfield directly stored in sector structure. This will be much more intuitive and simple solution, as we can check sector properties without re-parsing floor data every time. Additionally, we'll finally be able to resolve known TR3/4 function index conflict - in TR3, functions 0x14 and 0x15 were reserved for minecart railway flags, while in TR4 they were re-used for trigger triggerer and beetle flags. As for trigger floordata functions, these are going to be re-interpreted to Lua function array with IDs similar to FloorData index - this way, we'll get rid of FloorData itself while reusing sector's FD index as a reference to Lua trigger function array. Voila! Now I only should have a bit of patience to program all that stuff... Last edited by Lwmte; 07-01-15 at 20:43. |
07-01-15, 22:31 | #1092 |
Member
Joined: May 2010
Posts: 256
|
That's great! Gonna pull ASAP!
And you know, things sound very cool when they're addressed like that Can't wait for more amazing features! I think I'm gonna mess a bit with the GUI if no problem for everyone... After all, that'd be one of the few things I might be actually capable of doing at the moment. Oh, almost forgot: do you guys have any kind of IRC/email thread/stuff where you talk on the project or you just email singular people when needed? Last edited by Nickotte; 07-01-15 at 22:35. |
07-01-15, 23:03 | #1093 | ||
Member
Joined: Aug 2010
Posts: 1,810
|
I've just pushed another small patch which fixed a bug with stray backquote printed on console exit. It still prints tilde if pressed with shift, but I left it as it is for now.
Quote:
Quote:
|
||
08-01-15, 01:02 | #1094 |
Member
Joined: May 2010
Posts: 256
|
It seems to be doing it with '\' in my layout. Is it possible to fix it without removing the possibility to print '\' (or other keys) in other layouts?
Last edited by Nickotte; 08-01-15 at 01:46. |
08-01-15, 03:42 | #1095 |
Member
Joined: Aug 2010
Posts: 1,810
|
Well... I suspected that such straightforward way of dealing with keycodes won't work... I can only think of checking scancode or simply clear console input on close. I'll try to fix that.
By the way... When trying of re-organizing trigger parser, I got REALLY annoyed by ultra-complicated level loading function (TR_GenWorld) and decided to make it more logical and simple. And, in the process, I have finally found water scheme, alternate room and group properties for TR5 levels! Minus three other unknown parameters. Check out changes in VT loader! Last edited by Lwmte; 08-01-15 at 04:31. |
08-01-15, 14:25 | #1096 |
Member
Joined: Apr 2013
Posts: 343
|
OMG, this is great news! I'm looking forward to the whole trigger system Keep up this amazing engine, guys. From now, this is the best custom engine ever Good luck and I will keep my fingers crossed for this amazing project
|
08-01-15, 22:50 | #1097 |
Member
Joined: Aug 2010
Posts: 1,810
|
I'm prototyping trigger parser slowly but steady, but there are few things that I've stumbled upon. Basically, it's very obscure TR trigger workflow. Particularly:
1. Infamous one shot flag. I clearly remember that it doesn't act as it should, i. e. it WON'T make ALL trigger commands execute once; instead, only few commands are affected, which are they? And, on contrary, which commands are not affected by one shot flag? 2. Switch trigger, when switch is un-pulled, basically does the same thing as ANTITRIGGER function? 3. One-way switch... how to accomplish that? I suppose, make switch trigger one-shot, but I want to be sure... Also I have some questions regarding TR4's trigger triggerer (which is a uber-cryptic invention by Core Design, additionally complicated by ridiculous trigger chain layout involving ex-MINECART function ), but I'll leave it for later, as I just want to make basic trigger functions for now. |
08-01-15, 23:25 | #1098 |
Member
Joined: Jul 2012
Posts: 4,286
|
TRIGGER will always make something "on" (open door), ANTI-TRIGGER will always make something "off" (close door), and repeatedly running on them does nothing as you're re-triggering a door to be open that is already open and vice versa. Wheras the SWITCH trigger acts as both, changing the state from on to off and back again depending on which state the switch object it is linked to is, and allows the triggers to be repeated indefinitely.
If you place a switch and only activate it with a TRIGGER rather than a SWITCH lara will only be able to pull it once. Trigger-Triggerer as i understand it is a very roundabout way of controlling when lara can activate a trigger. The trigger-triggerer, when placed over a normal trigger, will disable it, allowing the player to run over it again and again without activating it. The player needs to trigger the trigger-triggerer to remove it, only then can they trigger the original trigger. |
09-01-15, 00:18 | #1099 |
Member
Joined: Aug 2010
Posts: 1,810
|
I just checked TR4 engine with a test level built in Dxtre3d, and it seems some strange stuff is going on.
First of all, I have placed two SWITCH triggers with reference to two different switches, but activating the same door. Also, one of these triggers was set to one shot, while another was not. When I pushed non-one-shot switch back and forth, door was opening and closing as usual, then I left door in opened state (hence pushed non-one-shot switch) and additionally pushed one-shot switch. Door closed, altough both switches were now in pushed state, and - most interesting - I wasn't able to re-open door with non-one-shot switch! This leads me to a conclusion that one-shot flag actually modifies internal movable flag which prevents to change its state again, no matter if by the same trigger or not - hence, any movables activated with one-shot trigger can't be deactivated again. And, regarding switch state vs. movable state - looks like it acts simply as "bit flip", i. e. any change in switch state produces inversion of movable state. As for keyhole trigger - it seems to only activate movable, i. e. it's rather "bit set" than "flip". I suppose, one shot flag and "anti-" trigger types doesn't affect any commands except movable activation? I. e. if I put CD trigger for ANTITRIGGER type, it will play it anyway, if I put END_LEVEL trigger for it, level will end, etc. What about HEAVY trigger/antitrigger? Is there any info on which item types can activate it? I know heavy triggers are activated by rollingballs, baddies and flyby cameras with specific flag set, maybe something else? |
09-01-15, 00:31 | #1100 |
Member
Joined: May 2010
Posts: 256
|
What if the trigger doesn't simply comply the opening/closing action of the door, but writes a state to the door whenever the trigger activates, thus having the engine to be continuously reading the state and only after that, complying the action?
This way, the one-shot trigger would be continuously writing the "open-to-be" state to the door, and while the non-one-shot tries to write other states, they are immediately overridden by the one-shot one. Just another way to look at it, I guess But I don't know anything else on how it works, so I may be wrong. |
Thread Tools | |
|
|