From BZFlagWiki
Revision as of 01:15, 24 March 2007 by Joevano (Talk | contribs) (spelling ;))

Jump to: navigation, search

Integration of Crystal Space into BZFlag

Scott Johnson
email: scottj@cs.umn.edu
irc nick: jwir3


Crystal Space is a 3D SDK for game development. One of the long standing goals of the BZFlag project has been to integrate with an existing rendering engine, in order to improve graphics capabilities. This project seeks to utilize the benefits of Crystal Space as a game engine in order to improve the BZFlag project, and make it extensible for future enhancements using Crystal Space.

Benefits to the BZFlag Community

Integration of BZFlag into the Crystal Space environment will allow for more realistic graphics to be placed into the game. In addition, the community will see the benefit of cleaner, easier to understand code, as well as additional functionality included with Crystal Space as windowing tools and plugins. Since Crystal Space is an application framework, it will be able to handle normal game application details, such as opening windows and drawing user interfaces, without the BZFlag application needing to clutter its code up with these items. Finally, the Crystal Space libraries are designed with speed and real-time gameplay in mind, and optimized for many different platforms, so render times may see a slight increase.


According to [1], several of the integration details for Crystal Space have already been accomplished. This project would seek to build upon these foundations, and add functionality for the radar renderer and debugging capabilities to the BZFlag client. The world element will be completed using Crystal Space, and menu selection will be implemented using Crystal Space's CEGui plugin. The Crystal Space plugin for ode will be used to re-implement collision detection. Finally, improvements will be made to graphics including: addition of shadows, better shading capabilities, and lightmaps. If time permits, CEL will also be utilized to create a more structured, rigorous re-development of parts of the game.

Functionality Details

The focus of what has been done up to now in the Crystal Space integration has focused on reconstructing what is currently available in the 2.0 version of BZFlag, except using Crystal Space. Additional functionality will be added to support better shading and lighting, including shadows. Since Crystal Space has the ability to support more complex graphical operations on a variety of platforms, there are a vast number of opportunities for extension once the initial integration is completed. Thus, the major focus of the project will be to finish the integration of Crystal Space into BZFlag, and achieve what is already available in the 2.0 version.

Implementation Details

Since Crystal Space is a C++ library, the integration will be in C++. Crystal Space's CEgui plugin will be used to construct menus and user interface items. A similar plugin for ode will be used to redevelop the collision detection/physic in BZFlag. The world will be redeveloped, entirely created using Crystal Space's format and API. Focus will be first on getting the client using Crystal Space to be as close to the current 2.0 version as possible. Once this is completed, additional features will be added. Shading will be addressed, and lightmaps will be added, computed using interfaces in Crystal Space's SCF. Improvements in overall lighting and effects will be improved. Interface design will be taken into consideration, and it is possible that functionality and/or updated visual aesthetics will be added, as the community feels is necessary. Debugging will be re-implemented, using Crystal Space's bugplug plugin. Finally, the overall design will be reevaluated to determine if CEL can be used as an additional layer to improve object-oriented design later on.

Development Methodology

The development will proceed according to a flexible iterative software engineering design process. At the beginning of the process, specifications will be designed outlining exactly what will be added, and this functionality will be broken into disjoint sets of functions. The sets will be added to the code, one by one, and then tested and debugged. Once complete, the procedure will move to the next set of functions to be added, until there are none remaining. Once this process is complete, the entire system will be tested rigorously, and submitted to the community for an initial evaluation. Any final bugs will then be eliminated from the system-wide test before final release of the code. At each stage, complete documentation on how each function works, the design considerations, and possible avenues for future work will be written and added to the BZFlag wiki.

Project Schedule

The first week will be used to research the BZFlag codebase, as well as outline the exact specifications for development. Once this is complete, the bugplug plugin will be the first change that is made, in order to facilitate debugging of other items of the code. When this is complete and tested, the functionality will be broken into iterations as described in the development methodology. Implementation, testing/debugging, and documentation will take up the largest portion of the project, and is estimated to take roughly 1.5 months. Once complete, the project will be delivered to the BZFlag community for evaluation and initial recommendations. Final testing and debugging will then be done before final submission to Google. The initial project schedule will be:

  * May 28 - Jun 8:  Research of BZFlag codebase
  * Jun 9 - Jun 15:  Integration of bugplug
  * Jun 16 - Jun 18: Development of Specifications
  * Jun 19 - Jul 30: Implementation of Specified Functionality
  * Jul 31 - Aug 5:  System-Wide Debugging, Initial Release
  * Aug 6 - Aug 18:  Final Debugging
  * Aug 19:          Final Code Documentation and Code Polishing
  * Aug 20:          Final Release to Google and Community


I am currently attending the University of Minnesota as a PhD student in the Computer Science department. My specialization/research area is in Graphics and Visualization. I have roughly 4 years experience working with Computer Graphics. I consider myself an expert in C/C++ programming, and have a passion for software engineering, especially when it comes to games and other entertainment software. I am an advocate of open source software, because I believe it gives inexperienced software engineers the chance to work with those who have had years of prior experience in design, development, and debugging of code which they would not otherwise have had. In my free time I enjoy playing the violin and practicing martial arts.


[1] http://my.bzflag.org/w/Google_Summer_of_Code#Graphics_Engine_Integration