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.

Messages - Simon

Pages: [1] 2 3 ... 222
SuperLemmini / Re: [SUG] The re-introduction of Timed Bombers
« on: May 05, 2021, 04:58:13 PM »
RR99 level with the lemmings dropping straight into a tight pit which needs to be bombed out of: you'd have to make sure you were selecting a lemming that had been in the level for at least 5 seconds from within the bunch... basically, things could get very messy in spite of the supposed simplicity of this option.

The answer to this is better UI: While bomber icon is selected, the cursor should only consider lemmings that are old enough. The cursor already prioritizes lemmings based on different things, this would be a natural extension under your new game rules.

In general, the program should offer the best possible UI for its chosen own physics/philosophy. It's okay to make the physics first and improve the UI later. Existing UI shouldn't be a concern for game design. Complicated future UI that supports pyshics can be a concern, e.g., player confusion, why doesn't the cursor open over this new lemming?

Interesting design problem of (2): What will you write to the replay? You'll want recorded assignments to replay with the same physics, no matter whether the player's option is timed or untimed bomber.

-- Simon

2 has the first 3.5 hours of the session archived for 14 days. Good night! Flopsy and some others are still playing.

-- Simon

Lix Main / End-of-singleplayer screen
« on: May 02, 2021, 10:27:46 AM »
Progress report on the new feature, the end-of-singleplayer screen.

March 2021: Start implementing the end-of-level screen.
Discover small piece of duplicated logic in the overarching screen handling.
Get idea for huge refactor of the screen handling.
Weeks later, finish refactor.
Lix runs, main menu comes up.
Praise the type system, it catches all bugs at compile time instead of at runtime.
Lix crashes at runtime.
Hack to navigate; most screens don't crash, only the level browser crashes.
Become nearly insane analyzing the code and proving that it cannot crash.
Browse Bugzilla for related compiler bugs.
Find matching bug that I filed myself 6 months ago, during similar problem.
Download compiler source and study, getting ideas to sleep over.
Next morning, discover that somebody already has a pull request in the works.
May 2021: Be happy, continue with end-of-singleplayer screen.

What do we get from these first 6 weeks? The most boring screen in the world, see attachment. :lix-evil: All you can do is go back to the browser.

The plan is:
  • Add the stats for the solution from the finished/exited playthrough.
  • Add replay-saving button, and info about about auto-saving.
  • Add the personal record. I track lix saved and skills.
  • Contemplate about more stats to track. The screen's top half gives room for more.
  • In the bottom half, add preview of next level in the level tree.
  • In the bottom half, add preview of next unsolved level, if that is different.
For consistency, the screen will appear every time you exit singleplayer, even if you didn't win. We might want to save a non-solving replay. And we want to support hotkey habits, e.g. hitting the quitting hotkey twice during a singlepalyer game will then always go to the browser, regardless of winning or not.

After this screen is finished, I'll look at the networking server, allowing different versions to play on the central server, and look into physics changes and level format changes. 0.9.x has been good for nearly 4 years, but we have more things to come.

-- Simon

General Discussion / Re: Simon blogs
« on: May 01, 2021, 01:15:47 PM »
The chunk in Python would look like this:

def makePanel(editor: Editor) -> None:
    editor._panel = EditorPanel()
    with editor._panel as p:
            lambda: editor.askForDataLossThenExecute(
                lambda: editor.setLevelAndCreateUndoStack(newEmptyLevel(), None))

Readability is roughly the same? Maybe indeed a tad better without the closing brace forest.

Sidetrack: Python "with" (click to show/hide)

I have no idea which set of curly braces goes together, it's so easy to lose track. I'd prefer a language that is more like this:
[declare many smaller functions and nest less]

Right, this is the correct feeling. We shouldn't write long or deeply-nested functions, but rather put different parts of the logic in separate functions.

The nesting in this example is necessary because we must capture the local editor in an argument-less function. Thus the definition of the function must be in the same scope where the editor variable of interest exists, which cannot be global scope.

The UI button gets assigned an argument-less function. All the button knows to do is call the function whenever we press the button. The button doesn't know about Editors, and it shouldn't have to know about them. It receives an argument-less function that already contains all necessary extra information (in its "closure").

I didn't choose the example because deep nesting were good, or for showing that I can use all these language features together; deep nesting is indeed to be avoided in general.

I chose the example because even when deep nesting cannot be easily avoided, 4 spaces is OK as an indentation. Any other solution in this particular instance of the problem, e.g., capturing the extra information in Command pattern classes like I do for the undo feature, would be 3-5 times as long and touch unrelated Button code. Thus, I accept the deep nesting this time, as a deliberate tradeoff.

-- Simon

Lix Main / Re: Feature idea: NPC Lix
« on: April 28, 2021, 05:24:35 PM »
Right, neutrals have the biggest potential for multiplayer. It's often too risky and unworkable to steal honeypots (bunches of other players' lix), but honeypots are lovely.

Forestidia is right that neutrals have been on the waiting list for long and haven't gotten implemented yet, even though it's a great idea. The rabbit hole here is: Adding neutrals is a physics change and a level format change. The networking server allows all connected people to play with each other, and excludes from connecting if somebody has outdated physics. Thus, whenever I update physics or the level format, players should update to the newest version.

But we have a Debian package of Lix that updates every 2 years at best. If I update physics freely, I decline Debian users my central server. If I update physics too slowly, as I do now, we don't get enough testing of new physics and I still have unmerged physics changes from 2017 in a side branch.

To resolve this, my plan for 2021 is to rework the end-of-level screen, and then to work on the server, allowing people with different client versions to play in separate rooms. Networking protocol incompatibilites can, if necessary, be hidden in the server, who then has to support several versions for a few years.

This opens the door to neutral lixes and to player handicapping.

Ginger Lixes, a 2014 topic on potential neutral color.

-- Simon

General Discussion / Re: Simon blogs
« on: April 27, 2021, 06:13:31 PM »

One mouse, two mice.
One house, two hice.
Very nice.

More seriosly, to hammer it in stone: I want to adhere to an early daily rhythm. All times are local times, i.e., UTC+2 in Summer, UTC+1 in winter.
  • 05:00: Rise. Minimal physical excercise. Shower. Dress. Take morning walk.
  • 06:00: The bakery opens. Buy Brötchen, return home, eat breakfast.
  • 07:00: Start work.
  • 16:00: End work if the day was normal, otherwise continue working.
  • 20:00: End of private computer usage. Offline hobbies, household, or early bed.
  • 21:00: Go to bed, maybe some reading, but not for hours.
Exceptions are OK for Lix sessions or other social things with a group of people who don't adhere to early rhythms. The schedule provides 8 hours of sleep, it's usually okay to compress it to 7 or 6 hours for a day, but it should never get out of hand.

Ending computer usage an hour before bedtime is common advice, see earlier posts by me/geoo on sleeping problems.

Good night!

-- Simon

Lix Levels / Re: 6 Gaps, 5 Builders
« on: April 25, 2021, 03:45:40 PM »
moving the last block 1 px to the right.

If by "last block", we mean the final island in the water and not the exit platform, and we move this island 2 hi-res pixels to the right, then all 4 covering replays still pass.

We can, in addition, move the exit platform rightwards by at least 8 hi-res pixels, and all 4 covering replays will still pass. Do we want to move the exit platform, too? E.g., we can move it by 4 hi-respixels, and then re-center everything by moving everything leftwards by 2 pixels.

-- Simon

Sun May 2 starting at your proposed 17:00 UTC is good with me, I'll play! Thanks for the initiative.

-- Simon

Right, an overview of physics changes (versions and release dates) is occasionally useful for level archaeology.

A covering replay merely shows that the level is solvable, but it doesn't necessarily show intent. E.g., Six Gaps, Five Builders, it may have become easier after we removed builder backstep.

For now, you can cobble the physics changes from
the C++ Lix history,
the D Lix history.

In 2010 and 2011, I didn't document the history entirely. This was the year of the redrawing towards free sprites and I didn't release Lix for months until it was free.

-- Simon

NeoLemmix Main / Re: NeoLemmix source - auto C# translation?
« on: April 17, 2021, 01:53:58 PM »
Welcome to the forum!

NL transpiled into C# or C++ would be really handy. It would be nice to build NL on Linux with a purely open-source toolchain. Even if it's C# and not C++, I can build from C# via Mono and Wine.

namida wouldn't start a fresh project in Delphi today. He really likes C#.

-- Simon

Engine Bugs / Suggestions / Re: [SUGGESTION] theme.nxmt overrides
« on: April 17, 2021, 04:51:19 AM »
Like cascading stylesheets, but for NL. 8-) Sensible, but needs good documentation. It makes stuff behave on more files than now, and levels behave differently based on where they sit.
-- Simon

New Skills / Re: [DISC][PLAYER] New skills general discussion
« on: April 16, 2021, 09:00:07 PM »
like the Drowners in this example, Swimmers "warp" straight to the top of the water area
I've used the Amiga .bat version
assuming your video was made in the DOS version

Thanks! Yes, I've used DOS L2.

I've just tested DOS L2 with an underwater walker that knows how to swim. It's exactly as you describe from Amiga L2: On rising by at least one pixel, the lemming teleports to the water's top surface, the splash animation plays there, and he immediately starts swimming.

-- Simon

New Skills / Re: [DISC][PLAYER] New skills general discussion
« on: April 16, 2021, 06:05:04 AM »
You can experiment even without level modification, by crawling into the water from below:

You can walk at the bottom of a water pit. Probably another relic of programming with the lemming's pin in the floor. :P If you gain even a single pixel of height, you'll drown.

Experiment what happens when this underwater walker has the swimmer ability. I conjecture that they warp to the top surface of the water, then swim.

How to crawl: When lemmings are trapped within a 1x1 hole (1xN also? I forgot), or trapped completely within terrain, they'll crawl. Roper and platformer are excellent to prepare 1x1 holes. Sometimes, a roper alone can do it, e.g., by a precise angled shot into a corner, or into the lovely Outdoor tribe roots.

To make levels, e.g., to test with unsteeled water: Combine lgl2 with geoo's L2 suite, copy the entire L2 directory and edit the levels within the copy.

L2 (the DOS program) will try to load levels from the emulated C:\L2 if that exists, and from its current emulated directory otherwise. Thus, if you have several copies of L2, don't mount any of them as C:\L2, to avoid this confusion.

-- Simon

General Discussion / Re: Simon blogs
« on: April 16, 2021, 05:15:20 AM »
4 spaces

Indenting code with anything less than 4 spaces is claustrophobic. 4 spaces is good.

Example of bad is Google's C++ style that indents with 2. Why not 1 then? Doesn't make a difference much anymore in clarity.

The alleged exception is Scala -- the language, and even more the culture around the language. They favor nested expressions, not only nested compound statements. Likely, Scala writers indent carefully even within a single expression, and then make long expressions?

Several times already, I've toyed with the thought to make Scala the next language to learn. Allegedly, its type system has elegant solutions to solve common problems, often different to what was considered the solution in academics. Nnnnnnnn... but do I really want to chain the JVM permanently to whatever project it will be...

Nesting within a single expression will happen in many languages, but it hasn't yet been a reason for me to reject 4-space indentation.

Example from my D (click to show/hide)

-- Simon

It's two things, yeah:

1. Track level format version in level.
2. On level load in editor, cleanse if level format is too old.

Or cleanse every time. Cleansing should do nothing when the level is already in newest format. Even if you cleanse every time, format tracking may be worthwhile.

-- Simon

Pages: [1] 2 3 ... 222