PDA

View Full Version : Online JCS level editor [moved from JJ2+]


DarkB
Aug 9, 2009, 10:11 PM
Would also be cool to host a JCS server :D So that others can join to see it (that's a live 'making of' :p) and possibly (after getting permission from the host) help building.


That would be a great start for my never-really-started-but-I-did-make-a-thread-for-it-somewhere-on-this-board 'Lets Make A Level' project. Just cut the level into a few pieces and assign those to the participants. While they are able to design their own stuff inside the assigned area, they can easily link up with the areas around them to improve the level's 'flow'.
I think it would be cool to have this 'online level editor':-)
dunno if is possible to make this..:rolleyes:

FQuist
Aug 12, 2009, 03:36 PM
I think it would be cool to have this 'online level editor':-)
dunno if is possible to make this..:rolleyes:

It's possible to make an online level editor that runs on a web page, however, if you use common web techniques (AJAX) the resulting load is too high for most webservers. JAVA or something might be a solution, but who wants to use THAT? (as a client, not as a coder) I think most luck would come from hooking up jcs.exe with something that changes its memory or shares it with other players, as someone has already done. I think the project was abandoned, unfortunately.

djazz
Aug 12, 2009, 11:49 PM
What about this:
I working on a web-based JCS using JavaScript and PHP, it's not much preassure on the server, because the PHP is generating the tileset image, level data only, Ajax is only needed if you want to save. You can put tiles in the lvl, nothing more yet. No save feature because I don't know how to make the 2D arrays into J2l words.

DarkB
Aug 12, 2009, 11:58 PM
What about this:
I working on a web-based JCS using JavaScript and PHP, it's not much preassure on the server, because the PHP is generating the tileset image, level data only, Ajax is only needed if you want to save. You can put tiles in the lvl, nothing more yet. No save feature because I don't know how to make the 2D arrays into J2l words.
great, keep workin' :cool:

Jerrythabest
Aug 13, 2009, 01:02 PM
Ajax is only needed if you want to save.

Well, that's the whole point: you need to keep open connections to send your locally-made-changes to the server or another client. If you are interactively JCSing with someone else you'll either have to connect the clients directly, or put your server under a heavier load.

djazz
Aug 13, 2009, 01:35 PM
great, keep workin' :cool:
Here is a screenshot of the web-based JCS: http://djazz.mine.nu/files/webJCS.png ;)

plunK
Aug 13, 2009, 07:00 PM
Here is a screenshot of the web-based JCS: http://djazz.mine.nu/files/webJCS.png ;)

That looks quite neat actually. Only 1 problem. There are probably a good thousand at lest tilesets and people tend to avoid standards, and many use customs, how will you deal with that?

djazz
Aug 13, 2009, 09:53 PM
That looks quite neat actually. Only 1 problem. There are probably a good thousand at lest tilesets and people tend to avoid standards, and many use customs, how will you deal with that?

Put a upload function, people can upload tilesets, but the sets need to be admitted by an admin, so that spam-sets not get published (the JJm music uploader works the same way). Or let people enter an url to the ZIP/J2T files, maybe from J2o?

FQuist
Aug 14, 2009, 05:15 AM
Why not plug into Jazz2Online somehow to get the tilesets? That way you only get approved ones.

I'm interested in testing this - I'm an experienced webdeveloper so I might have suggestions.

What I'm wondering is, how is it collaborative? The problem with AJAX isn't keeping a connection open (the point of AJAX is that it doesn't) but that if you want realtime collaboration you need a huge amount of requests/updates to the server. That was what broke my tool: it used one request per tile. That'd bring the server down in no time. Browser protection prevents you from opening a connection using javascript to another client. How is the level editor collaborative if it only uses AJAX while saving? Is it collaborative the way google docs is? You save a file, someone else can open it?

djazz
Aug 14, 2009, 06:05 AM
So, this found I when I looked out the new html5 standard coming (hopefully) in a couple of years, but some features already exists (FF 3.5, more maybe):
HTML 5 for a better Web (http://www.phpclasses.org/blog/post/98-HTML-5-for-a-better-Web.html)

Some parts of the site:
- Drag and drop, copy and paste
Drag and drop support is also part of the HTML 5 specification. It is mainly based on the drag and drop support already available for a while in Internet Explorer. So the implementation of browsers that follow HTML 5 is compatible.

- Running heavy tasks on the browser using Web workers
[...] A better solution is to use Web workers. These are background processes that can execute a given segment of JavaScript code. The main process and the worker processes communicate via a messaging API.

- Responsive browser-server communication with Web Sockets
The XmlHttpRequest object (AJAX) allowed browsers to communicate with the server without reloading the page. However, when you want to send more information to the server, you need to wait for the response and setup a new connection to send a new request.
Web Sockets are meant to address this problem by allowing bidirectional communication within the same HTTP connection.


Sounds interesting, with this new features a online-collaborative-JCS would be made much easier. Let me hear what you think :-)

EDIT1: Shouldn't this be on the JCS sub-forum?

EDIT2: Here is a web-worker example: http://www.whatwg.org/demos/workers/primes/page.html

EDIT3: I've uploaded the web-JCS so that you can try it out. Click here (http://djazz.mine.nu/content/jj2related/JJ2_formats/JCS/)!

FQuist
Aug 14, 2009, 09:02 AM
Would suggest some indication that tiles are being loaded after you select a tileset. Also, I presume the collaboration feature's not there yet?

EDIT: Oh wait, I totally misread your posts, you never announced a collaboration feature. Bummer.

In any case I would suggest thinking twice about replication offline JCS' layout for web use. I don't know what the goal of your app is, but offline layouts don't necessarily adapt to online ones well. Would suggest rethinking how JCS should work, so that a webJCS has added value above the regular one (ease of use, features that you would only be able to offer on the internet (for example: integration into existing information places, collaboration)

plunK
Aug 14, 2009, 10:14 AM
I just opened the link to your web JCS. It works, but it ran and almost frooze loading (which took about 5 minutes) then it nearly freezes again when trying to change layers =\

djazz
Aug 14, 2009, 10:19 AM
I just opened the link to your web JCS. It works, but it ran and almost frooze loading (which took about 5 minutes) then it nearly freezes again when trying to change layers =\

That's because it not use Web Workers yet, and when click a layer button it create the array containing all tiles.

DarkB
Aug 14, 2009, 12:51 PM
Yes it also freeze when trying to see the mask of tiles, but is a good start of this project ;) keep working!

FQuist
Aug 14, 2009, 02:05 PM
That's because it not use Web Workers yet, and when click a layer button it create the array containing all tiles.

I think you can probably make it load better without web workers.

Also, this might be interesting: http://www.sitepoint.com/article/multi-threading-javascript/

djazz
Aug 14, 2009, 02:09 PM
I just opened the link to your web JCS. It works, but it ran and almost frooze loading (which took about 5 minutes) then it nearly freezes again when trying to change layers =\

I fixed so that when a tileset is loaded, it's stored as png on the server, then it don't use the Tileset class everytime. The layers NEED Web Workers (or maybe another solution?), I've tried with big lvls (256x64) and those take loong time to load. I'm also thinking of include a save function (cookies).

FQuist
Aug 14, 2009, 02:59 PM
Cookies? How are you going to store 256+64 tiles+events on 8 layers in a cookie? I would recommend to either save it in a homegrown format and then later on allow downloads by converting it to a j2l file (needs a 1-way .j2l implementation), or saving/loading in .j2l on the server (needs 2-way)

The app feels much more responsive now. Alternatively, maybe it works to not make 256*64 <img> tags but create them only when you scroll. (or rather, replace the contents of those images). I'm a javascript/html n00b, this might actually make the app slower...

djazz
Aug 14, 2009, 03:04 PM
If the data should be saved on the server, then make a php that save it. Or save it locally with cookies or LocalStorage(read that html5 page)

And the page is faster because of... read my last post

DarkB
Aug 14, 2009, 10:54 PM
I have the same problem the tileset respond very hard when change it.
But now when I change the layers it works very fast ;) that's good.

Cpp
Aug 14, 2009, 11:00 PM
You could always use a Flash version. Flash cookies can store larger amounts of data.

djazz
Aug 15, 2009, 12:37 AM
I think I found the store solution: localStorage
http://people.w3.org/mike/localstorage.html

But it's not supported in all browsers

DarkB
Aug 15, 2009, 12:43 AM
You could always use a Flash version. Flash cookies can store larger amounts of data.
yes this idea is actually good ;)

FQuist
Aug 15, 2009, 12:46 AM
If the data should be saved on the server, then make a php that save it. Or save it locally with cookies or LocalStorage(read that html5 page)

Are you suggesting I code it, or am I misreading you? If the latter, no time, sorry

djazz
Aug 15, 2009, 01:08 AM
Are you suggesting I code it, or am I misreading you? If the latter, no time, sorry

I code on that, it's my server. The J2t fetch from J2o isn't something to think about yet, cause the web-JCS has no need for that yet. It's still a beta.
Something that someone could help me with is, my web-JCS working with the levels as 2D arrays, would be great if this somehow was converted into J2L "words" and "dictionary" so you actually can run the level in JJ2.

djazz
Jun 5, 2010, 05:51 AM
Okay, time for a revival.. :-)
The old WebJCS got old, as it used old technology.
I have now made a new version (http://jazzjackrabbit.net/DJ/WebJCS/), which works much better than the old, but it is still a alpha version. (Works best in Firefox, and it's slow in Chrome.. weird..)

This version got some new features than the old, which are multiple select in tileset and drag to place tiles. I will add new features, such as multiple layers, parallax scrolling, animations, level properties, open/save, collaborative level editing and so on...

And, why would you use this instead of the normal JCS you may wonder?
Because you maybe want to load/view/edit a level where you don't have access to JCS, or (which I will add later) if you want to work collaborative with someone else.

At the moment there only exists one tileset, but I will implant a "get tileset from j2o" feature so u can use any tileset on there (FQuist's idea (http://www.jazz2online.com/jcf/showthread.php?p=450409)), or maybe I will add "upload tileset" if you want to use your custom ones.


http://jazzjackrabbit.net/DJ/WebJCS/WebJCS.png (http://jazzjackrabbit.net/DJ/WebJCS/)


This is a project I make for fun, so, enjoy! :D

Stijn
Jun 5, 2010, 07:34 AM
At the moment there only exists one tileset, but I will implant a "get tileset from j2o" feature so u can use any tileset on there
I'd rather you don't, we don't have that much spare bandwith...

Tik
Jun 5, 2010, 11:03 PM
This looks very promising, although I don't understand the point entirely if there won't be a collaborative aspect. I guess it allows people who don't have access to JJ2 or JCS to make their own levels which is a potentially excellent achievement.

I echo the sentiment that it shouldn't grab from J2O, though. Either have the tilesets preloaded for speed or host them on the same server, for courtesy's sake, or allow uploads.

Slaz
Jun 6, 2010, 01:18 AM
The best use for this would be the fact that no JJ2 installation is required to edit levels. Thus for example, you could easely make small tweaks to your levels while at work. And collaborative editing could bring interesting community projects, perhaps LMAT level editing? Anyway, I'd say this is, together with JJ2+, one of the coolest JJ2 related programs of today! ;)

Troglobite
Jun 6, 2010, 12:42 PM
Great work. The editor seems to be off to a nice start, and I can't wait to see more functions implemented.

1. Have WebJCS here on J2O available to authors. It would allow quick edits to levels, eliminating the need of re-uploading. As Slaz noted, people would be able to tweak their levels without having access to their JJ2 installation.

I like this idea. However, I have the perspective of an uploader, not someone in charge of J2O, so I don't know if there are any issues with it for them.

djazz
Jun 8, 2010, 09:35 AM
Seems like good ideas, ill keep them in mind :-)

Anyway, I have implanted a save feature (File -> Save), which works very good! If you find any bugs, please let me know :D

Edit1: Now you can use any tileset, in the menu, :D

Edit2: Now you can skip that passwordbox!

Edit3: Now all layers!

http://jazzjackrabbit.net/DJ/WebJCS/WebJCS_save.png (http://jazzjackrabbit.net/DJ/WebJCS/)

Stijn
Jun 8, 2010, 11:27 AM
I like this idea. However, I have the perspective of an uploader, not someone in charge of J2O, so I don't know if there are any issues with it for them.
I think it'd be possible, at least technically. We store the files as individual .j2l and .j2t files already, so only a few changes would be required to add an interface on top of that. The real issue is of course whether uploaders would agree with their levels being "open" like that. It's something that should be discussed, were we to go through with it.

Violet CLM
Jun 8, 2010, 01:42 PM
I'm not sure if this is an admin post or a personal post, but I don't think that even an "open" level (were we to incorporate such distinctions) should allow edits to be uploaded automatically. This is the internet; there are trolls here. But I could imagine a system wherein you could make some small changes to someone's upload (fixing bugs, mostly) and submit your edit to the uploader for approval. The uploader would get an email notification (or PM, depending on their user preferences, I suppose) and could choose whether to approve the edit as a replacement for the original version, to approve it as an attachment (like an alternate version built to support a slightly different gametype), or disapprove it, if it's trash or something. Honestly that might even be more useful with tilesets, so that you could fix people's palettes and such more easily, if they'd allow you to.

Troglobite
Jun 8, 2010, 04:11 PM
I think it'd be possible, at least technically. We store the files as individual .j2l and .j2t files already, so only a few changes would be required to add an interface on top of that. The real issue is of course whether uploaders would agree with their levels being "open" like that. It's something that should be discussed, were we to go through with it.

I was thinking more along the lines of the level only being editable by the uploader, so that if say, they check j2o on a computer without jazz, and see there's a review of their level pointing out a major bug, they can fix the bug then and there online, without having to use JCS.

Although now that it's been mentioned, I think some kind of open level system would be worth looking into.

Grytolle
Jun 9, 2010, 03:55 AM
This is why I suggested there should be a password.Just let the uploader manage which usernames are allowed to edit it :p (j2o-logins)

Stijn
Jun 9, 2010, 03:55 AM
That sounds rather unwieldy.

BlueDragon
Jun 9, 2010, 05:04 AM
Yeah, that's what my idea originally was.



This is why I suggested there should be a password. Only editors trusted by the author would be able to edit the level this way. The original author could be able to delete attachments that are too bad (maybe they shouldn't be entirely deleted from J2O - some authors might possibly delete files that are completely fine but they don't like for some reason (or is that their right?)).
I imagine something like this on the upload page:

Community contribution settings:
<form action="">
<select name="contrib">
<option value="0">Disable contribution</option>
<option value="10">Allow level preview</option>
<option value="11">Allow level preview (require password)</option>
<option value="20">Allow edits (automatically post as attachment)</option>
<option value="21">Allow edits (require password)</option>
<option value="22">Allow edits (require author's approval)</option>
</select>
</form>

I'm in favour of this "automatically post as attachment" option because there are authors who don't come to J2O very often or leave the site for a longer while and are therefore unable to approve proposed changes.

Another idea: something like a level wiki. I don't mean an encyclopaedia, of course, but something following the same idea that anyone can be an editor, contributing to a project as much as they could. People would say what they've changed (and specify whether it's a minor or major change), there could also be an option to compare changes. Malicious changes would be reverted with one click.
You got a jazzjackrabbit.wikia.com :P

NovaStar
Jun 9, 2010, 06:03 AM
I'm in favour of this "automatically post as attachment" option because there are authors who don't come to J2O very often or leave the site for a longer while and are therefore unable to approve proposed changes.

That doesn't give you license to just edit their levels willy nilly though. Bad reason for favour! Bad!

djazz
Jun 9, 2010, 06:09 AM
Hey, I'm here to say that the save function now works very well! I made it so the passwordbox is not displayed, layer 4 is loaded by default in JCS, all layers are saved.. I will now move on to Level properties and Layer properties :)

About this.. to moderate others levels.. isn't really related to WebJCS as it's only J2L files, but it would be cool to somehow implant WebJCS there too.

Edit1: Implanted Level properties!

Violet CLM
Jun 9, 2010, 03:00 PM
Project Forward once made a very collaborative level and there are plenty of smaller collaborations among two or three people, all of which seem to work out. I think making the collaboration this much more direct, along the lines of Google Docs, could only lead to bigger and better things.

Troglobite
Jun 9, 2010, 09:37 PM
Project Forward once made a very collaborative level and there are plenty of smaller collaborations among two or three people, all of which seem to work out. I think making the collaboration this much more direct, along the lines of Google Docs, could only lead to bigger and better things.

I would very much support a system like that which encourages collaborations.

Obi1mcd
Jun 11, 2010, 02:14 AM
I think an online JCS would be quite useful. Like everyone else said, collaborations would be made simpler and on a larger scale.

djazz
Jun 19, 2010, 03:19 AM
WebJCS (http://jazzjackrabbit.net/DJ/WebJCS/)

I fixed a lot stuff, added a bunch of tilesets (about 400 I think), and WebJCS is now WAY much faster because it calculates what should be displayed and only draws that (layer view). Still, layer properties, parallax view, animation tiles and the undo function are still non-functional. What I will implant next are flipped tiles, layer properties and the B button, I hope :-)

I have made an Web App out of it, which is why you see that cool tab in Chrome in the image below, and WebJCS will appear on the New Tab page of Chrome. See Help -> About JCS for more details. Later, when Google makes Web App Store official, I will make a Web App with offline functionality, which means you "install" JCS in Chrome!

http://jazzjackrabbit.net/DJ/WebJCS/WebJCS_je_tilesetlist.png (http://jazzjackrabbit.net/DJ/WebJCS/)

At the moment, you can't use this "for real" yet, because it's still very limited (you can't change width, copy + paste, events...), but you can use this when you don't have access to JCS.exe, or on your cellphone/smartphone (yes, it works, but not very well in Opera Mobile :p).

I will implant collaborative editing when I have completed the normal JCS functions of WebJCS. Also, I'm thinking of storing levels in the browser, not export to J2L all the time.

Should/Could this be moved to the JCS forum/Further game development forum?

djazz
Jun 21, 2010, 04:14 AM
I implanted support of Parallax View, so you can see how it (almost) would look like in-game, just like in real JCS. It has some bugs with layer tiling outside the level (left and top sides), but I guess you don't use that area much anyways :p
Works best in Google Chrome!

Here, have a clickable screenshot:
http://jazzjackrabbit.net/DJ/WebJCS/WebJCS_parallax.png (http://jazzjackrabbit.net/DJ/WebJCS/)

You can "disable" parallax scrolling by minimize it's window, and you will see it gets blank. The bigger the view is, the slower it goes :-)

Dermo
Aug 31, 2010, 09:12 PM
Progress report?

djazz
Sep 1, 2010, 07:41 AM
Here is a status report, as requested:

I have updated WebJCS (http://jazzjackrabbit.net/DJ/WebJCS/) with event support!
It's not fully working, you can't grab/put events, some event parameters are buggy, event difficulty not implanted, illuminate surroundings don't work yet.
I'll fix those later.

Screenshot:
http://jazzjackrabbit.net/DJ/WebJCS/WebJCS_events.png (http://jazzjackrabbit.net/DJ/WebJCS/)

You can also flip tiles by pressing F.
Warning, don't overwrite your original J2L files with WebJCS generated ones, to be on the safe side. :-)

Toni
Sep 1, 2010, 10:52 AM
What about making Animations works? ;)