Summary of my WebGL port

The three months' coding for GSoC has ended and I'm proud to say that I've achieved the main goals in my project proposal. The final product is here:

http://hedgewars.org/hwjs/hwjs.html

In fact, when I started the project, I didn't have much idea about how well it would go. The tools I was going to use were not mature so it was hard to predict how many obstacles I might encounter. Fortunately, the developers in the channel, especially my mentor nemo, offered a lot of help so that I could proceed in the right direction. And finally, it turns out to be very successful.

I will still hang around in the channel and maintain the web port, though I won't be as free as in the summer vacation. There are still a few things to be done, probably also a project idea for next year's GSoC Smile

1. Pas2C is not completely worry-free. I need to patch a few places in the generated sources. But luckily, most of the issues have been addressed;
2. AI is running in main thread and may not be as "smart" as the native version. Using web worker or reworking the AI code could solve the problem;
3. Optimize math operations (esp. Rope);
4. Write a html frontend;
5. Add multiplayer for the web version (this could be fun!);
6. Add sound. This is not hard since sound files are not critical, but loading them when needed may also degrade the gaming experience (if you have a slow network). Preload all or load on-the-fly, that's the hard choice.

Finally, thanks to all developers and GSoCers working for hedgewars! Big Grin

xymeng

This is great!

A good way to show people Hedgewars if they're reluctant to install anything.

TheCycoONE wrote:

This is great!

A good way to show people Hedgewars if they're reluctant to install anything.

Also a good way to play back demos people upload to the website.
And as new versions of hedgewars are (hopefully) released, the old versions of the engine could be kept around, so the demos would always work.

Also a good way to showcase the development version.

Once network play is added, it would allow people to spectate on tournament games from the website.

Also a good way to play on those school or BestBuy computers Wink Smiley

Congrats! The project premises were really hard, glad you could overcome all of them!
Can't wait until mozillians post about this work!!!

Hiding my sestem does not seport webgl Sad Smiley

kai55 wrote:

Hiding my sestem does not seport webgl Sad Smiley

That might not be necessarily true.
If you are able to play hedgewars you probably should be able to run webgl.

Things to try:
1) ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ - latest code may have whitelist for your driver, and if you are running Windows, a more recent version of the ANGLE code (a wrapper layer used to workaround Windows' poor OpenGL support)

2) Try going to about:config and searching for force-enabled. Set it to true for webgl, and restart the browser.

If this fails and you are on Windows, also try:
3) Going to about:config and searching for prefer-native - set that to true for for webgl and restart the browser.

4) You can try seeing if there's a later version of your graphics driver with better support for opengl

If you are getting other problems like poor performance or loader issues, there's other things to try, but for actual "webgl not working", these are probably about all that you can do.

Oh, and if anyone was stuck at loading, try again.
JS compressor was screwing up.

Actullay that a lots of reading, I can't understand until weekend Sad Smiley.

But still... great Smile

Well it really hard to explain you Sad Smiley

Oh, now I'm understand Big Grin

Awesome job! Really shows the power of WebGL now huh! I've been working on some WebGL projects myself, so this code shohld be really interesting to take a look at Wink Smiley

Really? Thanks bananaoomarang Big Grin. Mine too

User login

Server Stats

Rooms: 4
Players: 8
Copyright © 2004-2014 Hedgewars Project. All rights reserved.