Page 1 of 1
How to draw a level sketch? Read on! :-)
Posted: Sat Jun 19, 2004 12:26 am
by Holger
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
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
Example 1: `
012 gives
(normal sized element)!
Example 2: ¸
012 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 press Ctrl-c to copy the selected rectangle (brush) to the clipboard (press Ctrl-x instead to copy the brush in small size).
Now go to your forum post edit form and paste your level sketch by pressing Ctrl-v -- that's all!
Have fun! :-)
Posted: Tue Oct 16, 2007 7:37 am
by Holger
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!
(*) Update: Broken links to Level Sketch downloads removed -- you can just use Ctrl-c/v and the clipboard now (see above)!
Posted: Tue Dec 29, 2009 9:56 pm
by RAP
Request: Why not add an explosion tile? I had to use
as an explosion tile in one of my examples.
Re: How to draw a level sketch? Read on! :-)
Posted: Sun Jun 22, 2014 10:50 am
by filbo
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.
Re: How to draw a level sketch? Read on! :-)
Posted: Sun Jun 22, 2014 11:52 am
by filbo
Re: How to draw a level sketch? Read on! :-)
Posted: Sun Jun 22, 2014 11:53 am
by filbo
Re: How to draw a level sketch? Read on! :-)
Posted: Sun Jun 22, 2014 12:06 pm
by filbo
Re: How to draw a level sketch? Read on! :-)
Posted: Sun Jun 22, 2014 12:19 pm
by filbo
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))
Re: How to draw a level sketch? Read on! :-)
Posted: Mon Nov 12, 2018 11:07 pm
by Holger
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...
Re: How to draw a level sketch? Read on! :-)
Posted: Thu Nov 15, 2018 5:54 am
by filbo
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 :(
Re: How to draw a level sketch? Read on! :-)
Posted: Thu Nov 15, 2018 7:21 am
by filbo
((
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 (21.14 KiB) Viewed 25368 times
Re: How to draw a level sketch? Read on! :-)
Posted: Thu Nov 15, 2018 10:10 am
by Holger
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.)
Re: How to draw a level sketch? Read on! :-)
Posted: Sat Nov 17, 2018 8:45 am
by filbo
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
...