How to draw a level sketch? Read on! :-)

For testing of level sketches, avatars, banners and BBCodes.

Moderators: Zomis, Flumminator

Post Reply
User avatar
Holger
Site Admin
Posts: 2981
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

How to draw a level sketch? Read on! :-)

Post by Holger » Sat Jun 19, 2004 12:26 am

Last edited by Holger on Mon Oct 22, 2007 11:16 pm, edited 1 time in total.

User avatar
Holger
Site Admin
Posts: 2981
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger » Tue Oct 16, 2007 7:37 am

The above links don't work anymore, and there seem to be no backup of those packages. But the following packages are still available:

Level Sketch V2.0 Stand-alone version:

http://www.artsoft.org/RELEASES/rocksnd ... ls2_sa.zip

Level Sketch V2.0 Installer version:

http://www.artsoft.org/RELEASES/rocksnd ... s2_ins.zip

Have fun!

User avatar
RAP
Posts: 285
Joined: Sat Jun 19, 2004 6:44 pm

Post by RAP » Tue Dec 29, 2009 9:56 pm

Request: Why not add an explosion tile? I had to use as an explosion tile in one of my examples.

filbo
Posts: 312
Joined: Fri Jun 20, 2014 10:06 am

Re: How to draw a level sketch? Read on! :-)

Post by filbo » Sun Jun 22, 2014 10:50 am

To draw such a level sketch, use the ` key (for normal sized elements) or the ¸ key (for small sized elements)
Hi -- when I use :DB it dumps ASCII backquotes (`); :DDB dumps a character hex-B8 which shows up as a white diamond with a question mark in it, in gnome-terminal. Sure enough, that's what the source code shows. In fact, if I copy the text "the ¸ key" out of your post, what looks to me like a comma is actually showing up as hex C2 B8 when pasted into a regular ASCII text file.

So I'm a little confused. When I read "the ¸ key" I expect to just type a comma -- I'm sure I don't have a "looks an awful lot like a comma, but is just a tiny bit different" key on my keyboard! :)

So I test:

Backquote yamyam:
Comma yamyam: ,011
What-the-comma yamyam:

Even the forum is in on this conspiracy! Regular commas don't work, only the Different Weird Comma.

Googling for [UTF-8 "C2 B8"], I learn that this is a standalone cedilla. Ok, maybe European keyboards actually *do* have a standalone cedilla key, or at least an AltGr-comma or some such sequence to generate one?

This seems like a to me. Especially since the forum appears to expect a 2-char UTF-8 sequence, while the source code says printf("%c", '[single B8 char]').
select the desired region using the "grab brush" tool (type 'g" and select rectangle with the mouse)
This doesn't work for me; the "grab brush" tool appears to be 'b' rather than 'g'.

Is there any way to "grab brush, then print sketch" of an entire level? I tried to do it with that Martin Brentnall level 14, which is quite a bit larger than the level editor window, and I couldn't drag the brush larger than the visible area.

filbo
Posts: 312
Joined: Fri Jun 20, 2014 10:06 am

Re: How to draw a level sketch? Read on! :-)

Post by filbo » Sun Jun 22, 2014 11:52 am

Test...





filbo
Posts: 312
Joined: Fri Jun 20, 2014 10:06 am

Re: How to draw a level sketch? Read on! :-)

Post by filbo » Sun Jun 22, 2014 11:53 am

Another test...





filbo
Posts: 312
Joined: Fri Jun 20, 2014 10:06 am

Re: How to draw a level sketch? Read on! :-)

Post by filbo » Sun Jun 22, 2014 12:06 pm

Is there any way to "grab brush, then print sketch" of an entire level? I tried to do it with that Martin Brentnall level 14, which is quite a bit larger than the level editor window, and I couldn't drag the brush larger than the visible area.
Here's the top of that level -- printed with ":DDB" and a small source change.

For these very wide sketches, it would be nice if the forum allowed the sketch to extend all the way to the right hand side of the tab. To see the regular tiles version without wrap, I have to "zoom out" until text is nearly unreadable. The small tiles version can be seen with only a little zooming out, or making the browser window very wide. The small tiles have narrow white lines between them (might be a Firefox zoom artifact).

Trying to post the entire 64x64 image of the level I'm messing around with doesn't work. The printout gets much slower as I add lines (I think non-linearly?) and by about 64x35, it just times out and sends a blank HTML "page".






















filbo
Posts: 312
Joined: Fri Jun 20, 2014 10:06 am

Re: How to draw a level sketch? Read on! :-)

Post by filbo » Sun Jun 22, 2014 12:19 pm

Patch:

In level editor, typing ":DB" or ":DDB" will print a level sketch of the entire level if no brush is selected.

Code: Select all

--- editor.c.orig	2013-09-05 01:38:45.000000000 -0700
+++ editor.c	2014-06-22 05:21:47.144204099 -0700
@@ -10143,18 +10143,20 @@
   if (mode == CB_DUMP_BRUSH ||
       mode == CB_DUMP_BRUSH_SMALL)
   {
+#if 0  /* Allow level sketch of whole level */
     if (!draw_with_brush)
     {
       Error(ERR_WARN, "no brush selected");
 
       return;
     }
+#endif
 
-    for (y = 0; y < brush_height; y++)
+    for (y = 0; y < (draw_with_brush ? brush_height : lev_fieldy); y++)
     {
-      for (x = 0; x < brush_width; x++)
+      for (x = 0; x < (draw_with_brush ? brush_width : lev_fieldx); x++)
       {
-	int element = brush_buffer[x][y];
+	int element = draw_with_brush ? brush_buffer[x][y] : Feld[x][y];
 	int element_mapped = element;
 
 	if (IS_CUSTOM_ELEMENT(element))

User avatar
Holger
Site Admin
Posts: 2981
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: How to draw a level sketch? Read on! :-)

Post by Holger » Mon Nov 12, 2018 11:07 pm

Although a bit late, this patch will be in the next version, with a few additional enhancements:

* Ctrl-c will copy the current level (or brush, if selected) into the clipboard.
* Ctrl-x will also copy the current level (or brush), but as small sized level sketch.
* Ctrl-v will paste a level sketch from the clipboard into the current level (or brush, if active).

So you can easily copy level sketches from the level editor to the forum, and also from the forum to the level editor (just temporarily go to the "reply" form for a post containing a level sketch, and copy the "source code" text of the level sketch to the clipboard with Ctrl-c, then paste it into the level editor using Ctrl-v).

This will also make it easy to copy a whole playfield from one level file to another in the level editor (playfield size will automatically be adjusted to the size of the pasted playfield).

Will be available in the next release version...

filbo
Posts: 312
Joined: Fri Jun 20, 2014 10:06 am

Re: How to draw a level sketch? Read on! :-)

Post by filbo » Thu Nov 15, 2018 5:54 am

Having been reminded of this thread, I wrote back then:
For these very wide sketches, it would be nice if the forum allowed the sketch to extend all the way to the right hand side of the tab. To see the regular tiles version without wrap, I have to "zoom out" until text is nearly unreadable.
-- now the situation appears to be worse, presumably due to newer phpBB. Now, no matter how much I zoom 'out', the layout width remains fixed in terms of number of characters; therefore those wide level images are always wrapped no matter what :(

filbo
Posts: 312
Joined: Fri Jun 20, 2014 10:06 am

Re: How to draw a level sketch? Read on! :-)

Post by filbo » Thu Nov 15, 2018 7:21 am

((
In writing this comment, I had a lot of trouble with phpBB and possibly the system it's running on:

Every 'preview' action takes something like 10-20 seconds. I've verified that my net connection is performing normally; either this host's net is slow or it's lugging for some reason.

Also, whenever I uploaded more than one attachment (always inline images), the images would be visible on first 'preview' reload; but the table of images would have been culled down to just one. A subsequent 'preview' reload then showed only that one attachment, with The attachment whatever.jpg is no longer available in place of the others.

It seems to me these might both be caused by a full filesystem on the host; except then it's odd that I was able to get one file uploaded successfully.

And, whenever I added another attachment, phpBB inserted it at the top of the table and pasted it into the post as '(attachment=0)' (with square brackets of course). Older images were shuffled down and would need to be referred to as '(attachment=1)' etc., but it didn't edit the comment 'source code' to match. This part is pure phpBB bugs, I think.
))

ANYWAY, what I came to say was, I tweaked the phpBB output and the forum was a whole lot better. Here is one image showing the patch (in browser debugger) and resulting effect on the computed box model of the forum. And the result is, with a wide-enough window (not very wide by today's standards), wide level sketches do not wrap.
widen.png
widen.png (21.14 KiB) Viewed 981 times

User avatar
Holger
Site Admin
Posts: 2981
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: How to draw a level sketch? Read on! :-)

Post by Holger » Thu Nov 15, 2018 10:10 am

Regarding web server and phpBB3 speed:
Every 'preview' action takes something like 10-20 seconds. I've verified that my net connection is performing normally; either this host's net is slow or it's lugging for some reason.
On my side, pressing the "Reply" button on your last post reproducibly takes 17-18 seconds until the form shows up.

But it's not the network, but the PHP process spawned by phpBB3 (or Apache, to be precise) -- looking at a running "top" in a ssh shell on the server shows it sitting there for around 17 seconds with 100% CPU usage. :-(

Just for testing, I've changed the Apache web server configuration from using MPM prefork and mod_php (before) to using MPM worker and FastCGI / php-fpm (now). It does not make any difference in speed for this "Reply" action.

But it's indeed this thread's content that causes the huge delay -- try to hit "Reply" on the thread "TEST" in this same "Testing Area" sub-forum, which is blazingly fast (under one second for me).

Apparently phpBB3 chokes on those many, many level sketch images for whatever reason (not sure what the heck it is doing with them when pressing "Reply"). Probably the same things happen when pressing "Preview". :-(

So for now, I have no idea how to speed up replying to threads with massive level sketch usage. :-(

More on your other interesting comments will follow later! (Just one additional comment: No, the server's file system still has lots of free disk space.)

filbo
Posts: 312
Joined: Fri Jun 20, 2014 10:06 am

Re: How to draw a level sketch? Read on! :-)

Post by filbo » Sat Nov 17, 2018 8:45 am

Um, wow!

That's really weird, given that:

- it renders the non-reply version of this thread instantly
- the reply form does include such a render, but not a 'source code' quote of the rest of the thread
- the total amount of level sketching in the entire thread is under 2000 cels

Admittedly, it does have a fairly large number of individual cels (table of 612 image mappings). But this is not actually a large number in modern computing resources...!

Weird ...

Post Reply