Engine class refactoring (Task #19)

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

Engine class refactoring (Task #19)

Post by Zini »

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: 5538
Joined: 06 Aug 2011, 15:16

Re: Engine class refactoring (Task #19)

Post by Zini »

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: 5538
Joined: 06 Aug 2011, 15:16

Re: Engine class refactoring (Task #19)

Post by Zini »

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: 2159
Joined: 07 Aug 2011, 17:21

Re: Engine class refactoring (Task #19)

Post by sirherrbatka »

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: 5538
Joined: 06 Aug 2011, 15:16

Re: Engine class refactoring (Task #19)

Post by Zini »

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: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Engine class refactoring (Task #19)

Post by raevol »

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: 2159
Joined: 07 Aug 2011, 17:21

Re: Engine class refactoring (Task #19)

Post by sirherrbatka »

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: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Engine class refactoring (Task #19)

Post by raevol »

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