Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Simon

#1
General Discussion / Re: Simon blogs
June 29, 2025, 05:26:06 PM
Saturated Addition

Here's some small talk from board game night this weekend. Consider the following mathematical operation, which I'll call a saturated sum, or saturated addition.

  • Input: A finite list (x1, x2, ...) of real numbers. It's okay if the list is empty. Order doesn't matter, but the list is not a set nonetheless: We allow multiple copies of the same number in the list, and it makes a difference.
  • Output: A real number.
  • Steps:
    • If the list is empty, return 0. Otherwise, continue with the next step.
    • Compute the sum s of the list, i.e., compute s = x1 + x2 + ...
    • Find the maximum max(x1, x2, ...). If the sum s is bigger than this maximum, return this maximum. Otherwise, continue with the next step.
    • Find the minimum min(x1, x2, ...). If the sum s is smaller than this minimum, return this minimum. Otherwise, return s.

Very nice. Examples:

  • The saturated sum of (3, 4, 5) is 5.
  • The saturated sum of (20, −1, −2, −3) is 14.
  • The saturated sum of the empty list is 0.
  • For x fixed, the saturated sum of the nonempty list (x, x, x, ...) is x.

Questions:

  • How common is saturated addition? E.g., I would like to use this in Lix to add the speed of overlapping flingers/batters. Where else does this appear?
  • We made up the name "saturated addition". Does it have a more canonical name?
  • In higher dimensions, is component-wise saturated addition base-invariant? No, see below.



We can lift saturated addition: Lists(ℝ) → ℝ to a multi-dimensional saturated addition Lists(ℝd) → ℝd. Conduct saturated addition component-wise, i.e., in each of the d dimensions, conduct saturated addition separately. You'll get a point in ℝd as final output of the d one-dimensional saturated additions.

This depends on the choice of base of ℝd.

Proof: Consider the two-entry list ((1, 0), (0, 1)) of points in ℝ². The component-wise saturated addition yields (1, 1).

Now we recompute that in a rotated base. First, rotate both list entries counter-clockwise by an eigth. We get the list ((1/√2, 1/√2), (−1/√2, 1/√2)) of rotated points. The component-wise saturated sum is now (0, 1/√2). When we rotate (0, 1/√2) back clockwise by an eigth, it becomes (1/2, 1/2), which fails to match the earlier result (1, 1). End of proof.

Lix physics are on a two-dimensional space, but there is a clear choice of base: the gravity axis and the horizontal axis. It's natural in Lix to depend on this base and not worry about it.

-- Simon
#2
General Discussion / Re: Simon blogs
June 17, 2025, 10:08:13 PM
I agree, the spirit and common interpretation of the bad rule (help solve, unless you had known the solution before) is the same as of the weak guideline (don't spoil it immediately if you had known it before).

-- Simon
#3
General Discussion / Re: Simon blogs
June 17, 2025, 09:43:42 PM
Quote from: Silken Healer on June 17, 2025, 09:26:43 PMHow will they know if the part they solved is used in the final solution correctly

To the specific argument that I'm making, it's irrelevant.

A and B are in the chat. A has solved the level before. From watching, B gets three ideas, X, Y, Z, but only Z is correct. Under the bad rule (help solve, unless you had known the solution before), A is disallowed from writing X, Y, or Z, but B is allowed to write all of X, Y, Z. Now, A doesn't care about X or Y. But having been disallowed from writing Z feels wrong to A after A sees B write Z. It's irrelevant to A what B thinks/knows here.

-- Simon
#4
General Discussion / Re: Simon blogs
June 17, 2025, 09:11:33 PM
Single-Player Lemmings Streams

Consider livestreaming your solving. It's fun!

You can stream to Twitch, to Youtube, you can host your own RTMP server/webchat and link people to that, you have many options. Announce your streams in advance on the forums, then forumers can join your chat.

There are two main styles to stream single-player puzzles:

  • No spoilers allowed in chat; this is the more common style, or
  • viewers are actively encouraged to help solve.

There are nuances among both of the styles. darkshoxx forbids spoilers and considers even UI explanation in chat a spoiler.

I've always encouraged active solving; the idea is: If you join chat, you should be allowed to participate fully. If you weren't allowed to help solve, you'd have to limit your chat to irrelevant smalltalk. I wouldn't want to inflict that on you. (To solve 100 % hint-free, I'll solve off-stream.)

With active solving encouraged, again, there are nuances. It's hard to pin down what I really want. I've written: "Help solve, unless you had already known the full solution by heart." There is a problem here: This rule forbids hints that other people in the same chat are allowed to write after they live-solve a part of the puzzle in their head.

I'm beginning to think that my rule is bogus (help solve, unless you had known the solution before). There should be a rough guideline that you shouldn't outright spoil the solution immediately at the beginning. What that means in detail should be interpretation of the viewer, i.e., the guideline should remain largely unenforced. If you pop into my chat and want to give hints, you should give hints.

-- Simon
#5
In May and June, I've streamed thrice, for a total of 10 hours.

I've got through ~30 % of the Level of the Year nominations on stream. I've given every played level a good shot, solving many level, and making progress on the others. Of every author with a nomination, I've played at least one level.

Mobiethan, Pieuw, and Icho watched live. Thanks for hanging in the chat!

I'm happy with the invested time. The mix of nominations is wonderful, with varied puzzle difficulty. It shows the creativity and spirit of the Lemmings community. Among the played levels, I have some secret favorites already, but I won't name any for now, lest it skew the polls.

I'll review the remaining unplayed levels offline before the voting. There had to be ad-hoc level selection during the livestream. If I didn't hit your best entry by chance, I'd still like to have tried it.

-- Simon
#6
Stream is over! Recording will remain for 14 days at:

https://www.twitch.tv/simonnaar

-- Simon
#7
Video: Splat ruler freezes CE for 5-10 seconds (70 seconds long, 4.4 MB)

This is an excerpt from my stream 3 weeks ago. I've had already played CE for 2 hours here.

-- Simon
#8
Forestidia saw this in 0.10.29 again.

Forestidia's report

-- Simon
#9
Thanks!

I have to investigate whether we draw from current state onto the new savestate (that we allocate), or if the current state becomes the savestate (and we allocate a new current state), drawing from savestate onto current state.

This can merge all of the following 3 phenomena,

(a) missing bridge slap during stutter,
(b) all terrain becomes black,
(c) failed VRAM allocation,

... into a consistent world-view: The theory will be: When a monitor turns off, something happens with Lix's window behind the scenes, all VRAM drawing during this short time has no effect (but won't crash), and all VRAM allocations with this window in this short time fail (and crash because Lix chooses to crash then). In case (a), Lix wants to draw only a brick, but in case (b), Lix wants to load an old savestate including all of its saved terrain.

Leftover consistency problem: Why does the terrain in case (b) become black ... it should remain the terrain from before loading the savestate, then, right? Details, details.

In any case, more to investigate.

All of this has given me ideas to ask directly in the Allegro IRC: How does an Allegro 5 window react to monitor turn-off, such stutter etc., and should the usercode (Lix) react or should Allegro react.

-- Simon
#10
Do you put large water areas?

Another solution, then, is to draw only the outline of the trigger rectangle in the contrastful color. The inner area can be fully/mostly transparent.

-- Simon
#11
All right, Sunday (in two days) at 14:00 UTC. See you!

-- Simon
#12
These monitor bugs -- wonder why nobody has run into them before, and you found 3 or 4 of them already this year. And you're not even using Windows 11, which is nowadays's easy blame target. ;P

This one is particularly astounding. The already-loaded sprites, exits, hatches, ... all remain intact. Only the terrain layer becomes black or transparent, even though it's a VRAM bitmap like any other sprite/exit/hatch. Or is it? I should research. But then new terrain (the later-built staircases) can be painted onto the black/transparent as if nothing were out of the ordinary.

The terrain VRAM bitmap may be large (it's a single piece, 1:1 the size of the level), but the spritesheet is also large at 913 x 946, about the same order of magnitude as that map. That would rule out size.

No idea, must reproduce from first principles. And first find a multi-monitor setup.

-- Simon
#13
The answer I was hoping for was: You look into the source and see an obvious performance bug with the splat ruler within 5 minutes. ;P

According to your testing, I doubt that the lion's share is due to Wine; it's a general issue. But I haven't investigated other than how a freshly started CE won't freeze in Wine either. Even on Turrican's Space Program 10,000 BC, yes, it still stuttered, but it wasn't frozen for seconds. All my testing in this entire thread has been with low resolution and low-quality minimap.

Before you put a warning, I'd wait until we all have researched this better. The warning would also break NL compatibility in a weak sense: NL won't scold you for making large levels, but CE would.

Do you have time on Sunday, June 15th, 14:00 UTC, to dig into the CE source together in Mumble?

-- Simon
#14
Next stream will be Sunday, June 15th, starting 16:00 UTC.

We'll play more Level of the Year 2024 submissions. I will show geoo's two Lix levels: Just Mine, and Roots of Life. I know (part of) the solutions by heart, and therefore I myself will hold back with ideas for geoo's levels. Instead, you tell me your ideas, and I'll play like that.

There will be more NeoLemmix entries after geoo's two Lix entries.

-- Simon
#15
What problem are you trying to solve?

Do you mean the time zone name (ET), the time zone name with DST information (EST/EDT), or the UTC offset (−05:00/−04:00)?

And of what? Of when Lix saved the replay? Or of the level's built datetime? The levels' built datetimes carry no time zone information in the levels.

The point of the replay names is to generate unique filenames. It's not tailored to match your replay to my replay. To do that, a better feature is: Generate a match ID for each started match in the server, and change the networking protocol to work with match IDs. That would also be a start to allow people to observe (or even to reconnect as an active player to) a previously started networking match that hasn't finished yet.

-- Simon