JazzJackrabbit Community Forums

JazzJackrabbit Community Forums (http://www.jazz2online.com/jcf/index.php)
-   JCS & Scripting (http://www.jazz2online.com/jcf/forumdisplay.php?f=5)
-   -   WebJCS (http://www.jazz2online.com/jcf/showthread.php?t=19193)

djazz Aug 21, 2011 01:37 PM

WebJCS
 
New version: http://www.jazz2online.com/jcf/showt...684#post471684

[IMG]http://i.imgur.com/wGKXc.png[/IMG]
Download WebJCS from Chrome Web Store here.

WebJCS is a fanmade version of Jazz Creation Station running in a web-browser.
Currently the only supported browser is Google Chrome, but I'd like to support more browsers, such as Firefox.
Some reasons why this isn't cross-browser:
  • It is using special APIs only available in Google Chrome (such as the FileSystem API).
  • It requires fast graphics rendering (Chrome renders twice as fast as FF).
  • It requires some of the latest ES5, HTML5 and CSS3 features.
  • Chrome's JavaScript engine, V8, is (with my experience) the absolute fastest JS engine available.
  • The browser needs to render the page correctly, when in standards mode.
  • You can run it as app in Chrome and it's easy to install it from the Chrome Web Store.

When the basic JCS functionality is done, I can start add new features, such as the first idea of a web-based JCS: Collaborative level editing.

Things to do next: Bugfixes (Saving don't always work, for example), an interface to select events, changable level properties, better help-string editor, editable JCS.ini, better filesystem browsing with features like rename, delete, sort, and other settings.

Want to suggest a feature to a new version of JCS? Use this thread. Only post WebJCS related questions/posts in this thread.

djazz Aug 22, 2011 09:32 PM

A new stable version (1.1) of WebJCS has been released!

Some new features:
  • Level and tileset loading now runs on the main thread instead of it's own. This is much faster because it don't have to send the level/tileset data back and forth.
  • I created a colorpicker and with it you can change the standard blue backgrounds to your own.
  • Layer properties should be fully working.
  • You can clear a layer by pressing the [x] button.
  • Scrollbars have been tweaked, should now work as you expect them to ;)
  • I tried to change the layout from flexible box model to tables, but failed. It is now using JavaScript to calculate the sizes of tileset, layer, anims and parallax view when resizing or when draging the anim/parallax toolbars.
  • The events are now stored in a separate array (same as the one in data2). Before, events were stored in each tile, and those could be drawn on other layers or get overwritten.

Enjoy ;-)

djazz Aug 23, 2011 03:14 PM

Version 1.2 is released, which features a fully functional Level Properties dialog.. with realtime as-you-type HelpString-previews! (If you find any bugs with coloring etc.. please let me know)

The screenshot shows how the preview works:
[IMG]http://i.imgur.com/flNy8.png[/IMG]

WebJCS now has 34 users! :)

Oh, if you have problem running it with Chrome 13, try Chrome Canary. It installs alongside your current Chrome and WebJCS works better there. It's a highly experimental version of the browser, so be careful.

Violet CLM Aug 23, 2011 04:15 PM

Very, very pretty. Concerns:
I would suggest adding a button to summon up the text spacing character, since it's hardly going to be on most people's keyboards.
"Homecooked" is not really the best label.
Min. and Start lights needn't be limited to the 0-100 (=0-64) range.

djazz Aug 24, 2011 05:01 AM

Quote:

Originally Posted by Unknown Rabbit (Post 469819)
I would suggest adding a button to summon up the text spacing character, since it's hardly going to be on most people's keyboards.

I added buttons for #, ยง and |.

Quote:

"Homecooked" is not really the best label.
I replaced it with "Hide level in Home Cooked Levels list" (same as what JCS says).

Quote:

Min. and Start lights needn't be limited to the 0-100 (=0-64) range.
The value is now from 0 to 127 (=0-81, roughly).

cooba Aug 24, 2011 07:29 AM

DJazz asked me if I had any ideas about making MCEs easier to put together, so here goes:

By know, you already know how the generating event's ID affects the created object's placement:



Using event 32 (in this case, Lori Start, thanks to JJ2+) will thus move the object 32 pixels to the right from its origin:



Now, imagine that you're me and you want to make a slightly complex bunch of MCEs like this:



My suggestion is: make the editor put a marker showing where the object will appear in game.



This would be useful to have, considering how it took me like 10 minutes to get this particular example MCE to appear correctly.


Violet CLM Aug 24, 2011 11:27 AM

That's not bad, but I'm wondering when you'd a) need to know the exact column the event ends up being generated in but b) imprecisely enough that a vertical line will be sufficient. The only two times I can think of that I've been concerned with the exact column like that are a) five event MCEs, necessarily and b) something that's going to interact with the masking somehow, and I'm not sure a vertical line would be enough. Obviously those are just simplified examples, but why else would you ever use numbers besides 32, 64, 96, and 127?

djazz Aug 28, 2011 06:29 AM

A work in progress:
[IMG]http://i.imgur.com/BBq1n.png[/IMG]

Sean Aug 28, 2011 09:30 PM

Nice to have the event number right next to the event name.

djazz Aug 29, 2011 10:07 AM

I have released a new version of WebJCS, featuring select event-dialog and some bugfixes.

If you find any bugs, don't wait and report them here.

[IMG]http://i.imgur.com/lO5Zn.png[/IMG]

New hotkeys: E, Ctrl+E and Shift+E for events. Also, rightclickmenus for tileset and layer views.

50 users!

Obi1mcd Aug 29, 2011 10:16 AM

I think I may get Chrome just for this.
The search box for events is a nice touch, by the way.

djazz Sep 19, 2011 01:00 AM

Chrome 14 has been released in the stable channel! You can now enjoy WebJCS again :)

Violet CLM Sep 20, 2011 08:31 AM

All right, I updated Chrome and tried this out. Just scrolling around in Haunted1, it looks great, though I haven't done any extensive testing to make sure everything's saved properly and such. B and such are working perfectly. One issue I had is that Ctrl+E in Chrome puts a question mark in the omnibox and this blocks the Grab Event behavior. I suspect you are much more versed in Chrome than I am; how do I turn off this behavior?

One thing I'm personally doing differently than in JCS is the default settings for Layer 3: I'm not sure I've ever once used the 1.5/1.5 speeds, so I initialize it as 256/64 and 1/1, just like Layer 4. If you're trying for 100% accuracy, ignore me, but I find it more useful that way.

I'm not sure how I feel about the up/down buttons for animated tiles. All references to the relevant animations within the level remain the same, so that clicking the buttons functionally changes which animated tiles are used at specific places in the level. I had expected the buttons would only rearrange the animations for aesthetic purposes, that is, allowing the user to sort related animations together without changing the level itself. On the other hand, I'm not sure if either approach is more "right" in any meaningful way? What purpose do you plan on the functionality serving, as it is presently implemented?

Are animated tiles properties not implemented yet, or could I just not figure out how to bring up the window?

I was able to mess up the animated tiles somehow, causing big question mark tiles to appear in place of certain frames, but I'm not yet sure of the exact set of steps. I'll get back to you.

The event selection window looks great. I know from experience that there's some tricky stuff there, although I suppose it's a lot simpler without trying to hack in AGA support, and it seems to match JCS behavior quite well. The only issue I notice -- and it's an "issue" only in that JCS does it differently, not in that it's necessarily wrong -- is that when you hover over a generator event, the description at the top is different than the one JCS offers. You have the event name be the event being generated and include the parameters numerically, whereas JCS calls it a "Generator" but gives the name of the event being generated as the first parameter in place of the actual ID. I don't know if this was a conscious decision or not so I thought I should point it out just in case.

Seren Sep 20, 2011 08:58 AM

Quote:

Originally Posted by Unknown Rabbit (Post 470315)
I'm not sure how I feel about the up/down buttons for animated tiles. All references to the relevant animations within the level remain the same, so that clicking the buttons functionally changes which animated tiles are used at specific places in the level. I had expected the buttons would only rearrange the animations for aesthetic purposes, that is, allowing the user to sort related animations together without changing the level itself. On the other hand, I'm not sure if either approach is more "right" in any meaningful way? What purpose do you plan on the functionality serving, as it is presently implemented?

Imagine you have accidentally deleted some animated tile in the middle of a huge list of e.g. 100 animations (because you're working on an animation-based level =P). Thanks to the arrows you won't have to delete all the following ones to get the level back to normal, you'll just create that deleted animation again and return it to its place. I admit it's not a great example, because it needs a level maker to make a mistake in the first place, I can't think of anything better though.

And yes, I know I wasn't the one asked, but I tried to figure out the reason for placing those arrows before already, so I thought I'll share my conclusions.

djazz Sep 20, 2011 10:18 PM

Quote:

Originally Posted by Unknown Rabbit (Post 470315)
... though I haven't done any extensive testing to make sure everything's saved properly and such.

Saving seems broken, I don't know what the problem is yet. It's probably the compressing function that's not behaving as expected.

Quote:

Originally Posted by Unknown Rabbit
One issue I had is that Ctrl+E in Chrome puts a question mark in the omnibox and this blocks the Grab Event behavior. I suspect you are much more versed in Chrome than I am; how do I turn off this behavior?

Just press F11 to run in fullscreen or open the app as windowed (rightclick the app in the new tab page). There may be some way to override default behaviour which I'm at the moment are not aware of.

Quote:

Originally Posted by Unknown Rabbit
Are animated tiles properties not implemented yet, or could I just not figure out how to bring up the window?

Currently unimplemented.

Quote:

Originally Posted by Unknown Rabbit
I was able to mess up the animated tiles somehow, causing big question mark tiles to appear in place of certain frames, but I'm not yet sure of the exact set of steps. I'll get back to you.

The question mark appear when an animated tile could not be found in the animation list. Keep in mind it also can appear in another animation because of the "CRAZY ANIMS" behavior (animations as frames).

Quote:

Originally Posted by Unknown Rabbit
The only issue I notice -- and it's an "issue" only in that JCS does it differently, not in that it's necessarily wrong -- is that when you hover over a generator event, the description at the top is different than the one JCS offers. You have the event name be the event being generated and include the parameters numerically, whereas JCS calls it a "Generator" but gives the name of the event being generated as the first parameter in place of the actual ID. I don't know if this was a conscious decision or not so I thought I should point it out just in case.

I could add something stating it's a regenerating event, yes, but I also want the name of the event and the same parameters to be shown, not just "Generator" and replacing the event parameter with the name that JCS do.

@Sir Ementaler & Unknown Rabbit about anim-arrow sorting
I got the idea about arrows and that someone might find it useful. Use it or not use it, your choice :)

Love & Thunder Sep 28, 2011 06:13 PM

I installed Chrome to use this(I normally use Firefox), but Chrome required me to register and give them my Phone Number, so I gave up and uninstalled Chrome, it's a shame though, because I'd love to try this out. :(
Oh well. Good luck with this, and let me know when it supports Firefox!

Troglobite Sep 28, 2011 07:28 PM

Quote:

Originally Posted by Robo4900 (Post 470479)
I installed Chrome to use this(I normally use Firefox), but Chrome required me to register and give them my Phone Number, so I gave up and uninstalled Chrome, it's a shame though, because I'd love to try this out. :(
Oh well. Good luck with this, and let me know when it supports Firefox!

Google probably already knows your phone number anyway. And besides, their motto is Don't be Evil. So you know you can trust them with all your deepest secrets.

Obi1mcd Sep 28, 2011 10:16 PM

Phone number?? I didn't give them a phone number. Or at least I don't think I did.

KRSplat Sep 28, 2011 11:28 PM

Google tends to ask for a phone number for verification when you make a new account, I remember doing it when I made my Gmail but not afterward for Chrome or anything else.

Obi1mcd Sep 28, 2011 11:36 PM

Ah, ok. That makes sense.

minmay Oct 17, 2011 10:18 AM

Just wanted to say, thanks for making this. A recent change of operating system made the JCS animated tiles and parallax view inaccessible, the former of which puts a cap on levelmaking, as you might imagine. So without having this alternative, I wouldn't be able to make any levels until I get enough intelligence to fix this issue.

Jgke Oct 17, 2011 10:33 AM

What OS are you using?

minmay Oct 18, 2011 04:50 PM

Ubuntu 11.10, upgraded from 11.04. To be more specific about the JCS issue, it has a tendency to think its window is larger than it is (I had this on some versions of Windows too), which results in it putting those two views outside of the area you can interact with.

Jgke Oct 18, 2011 08:27 PM

Hmm.. Have you tried using a virtual desktop with wine?

minmay Oct 19, 2011 11:11 AM

Yes, it doesn't do anything in particular. Messing with window manager settings, the best I can get is access to the bottom row of tiles. If you want to continue this, please make another topic or PM me, I don't want to choke up this one with unrelated stuff.

EDIT: Problem just went away. Resizing the window so it's bigger than my actual display offers access to the Animated Tiles/Parallax Display windows, which can then be moved into a reasonable position. I really should have thought of that earlier.

djazz Nov 14, 2011 10:21 AM

Hey again!

I have changed quite much under the hood in WebJCS since last update, not much visual changes. The WebJCS app on Chrome Web Store will remain there, as I can't upload this on the store because of some new features and technologies.

DOWNLOAD HERE! (hosted on my own webserver, djazz.se)

What is new?
  • Levels and tilesets are loaded from your drive, no longer need to manually add j2l and j2t files
  • Saving works!
  • You can play your level without saving it
  • I have replaced the FileSystem API with HTTP calls to a mini-webserver, that also handles decompressing of j2l/j2t, launching JJ2 (Run) and Chrome. The mini-webserver is written in JavaScript and is powered by Node.JS.

How to run WebJCS
Unzip it in any folder, not necessarily in your Jazz2 folder.
Edit the file settings.ini to match your configuration, such as path to Jazz2 folder for finding level/tilesets, command to run when you want to Run your level and the path to your Chrome install.
Then make a shortcut to the WebJCS.bat file, as you would do with any program/file you want a shortcut to.
Run it!

Click for larger screenshot:
[IMG]http://i.imgur.com/GJOtu.png[/IMG]

Violet CLM Nov 14, 2011 11:04 AM

Your save code's looking pretty solid there! You do seem to be checking for events on animated tiles now, you're calculating DoesLayerHaveAnyTiles on saving, and it looks like you're even counting flipped tiles (even within animated tiles), even though that section of data1 was only added to the wiki yesterday. Fast work! Issues I've noticed so far:
  • In JCS, if your selected tiles come from the tileset, the blank tile (0,0) will always paste, even if you're not holding down shift. You only have it paste if you're holding shift or if it's the sole tile in the selection.
  • The "saved files" list seems to have some sort of maximum length, since it only gets as far as R.
  • You don't do a password check.

djazz Nov 14, 2011 11:22 AM

Quote:

Originally Posted by Unknown Rabbit (Post 471686)
Your save code's looking pretty solid there! You do seem to be checking for events on animated tiles now, you're calculating DoesLayerHaveAnyTiles on saving, and it looks like you're even counting flipped tiles (even within animated tiles), even though that section of data1 was only added to the wiki yesterday. Fast work!

Yeah I was getting AVs with flipped tiles, so i checked the J2L spec and found something new! Nice!

Quote:

Originally Posted by Unknown Rabbit
In JCS, if your selected tiles come from the tileset, the blank tile (0,0) will always paste, even if you're not holding down shift. You only have it paste if you're holding shift or if it's the sole tile in the selection.

Must have forgotten that, thanks. I think the old/early versions of WebJCS had the JCS behavior there. I haven't reused any code from the old versions, I want this to be fresh.

Quote:

Originally Posted by Unknown Rabbit
The "saved files" list seems to have some sort of maximum length, since it only gets as far as R.

Fixed in latest Node.JS.

Quote:

Originally Posted by Unknown Rabbit
You don't do a password check.

That's right. What do one want to protect btw? One's Super Awesome Multi Combo Event?
Ofc, it could be nice for Singleplayer levels, that once you finish, you get the password and can see how whatever-in-the-level was made. Need more arguments though.

Violet CLM Nov 14, 2011 11:53 AM

I dunno, but about 20% of levels are passworded, so that's a not insignificant number of users to worry about.

djazz Nov 14, 2011 11:49 PM

Quote:

Originally Posted by Unknown Rabbit (Post 471686)
The "saved files" list seems to have some sort of maximum length, since it only gets as far as R.

This seems fixed in latest version of Node.JS v0.6.1, try download again, I have included the updated executable. I had this issue before too, it seems fixed now.

djazz Nov 15, 2011 09:43 AM

You can now edit the event list, you can also make as many categories you want for your events.
I have included a JCS.ini file I made just for WebJCS.
Also added an option for "Tile Cache lines" (drawn above tiles), check it out!
If you got any ideas of what i should prioritize next? I'm open for suggestions :)

Violet CLM Nov 15, 2011 10:26 AM

Animations, perhaps? There doesn't seem to be a properties editing window yet, and as far as I can tell, you haven't implemented the random adder amplitude for frame wait. (And depending on how you've been doing animations so far, implementing it may require you to recode a significant portion of them.) Also anything you could do to speed up startup time would be much appreciated.

minmay Nov 15, 2011 02:29 PM

Wait wait wait. The random adder thing actually does something? I wish I'd known that, oh, about ten years ago...

djazz Nov 15, 2011 02:39 PM

Quote:

Originally Posted by Unknown Rabbit (Post 471743)
Animations, perhaps? There doesn't seem to be a properties editing window yet, and as far as I can tell, you haven't implemented the random adder amplitude for frame wait. (And depending on how you've been doing animations so far, implementing it may require you to recode a significant portion of them.) Also anything you could do to speed up startup time would be much appreciated.

There is now an Animation Properties window, open it by rightclick on an animation. I haven't planned about Random Adder, but if it turns out simple I could implement it. I'm doing animations by calculating time offset, I guess JJ2 don't do this.
About startup-time I don't think I can do much more. Reading 100-200 tilesets just to get version and title is slow :P
[IMG]http://i.imgur.com/U4KvA.png[/IMG]

Quote:

Originally Posted by minmay (Post 471749)
Wait wait wait. The random adder thing actually does something? I wish I'd known that, oh, about ten years ago...

From the JCS help:
Quote:

Random adder amplitude for frame wait
This value is used to make the wait between animation cycles semi-random. A random number in the range [-1..1] will be multiplied with the random adder amplitude value and added to the amount of frames to wait between cycles. So, if the amount of frames to wait is 10 and the random adder values is 4, the animating tile will wait anywhere between (10-4=) 6 and (10+4=) 14 frames after each animation cycle.

Violet CLM Nov 15, 2011 02:49 PM

Quote:

Reading 100-200 tilesets just to get version and title is slow
*1125
Even so, it shouldn't be that slow... you only need the first 222 bytes or so of each file, after all, unless javascript is just inherently limited in that direction.

JCS does it that way, but not JJ2. A simple modulo won't do the trick for random amplitude at all, since the length of the sequence can potentially change every time it restarts.

djazz Nov 15, 2011 11:51 PM

Quote:

Originally Posted by Unknown Rabbit (Post 471686)
In JCS, if your selected tiles come from the tileset, the blank tile (0,0) will always paste, even if you're not holding down shift. You only have it paste if you're holding shift or if it's the sole tile in the selection.

Fixed
Also made so that when you shrink a layer, it displays a warning/confirm box.

djazz Nov 16, 2011 04:03 AM

Quote:

Originally Posted by Unknown Rabbit (Post 471751)
Even so, it shouldn't be that slow... you only need the first 222 bytes or so of each file, after all, unless javascript is just inherently limited in that direction.

I have now updated it so that it only reads the 50 needed bytes from the header. 50 bytes after copyright (180).

djazz Nov 16, 2011 09:00 AM

Triplepost yay!

Anyways, here are some more bugfixes and features:
  • Warp-lines!! :D
    Lines are drawn between a Warp and Warp Targets with same ID. See the image below for more information. It's toggleable in the settings and requires [Events] to be visible.
  • You can set event parameters to zero. Some if-statement failed. Strange nobody found this :P
  • Fixed a bug with Animation Properties showing up for the wrong animation.
  • Fixed a bug where flipped frames could cause AVs.

Here's a download link: http://djazz.mine.nu/files/WebJCS+Node.zip

[IMG]http://i.imgur.com/QNHSC.png[/IMG]

djazz Nov 18, 2011 03:24 PM

J2O download: http://www.jazz2online.com/downloads/6796/webjcs/

FQuist Nov 18, 2011 04:15 PM

Nice work!


All times are GMT -8. The time now is 07:48 AM.

Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
JCF © 2001-Infinity Jazz2Online