SummerOfCode/2012/PortSupertux
This project is going to port Supertux to web by using Emscripten, a C/C++-to-Javascript compiler.
Status Report
May 21st - May 27th I'v compiled the supertux to a html. And I'm going to run it in broswer and fix any problems met during this process.
(1)Fix page stuck problem caused by audio format. Supertux contains MOD format audios which are not supported by the current HTML5 audio. This problem is solved by converting the audios to ogg format. (2)Fix page stuck cause by IMG_Load. Emscripten's IMG_Load implementation seems buggy, as it will trim the leading "/' of an absolute path of the image. I just commented the code, and this stuck disappeared. I'll talk to Alon about this problem. (3)Fix page stuck cause missing SDL functions in Emscripten. a. Mix_ReserveChannels: I just commented the code in Supertux. b. SDL_WM_SetIcon: commented. c. SDL_Joystick*: commented. d. SDL_GetKeyState: similar to SDL_GetKeyboardState, implemented. e. SDL_GetVideoSurface: just return the SDL.screen, implemented.
After doing this, the html page now can run into the game main loop, and background music plays well. But still has no pictures, as there's still some SDL functions not implemented, and the main loop is not yet changed to javascript setTimeInterval form.
Status report before May 21st will be added as soon as possible.