architectural issues with new engine

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
loki1985
Posts: 17
Joined: Sun Nov 06, 2005 8:25 pm

architectural issues with new engine

Post by loki1985 »

hi there.

i recently started looking into Simon3D as a new engine for residual. not because Simon3D is so good a game (but it aint so horrible either), but rather because it only seems to use 1 proprietary data format for textures/models/scenes (which is documented on the internet), and also most logic seems to be in script files.

i already decrypted the script files, and would like to start developing an interpreter in residual. but before this, i have some issues i'd like to discuss, and since nobody answered me in IRC i try to do it via this forum post.

biggest problem i see: this tinygl which is currently used probably is a software only renderer, no HW acceleration.
this is sufficient for Grim Fandango, since only the actors and some objects are 3D, the rest is pre-rendered. but since for Simon3D everything is 3D, i think this would be much too slow (or bad-looking otherwise).

also, while making pure opengl (or similar to opengl) calls is flexible, it requires pretty good 3D knowledge and a lot of boilerplate code, and there are not many convenience functions available.
as a solution to this as well as the above problem i would like you to consider implementing some more abstract 3D engine as a rendering backend. i for example have made some good experiences with the irrlicht engine. it is open source (BSD), has multiple renderer backends (D3D, OpenGL, 2 software renderers one of which produces high quality graphics), pure C++, etc. this way residual could still support low-end systems like mobiles without HW acceleration, but still development would be much easier i think.

i understand ScummVM comes from a "few-dependencies" mentality, but i really think for supporting more 3D titles than only GF some architectural advancements are needed.

lets discuss :)
User avatar
Graxer
Posts: 451
Joined: Sat Sep 13, 2008 2:24 pm
Location: Scotland

Re: architectural issues with new engine

Post by Graxer »

While I can't help with the questions you asked I would just like to say that it's great that someone is looking into starting another engine for ResidualVM. Hopefully this will help raise the project from it's hibernation and lead to other engines being added in the future. :D
User avatar
ScottT
ScummVM Developer
Posts: 30
Joined: Fri Nov 28, 2008 12:08 pm
Location: .au

Post by ScottT »

The graphical 'backend' is certainly one area where ResidualVM could use a little bit of work, but the difficulty would be designing such an interface that is flexible to handle the requirements of the different engines.

I did a bit of fiddling a few months back and found that short of the very crude framework (basically, just set up viewport), all the rendering code I used was rather specific to the engine (or rather, the model format). Would using an abstracted 3D engine (that has to be abstracted enough to be flexible for all sorts of uses) have any performance issues (especially for handheld ports, if/when ResidualVM heads down that path)?

Edit: This is also dependent on the style of game - games with full 3D environment would have a bit more boilerplate code to those which are only 2.5D, however whatever generic framework is provided would need to work with both of these style of environment as well as possibly a few others permutations (eg, Myst 3?)
User avatar
bobdevis
Posts: 567
Joined: Fri Jan 16, 2009 10:52 am

Post by bobdevis »

ScottT wrote: Would using an abstracted 3D engine (that has to be abstracted enough to be flexible for all sorts of uses) have any performance issues (especially for handheld ports, if/when ResidualVM heads down that path)?
I don't think you should be worrying about that.
By the time the engines that are more 3D heavy then Grim actually become playable, the common phones and handhelds around will be more powerful then they are today.

I would just pick an OpenGL version (2.1 or so) and do the abstraction layer so that it allows feature complete use of that OpenGL version.
If this means that on some hardware in combination with some engines some effects can not be displayed because the hardware doesn't support it and its to slow to do it in software, then, well.... tough shit.

You have to draw the line somewhere.
User avatar
Journeyman
Posts: 3
Joined: Tue Sep 16, 2008 2:43 pm

Post by Journeyman »

For the benefit of the project it must grow, and this means that if the current opengl implementation does not fit the need another one must be chosen; said so I endorse irrlicht adoption as:

a) loki1985 said he know it and this is a vantage as there's somebody who can help the transition

b) irrlicht supports various render API seamlessly (DX8, DX9, OpenGL 1.2-3.x, SW Render)

c) irrlicht homepage says it's designed to work well with every sdl compatible system

d) having an extend-able abstraction layer is possible to add a renderer (for example OpenGL ES) without changing the code that rely on that
loki1985
Posts: 17
Joined: Sun Nov 06, 2005 8:25 pm

Post by loki1985 »

Journeyman wrote: d) having an extend-able abstraction layer is possible to add a renderer (for example OpenGL ES) without changing the code that rely on that
opengl ES is already working in irrlicht, there are games using irrlicht on iPhone and Android based phones :D
Post Reply