Porting Arx Fatalis: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Add an overview of the porting statis.)
(Add an overview of the porting statis.)
Line 1: Line 1:
This article contains a list of Win32 dependent code & data structures in Arx Fatalis. It also contains a list of potential libraries to replace this code and data structures with cross platform alternatives.
This article contains a list of Win32 dependent code & data structures in Arx Fatalis. It also contains a list of potential libraries to replace this code and data structures with cross platform alternatives.


== Porting status ==
== Status ==


* '''audio''': <font color="green">done</font>: abstracted audio backend, new OpenAL backend
* '''audio''': <font color="green">done</font>: abstracted audio backend, new OpenAL backend

Revision as of 21:03, 23 July 2011

This article contains a list of Win32 dependent code & data structures in Arx Fatalis. It also contains a list of potential libraries to replace this code and data structures with cross platform alternatives.

Status

  • audio: done: abstracted audio backend, new OpenAL backend
  • io: done: using boost::filesystem (case-sensitive branch, not yet merged)
  • graphics: partially done: abstracted renderer backend, stubbed out OpenGL implementation
  • input: partially done: abstracted input backend, needs SDL / X11 implementation
  • windowing: wip: backend abstraction started
  • misc: threads, timing code abstracted, msvc-specific string functions replaced

Library suggestions

SDL has turned out to be the library of choice for the base init code, probably the input code and the setup for rendering. It can support both an OpenGL and a DirectX rendering context making it suitable for supporting the porting to OpenGL as well as the base D3D7 rendering code.

Rendering

While most of the functionalities were kept intact, porting some pieces of code was not making much sense. A lot of texture operations were done in the original game that would now be performed using shaders. Here's a list of what was removed and could someday be reintegrated into the game in another form.

  • Bump mapping: Was generated using the diffuse texture turned into grayscale. The effect was performed using texture combine. While using this technique could yield some interesting results, in most cases it produced a blurred effect. Should be reimplemented as per pixel bump mapping using shaders.
  • PNUX texture effect: Color conversion applied to all textures in the game, resulting in funny looking scenes. It seems like it was a cheat (activated as a spell), so in the end it was not worth porting. Would be trivial to implement as a post processing effect.
  • HALO: Glowing effect around 2d items like runes & inventory items. Halo textures were built by scanning the original texture line by line and adding pixels when a boundary was found (when going from black to colored pixels).
  • Texture size option: To reduce the game textures quality... should be reintegrated. The menu option & internal setting are still there, but have not effect.
  • 16 bit texture support: Reduce gfx & main memory usage, but with a cost in image quality. Pretty much useless now...