[Scummvm-devel] Pseudo-3D adventure games / 360 degree panoramic adventure games

Filippos Karapetis bluegr at gmail.com
Fri Dec 28 16:08:20 CET 2012


Hello everyone!

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.

These are the main reasons that a separate fork of ScummVM was created,
ResidualVM. And that project has been successful.

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:
http://www.google.com/streetview/
http://www.googleartproject.com/

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:
https://github.com/residualvm/residualvm/blob/master/engines/myst3/gfx.cpp

Other known games are all of the games using the Cryo Omni3D engine:
http://www.mobygames.com/game-group/graphics-engine-omni3d
and the Arxel Tribe games:
http://www.mobygames.com/browse/games/arxel-tribe/adventure/
for which there's the WIP Ring engine:
http://wiki.scummvm.org/index.php/Ring

Here's a relevant article on wikipedia:
http://en.wikipedia.org/wiki/Isometric_graphics_in_video_games_and_pixel_art#Mapping_Screen_to_World_Coordinates
Plus a video of Myst 3 that explains the gameplay of some of these games:
http://www.youtube.com/watch?v=Lp-floACEkg#t=5m18s

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.

We will need to get in touch with the people from ResidualVM concerning
this change (as Myst 3 is included in ResidualVM).

The needed functionality will need to include the following:
- Math code used to rotate a shape around a fixed point (parts of the
ResidualVM math classes could be used for this)
- 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

The aforementioned functionality (drawing vertices, adding textures to
them) already exists in the OpenGL backend. We would need to expose it to
OSystem.

The benefits in extending our policy to include these games are:
- A broader scope of adventure games. All of the Cryo/Arxel Tribe
adventures are pretty good games, and fit in ScummVM
- The needed 3D code is quite minimal, so it's easier to port
- There are already a lot of WIP games that are using this technology (Myst
3, all the Ring engine games)
- 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.
- The games themselves are still point'n'click adventure games, and still
2D, with some added small 3D functionality

The plans to include them would be:
- Get in contact with the ResidualVM devs about these games, and ask for a
possible inclusion of Myst 3 in our source code tree
- Create the needed 3D functionality in OSystem that is needed for these
games (math classes, minimal 3D code)
- 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)

Possible implications would be:
- 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
- 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)
- 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)

Any thoughts on this would be welcome

Regards
Filippos Karapetis

-- 
"Experience is the name every one gives to their mistakes" - Oscar Wilde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20121228/5bf81cfc/attachment.html>


More information about the Scummvm-devel mailing list