Searching We Love Privacy Club

Twts matching #games
Sort by: Newest, Oldest, Most Relevant

Hurray, I can now press gg instead of g to go to the top in tt. Much better! :-) Other multi-key combinations are also easily possible now.

I should probably write a real article about this at some point, but here we go. The only downside with my new key binding system is that it breaks tview’s established pattern. You’ve got an InputHandler(), that is implemented using WrapInputHandler(…). It typically then directly implements the switching logic depending on the key press. Something like this:

func (w *Widget) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
    // WrapInputHandler allows for intercepting key events with SetInputCapture(…)
    // from the outside for customization. This handles the default key bindings.
    return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
        switch event.Key() {
        case tcell.KeyRune:
            if event.Modifiers() == tcell.ModNone {
                switch event.Rune() {
                case 'k':
                    w.scrollUp()
                    return // we already handled the event, stop processing

                case 'j':
                    w.scrollDown()
                    return
                }
            }
        }

        // We didn't handle the key event. Maybe the parent
        // widget knows what to do with it.
        if handler := w.parent.InputHandler(); handler != nil {
            handler(event, setFocus)
        }
    })
}

From the outside, you can intercept and either stop or continue the widget’s original key handling with a potentially rewritten key event using SetInputCapture(…):

w := NewWidget()
// customized or additional key bindings
w.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
    switch event.Key() {
    case tcell.KeyUp:
        // Rewrite the event, so the "cursor up" key is an alias
        // for the vim key binding "k", that is handled by the
        // wrapped input handler above. (I know, I know, this is a
        // completely unrealistic example, why would anyone use
        // cursor keys when there are vim key bindings available?!)
        return tcell.NewEventKey(tcell.KeyRune, 'k', tcell.ModNone)

    case tcell.KeyRune:
        if event.Modifiers() == tcell.ModNone {
            switch event.Rune() {
                case 'q':
                    app.Stop()
                    // we already handled the event, do not pass it
                    // to the wrapped input handler above
                    return nil

                case 'r':
                    toggleMessageReadStatus()
                    return nil
            }
        }
    }

    // we didn't handle the event, pass it to the wrapped
    // input handler above
    return event
}

Since they all expect a single key, I’ve noticed that using multiple dedicated KeyBindings of mine on these different levels kinda breaks multi-key handling with common prefixes. The outer-most KeyBinding captures the prefix, but it can’t transfer it to the inner one if not handled by the outer one. At least not without some more (potentially ugly) changes. So, I now have to work with just a single KeyBindings object for the entire widget chain (if it consists of multiple other widgets or the regular input handler and input capture are in the game). The outside needs to register all its key bind customizations or extensions at the same level that the original widget handles its default ones. Doable by exposing the widget’s KeyBindings instance, but not pretty. You always have to keep this in mind.

With the KeyBindings, it will look like that:

type Widget struct {
    parent tview.Primitive

    // make it available to children or the outside either by
    // direct field access or by providing a getter method
    KeyBindings *bind.KeyBindings
}

func NewWidget() *Widget {
    w := &Widget{KeyBindings: &bind.KeyBindings{}}
    w.KeyBindings. // default key bindings
        Bind0(bind.KeySequence('k', w.scrollUp).
        Bind0(bind.KeySequence('j', w.scrollDown)
    return w
}

func (w *Widget) InputHandler() InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
    return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
        // also note the missing support for focus transfer at the moment
        event = w.KeyBindings.Capture(event)
        if event == nil {
            return
        }

        if handler := w.parent.InputHandler(); handler != nil {
            handler(event, setFocus)
        }
    }
}

And then from the outside, or in a child widget:

w := NewWidget()
w.KeyBindings. // additional or customized key bindings
    Bind1(bind.KeySequence(tcell.KeyUp), func(*tcell.EventKey) *tcell.EventKey {
        return tcell.NewEventKey(tcell.KeyRune, 'k', tcell.ModNone)
    }).
    Bind0(bind.KeySequence('q'), app.Stop).
    Bind0(bind.KeySequence('r'), toggleMessageReadStatus)

When directly working with tview primitives that are not part of custom widget implementations, the following works well so far:

textView := tview.NewTextView().
    SetWordWrap(true).
    SetText("…")
    SetScrollable(true)
textView.SetInputCapture((&bind.KeyBindings{}).
    Bind0(bind.KeySequence('q'), app.Stop).
    Bind1(bind.KeySequence('g', 'g'), func(*tcell.EventKey) *tcell.EventKey {
        return tcell.NewEventKey(tcell.KeyHome, 0, tcell.ModNone)
    }).
    Capture)

I need to sleep on this some more.

Also, writing very long messages like this one is really not all that fun in tt’s editor. I should absolutely provide a way to shell out to vim.

(Took me about one and a half hours to compose, holy crap. But not only because of not using vim. Although, that might have saved me a quarter hour or so for sure. Proof-reading this message also uncovered quite a few bugs in my real documentation. So, that’s a big win!) Good night!

⤋ Read More
In-reply-to » Perhaps unsurprisingly, last night's Magic games were dominated by the new Marvel set.

For game 2, everyone else brought out bigger guns - tribal dragons, tribal giants, tribal spiders (led by the completely broken Cosmic Spider-Man), and Atraxa (equipped with Captain America’s shield, no less), while I ran my new (also unlisted) 5-color tribal Super Villains deck (fronted by the Super Skrull). Although I got off to a slow start, it kept me mostly under the radar, allowing me to ultimately win with the Villains by goading everyone else’s creatures into attacking each other on one turn (via Maximum Carnage), and then killing off the remaining players over 3 combat phases on the follow-up turn (Full Throttle).

Boo-yah!

⤋ Read More

Perhaps unsurprisingly, last night’s Magic games were dominated by the new Marvel set.

In game 1, I was running my new (unlisted) 5-color tribal Super Heroes deck (led by Nick Fury, Agent of SHIELD) against a lightly-modified Avengers Assemble deck, a tribal Super Villains deck (fronted by Thanos, the Mad Titan), and 2 “classic” magic decks (Fractals and Artifacts). The heroes held their own quite well, but that game went way too long (thanks to Thanos snapping away half the board every other turn). It finally ended when everyone quit after yet another board wipe (giving the wiper her first win).

⤋ Read More

ReactOS “Open-Source Windows” Project Now Capable Of Running Half-Life 2
One month ago it was exciting to see the open-source ReactOS operating system running Valve’s Half-Life game. Little to realize less than 30 days later it would also be running Half-Life 2… ⌘ Read more

⤋ Read More

Hobbit-like Humans May Have Scavenged Komodo Dragons’ Leftovers to Survive
CNN reports:

Prehistoric human relatives, nicknamed “hobbits” due to their short stature, may have been scavengers, rather than skilled hunters capable of taking down big game or building cooking fires, according to new research. The study adds to growing evidence that Homo floresiensis, which had a brain only slightl … ⌘ Read more

⤋ Read More

OpenRazer 3.12.4 Fixes Compatibility With Linux 7.2
OpenRazer 3.12.4 is now available as the newest update to these out-of-tree, unofficial Linux drivers for Razer devices. OpenRazer when paired with the likes of Polychromatic or other GUI options is what makes for a nice experience running Razer gaming peripherals under Linux… ⌘ Read more

⤋ Read More

FEX 2607 Optimizing For Yet-To-Be-Released ARM 256-bit SVE2 Hardware
The FEX Emulator that allows running Linux x86/x86_64 software on ARM64 (AArch64) systems, including the likes of Wine / Valve’s Steam Play (Proton) for Windows gaming on ARM, is out with its newest monthly feature release. The Valve-backed project for running x86_64 games and other software on ARM for the upcoming Steam Frame and other more typical ARM Linux systems has been baking more optimizations and improvements… ⌘ Read more

⤋ Read More

Video Game History Foundation Says Piracy Remains the Only Viable Preservation Method
An anonymous reader quotes a report from TechSpot: Video Game History Foundation founder Frank Cifaldi recently supported claims that piracy is the only effective way to preserve video games. The comments lay the blame squarely on game companies’ refusal to keep legacy content available or allow archivis … ⌘ Read more

⤋ Read More

California Bill To Preserve Online Games Fails Committee Vote
California’s Protect Our Games Act, which would require publishers to warn players before shutting down paid online games and offer refunds or continued access, failed to advance after a state Senate committee vote. Four state senators voted in favor, three voted against, and four abstained. Engadget reports: The committee unanimously voted in favor of g … ⌘ Read more

⤋ Read More

TLAC Aims To Be An Open-Source Alternative To Kernel-Level Anti-Cheat Systems
It’s not clear that any games have yet to deploy this open-source anti-cheat system but TLAC is a new open-source project that aims to provide a privacy-respecting alternative to kernel-level anti-cheat systems like Denuvo, Easy Anti-Cheat, and BattlEye… ⌘ Read more

⤋ Read More

Google Starts Lowering Play Store Fees, Making Good On Epic Games Settlement
An anonymous reader quotes a report from Ars Technica: Google spent the last few years locked in a legal grudge match with Epic Games, which claimed that Google’s stewardship of the Play Store was anticompetitive. Now, the companies are thick as thieves, and Google is beginning to implement app store changes as agreed in it … ⌘ Read more

⤋ Read More

GTA VI Is a Worrying Sign For the Future of Physical Games
Rockstar Games has revealed the price of Grand Theft Auto VI to be $79.99, and confirmed that the physical versions of the game won’t include a disc. Instead, they’ll contain a one-time download code when it launches November 19. “Not only is that a disappointing decision for people who like to own physical games, but given the scale of the next GTA, it als … ⌘ Read more

⤋ Read More

Mark Zuckerberg Directed Meta To Create a Prediction Markets App
An anonymous reader quotes a report from the New York Times: Mr. Zuckerberg, the chief executive of Meta, recently dispatched a small team at his company to create a smartphone app similar to Polymarket and Kalshi, two employees with knowledge of the matter said. Users would not wager money, and the app would probably rely on a video game-like poi … ⌘ Read more

⤋ Read More

Valve Will Finally Let You Build Your Own Steam Machine With SteamOS For Desktop
With the price of the new Steam Machine starting at $1,049, you might want to consider making your own Steam Machine instead. An anonymous reader quotes a report from The Verge: Valve says that “starting with the SteamOS 3.8 release, you can put together your own Steam Machine using whatever PC parts you want.” St … ⌘ Read more

⤋ Read More

Valve Prices the Steam Machine At $1,049
Valve’s new Steam Machine will launch June 29 starting at $1,049 and go up from there depending on the configuration. Although it costs considerably more than the PS5 ($599.99) and Xbox Series X ($649.99), “the value proposition for the Steam Machine is that it can play your library of Steam games you may have accumulated over years (or even decades), rather than just PlayStation games, and it’ … ⌘ Read more

⤋ Read More

Ubisoft Co-Founder Claude Guillemot Dies In Plane Crash
An anonymous reader quotes a report from TechCrunch: Claude Guillemot, co-founder of French video game company Ubisoft, died Friday at the age of 69. According to French media (via Bloomberg), Guillemot died in a plane crash in the French resort town of La Baule. He was one of two people aboard the plane, both of whom died.

Guillemot founded Ubisoft with his fou … ⌘ Read more

⤋ Read More

Valve Creates The Ray-Tracing Inspector “RTI” To Help Further Optimize Linux GPU Drivers
Merged today to Mesa 26.1 is the Ray-Tracing Inspector “RTI” as a new GUI created by developers on Valve’s open-source Linux graphics team. The Ray-Tracing Inspector is designed to help in analyzing and optimizing the Vulkan ray-tracing performance as part of their continued work on further bettering the Radeon RADV RT performance for Steam Play / Linux gaming… ⌘ Read more

⤋ Read More

Gamers Sue PlayStation: It’s Not Clear They’re Selling Licenses Rather Than Ownership of Games
The gaming news site Aftermath reports:

Four gamers are suing Sony Interactive Entertainment for allegedly breaking a California law that requires digital storefronts selling games to make it clear people are buying licenses, not actually owning the games.

Sony Interactive Entertainment … ⌘ Read more

⤋ Read More

Doom Composer Bobby Prince Has Died
Video game composer and sound designer Bobby Prince has died at age 81 following an illness. Developer id software shared the news. Engadget reports: Prince was perhaps best known for his pioneering work on the Doom series. The Library of Congress inducted his soundtrack for the original game into the National Recording Registry just last month. “Despite the limitations of the 1993-era sound card drive … ⌘ Read more

⤋ Read More

Open-Source NVIDIA NVK Vulkan Driver Now Supports DLSS
With the code merged today to Mesa 26.2-devel, the open-source NVIDIA “NVK” Vulkan driver is capable of handling Deep Learning Super Sampling (DLSS) with modern game titles running on Linux / Steam Play… ⌘ Read more

⤋ Read More

Android 17 Drops For Pixel Phones and Watch
Google has begun rolling out Android 17, the June Pixel Feature Drop, and Wear OS 7 simultaneously across supported Pixel phones and watches. Highlights include floating app bubbles, improved foldable multitasking and gaming, tighter location and contact permissions, stronger lost-device protections, new Pixel AI tools, and up to 10% better Pixel Watch battery life. PhoneArena reports: … ⌘ Read more

⤋ Read More
In-reply-to » @lyse Awww, that sounds like a typical experience at school. 😅 They meant well but somehow it was still shitty …

@lyse@lyse.isobeef.org Yeah, I have a couple of teachers in my family and they all tell similar stories. 🙄

I have almost no recollection of my time at the “Gymnasium” anymore. I’m either traumatized by it or I wasn’t very interested in what happened there. 😅 But I have some vague memories of doing “computer stuff” at school. There certainly were computers and they certainly ran DOS games like Duke Nukem, that I do know. 😂 Just checked my records, and no, this wasn’t an official class. At best, it was one of those AGs. 🤔

⤋ Read More

Epic Games Announces Lore Open-Source Version Control System
Epic Games has released Lore, an MIT-licensed version control system written in Rust and designed specifically for “games and entertainment purposes with large file sizes,” reports Phoronix. From the report: While there is Git LFS for large file storage with Git, Epic Games has crated Lore as a version control system designed entirely around the large fi … ⌘ Read more

⤋ Read More

Epic Games Announces Lore Open-Source Version Control System
Epic Games announced today they have created a new version control system that is now open-source as Lore. Given the proliferation and excellence of Git, you may be wondering why Epic Games is pursuing another VCS option… They are specifically catering Lore to games and entertainment purposes with large file sizes… ⌘ Read more

⤋ Read More

Stop Killing Games Fails To Secure EU Law Despite 1.3 Million Signatures
The European Commission has declined (PDF) to propose a law requiring publishers to keep discontinued video games playable, despite the Stop Killing Games initiative collecting nearly 1.3 million verified signatures. Instead, it plans to develop a voluntary industry code covering end-of-life transparency and preservation. Dextero … ⌘ Read more

⤋ Read More
In-reply-to » @lyse In what way was KDE 3’s menu organized? KDE 1 is the only KDE version I ever used. 😅 We’re talking about this one, right?

@movq@www.uninformativ.de Yes, this screenshot. However, not the Dutch but rather the German version, no wonder it looks so crazy!!1!11

It’s been a hot minute or two since I last used KDE, so I don’t remember exactly. I just vaguely recall that I found myself thinking multiple times that the KDE application categories were better matching or there were more or something like that. Most of my classmates were on Windows and had one giant long list of all sort of stuff in there. You even had to scroll in the menu. Sure, they installed all kind of garbage, which didn’t exactly help. Where in KDE, they were actually grouped by Office, Internet, Graphics, Multimedia, Games, etc. In Windows, applications usually hid themselves in a sub folder named after the software vendor. At least in the later (?) days.

I only used Win 95, 98 and XP at home. For maths class with computer algebra system (Maple), we had a Cassiopeia with Win CE: https://en.wikipedia.org/wiki/Casio_Cassiopeia At school, there was probably also Win 2000, but I don’t know anymore for sure.

⤋ Read More

In Magic today, the Phyrexian Invasion failed in the first game, but the second game was EPIC!

I played my (unlisted) Dragons 2: Draconic Boogaloo deck, and…

Turn 1: Nothing special
Turn 2: Miirym (when a dragon enters, copy it)
Turn 3: Tiamat (choose 5 dragons from deck, put in hand)
Turn 4: Klauth (when dragons attack, create mana equal to their total power)
I attacked with all 5 dragons, which made 28 mana x2 = 56(!) mana.
Then (still turn 4) I played Scourge of Valkas (when a dragon enters, deal damage to target equal to number of dragons) + 5 other dragons, dealing 6 + 2 x (7+8+9+10+11+12+13+14+15+16+17) = 270(!) direct damage (more than double enough to kill the other 3 players).

Damn fine win, if I do say so myself.

⤋ Read More

Blizzard Sues To Take Down Another Private World of Warcraft Server, Project Ascension
“Blizzard Entertainment is continuing its crusade against private World of Warcraft servers,” reports the gaming news site Aftermath:

The company filed a new lawsuit on Friday in a California court against the makers of Project Ascension, alleging copyright infringement, Digital Millennium Copyright A … ⌘ Read more

⤋ Read More

Tigers consider playing all home games at Leichhardt Oval in 2028
Sunday’s match will be the Tigers’ last at Leichhardt Oval for almost two years. But fans could be getting more games at the “Eighth wonder of the world” once it is redeveloped. ⌘ Read more

⤋ Read More