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
#78
RE: Amnesia: The Second Dimension [Not out of the woods yet...]

I decided to take a scientific approach to this. Over the last week, all of my free time at home has been spent doing experiments. Setting up test maps, using control groups, tweaking variables and processes, recording and comparing results. I don't know anything about statistical significance or any of that malarky, but, as of tonight I can make a few conclusions that I'm 99.9% sure are accurate. (Some of this has already been said.)

1) There is a limit on callbacks as discussed.

2) This includes timers.

3) Once the limit is passed, the engine will crash at the next load. However, it's possible to go way over the limit before loading. That's why it sometimes seems like the limit is ~65k. But using short tests and frequent loading over long periods of time, I've pinned it down as closer to ~58,300, or ~61,700 if OnStart(), OnEnter() and OnLeave() count as callbacks.

I don't know what the significance of these numbers is, unless it's 65,535 with some kind of deduction.

4) This is the important (and disappointing) part. This is not a limit on the number of callbacks (event listeners) you can add. It's a limit on the number of callbacks getting called.

To clarify, if you set up an empty map with two entities and used AddEntityCollideCallback() just once, with no other script, if the entities collide more than about 58,000 times then the engine will crash the next time it loads a map.

5) As well as relying on collision callbacks for all kinds of puzzles and gameplay features, the "timerless loop" uses 60 collision callbacks per second. All this is why almost entirely getting rid of timers made the mod last longer before crashing, but since it still relies heavily on callbacks, it mounts up to over 58k easily in about 15 minutes of play.

6) I really don't know what to do about this.

03-11-2015, 01:57 AM
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 [Not out of the woods yet...] - by MrBehemoth - 03-11-2015, 01:57 AM



Users browsing this thread: 1 Guest(s)