Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 5 Vote(s) - 4.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Amnesia: The Second Dimension [READY FOR LAUNCH]
MrBehemoth Offline
Senior Member

Posts: 408
Threads: 19
Joined: Feb 2014
Reputation: 40
#68
RE: Amnesia: The Second Dimension [SERIOUSLY?!?!]

Got the day off work today, so I've been able to spend the morning experimenting, and after a few hours I finally got somewhere...

I've tried a few different ways to make a loop using callbacks: buttons, multisliders, even looked into a zero length model animation, but none of those worked for various reasons. Then I decided to take another look at the collision callback method. After some tinkering I realised why the callback wouldn't stick and had to be re-applied.

Assuming that the engine "thinks" at 60Hz or fps or whatever, it can't recognise that an entity has stopped colliding until at least the next frame after it started colliding. So when using Amn's method, the enity is already back at the first area before the engine notices that it is gone. Removing and re-adding the callback forces it to re-notice the collision. I tried using 3 and even 4 areas, cycling the entity between them, but it was always back at the first one before the engine had time to "think" and noticed that it was gone. (Which is also why it doesn't appear to move at all, visually.)

So then I tried using just one callback for a single area, detecting when the entity goes in and out of it...... Bingo! This method works, loops as long as you need it to and only requires 1 permanent callback. It clocks almost exactly 60Hz (slightly faster, 60.011666...Hz after 10min) and doesn't cause a crash on (un)loading. Cool

Now, I'm not going to get too excited until I've implemented it in the mod and playtested it... but keep your fingers crossed...

It you want to verify it, the map is attached below but SCREEN BURN WARNING don't try it with a visible entity and don't uncomment line 43 so that each loop displays a message. I left it running like that for 10 min and it burned a flickering box and column of messages on my screen. Luckily 45 min of screen cleaner video faded it out. Confused

Ps. Sorry for double posting - I'm aware that I do that a lot. I figured it's ok if there's something new to say. If it's not ok just let me know.


Attached Files
.rar   looptest.rar (Size: 2.84 KB / Downloads: 128)

(This post was last modified: 02-24-2015, 12:54 PM by MrBehemoth.)
02-24-2015, 12:52 PM
Find


Messages In This Thread
RE: Amnesia: The Second Dimension - by Romulator - 09-07-2014, 03:01 AM
RE: Amnesia: The Second Dimension - by Mudbill - 09-07-2014, 03:13 AM
RE: Amnesia: The Second Dimension - by MrBehemoth - 09-07-2014, 12:42 PM
RE: Amnesia: The Second Dimension - by Streetboat - 09-07-2014, 05:56 AM
RE: Amnesia: The Second Dimension - by Slanderous - 09-07-2014, 11:36 AM
RE: Amnesia: The Second Dimension - by Rapture - 09-07-2014, 08:29 PM
RE: Amnesia: The Second Dimension - by MrBehemoth - 09-07-2014, 08:47 PM
RE: Amnesia: The Second Dimension - by Neelke - 09-07-2014, 08:42 PM
RE: Amnesia: The Second Dimension - by AGP - 09-07-2014, 09:11 PM
RE: Amnesia: The Second Dimension - by MrBehemoth - 09-08-2014, 06:18 PM
RE: Amnesia: The Second Dimension - by MrBehemoth - 09-27-2014, 01:10 AM
RE: Amnesia: The Second Dimension - by Viper85626 - 09-27-2014, 01:38 AM
RE: Amnesia: The Second Dimension - by MrBehemoth - 11-01-2014, 04:21 PM
RE: Amnesia: The Second Dimension [SERIOUSLY?!?!] - by MrBehemoth - 02-24-2015, 12:52 PM



Users browsing this thread: 4 Guest(s)