Proposal

Refactoring of the SDL backend

and OpenGL support

Abstract

This project will help ScummVM in various aspects. It will improve the SDL backend by refactoring it and the support of derived backends. It will also add OpenGL and OpenGL ES support as an option for the platforms that support them. OpenGL will make scaling and blitting hardware accelerated, and so a positive impact on performance will be achieved.

Personally, I am really eager to join a big open source project like ScummVM and Google Summer of Code is the perfect opportunity for this.

Contents

Benefits to the ScummVM Community

This project will expand ScummVM rendering capabilities with the OpenGL specification. OpenGL, as well as OpenGL ES, has interesting features that the current SDL library does not include or fully implement, such as hardware acceleration. This will improve performance on some machines.

Refactoring of the default SDL backend will provide a better structure, which will make the derivation and inheritance of it for new backends an easier task.

Deliverables

  • Clean and portable c++ code
  • A new backend structure divided into subsystems classes
  • Improved SDL backend by refactoring
  • New platform backends derived from the SDL backend for Windows and Unix, and also others may be created
  • Added optional OpenGL and OpenGL ES support to the SDL graphical subsystem
  • A new OpenGL / ES graphical subsystem

Plan

Preparation

Regarding SDL API and OpenGL API, I believe that I have enough experience working with them. However, I do not know much about OpenGL ES, so I will dedicate some time for getting familiar with it.

Regarding ScummVM, I have played many games with it, but I am new to development and I am starting to learn it structure. Most preparation time will be for learning more about ScummVM codes.

Production

The first coding phase will be the creation of new classes for the backend subsystems, namely for the Graphics, Audio, Input, and other minor subsystems. These classes will be the base for the refactored SDL backend and for the OpenGL / ES implementation.

The second coding phase will be the SDL backend refactoring. That includes the following steps:

  1. Separation of the SDL backend into its subsystem using the base classes previously created.
  2. Implement a windows and linux backend derived from the new SDL subsystems.
  3. Testing and debugging new code.
  4. Optimization of code.
  5. Create project documentation.

The third coding phase will be the OpenGL support implementation. That includes the following steps:

  1. Implement optional OpenGL support in the new SDL graphical subsystem.
  2. Testing and debugging new code.
  3. Implement an OpenGL graphical subsystem, independent from the SDL backend.
  4. Testing and debugging new code.
  5. Optimization of code.
  6. Create project documentation.

The fourth coding phase will be the OpenGL ES support implementation. That includes the following steps:

  1. Implement optional OpenGL ES support in the new SDL graphical subsystem.
  2. Testing and debugging new code.
  3. Implement an OpenGL ES graphical subsystem, independent from the SDL backend.
  4. Testing and debugging new code.
  5. Optimization of code.
  6. Create project documentation.

The fifth phase, I will try to implement the new subsystem architecture on as many platforms as I can. In the case I can’t test myself the platform I am working on, I will ask for cooperation of porters and other developers.

The final phase, I will do the last ixes and tweaks, and complete the project documentation if needed.

Tests

Testing is an important part of the developing project, so on all testing steps I may ask the general community for help on testing the advances, while I do my own tests on the platforms I have access to. This should give me enough feedback for fixing most errors, as well as improving and optimizing the code.

I may start working on the documentation for each milestone while testing and before optimization for making it easier for the community to test the new changes.

Possible problems

I am a bit worried with OpenGL ES, as I have not experience with it yet, and that may present some difficulties. However, there is plenty of tutorials and documentation around the net and with some support I may overcome most problems.

I may also have some problems implementing OpenGL shaders and extensions for complex scaling methods, as they may not be all available on my pc. However, in that case I can ask someone for help, but that will slow the progress a bit. This may not be an essential feature, but I would like to implement all scaling methods for OpenGL if possible. If not possible, a fallback to the current scaling methods for sdl will work.

There can be also some difficulties working with the port for linux and other unix systems, as I have worked all my life with Windows and only recently I have started to work with linux. I have some experience with mingw and that may make things easier, and I am also working with linux on my programming classes at university.

Schedule

Preparation: Now – May 24. Investigation.

Learn more on ScummVM structure and codes. Research on OpenGL ES. Get involved in ScummVM community discussions (irc, mailing list). Consult mentor on guidance and community.

Production: Coding phase.

May 24 – June 7: First phase, design and creation of base subsystems

June 7 – June 28: Second phase, refactoring of SDL backend

June 28 – July 12: Third phase, implementation of OpenGL support

July 12 – July 19: Fourth phase, implementation of OpenGL ES support

July 19 – August 14: Implementation of new SDL/OpenGL backends for other platform backends. Possible implementation of GLSL scalers. I may also help on other miscellaneous tasks if project is finished before expected.

End Phase: August 14 – August 16. Final adjustments. Last minor tweaks.

Availability

I am currently attending classes; however I still have enough free time for spending 4-6 daily hours on this project and extra hours on weekends if ever needed. I do not plan going on vacations or taking a job, and exams start after GSoC ends, so I have enough time for completing this project. I also have a period of 4 weeks of vacations starting at 28 june, and ending at 25 july.

Biography

I am a 19 year old student from the city of Córdoba located in Argentina. I am currently studying electronics engineering at the National University of Technology. At the age of 14 I got interested in programming, and since then I have been learning the logics of programming and algorithms creation. I am a fluent programmer in C, C++, Ruby, VB and I have worked with some other programming languages in minor levels. I have experience on 2D games development, and I am very familiar with the SDL API and the OpenGL specification. I have also experience on c++ code refactoring.Currently, I am working on 2 open source projects:

ARGSS (http://sourceforge.net/projects/argss/)

I started this project a bit more than a year ago. It aims to create a game player framework developed in c++. Initially it worked with SDL, but now it makes use of OpenGL for rendering.

EasyRPG (http://sourceforge.net/projects/easyrpg/)

A c++ project, that consists on a 2D RPG game editor and interpreter. I have joined this project recently, where I have been working on refactoring the game player. It makes use of SDL.

Conclusion

I am confident that I have the required skills and experience for finishing this project at time. I wish I have included and made clear all needed details. In case of any question, feel free to contact me.

With best regards,

Alejandro Marzini

Leave a comment

0 Comments.

Leave a Reply

You must be logged in to post a comment.