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





Exclusively for this forum! Just draw a quick sketch, copy the forum code, and paste into your post!

To draw such a level sketch, use the ` key (for normal sized elements) or the ¸ key (for small sized elements) together with one of the following three-letter numbers:

000 001 002 003 004 005 006 007 008 009
010 011 012 013 014 015 016 017 018 019
020 021 022 023 024 025 026 027 028 029
030 031 032 033 034 035 036 037 038 039
040 041 042 043 044 045 046 047 048 049
050 051 052 053 054 055 056 057 058 059
060 061 062 063 064 065 066 067 068 069
070 071 072 073 074 075 076 077 078 079
080 081 082 083 084 085 086 087 088 089
090 091 092 093 094 095 096 097 098 099
100 101 102 103 104 105 106 107 108 109
110 111 112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127 128 129
130 131 132 133 134 135 136 137 138 139
140 141 142 143 144 145 146 147 148 149
150 151 152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167 168 169
170 171 172 173 174 175 176 177 178 179
180 181 182 183 184 185 186 187 188 189
190 191 192 193 194 195 196 197 198 199
200 201 202 203 204 205 206 207 208 209
210 211 212 213 214 215 216 217 218 219
220 221 222 223 224 225 226 227 228 229
230 231 232 233 234 235 236 237 238 239
240 241 242 243 244 245 246 247 248 249
250 251 252 253 254 255 256 257 258 259
260 261 262 263 264 265 266 267 268 269
270 271 272 273 274 275 276 277 278 279
280 281 282 283 284 285 286 287 288 289
290 291 292 293 294 295 296 297 298 299
300 301 302 303 304 305 306 307 308 309
310 311 312 313 314 315 316 317 318 319
320 321 322 323 324 325 326 327 328 329
330 331 332 333 334 335 336 337 338 339
340 341 342 343 344 345 346 347 348 349
350 351 352 353 354 355 356 357 358 359
360 361 362 ... skip ... 614 615 616 617 618 619
620 621 622 623 624 625 626 627 628 629
630 631 632 633 634 635 636 637 638 639
640 641 642 643 644 645 646 647 648 649
650 651 652 653 654 655 656 657 658 659
660 661 662 663 664 665 666 667 668 669
670 671 672 673 674 675 676 677 678 679
680 681 682 683 684 685 686 687 688 689
690 691 692 693 694 695 696 697 698 699
700 701 702 703 704 705 706 707 708 709
710 711 712 713 714 715 716 717 718 719
720 721 722 723 724 725 726 727 728 729
730 731 732 733 734 735 736 737 738 739
740 741 742 743 744 745 746 747 748 749
750 751 752 753 754 755 756 757 758 759
760 761 762 763 764 765 766 767 768 769
770 771 772 773 774 775 776 777 778 779
780 781 782 783 784 785 786 787 788 789
790 791 792 793 794 795 796 797 798 799
800 801 802 803 804 805 806 807 808 809
810 811 812 813 814 815 816 817 818 819
820 821 822 823 824 825 826 827 828 829
830 831 832 833 834 835 836 837 838 839
840 841 842 843 844 845 846 847 848 849
850 851 852 853 854 855 856 857 858 859
860 861 862

Example 1: ` 012 (without the space) gives (normal sized element)!
Example 2: ¸ 012 (without the space) gives (small sized element)!

If you don't want to enter these numbers, you can also simply start Rocks'n'Diamonds, enter the level editor, draw your level sketch, select the desired region using the "grab brush" tool (type 'g" and select rectangle with the mouse), and then type ":DB" (for "dump brush") for a normal sized level sketch or ":DDB" for a small sized level sketch -- your level sketch data will be printed out to the command line, from where you can cut and paste it into the forum. (This works best when started on the command line under Unix; under Windows, the data should be printed into the file "stdout.txt". Future versions may directly copy the data to the system's clipboard.)

But the most convenient way to create a level sketch (at least under Windows) is probably by using Alan Bond's program "Level Sketch", which lets you draw your sketch and create the codes ready to cut'n'paste them over to the forum!

Image Level Sketch V1.0 (Stand alone, 31 KB)
Image Level Sketch V1.0 (Installer, 1.38 MB)
Image Level Sketch V1.0 (+Zipped VB6 DLLs, 1.32 MB)

Here is a screenshot of the Windows "Level Sketch" program:

Image

Have fun! :-)
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 982 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