ParaJVE : Parabellum's Java Vectrex Emulator   

Official Home of ParaJVE ... A travel through the programming of a freeware Vectrex emulator in java!

Thursday, July 16, 2009  

WIP : Overlays & Rendering

With the arrival of the summer, I felt like it was time to provide you with some Work-In-Progress information, so here it is... First, let's start with a couple of snapshots, taken from the current development version :

Well, as you have probably already noticed from the pictures above, I've been quite busy lately with improvements regarding the Overlays and the vectors rendering. This comprehends these three different tasks :

  • Rewriting the OpenGL code responsible for rendering the overlays :

    In the previous versions, the transparent areas in the overlays were obviously too dark (the colors were barely visible, and the vectors drawn in such areas did not have their colors altered enough).

    The new overlays handler now displays textures in a much more colorful way (especially for the vectors showing through the transparent areas), and it also provides different rendering modes, so that every user can select (through a menu) the one that best fits his monitor brightness.

    This task is 100% completed.

  • Improving the overlays texture quality :

    So far, the textures used for the overlays were poor quality pictures found here and there on the Internet, and that I had to alter a bit to conform with the ParaJVE rendering engine. If this was enough for a first shot, it's now clearly not good enough when the emulator is run within a large window (let alone fullscreen).

    Therefore, I've decided to create all the overlay textures from scratch. This is a long-drawn-out job that I've been postponing for too long, but the result is really well worth the pain. So far, I've done 12 overlays (Armor Attack, Berzerk, Blitz, CosmicChasm, HyperChase, MineStorm, Fortress of Narzod, RipOff, Scramble, SolarQuest, SpaceWars, and StarHawk) and there is about 12 more to go before the task is over.

    The only drawback is that the new overlays size will drastically increase (about 10 to 15 times larger than the old ones), but I will pack them all in a single texture file that should not be bigger than 2,5 MB.

    Task completion level : 50%

  • Implementing phosphor glow using a shader :

    In the versions released previously, the physical properties of the vectrex display system are emulated using a "persistence" option that mimics the phosphor afterglow. The result is fair enough, but it misses another specificity of the original display: the phosphor glow around the vectors being drawn.

    As I have finally found some time to learn GLSL (the OpenGL Shading Language), I've started to work on shaders that would help to render the phosphor glow. The current implementation is still in its infancy (as this is a trial & error process, with a lot of parameters to tweak) and the code is far from optimal... But still, the result looks promising, and runs in real-time.

    There's still a lot of work to do for this task, because I need to find the best settings, then a way to dynamically and conditionally change the parameters depending on the users preferences and the OpenGL drivers capabilities (availability of p-buffers, etc...)

    One thing is certain : this "glow" feature will only be available for users that have a 3D card whose driver is compatible with OpenGL 2.0 (or more), because GLSL is not available for older versions of OpenGL.

Labels:

3 Comments:

  • Fantastic! Can't wait for the next version. :)

    By Anonymous Anonymous, at 7/16/2009 5:25 PM  

  • Thanks Martijn! :)

    A release was initially planned sometimes during the summer, but it finally looks like I won't manage to complete everything before September (at least).

    But if the overlays refactoring task is finished soon enough, I'll release an earlier version (that does not include the glow shaders).

    By Blogger Parabellum, at 7/21/2009 1:03 PM  

  • Does sound fantastic. v0.6 is already good so I wasn't expecting much from the next version... how wrong...

    From the screen shots it looks like the next version is going to be beautiful. Well done, and hope to see it soon.

    And please do consider releasing this a bit at a time so we don't have to wait so long. "agile" :-)

    Roberto/.

    By Blogger Roberto, at 7/23/2009 4:07 PM  

Post a Comment

<< Home