<div dir="ltr"><div style>Hello everyone!</div><div style><br></div><div>As of now, the aim of ScummVM is 2D point'n'click adventure games. 3D adventure games, like Grim Fandango, are outside of this project's scope, as the 3D code requires a much different kind of programming than regular 2D games, because there are a lot of features involved, like drawing complex 3D models, lighting, shading, textures, a specified rendering pipeline etc. Furthermore, it's more challenging to reverse engineer 3D games, as their code is usually more complex than regular 2D games. Finally, it's harder to port 3D games, especially to non-desktop platforms, as the 3D code will need to be accelerated for these devices, plus a lot of desktop 3D features aren't available in mobile platforms.</div>
<div><br></div><div>These are the main reasons that a separate fork of ScummVM was created, ResidualVM. And that project has been successful.</div><div><br></div><div>In this e-mail, I'd like to discuss some in-between games, namely pseudo-3D / 360 degree panoramic games where the player is placed in the middle of a big cube or a sphere, and can rotate around 2 axes. The cube has several texture images on each side, forming a room where the player can rotate the camera around a fixed point. Examples used nowadays include Google Street View and the Google Art Project:</div>
<div><a href="http://www.google.com/streetview/">http://www.google.com/streetview/</a></div><div><a href="http://www.googleartproject.com/">http://www.googleartproject.com/</a></div><div> </div><div>These kinds of games do not use any complex 3D graphics code, i.e. there is no complex modelling code, no shading, no lighting etc. An example is Myst 3, and we can see its graphics code in the residualvm source code tree:</div>
<div><a href="https://github.com/residualvm/residualvm/blob/master/engines/myst3/gfx.cpp">https://github.com/residualvm/residualvm/blob/master/engines/myst3/gfx.cpp</a></div><div><br></div><div>Other known games are all of the games using the Cryo Omni3D engine:</div>
<div><a href="http://www.mobygames.com/game-group/graphics-engine-omni3d">http://www.mobygames.com/game-group/graphics-engine-omni3d</a></div><div>and the Arxel Tribe games:</div><div><a href="http://www.mobygames.com/browse/games/arxel-tribe/adventure/">http://www.mobygames.com/browse/games/arxel-tribe/adventure/</a></div>
<div>for which there's the WIP Ring engine:</div><div><a href="http://wiki.scummvm.org/index.php/Ring">http://wiki.scummvm.org/index.php/Ring</a></div><div><br></div><div style>Here's a relevant article on wikipedia:</div>
<div style><a href="http://en.wikipedia.org/wiki/Isometric_graphics_in_video_games_and_pixel_art#Mapping_Screen_to_World_Coordinates">http://en.wikipedia.org/wiki/Isometric_graphics_in_video_games_and_pixel_art#Mapping_Screen_to_World_Coordinates</a><br>
</div><div style>Plus a video of Myst 3 that explains the gameplay of some of these games:</div><div style><a href="http://www.youtube.com/watch?v=Lp-floACEkg#t=5m18s">http://www.youtube.com/watch?v=Lp-floACEkg#t=5m18s</a><br>
</div><div style><br></div><div>These games are very good candidates to be included in ScummVM, but we need to ensure that the needed functionality for these games is included in ScummVM, and to slightly modify our policy to include pseudo-3D adventure games.</div>
<div><br></div><div>We will need to get in touch with the people from ResidualVM concerning this change (as Myst 3 is included in ResidualVM).</div><div><br></div><div>The needed functionality will need to include the following:</div>
<div>- Math code used to rotate a shape around a fixed point (parts of the ResidualVM math classes could be used for this)</div><div>- Software rendering code (probably small chunks of tinygl) and expose parts of OpenGL in our OpenGL backend to draw vertices on screen and add textures to them</div>
<div><br></div><div>The aforementioned functionality (drawing vertices, adding textures to them) already exists in the OpenGL backend. We would need to expose it to OSystem.</div><div><br></div><div>The benefits in extending our policy to include these games are:</div>
<div>- A broader scope of adventure games. All of the Cryo/Arxel Tribe adventures are pretty good games, and fit in ScummVM</div><div>- The needed 3D code is quite minimal, so it's easier to port</div><div>- There are already a lot of WIP games that are using this technology (Myst 3, all the Ring engine games)</div>
<div>- We already have first-person view games that are using static images (e.g. Return to Zork, Myst, Riven, LGoP2, all the RPG games, Lost in Time, Urban Runner, Ween, 7th Guest etc). This is an addition where these static images are rotated around a specific point (the player's static POV). Moreover, we got 2D games that we support (namely, Inherit the Earth) which use 3D-like code to display isometric areas.</div>
<div>- The games themselves are still point'n'click adventure games, and still 2D, with some added small 3D functionality</div><div style><br></div><div>The plans to include them would be:</div><div>- Get in contact with the ResidualVM devs about these games, and ask for a possible inclusion of Myst 3 in our source code tree</div>
<div>- Create the needed 3D functionality in OSystem that is needed for these games (math classes, minimal 3D code)</div><div>- The new 3D code will certainly not affect existing games, and can be #ifdef'ed out in the platforms that can't handle it (e.g. the DS)</div>
<div><br></div><div>Possible implications would be:</div><div>- There aren't any complex calculations for these games, so the CPU load needed will probably not be much. However, they would probably benefit more from the WIP OpenGL backend, where the drawing would be benefiting from the OpenGL hardware acceleration</div>
<div>- We would need to port the new 3D related backend code to non-desktop platforms, although most modern non-desktop platforms (e.g. iOS and Android) do include basic OpenGL support (OpenGL ES)</div><div>- The screen is wholly refreshed in these games when the camera rotates, so known tricks like dirty rects can't be used, and of course some platforms won't be able to handle that (but then again, not all of our supported games run in all of our supported platforms)</div>
<div><br></div><div>Any thoughts on this would be welcome</div><div><br></div><div>Regards</div><div>Filippos Karapetis</div><div><br></div>-- <br>"Experience is the name every one gives to their mistakes" - Oscar Wilde 
</div>