![]() |
Has someone started on an AJAX implementation of JJ2 yet? :lol:
Really, reading all this makes me think we're almost ready for that. They should hurry with those 100 THz 50-core processors that are probably needed for playing 'JSJJ2' (JavaScriptJJ2) though. |
Yea, I have thought about that too, but it's very hard I think.
I can now make php exe programs with a GUI, maybe we could make a completely php-based JJ2? |
Sounds optimized! Do it man
|
Hmm... I think the best you could do with PHP with stuff like this is by using it as some sort of core layer to build a Javascript on top of it that will handle all the I/O. PHP is good at keeping track of stuff, but I'm not so optimistic about its abilities to react immediately to user input.
|
protip: this will lead nowhere
Seriously, porting JJ2 to javascript+php, what have you been smoking? :p |
yeah
you don't need php/javascript for that.... html and the canvas element is enough.................. |
HTML is a luxury, a JJ2 port using straight Assembly is the way to go. Machine code would be even better!
|
It wouldn't be hard to do a JCS based on HTML, CSS, JavaScript and PHP. Just look at my level editor, it has tiles and rules (events)!
Thanks to Stijn for making it easier to read J2l and J2t! A web-based JJ2 is nearly impossible, I think, with HTML, PHP and JS+Ajax. Because it need to handle TCP and UDP connections. |
Quote:
FQuist made a working version of a collaborative web-based JCS a year or two ago (you could create a level together, and see the changes others made real-time), which that page of mine is based on. Note that back then the J2L and J2T formats were not documented yet. |
Awesome Stijn! does it use any PHP or is it static HTML?
|
It uses some PHP for breaking up a tileset image in 32x32 tile images, but apart from that it's all Javascript/CSS/HTML. The PHP part could probably be improved a lot (to handle .j2t files directly for example).
|
I remember that script... it's so awesome :D
Although I wasn't serious about the AJAX JJ2, it would be pretty awesome :D |
JJ2 File Format Specifications
Just wondering if anyone could help me with a problem I am having. I need to have a lot o webpages that pull a line of text from a txt file so that when the file is changed, all the HTML files will have the new info when they start.
Any ideas? Please let me know. |
Good guide! :D
|
Hello
Good Job Guys, I tryed to create basics on this thread a component for Delphi and i have the most finished but I have a problem with compress2, I have more parameters as you in the function header and i dont know 3 of them, i hope someone can help me. How the compress2 Function is looking at delphi: ZlibEx.ZCompress2(inBuffer,inSize,outBuffer,outSiz e,compressionlevel, windowBits,memLevel,strategy) the first 4 i know (...) and i think the compression level is "max" (9) WindowBits and memLevel are Integer Values (4byte, in c++ "int") The strategy have 5 possible values: - zsDefault(0) - zsFiltered(1) - zsHuffman(2) - zsRLE(3) - zsFixed(4) I hope someone can help me with this, when i get this working i post my component for Delphi here. Sfaizst |
Does anyone know if Data3 in .j2t files is read by JCS, or only JJ2?
|
J2L - Event Map, Events in general and the Generator Event
Quote:
Each event looks like this (4 bytes): Code:
struct Event {I've done some deeper research about the Generator event (216), and found out this: If the Event is 12 (Belt AccR) and the Delay is 3, the structure of the Event Data is: Code:
216 192 48 048 / 16 = 3 But this ONLY applies when Event or Delay is below 15. Example with values above 15: Event: 58 (TNT) Delay: 29 And we get the following result: Code:
216 160 211 1I've made a PHP script that calculates the Delay: PHP Code:
This code isn't tested with all the combinations of event and delays, as there are a lot of combinations: 256*32 = 8192 All I know it works with the most event and delays, and there may be some exceptions. If we/someone will make a new JCS or make a JCS patch, or something else related to events, please help me/us. If this information was useful, or you got any questions/suggestions/further knowledge, please let me know. Comments are appreciated! |
DJazz: No worries, events are understood.
Neobeo addresses your research. Same info, in a JCSref article. (Scroll down to "Parameters vs. Bitfields.") |
A better J2L Event reader/parser
Aah, I haven't seen those pages before, thanks!
That solution is much more simpler than mine.. :D Anyway, it was so interesting that I made a PHP script to get all the event data and it's parameters. It's heavily commented, so you easy understand what it does :P PHP Code:
The first working code was made in three hours! |
Very nice! Particularly remembering to account for the negative parameters. Depending on the context that gets used in, one probably also wants to put in some exception for the Generator event, since giving the name of the event being generated is more useful than the number.
|
:) Thanks
Quote:
|
Quote:
Also in that article: I tried to give the apple |Speed:-8 in jcs but it appeared in the name of the event, how do you change it in jcs so it will appear in a box where you can edit it? |
You will not be able to use more than 32 (0-31) triggers because that's all that the game code allows for, the trigger events only read the first six bytes and not the others for figuring out the TriggerID.
As for Apple, JCS names use two fields, so that you can have multi-line event names, not just one, so you need a blank field between Apple and the parameters. Compare to, say, Echo. Code:
141=Apple |+|Food |Apple | |Speed:-8 |
Quote:
|
http://mods.jazz2online.com/j2b.txt
(Very) incomplete J2B documentation, not complete by far but at least more readable than Dr. Eggman's article. Thanks to Torkell for additions and corrections. If you have any more information on the format, feel free to share. |
Python tileset renderer: http://www.jazz2online.com/junk/sour...ile=tileset.py
Can be optimized (it doesn't cache tiles, for example), but I thought, why not put it up here. |
Quote:
|
I believe the J2L specification is wrong:
Code:
JcsLayerWidth[0 to 7] Byte (1 byte each) Width of layer as seen in JCS. (decreased by Tile Width setting) |
I thought you would've know the correct specification considering that you made the php Level class. Anyway, here is the struct that I have been using recently. Some of it is based on your Level class.
|
Yes, but I only got that to work after skipping random numbers of bytes (the LayerUnknown parts, for example - their size also doesn't match NeoBeo's article), and I hoped someone else had a more robust solution.
Thanks for the code! I see you also haven't figured it out all, but at least a C struct comes in handy for what I was trying to do. |
Quote:
|
I'm sure. You can't even add more than 128 animating tiles in 1.23 JCS.
|
I dunno if this has been posted before (I couldn't find anything about it), so here goes: a list of what set/animation goes with JCS events. Formatted as a Python dictionary (remove the newlines if you want to use it in Python though), but should be easy to convert.
Code:
#format: Event ID (as in jcs.ini): (setID, animationID)Events which have no sprite are obviously excluded. |
Quote:
|
And the PHP port: http://www.jazz2online.com/junk/sour...ss.Episode.php
|
Aaand a J2A renderer (for all those myriads of custom animation files out there):
http://www.jazz2online.com/junk/source.php?file=j2a.py also needs http://www.jazz2online.com/junk/source.php?file=misc.py The sprite drawing algorithm is a bit quirky, but seems to work and is reasonably fast. |
Quote:
|
Sweet! Thanks.
|
Hello Stijn and others,
you may want to have a look at modplug's source code (load_j2b.cpp) for a deeper insight into the J2B format. Everything is working correctly (apart from restart position, I have absolutely no clue where this could be hidden in the file, apparently it's hardcoded?) and I hope that there are at least a few helpful code comments in there. This is certainly more helpful than Dr. Eggman's findings (no offence). |
Oh and if you have any specific questions about the J2B format (EDIT: Although I see that you pretty much covered most of it already), just let me know. I feel like I could answer most of the stuff. =)
|
| All times are GMT -8. The time now is 10:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
JCF © 2001-Infinity Jazz2Online