freenode/#clim - IRC Chatlog
Search
12:09:43
scymtym
seems like a nice demo/example (if dim wants to contribute it). is the name a problem? legally, i mean
12:24:30
dim
about unicode instead of hand drawn sprites, it's on purpose for this game, I think for discovering programming and making nice visuals unicode is awesome
12:25:22
dim
you could make a chess board just in unicode, no need to learn graphics programming at all, no need to open a third party tool to handle drawing and learn pixels and vectorial designs and things, just, you know, pick a unicode character and be done already
12:25:43
dim
but my local setup can't display https://www.fileformat.info/info/unicode/char/1f4a3/index.htm
12:30:27
jackdaniel
as of other fonts possibly capable of having it, we could implement font replacement in the renderer
12:30:29
dim
thanks, I didn't manage to have it here, but of course the game would look so much better by having them
12:31:09
dim
well if you have a code snippet that allows picking a unicode friendly font I'm going to try it for sure
12:34:34
dim
jackdaniel: examples for hand-coded patterns? as much as I like using unicode, well, it doesn't work here.
12:35:40
jackdaniel
"this should also expand other boxes" – when I hit the bomb, not all cells are shown, only bombs. so I can click for instance on place where there were no bombs and it "expands" them
12:38:19
jackdaniel
so: (make-pattern #2a((0 0) (0 0) (1 1) (1 1)) clim:+red+ clim:+blue+) will create a rectangular 2x2 sprite with color +red+ on 0s and color +blue+ on 1s
12:40:29
jackdaniel
as of drawing patterns: (draw-design pane pattern) ; you may also use draw-pattern or even draw rectangle with pattern being the ink (!), but I don't recommend the last one, because inks by default start at point 0,0, so you'll have a very confusing experience
12:41:56
jackdaniel
you may also load such pattern from a file: (clim:make-pattern-from-bitmap-file pathname)
12:43:16
dim
alos about the clim:+flipping-ink+, the idea is that if I draw-rectangle* and THEN also format the bomb/flag/number character on top of it, I can't see the character
12:43:42
dim
that's why I picked the flipping ink, just so that you can still see the character underneath when there's one, while highlighting the cell
12:48:43
dim
next step is to use e.g. https://opengameart.org/content/complete-set-of-graphics-for-rts and make a nice coding game with it
12:49:27
dim
(generate maps and a nice character that needs to go from one point to another one, and to move the character you need to enter code, using some high-level functions prepared on purpose)
12:53:44
jackdaniel
we do it another way (for highlighted record if it is bordered): on highlight we change record drawing-options and during unhighlight we restore original ones
12:54:28
jackdaniel
but your solution is cleaner and doesn't require divine knowledge about the core components, so I'd leave it being flipping-ink for now
12:56:20
dim
is it possible to both draw a rectangle and a text on-top of it in highlight-presentation?
12:58:45
jackdaniel
but for exact behavior of highlightning (i.e if spec requires redraw etc) you'd need to consult CLIM II (I don't know it by heart)
13:05:02
dim
is there a transparent ink, so that I can prepare a pattern with transparency, ala PNG?
13:05:50
jackdaniel
yes! but(!) it still doesn't work on CLX backend. I have a working proof of concept code though
13:08:36
dim
ah yeah, transparent is what I want here, just to avoid hard-coding the background color, which is supposed to change
13:31:08
dim
The value CLIM:+TRANSPARENT-INK+ is not of the expected type (OR (UNSIGNED-BYTE 32) (OR CLIM:COLOR CLIM:OPACITY CLIM-INTERNALS::UNIFORM-COMPOSITUM) CLIM-EXTENSIONS:INDIRECT-INK).
13:36:19
jackdaniel
regarding bomb design, if you have a raster image with it, then read-pattern-from-bitmap will give you it right of a bat
13:44:51
jackdaniel
you may also do that a little smarter (we should polish these interfaces and allow outputting to regular pattern too)
13:45:40
jackdaniel
this will give you a rgba-pattern which is not that nice (it has numbers not inks), but may be rendered just as "normal" pattern can
13:46:18
jackdaniel
we should have (clime:with-output-to-pattern (…) …) as well imho (not only with-output-to-output-record which requires existing stream), but we don't
13:47:32
jackdaniel
also, another useful trick: (clim:open-window-stream) will return a window stream to which you may draw
13:47:59
jackdaniel
also after drawing you need to call (finish-output *that-stream*) to make sure output is present
14:42:45
dim
I updated https://gist.github.com/dimitri/5362ed104481f0d3031f26b71f3b3636 with patterns ;-)
14:53:05
jackdaniel
that's a good case for incremental-redisplay (remember updating-output you have used? it is for that display mode)
14:55:41
jackdaniel
dim: see this: https://common-lisp.net/project/mcclim/static/documents/mcclim.pdf#Using%20incremental%20redisplay
15:53:58
slyrus1
there's some difficult-but-not-impossible-to-reproduce bug with dragging where one stops dragging but McCLIM doesn't realize it and then you can't ever stop dragging until you kill the process.
16:08:41
slyrus1
of course I really want flicker-free dragging feedback too so maybe I should worry about that first
16:10:59
TMA
the usual method to miss the 'dragging stops now' event is to release the held mouse button while another application is under cursor/after an app switch by some keyboard shortcut/when a pop-up from another application gains focus
16:12:39
TMA
however to stop dragging, it is usually sufficient just to click inside the apllication as the clicking resets the dragging status
16:43:08
jackdaniel
Colleen: tell scymtym that I've found one particular thing annoying when using clim.flamegraph (hard to say - McCLIM or appliaction fault): when I click the intervals interactor tries to print these large sample arrays what halts the application
16:43:08
Colleen
scymtym: Unknown command. Possible matches: 8, time, tell, set, say, mop, get, time in, have a, grant,
16:43:17
jackdaniel
Colleen tell scymtym: that I've found one particular thing annoying when using clim.flamegraph (hard to say - McCLIM or appliaction fault): when I click the intervals interactor tries to print these large sample arrays what halts the application
16:43:44
jackdaniel
Colleen tell scymtym: that's why I've removed locally interactor from the frame whatsoever
16:45:52
jackdaniel
::notify scymtym I've found one particular thing annoying when using clim.flamegraph (hard to say - McCLIM or appliaction fault): when I click the intervals interactor tries to print these large sample arrays what halts the application, that's why I've removed locally interactor from the frame whatsoever.
16:46:18
jackdaniel
I find minion's syntax much more pleasent to interact with (I never remember how to "use" Colleen)
16:48:09
dim
using incremental-display and then updating-output then the content is not redrawn in several cases
16:49:47
jackdaniel
these parts of code are not well tested (so if you can split these cases into simple orthoghonal instructions to reproduce and report issues, that will be a welcomed contribution - also it will increase a likehood of fixing them)
16:50:21
scymtym
jackdaniel: yeah, that's a problem. i wonder whether selecting individual samples even makes sense
16:50:21
Colleen
scymtym: jackdaniel said 4 minutes, 29 seconds ago: I've found one particular thing annoying when using clim.flamegraph (hard to say - McCLIM or appliaction fault): when I click the intervals interactor tries to print these large sample arrays what halts the application, that's why I've removed locally interactor from the frame whatsoever.
16:51:00
jackdaniel
dim: it may be one issue with multiple code snippets showing different issue manifestations, or one code snippet with clearly commented failure modes (and how to reproduce)
17:06:38
dim
jackdaniel: from commands, when I use commands (from the menu or otherwise), nothing gets redisplayed, but I have commands that change the cells
17:07:41
jackdaniel
I *think* that with incremental-redisplay you need to tell which cells need to be updated
17:11:07
dim
jackdaniel: is that the same thing? http://bauhh.dyndns.org:8000/clim-spec/21-1.html#_1017 the anchor in the PDF didn't work with safari
17:12:40
dim
currently redisplaying works fine in the game, mostly, with some bugs sometimes, but doesn't work when I run commands
17:12:52
jackdaniel
I don't have much experience with incremental-redisplay, I'm only aware it exists and may be used to speed up things (because you redisplay only damaged parts)
17:14:02
dim
ok I'm back to not using it at the moment, I think my understanding of it is too poor at the moment
17:23:49
dim
maybe I should write an Othello again, with the IA and all, like I did back ~20 years ago at school… though it was in Java, then Java+C (client/server), then one member of the team redid it in Javascript/C, then full javascript
17:24:07
slyrus1
yay. editable ellipses. needs incremental redisplay and maybe some faster ellipse math.
17:27:47
scymtym
jackdaniel: i didn't read closely enough what you wrote. were you trying to adjust the interval bounds or did you intentionally click one of the points?
18:06:57
jackdaniel
scymtym: it is hard to tell, because I have this X11 bug with patterns starting at screen's 0,0 (instead of window's [0,0]), basically window looks like this here: http://i.imgur.com/XH6OR9Z.png
18:07:15
jackdaniel
I click black area and sometimes it's fine and sometimes it prints on the interactor pane
18:22:50
scymtym
jackdaniel: i see. it really looks different (in part because you are using an older version). it is probably best to wait until the xrender work is merged
18:39:46
slyrus1
jackdaniel: sometimes I get funky ellipse drawing e.g. https://github.com/slyrus/clim-paint/issues/1
18:49:29
jackdaniel
slyrus1: rotated ellipses are drawn in quite peculiar way (due to lack of primitives in clx): we scan them horizontally (line by line) and draw intersecting lines; then we scan them vertically (to improve drawing quality)
18:50:45
jackdaniel
we should approximate drawing them with bezier curves (8 bezier curves for whole ellipse gives a very appealing result according to the article I've read)
20:13:46
slyrus1
I think we should rename the bezier segment point accessors. p0, p1, p2, p3 was a bad idea.
21:01:17
jackdaniel
afair there is no definite set of points (there may be 100 points), so more consistent approach (with other regions) would be having them in a sequence
22:19:33
slyrus1
p0 p1 p2 p3 are the points of a single bezier segment. No need for those symbols to be exported, IMO.