RFC: Serializing scripts into binary files

Threads related to Google Summer of Code
Post Reply
liquidmetal
Gnoblar
Posts: 1
Joined: Wed Apr 01, 2009 1:28 pm
Location: Goa, India
Contact:

RFC: Serializing scripts into binary files

Post by liquidmetal »

Hello everyone! I'm Utkarsh Sinha, currently I'm in my second year of studies, pursuing B.E. (Hons) Computer Science + M.Sc. (Hons) Mathematics at BITS-Pilani, Goa Campus, India.

------------------

Project Proposal

Serialize scripts for a scene, like materials, shaders, particles systems, etc into a single binary file. Along with this,
an editor that lets you edit and save scripts directly into a binary file... ready for use with Ogre3D.

If possible, I could work with the person serializing the scene and probably serialize the scripts directly into the scene binary file.

-------------------

Schedule

23 May to 29 May - Start figuring out what all components can use a binary file format (eg:
30 May to 05 May - Document each component, detailing each property needed by every component.
06 Jun to 12 Jun - Document a binary format for each component, down to the last detail. Also create a format that allows for storing
multiple such binary components inside one single file.
13 Jun to 19 Jun - Start work on classes that serialize in and out each component.
20 Jun to 26 Jun - Continue work on the classes. Optimize, test and debug them, and make them flawless.
27 Jun to 03 Jul - Work on a single class that serializes in and out multiple components from a single class.
04 Jul to 10 Jul - Testing and debugging of all classes created till now.
11 Jul to 17 Jul - With the classes completed, start working on a graphical, realtime script editor.
18 Jul to 25 Jul - Continue work on the editor.
25 Jul to 01 Aug - Finish the editor. Optimizing, testing and debugging. Documenting it.

I plan to finish the project before August because my next semester starts around the first week of August. I will be available for coding during August too, but I want to finish the project before the semester starts :)

---------------------------------------------------

Future Extensions

The code for the script editor could be assimilated into a graph/scene editor. That way, the developer can seamlessly work on multiple scripts, and the editor would take care of converting it into OGRE readable binaries.

---------------------------------------------------

Why You're The Person For This Project

I'm the right person for this project because I've worked with binary files extensively (MDL, MD2, MD3; BMP, TGA; BSP; WAV). I've also worked a bit with Java's bytecodes, and I feel something similar to that can be used here.

Apart from that, I've worked on multiple personal projects in diverse fields. Here's a list of a few major ones:
1) A 3D chess game in C/C++ from scratch (Sep '08)
* Uses OpenGL and OpenAL
* Heavely uses the concept of reusable objects (like, a renderer object to use OpenGL, a Camera object, a CameraAnimator object that lets you move a given camera over certain paths, etc). You can have a look at a few screenshots of the game at my website: http://liquidmetal.in/work/chess-game.php

2) 3 robotics projects (over the last year)
* Based on Image Processing using OpenCV
* Used C++ for implementing the image processing
* Efficient code: Pictures taken from a webcam and are processed (to get information like the positions of balls, etc). This is done approximately 30 times per second, with memory usage never exceeding 10mb.
* You can get some more info about these bots on my website:
- http://liquidmetal.in/work/ipbot.php
- I couldn't put up a web page for the second bot my team and I made
- http://liquidmetal.in/work/goal-image-p ... soccer.php

3) My website
* No prewritten software was used (like wordpress or blogger)
* Uses ajax techniques for the shoutbox and comments, making it a lot easier for the visitor to leave a comment/shout
* Uses PHP, MySQL and Javascript
* You can get more information about it here: http://liquidmetal.in/work/this-site.php

4) A basic Quake3 rendering engine (Summer '06)
* Made in VB6 (yes, VisualBasic 6)
* Loads a BSP level (Q3BSP), all texture maps (even from ZIP files, supported formats: BMP, TGA and JPG), lightmaps and models (MD2 with animation). And then it lets you move around the level, performing basic collision detection.
* The renderer performs frustum culling, and also uses the visibility information stored in the BSP file to reduces the polygons to be rendered.
* The project wasn't quite speedy... partially because of the programming language used.
* I tried making the engine as object oriented as possible, but VB6 didn't really allow me to do what I wanted. Since then, I've completely abandoned VB6, and work on C/C++ and Java for developing applications.

As for communication, I am very good at English, both written and spoken.

---------------------------------------

Why OGRE?
I've always wanted to develop a 3D rendering engine, something similar to the Doom3 engine. But after some tries I realized this wasn't really a one man job. And this GSoC lets me be a part of the development team of a very popular open source 3D engine :)

-------------------------

Contributor Agreement

Please be aware that all OGRE contributors are required to sign the OGRE Contributor License Agreement - this will be a condition of acceptance of your project should your application be accepted.

--------------------------

Anything Else

* I've worked a lot with OpenGL. Mostly learned over the internet (from the likes of http://nehe.gamedev.net ).
* In commercial game engines, I've done quite a bit of research on the Quake3 engine (learning a lot from http://gametutorials.com, when their tutorials were free) and also its source code.
* In free game engines, I've tried understanding the code of OGRE, CrystalSpace and Irrlicht... taking bits and piece from each and trying to implement that in some of my projects.
* Apart from these, I've also worked extensively with 3D GameStudio and a bit with DarkBasic.

--------------------------------

Feel free to ask any question or let me know any suggestions :)
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Re: RFC: Serializing scripts into binary files

Post by sinbad »

Bear in mind that the scripts at the moment are lexed into a syntax tree, and then that tree is parsed. Therefore, the most maintainable way to serialise script information to a binary file is to serialise the lexed syntax tree - that way, you just have to reload that tree from a binary file and pass it through the same parser, avoiding having 2 separate parsers that need maintaining every time something changes.

So, you will need to look at the ScriptLexer and ScriptParser classes, and their subclasses, to figure out how this might work. Take a look and give us your thoughts.

Please can you also post some source code examples from your previous work. Ability to write clear, maintainable code is important on the OGRE project.
Post Reply