Thread: WebJJ2
View Single Post
djazz djazz's Avatar

JCF Member

Joined: Feb 2009

Posts: 257

djazz is OFF DA CHARTdjazz is OFF DA CHARTdjazz is OFF DA CHART

Apr 24, 2013, 02:17 PM
djazz is offline
Reply With Quote
WebJJ2

Might aswell start this thread too, along with WebJCS.

Over the past years I have been trying to "remake" JJ2 from scratch, using web tachnologies. Here's some brief history:

It started out as a simple layer viewer of the level Triton Armory by PurpleJazz. The layers was rendered to png images using PHP. Then a simple script changed the CSS background-position attribute to move the layers. It was a very static viewer, and it only worked with one level. You can try it here: http://jazzjackrabbit.net/DJ/LvlView/

Then I continued to build on that, adding a player (green square) and a somewhat failed attempt to do collision detection and physics. It is playable though, with music and simple sound effects. Springs are hardcoded. See it here: http://jazzjackrabbit.net/DJ/oldWebJJ2/

Then there was the version I'm most proud of. It is based on HTML5 Canvas and it features the main menu with JJ2 font rendering. Selecting New Game loads ISLAND LEVEL WITH ISLANDS by EvilMike. A PHP serverside script reads the J2L and J2T files and generates the level as tileset image and JSON info for layer tiles, animated tiles, event positions and other level info. It then renders the level, and you can play it as Jazz. The physics here are much better than in the previous version, but still only tile-based, so you can't walk up slopes etc. You find that version here: http://jazzjackrabbit.net/DJ/WebJJ2/

Then I started all over from scratch again, I wanted an as pure clientside game as possible. I only made the level renderer part, complete with animated tiles, ambient lighting and textured background. I suggest lowering the quality of or disable the textured background for more smooth rendering. This is also a great attempt, but I soon gave up on it. It is impressive to see though the high fps count with textured bg disabled, considering it's just 2D canvas. I'm proud of the main menu background animation here, as with the previous version. It just uses the J2O background and rotates it. Try it here: http://djazz.mine.nu/apps/WebJJ2/

Then, I started working on a new version of WebJCS. I wanted to use WebGL for the tile rendering as I knew that would be the best choice for a future WebJCS/WebJJ2. It falls back to 2D canvas if WebGL isn't supported. Try it live here: http://djazz.mine.nu:8011/

Recently I made a utility that lets you join JJ2 servers and chat in them. It was a test to see if Chrome apps are capable of the kind of TCP/UDP the JJ2 protocol requires. I made my own network manager so that the same code can run as a Chrome app and a semi-native app using node-webkit. It was a success! It also can download and play the music in the level that's being hosted, if it's in MP3 or OGG format. Read more about/download it here: http://djazz.mine.nu/apps/webjj2/

And now, a few days ago I started (from scratch, again) a new attempt to remake JJ2 for the web. I started playing with the Anims.j2a file again. I have previously made parsers for it to view the animations and listen to the sound effects, but I knew I could do it even better, and together with WebGL for rendering.
So I hereby present you my latest crazy creation: JJ4: A sprite odyssey. Exploring the galaxy of the holy sprites. (warning: trippy)
I was impressed at the solid 60 fps framerate and the fluid animation. And that it parses and extracts every single frame from the Anims.j2a file within 2 seconds! I'm convinced that rendering-wise the web does not hold back.



If I were to combine all versions of WebJJ2, it would look pretty awesome, but with poor gameplay. I don't want to revive the old code, that is very badly structured, that was made for one purpose: experimenting with the technology at the time and learning how JJ2 file formats work.

I had very fun building the sprite renderer, but my free time is limited by college studies. I'll put the code up on github as usual, in case anyone want to help me out.

I don't know why I'm writing this long post, but there you go :P

Edit: Github repository: https://github.com/daniel-j/webjj2/tree/master/project
__________________
WebJCS 2 (new and in progress)
WebJCS 1 (old but complete)
SGIP Simple Games in Progress list
Level Packer v2 - With a GUI!
PHP Tileset Compiler

Last edited by djazz; Apr 24, 2013 at 02:31 PM.