Engine class refactoring (Task #19)

Everything about development and the OpenMW source code.
Post Reply
User avatar
Zini
Posts: 5533
Joined: 06 Aug 2011, 15:16

Engine class refactoring (Task #19)

Post by Zini » 29 Sep 2011, 08:11

I am done with both the tasks I had reserved for myself for 0.12.0 and I also finished the local script bug fix. But since the 0.12.0 release seems to be a good while away, I decided to pick up another task: Refactor engine class (admittedly mostly because I can't stand it no longer to look at this messy framelistener in the engine class).

Will get to it next week. Probably.

User avatar
Zini
Posts: 5533
Joined: 06 Aug 2011, 15:16

Re: Engine class refactoring (Task #19)

Post by Zini » 06 Oct 2011, 11:44

First part of the refactoring is done, but there is a lot more work. Engine has become one of the messiest classes I have ever seen.

An important note to all coders: Do not ever add any code to an OGRE framelistener outside of a try catch block. At least with the default render loop OGRE does not have any means of dealing with exception in the code that calls the framelistener. That means the moment an exception leaves the framelistener the whole process is toast. While that might be the right thing to happen in some problem domains, I think we can all agree that a crash (a.k.a. CTD) is the worst kind of failure mode in a game and should be avoided at all costs.

User avatar
Zini
Posts: 5533
Joined: 06 Aug 2011, 15:16

Re: Engine class refactoring (Task #19)

Post by Zini » 08 Oct 2011, 09:36

More engine improvements. And since I was at it already, I also improved the focus reporting code ("Object: X" in the console). It is optional now (off by default; can be switched on with the --report-focus command line option) and also less spamy.

User avatar
sirherrbatka
Posts: 2121
Joined: 07 Aug 2011, 17:21

Re: Engine class refactoring (Task #19)

Post by sirherrbatka » 09 Oct 2011, 09:47

I think we can all agree that a crash (a.k.a. CTD) is the worst kind of failure mode in a game and should be avoided at all costs.
I thought that OpenMW 1.0.0 needs to look and WORK just as morrowind :lol:

User avatar
Zini
Posts: 5533
Joined: 06 Aug 2011, 15:16

Re: Engine class refactoring (Task #19)

Post by Zini » 09 Oct 2011, 12:23

Funny!

Anyway, I am done with the engine class. Mostly. The incomplete MWRender refactoring got in the way once more. I created a new follow up task, that can be tackled once the refactoring is complete and we finally got rid of this nasty MWScene class.

User avatar
raevol
Posts: 2805
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Engine class refactoring (Task #19)

Post by raevol » 10 Oct 2011, 03:17

sir_herrbatka wrote:I thought that OpenMW 1.0.0 needs to look and WORK just as morrowind :lol:
Aah, the good ole days. :D

User avatar
sirherrbatka
Posts: 2121
Joined: 07 Aug 2011, 17:21

Re: Engine class refactoring (Task #19)

Post by sirherrbatka » 11 Oct 2011, 16:46

Aah, the good ole days.
Well: no. I still play Morrowind (if I can find time) and CTDs are still here. Wine or windows ? still CTDs.

User avatar
raevol
Posts: 2805
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Engine class refactoring (Task #19)

Post by raevol » 11 Oct 2011, 19:21

sir_herrbatka wrote:Well: no. I still play Morrowind (if I can find time) and CTDs are still here. Wine or windows ? still CTDs.
The last time I was playing, back when I still had windows, with a fully patched game and system I was almost never seeing CTDs. I believe they are still there though, on certain systems... this is off-topic though, we should make a new thread if we want to discuss more. :)

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests