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.


Topics - Simon

Pages: 1 ... 9 10 [11] 12 13 ... 18
151
Lix Main / Korean washing machine
« on: September 22, 2016, 07:48:18 AM »
The Lix ingame UI looks too much like a Korean washing machine.

Idea: Remove boundaries between any two inactive buttons.



-- Simon

152
Closed / [bug] [player] Desync when RR change & assignment in same frame
« on: September 15, 2016, 06:55:27 AM »
<namida42> this [= the assignment logic], and a fix to the weird window stuff, are the two biggest things needed. but both are intimidating tasks.
<SimonNa> hmm
<SimonNa> the windowing has more severe impact for me
<SimonNa> but the assignment is so lovely and exciting to find bugs in, I focus on that, it's like fishing in a lake


I reeled in this carp. This can desync replay and physics: You will see different actions on the screen than what actions will be replayed later.

1. Play a RR 1 level. Let a lem spawn and land.
2. Pause.
3. Set the RR to 99 by right-clicking on the + panel. This doesn't advance physics.
4. Advance exactly 1 frame with the hotkey that advances physics and doesn't cancel the replay. This seems to write the RR change into the replay.
5. Step back 1 frame. See how the RR in the panel shows 1 again.
6. Assign basher.
7. Unpause. Watch the lemming bash. The game will continue to spawn lems at RR 1.
8. Restart level. Watch the lemming bash. The game will continue to spawn lems at RR 99.

The physics lack an action that the replay has: The change of the RR to 99. Expected instead: Items 7 and 8 above continue with the same RR.

You can repro an equivalent bug by replacing RR-to-99 with nuking.

As for LMB advances before cancelling replay, namida and I agree on a more fundamental redesign of the assignment logic: All input goes into the replay first, then the game fetches data from the replay and invokes the data on the physics. The program should be designed such that this is the only way to affect physics.

-- Simon

153
NeoLemmix Main / Confusing gadgets: make design guidelines
« on: September 13, 2016, 12:32:14 AM »
<Nepster> Yes, more guidelines for objects would be nice. This needs a proper forum topic though and I am currently not in the mood to make one.

You play a level in a new tileset, and there is a little house. Is this an exit? Trap? Teleporter? Receiver? Who knows? It's whatever the set designer liked that day.

Whatever looks like a house or archway, I suppose it's an exit. Bonus points if the house has torches. This guideline was set in stone in L1. Very consistent, very good. L2 Sports had the dumb flag in the Sports tribe, but that doesn't violate the rule that every archway is an exit.



L2 began violating the guideline with the airlock. This doorway looks like an exit, because up to here, all the archways were exits. But it's not, it's a trap.



L3 Egyptian has this awful fake exit, and the rotatable wall with hands, of which I didn't find a picture. Both are traps.

Please don't make traps that look like archways. Avoid avoid avoid. If it looks like a building with an inviting door, it's good to enter.



Whatever the L2 devs were smoking, they made this, and it's the L2 Scottish set. This looks like terrain or decoration, but it's again a trap.



Compare with the coastal suction function! This is perfect trap design. The coastal suction function hovers above the path, with a dangeorus tube coming out that aims at the lemmings. It looks mechanical, and not at all like a house. Obviously a trap!

Teleporters must look reasonably different from receivers. Door open or door closed? I don't look at that, I look at the shape of the thing. And if it looks like a house, convince me first that it's not an exit. It's not enough if it doesn't animate. If it doesn't animate, convince me first that it's not terrain.

There's a teleporter in the marble set, it has striped pipes coming from it. Why shouldn't these be solid? They look exactly like the other pipes. Beware of levels that connect real pipes to the fake pipes.

Teleporters could get a consistent symbol throughout all tilesets. Real life has no teleporters, so we must invent something. A lightning bolt? A star? Something that doesn't yet have meaning in Lemmings!

-- Simon

154
Closed / [FIXED] [bug] [player] Pause slows the drawing
« on: September 09, 2016, 04:45:35 AM »
We discussed this in #nl yesterday.

Chat summary: The game scrolls slower during pause. This is dubious: During play, we update physics and draw, but during pause, we only draw. Pause cannot possibly run slower than play, because it's strictly less work -- unless there is a bug.

namida has suspected that the game renders the level twice during pause.

Source code: In v1.47, GameWindow.pas:247, procedure TGameWindow.DoDraw; seems responsibe to render everything. This tells gadgets, lemmings, and the terrain to draw themselves.

When I grep the codebase for DoDraw, I find 7 calls to this method, spread across GameWindow. With so many calls all over the place, I didn't try to reason whether DoDraw gets called too often.

One solution is to make DoDraw do nothing but set a flag. When all input and physics are done, and the flag is set, draw. You already have fNeedRedraw, but aren't using it consistently for this.

-- Simon

155
Lemmini / Smooth moves
« on: September 08, 2016, 06:42:35 AM »
I've dabbled in the Lemmini source on bitbucket, or
git clone https://bitbucket.org/fade0ff/lemmini
Does the Superlemmini source sit somewhere on the web, too? namida pointed me to the zip in the Superlemmini 1.03 release thread.

I've always wondered whether Lemmini is fully hi-res, or lo-res physics with hi-res graphics. The lemmings move very smoothly compared to other games. Is this a purely visual perk, or are the game physics this smooth?

The answer is full hi-res: Builders move 4 pixels ahead during a cycle, that's hi-res. Nonetheless, hi-res isn't obvious: Fallers fall 3 pixels per physics update, that's the same speed as Dos L1 fallers, which would imply lo-res. Hmm.

The solution is that Lemmini performs a physics update every 30 ms, this means 33 frames per second. It updates twice as fast as Dos L1 or Neolemmix at 17 fps, and more than twice as fast as Lix at 15 fps. If we fall at Dos L1 speed, and the distance fallen is half as much as Dos's due to hi-res vs. lo-res, and we fall twice as often, everything fits together again.

But 33 fps isn't obvious from the source either. The source boldly claims:
/** Lemmini runs with 50fps instead of 25fps */
TIME_SCALE = 2;
Bleh? This comment won't digest smoothly with
/** time per frame in microseconds - this is the timing everything else is based on */
MICROSEC_PER_FRAME = 30*1000;

...and this is the code used in the main loop. But doesn't matter, either 25 fps or 33 fps is more than Dos L1, and the thing is definitely hi-res.

Now, if you watch Lemmini closely, you will notice that the lems moonwalk. In detail: Walkers alternately move ahead by a hi-res pixel and animate, and then, in every other physics update, they move ahead by a hi-res pixel, but don't animate. This comes from TIME_SCALE = 2; the lemmings animate only every other physics update.

I conjecture that Windows Lemmings was lo-res physics with hi-res animations, and then Lemmini took the hi-res animations into faster, hi-res physics. Can someone shed light on the Windows Lemmings?

-- Simon

156
Lix Main / I've begun networking in D Lix
« on: September 08, 2016, 02:02:02 AM »
Hi,

this topic is outdated: Lix 0.8 and onwards has networked multiplayer, and we've played some nice sessions already in September 2017. Get a recent Lix from the Lix homepage.



I have begun developing the networking in D Lix. Networked multiplayer is the cheese feature, Rubix and NaOH have joined LF after playing Lix multiplayer in C++ Lix. We must have multiplayer in D Lix.

Game rules: Each player has lixes in their own color. You may assign skills only to lixes of your own color. There is an exit with your color, try to get many lixes into that exit. You get a point for each lix in your exit, no matter whose lixes they were. Screenshot of multiplayer in C++ Lix.

Technical background: Each player runs Lix on their own computer, and connects to a server. When a player assigns a skill to their lix, the server relays this event to everybody else. The game calls high-level networking functions like "send assignment", "choose level", "send chat message".

I have written an abstraction layer that exposes these high-level functions. The abstraction layer sits between the game and enet, a C networking library. I get my hands dirty here, read from bare ubyte*, count precise lengths of data structures, cast data types around.

The networking layer is standalone: It doesn't include anything from the remaining game. Therefore, I can test the abstraction layer outside of the game.

How far am I: The abstraction layer has most features and is well-debugged. My next step is to write the lobby. The lobby will be a graphical user interface inside Lix, it will connect you to the server, offer a text field to chat, and buttons to choose colors and levels.

-- Simon

157
Lix Main / Builder generates terrain behind itself
« on: September 06, 2016, 08:38:40 PM »


The builder generates terrain behind itself with every brick. Here, the builder barely bypasses the exit. Walkers coming from the left will jump into the exit, because they will walk over the extra terrain.

Keep? Remove the lo-res pixel (= 2x2 hi-res pixels) behind the builder? Remove the lo-res pixel and add a pixel at the tip of the bridge, keeping the shape?

-- Simon

158
Lix Main / Triggered traps & lix in transit
« on: August 17, 2016, 05:59:06 AM »
IchoTolot: ah ok the bug front :P
Simon: the bug front is exciting
Simon: I love bugs, everybody should report bugs against every software


Long and technical post, programming.

Github bug #132: Walker bypasses trap, faller is killed, found by Ramon. Equivalent to a bug in C++ Lix, Fast flinging through traps, found by geoo. I want to find the best solution to this.

What happens? When you enter and leave triggered traps, the game scans for traps only at your final position. The game knows that you went through a trap somewhere, but it doesn't remember where you encountered a hungry trap. Whenever you somehow went through a hungry or already-eating trap, the game sets a flag. If this flag is set, then after your full motion, the game scans for hungry traps at your final position.

Compare this with our fire solution: When you enter and leave fire within the same frame, the game still remembers that you went through fire, and kills you. You got to perform your full motion and affect the environment, but after that, you die.

Desired instead: When you move through a hungry trap, then leave it during the same frame, this trap kills you. I don't know whether you should move away or not before the trap kills you.

Sketch of call stack

single lix performs physics update:
    perform job:
        some work
        move ahead:
            if encounter trap:
                set flag
        more work
    if flag:
        feed trap
        die


I don't know whether "more work" should execute when we are going to die. "More work" can easily move you somewhere else, and then it could be harder to determine the correct trap.

Idea #1: throw exception

Have moveAhead throw on trap encounter, and catch this exception in singleLixPerformsPhysicsUpdate. The intention is to stop performJob early.

Benefit: Program flow mimicks what we see and expect. We die immediately.

Disadvantage: I use the exception in a non-exceptional case. This may happen several times per second. In effect, it's a goto that jumps between methods of different classes.

And exceptions produce the slowest code. Throwing may be idiomatic in Python, you even throw when your iterated range is empty. This isn't Python, exceptions are slow. I had file-searching code that relied on exceptions internally, it became 10 times faster after rewriting internals to return success or fail. You don't want exceptions flying everywhere in a multiplayer game.

Maybe it's not a huge performance dent and I should profile.

Also, are exceptions designed for this? Exceptions are for when you encounter non-bug problems with your input or environment, and you don't know how to handle. But I know exactly how to handle traps. My desire is to stop the outside logic, not to inform the outside logic.

Idea #2: disable movement

Once we touch a hungry trap, disable further movement.

Advantage: Relies on encounter flags (did we touch water, fire, trap, steam, etc.) like every other encounter.

Disadvantage: We don't die immediately. The movement-calling code, "perform job" in the call stack above, contiues to happily call moveAhead, and yet we don't move ahead.

Idea #3: remember reference to trap

Once we touch a hungry trap, remember a reference until the end of performJob.

Advantage: We know the correct trap 100 % of the time, instead of deducing which one it was after the fact. We don't ever remember references to already-eating traps, even though we moved through their area. When the job calls moveAhead, we will still move ahead, even if we die afterwards.

Disadvantage: Extra mutable state. We don't die immediately.

Hmm.

I like #3 best, then #1, then #2. (Completing the motion after seeing the trap) shouldn't be problematic. Lixes never affect each other with traps: One lix performs at a time, traps snap immediately before the next lix performs.

-- Simon

159
Closed / Wheel of Misfortune -- inconsistent physics
« on: August 13, 2016, 06:15:25 PM »
Hi,



Here's a bug level, Wheel of Misfortune. See attachment for level, and for the solving replay.


This level highlights an inconsistency of the engine. Decide whether there is a bug, and if so, what to do!

The inconsistency -- spoiler (click to show/hide)

My proposal -- spoiler (click to show/hide)

-- Simon

160
Lix Main / Singleplayer browser vs. hack browser
« on: August 08, 2016, 08:26:21 AM »
I'm unhappy with Lix's information architecture within the application. Playing Levels and viewing their replays should be close together. But it's not: You play from the singleplayer browser, and view replays from the replay browser.

Idea: Redesign into a singleplayer browser, and a hack browser.

Singleplayer is for play, and viewing replays. Singleplayer browser can list replays for the selected level.

Hack browser is for play, edit, delete, mkdir, list and view replays, rename replays, export level as image, what-have-you. Hack browser is a strict superset of the singleplayer browser. The hack browser is a nightmake to make, because it must be powerful and needs lots of extra GUI for rename, mkdir, list replays, etc. Whatever you maintain by your favorite shell or file browser right now, it would become a reasonable feature request for the hack browser.

If hack browser exists, why keep singleplayer browser? Reason #1 is streamlined UI without clutter. Reason #2 is that you don't want a full-fledged filesystem shell within other people's packs.

-- Simon

161
Lix Levels / lemforum, D replay collection
« on: July 27, 2016, 09:37:36 PM »
I maintain replays for the community pack, lemforum/, on github:

Download replays as zip archive or
git clone https://github.com/SimonN/lemforum-replays

These replays won't help you in C++ Lix. geoo has 800 C++ Lix replays with 100 % coverage.

-- Simon

162
Lix Levels / Flopsy plays Lix's lemforum pack
« on: July 24, 2016, 06:28:34 AM »
Simple 1 through Simple 10 on Youtube
Simple 11 through Simple 20
Simple 21 through Simple 28
Simple 29 through Simple 38
Simple 39 through Quirky 8
Quirky 9 through Quirky 14
Quirky 15 through Quirky 20
Quirky 21 through Quirky 27
Forest of Fears, Lix Lata
Quirky 29, 30 = Snowball Battle
Quirky 31-34
Quirky 35-40
Cunning 1+2
Cunning 3 through Cunning 5 = Lix Cannon
Cunning 6-10
Cunning 11-13
Cunning 14
Cunning 15-17
Cunning 18-22
Cunning 23-25
Cunning 26-28
Cunning 29-30
Cunning 31-34
Cunning 35+36
Cunning 37+38
Cunning 39+40
Daunting 1
Daunting 2+3
Daunting 4+5
Daunting 6 = Now This is Fun
Daunting 7-9 = Variety Day, Merge Sort, Backslash
Daunting 10-11 = Go West, Stickup (sorting before v.0.9.12)
Daunting 2 = Round Trip
Daunting 12-14
Daunting 15 = Railroad Plot
Daunting 16-17 = Derailed Level, Lixes in Motion (does not solve Derailed Level)
Daunting 18-19 = Too Much Stepping Stones, Jack in the Box
Daunting 20-22 = Slipping, Slipping Again, Lix Ferenda
Daunting 23 = Segmentation Fault
Daunting 24-26: Cornerstone, Repeating Patterns, The Crimson Room (does not solve Repeating Patterns nor Crimson Room)
Derailed, Repeating, Crimson, Feel the Pressure, Beneath the Lab, Slaughterhouse

Early videos show both Windows's mouse cursor and Lix's mouse cursor. This effect comes from the recording software, it puts Windows's cursor back into the video. Flopsy doesn't see the Windows cursor during play, not even during recording.

When you pull the mouse hard enough to a window side, Lix releases the mouse. This is a feature. Depending on your mouse speed in the game and in Windows, it feels like a bug instead. I fixed this in the later Simple levels.

SI, in the panel, means spawn interval, the physics updates between successive lix spawns. I should write that on hatches instead, during pause, and not use the abbreviation either.

-- Simon

163
Closed / [editor] Preplaced lem, sprite too low by 1 pixel
« on: July 18, 2016, 04:34:54 AM »
Tested in 1.42-B, but Wafflem's avatar suggests that it's still in the current version. <_<

The pin (effective coordinate) of an L1 and NL lemming is inside the floor. The lemming's white foot is above the floor. Therefore, the pin is 1 pixel below the white foot.

The NL editor allows preplaced lemmings. Preplaceds have a special sprite in the editor: A still walker frame, and a red dot. The red dot is on the same height as the foot. When you run the level, a lemming appears with its pin exactly where the red dot was. We see how the red dot marks the pin correctly.

When you insert a preplaced, you must move its foot into the terrain. Only then will the dot be at the correct position. The ingame lemming will have its foot above the terrain.

Expected instead: The sprite should be shifted upwards by 1 pixel in relation to the dot. The dot stays where it is.

-- Simon

164
Lix Main / Download Lix here! Chat, bugtracker, source code
« on: July 17, 2016, 11:40:47 AM »
Hi,

Lix is a free-and-open-source game inspired by Lemmings. It's in the public domain and runs on Windows, Linux, and other platforms. We have singleplayer, a level editor, and networked multiplayer.

Download Lix -- if Windows, prefer the 64-bit version
  • Play the included lemforum community pack.
  • Play the included ClamLix, NepsterLix, Rubix's pack, ...
  • Design new levels in the included editor.
  • Play multiplayer: Post on the forums to agree on a time, or join IRC.
Homepage
Source code on github
Source code as .zip

Get help, report bugs/features:
Screenshot from our first singleplayer level, Any Way You Want. Lix comes with over 700 levels designed by Lemmingsforums members. Build your own levels with the included editor.



-- Simon

165
Closed / [bug] [player] Crash on single level with tileset missing
« on: July 06, 2016, 09:13:38 PM »
Hi,



Related chat on 2016-07-06 at 21:00 UTC:

Gronkling: SimonNa: Thanks for the backroute! here's a V2 of the level which will be included in the finished game (unless any other backroutes are found) https://drive.google.com/open?id=0B24bnHjK2QUDTGNhMWNxeWJVNlU
SimonNa: Gronkling: that level segfaults NL immediately on loading the level. What NL version do you use?
Gronkling: im using v1.43 for the player
SimonNa: okay, hmm
SimonNa: maybe I lack the tilesets, and the game doesn't give a proper error
Gronkling: just checked and i can load in my player
SimonNa: okay, cool
Gronkling: yes that might be it because i bundled the tilesets with the nxp


-- Simon

Pages: 1 ... 9 10 [11] 12 13 ... 18