axby

joined 2 years ago
MODERATOR OF
[–] axby@lemmy.ca 2 points 2 days ago

I don't host a Lemmy instance, but I post links in my comments. I sometimes generate and share unique-ish URLs to share updates with specific versions of my hobby projects. I've seen them queried a few times in my Apache logs by useragents claiming to be from OpenAI, Anthropic, etc. Also search engine crawler bots.

Here's the IP whose useragent claimed to be an Anthropic bot, seems like others have encountered the same behaviour: https://abuseipdb.com/check/216.73.216.135

[–] axby@lemmy.ca 1 points 4 days ago

Ah, thanks for the feedback. Can you give me an idea of areas that I should improve? I tried to keep it simple, you should just be able to select a game and play, but maybe there is a pain point that I don’t notice anymore now that I’ve gotten used to it.

[–] axby@lemmy.ca 1 points 5 days ago* (last edited 5 days ago) (2 children)

Thanks! What do you mean about smartphones, can you share what phone OS and browser you are using? It should work on Android (Firefox/Chrome) and iOS (Safari), I consider mobile to be just as important as desktop. Ah, I remember some FOSS mobile browsers have WebAssembly disabled... here is an older version compiled to JS instead of WASM, let me know if that works: https://alexbarry.net/dev/games/reversi-ai2-no-wasm-2025-01-05/

In hindsight I should add some browser side detection of if WASM is supported, then show a warning at least, if not redirect to a JS version.

And yes, it's all one big code base (https://github.com/alexbarry/AlexGames), each game is pretty small though, maybe 500-1000 lines of Lua on average: https://github.com/alexbarry/AlexGames/tree/main/src/lua_scripts/games . Overall it's quite simple, the Lua/Rust APIs just call simple browser APIs to draw shapes and graphics. The harder part was being able to re-use the same code on Android and desktop (wxWidgets). Also I'm running into some WASM/browser limitations when trying to do heavy processing for board games AI.

[–] axby@lemmy.ca 0 points 6 days ago* (last edited 6 days ago) (4 children)

What do people think of my hobby project, "AlexGames": (F-Droid) (Web version) (Source on Github, AGPLv3).

It's a collection of simple games, mostly solo or local multiplayer, though the web version supports network multiplayer by sending your friend a URL: solitaire, chess, go, reversi, checkers, minesweeper, backgammon, some word puzzle games, and some arcade type games.

I was planning on adding AI next. And I really should polish the Android app, I've mostly only focused on the web version. And if people want, I could also submit to Google Play. My calculator app seems to be a lot more popular on F-Droid than Google Play, so I haven't bothered uploading this one to Google Play yet.

Happy to hear any feedback! I suspect that it looks too bland and unpolished for many people to be interested, or maybe it needs different kinds of games? My goal was to not need to download a bunch of ad filled free apps from the play store for when I wanted to play games with a friend on a flight or something, or just idly play something simple like solitaire.

edit: also in the Android app, stick to the "webview" version... the native Android version is mostly an experiment, I meant to hide it behind a setting but never got around to it.

[–] axby@lemmy.ca 3 points 1 week ago* (last edited 1 week ago) (1 children)

Is OVH $4.67/mo? (source)

I'd be interested in a Canadian version of something like this, for $15 USD/yr: https://tinykvm.com/

I've been using it for a few years now and it's great for a few hobby web dev projects. I feel like ~$5/mo is a lot for something I just play with now and then and host a simple static site on, but ~$1/mo feels fine.

And +1 to the other person who responded about how self hosting email is too much work, I've heard that it's extremely difficult not to end up getting blocked, presumably because spammers significantly outnumber legitimate self hosters, and most people use one of the big email providers anyway. (I don't like this, I feel like email is very important and we deserve the right to self host it, but I don't know what can be done about it)

[–] axby@lemmy.ca 2 points 3 weeks ago (1 children)

+1 to this, I feel like having a ton of money is what corrupts leadership, not necessarily their technical background.

Maybe Spez and Zuck haven’t changed much, but I feel like some others started out as relatively reasonable people who were also technically brilliant, but eventually their companies started doing shitty things and they are both aware and apparently unwilling to stop it.

Perhaps corruption in the Soviet Union is a good example of how even people from normal hard working backgrounds (i.e. not billionaires who have never worked a day in their life) can still be corrupted by power and a lack of accountability.

[–] axby@lemmy.ca 2 points 3 weeks ago

What does "boundaries" mean here? Did you mean "binaries"? Apologies if this is obvious to most people, I never used BBS myself and only saw my father use them. I know he used BBS to find shareware games for me, I'm not sure if he actually downloaded them through usenet.

[–] axby@lemmy.ca 4 points 3 weeks ago

The cookie popups (you mean the cookie consent ones, right?) weren't really common until like ~2016 or so, were they? (I found this post that claims May 2018) And I thought there were actual pop up ads before then, though yeah not as bad as modern internet browsing without an ad blocker, in some ways.

But there were other usability quirks... I remember always downloading Firefox on a new computer, because Internet Explorer 5 or whatever didn't have tabs (and Firefox did). Then Chrome was faster and seemed to quickly take over. I remember that javascript alert popups were somewhat common, and would force their window or tab to the top, so a site could easily kind of hijack your whole desktop session, since I think you couldn't resize the window or even close it until dismissing the popup. In fact at some point the major browsers added a checkbox "prevent this site from showing this dialog" (or something like that) as a mitigation. Before that you could do like while (true) { alert('hello world'); } and I think the only workaround was to force-close the browser? Other random tidbit: you could also execute arbitrary javascript by putting it in the address bar, javascript:alert('hello world') would show the popup. And ha, I remember when the address bar didn't default to search, it would only accept URLs.

In 1996 I was quite young, but I remember my father connecting to bulletin boards to download free shareware games for me, and it would use up the home phone line. (For anyone who doesn't know, bulletin boards were text based, like a terminal... and he'd have to call a number, we'd look up some in our area code to avoid long distance fees, I think. When visiting my grandmother's house in another province, we used a different set of bulletin boards, I think. I remember seeing something like a phone book that would list a bunch of servers that could be called for different things. I remember seeing something like this on Reddit a long time ago:

picture of an old BBS phone book

[–] axby@lemmy.ca 1 points 3 weeks ago (1 children)

Its like this area of tall building that has little to no safety. No elevators, a staircase that ran from ground floor to like idk 7 or 8 floors? And the stairs were exposed to outside the building, meaning you could accidentally fall and die. It took a half an hour to get to the main road where you can actually take a bus and where the malls are at.

Could you share a picture of this? I tried to find one myself on the internet but couldn't. That sounds really interesting... were there handrails?

[–] axby@lemmy.ca 3 points 3 weeks ago* (last edited 3 weeks ago)

I think I first started regularly using the internet in the early 2000s, when I was a little older than 10.

I mostly remember looking up N64 game walkthroughs on “GameFAQs”, reading some big text file with occasional ASCII diagrams. I think I’d sometimes print them. I also used MSN Messenger to talk to some friends. Not many people had microphones so often I’d still use the house phone to call a friend if we were chatting over MSN but wanted to say a lot over voice.

But for most of my PC gaming time before that, I would just ignore the (network) multiplayer option in games, since I never had a LAN party and mostly only had dial up, where you would tie up the home phone line, and I assume actually call the person you want to game with, or maybe call some specific server (and I was too young to do that on my own anyway).

But I remember one day playing StarCraft (the original), realizing that I finally had a dedicated and decent internet connection, and that I’d be ignoring the multiplayer button unnecessarily. I joined a random multiplayer game, a 7 vs 1 “comp[uter player] stomp”. It was quite novel for me to get to play a computer game and chat with random people, I remember showing my parents. Later I played “James Bond: Nightfire” on PC a lot with randoms, and joined clans and all that. Later I played Runescape and most of the rest of my friends and classmates eventually played too.

It’s kind of sad now that everyone is on the internet, and that we’re “always” on. You don’t really say “brb” anymore. I kind of liked when the internet was something that you’d only get to see when using the shared family computer, not something that’s constantly accessible to us at all times. I even wrote this when I meant to just relax in the sun, not scroll on my phone.

[–] axby@lemmy.ca 3 points 1 month ago

After reading a bunch of comments about people using electronics in this post, I had initially pictured “jumpers” as either “jumper cables”, the things people use to boost car batteries with, or small plastic coated pieces of metal or wires that can be placed over exposed pins on circuit boards to connect them (e.g to enable some behaviour). Generally I’d only assume this meaning in a discussion about electronics, though.

(I’m not the person that you replied to, and I knew that jumper means sweater or jacket or something in British (and possibly Australian?) English.)

And now that I think about it, most of my clothing gets worn after a few years, at least on the elbows.

 

Is there a Lemmy community for "someone should make this"? Similar to reddit's r/SomebodyMakeThis.

And alternatively, this thread could serve as one: what are some software projects that I/others could take on? Ideally small enough in scope that I could make something partially usable in a weekend or two.

Previously I've just worked on whatever I found fun to program, but it would be nice to hear things that people actually want that don't exist yet, and would be interested in trying it even when it is only partially finished. I'm not sure about others but I find my day job is often full of meetings or bureaucracy, and I don't often get the satisfaction of seeing people happy with something that I built. (I wonder if this feeling is more common in other types of work)

 

The Bank of Canada has lowered its key interest rate to 4.75 per cent, marking the bank's first rate cut since March 2020.

 

cross-posted from: https://lemmy.ca/post/18821047

AlexGames: simple Lua games in a browser with multiplayer support, self hosting friendly.

TL;DR: try my Lua web games here, see github for self-hosting instructions: https://alexbarry.github.io/AlexGames

Hi all, here's a hobby project I've been working on: I wrote a bunch of simple Lua games, compiled the Lua interpreter to web assembly, and defined a simple API to draw on a canvas and handle input. It all builds to static HTML/JS/WASM, except a few hundred lines of python for a websocket server for multiplayer. I recently added some dockerfiles so I think it should be easy to self host.

Here is the web version on github pages: https://alexbarry.github.io/AlexGames/ , and the source on github (self-hosting instructions in the README).

I'll list some of the games:

  • local/network multiplayer: chess, go, checkers, backgammon, gomoku
  • single player or network multiplayer: minesweeper
  • single player only: solitaire, "word mastermind"[1], "endless runner", "fluid mix", "spider swing", "thrust"

[1]: it may not technically be multiplayer, but my partner and I enjoy picking our own hidden word and sharing the puzzle state as a URL or just passing a phone to each other.

Part of my motivation is to avoid ads on mobile games, and to be able to play different multiplayer web games with friends without having to get them to make an account and all that (just share the generated URL, it contains a multiplayer session ID). I also like the idea of having my own private web games server, and not having to be reliant on some service that might eventually get enshittified.

I figure that if I can throw together a similar game in a few hundred lines of Lua, then no one should have to deal with full screen ads or pay ~$10 to play them. Especially since most mobile games that I like are simple and I only play them for a few minutes at a time, maybe only a few times per week.

Self hosting isn't necessary to try it out, but without SSL it should just be a simple one-line command to host the HTTP and websocket server with docker compose. For SSL support it is a few more steps, I added steps to the README: one command to build the static HTML (so you can copy it to your web hosting server, which should already take care of SSL), and another to host the websocket server, which can have your SSL certs passed as parameters. But you don't strictly need the websocket server, it should just fail to connect after a few seconds and then you can play the games without network multiplayer. You can even use my websocket server and your own static HTML, just add &ws_server=wss://alexbarry.net:55433 as a URL parameter to your own URL. I haven't self hosted much on my public server, so I'd love to hear feedback on how to better handle SSL certs. Ideally you could just choose to not use SSL for your websocket server, but firefox at least prevents you from connecting to a websocket server without SSL if you're using SSL to visit the page itself on the same server. (On a local network without SSL it's fine, though)

Some features that I'm proud of:

  • the network multiplayer works pretty well, I'm pleased with websockets (previously I was hoping to get WebRTC working but I didn't have much luck). On the wxWidgets and Android prototypes I had a normal socket server working too, but I've focused on the web version since it's good enough
  • an English dictionary for word puzzle games. (aside: loading ~220k English words as javascript strings and a javascript array took like 12 MB of browser memory or more, but I got it down to ~6 MB by moving the dictionary to C managed memory)
  • state sharing via URL: for most games I serialize the state and then you can export it as a base 64 string in a URL. This is useful to keep playing on a different device, send a puzzle that you liked to a friend, or for "word mastermind", to choose your own word and get your friend to guess it.
  • built in autosave, undo/redo, and browsing previous saved states. I used the same code to render state previews that I wrote to render the games for normal play, so all a game has to do is implement state serialization, implement a few APIs to get that state, and call "save_state" whenever the player makes a useful move. Then games can simply call a few lines to add an "undo" and "redo" button, and those can call a one line function to fetch the previous or next state. (I'd like to add a full history tree at some point, but for now if you undo many times and make a new move, you lose the moves that you un-did ("undo-ed"?))
  • playing arbitrary games as zips of Lua files. While the self hosting community might not need this much (since they can just add their own games to the source and rebuild), I figured many people might be interested in writing a game without having to build and host my project. So I added support for unzipping bundles of Lua source files and storing them in the built in emscripten filesystem in the browser. I added an example game and an API reference, see the "Options" menu and the "Upload Game Bundle" section.

Let me know what you think! I'd love to hear feedback, or get new game contributions or bug fixes / features.

 

TL;DR: try my Lua web games here, see github for self-hosting instructions: https://alexbarry.github.io/AlexGames

Hi all, here's a hobby project I've been working on: I wrote a bunch of simple Lua games, compiled the Lua interpreter to web assembly, and defined a simple API to draw on a canvas and handle input. It all builds to static HTML/JS/WASM, except a few hundred lines of python for a websocket server for multiplayer. I recently added some dockerfiles so I think it should be easy to self host.

Here is the web version on github pages: https://alexbarry.github.io/AlexGames/ , and the source on github (self-hosting instructions in the README).

I'll list some of the games:

  • local/network multiplayer: chess, go, checkers, backgammon, gomoku
  • single player or network multiplayer: minesweeper
  • single player only: solitaire, "word mastermind"[1], "endless runner", "fluid mix", "spider swing", "thrust"

[1]: it may not technically be multiplayer, but my partner and I enjoy picking our own hidden word and sharing the puzzle state as a URL or just passing a phone to each other.

Part of my motivation is to avoid ads on mobile games, and to be able to play different multiplayer web games with friends without having to get them to make an account and all that (just share the generated URL, it contains a multiplayer session ID). I also like the idea of having my own private web games server, and not having to be reliant on some service that might eventually get enshittified.

I figure that if I can throw together a similar game in a few hundred lines of Lua, then no one should have to deal with full screen ads or pay ~$10 to play them. Especially since most mobile games that I like are simple and I only play them for a few minutes at a time, maybe only a few times per week.

Self hosting isn't necessary to try it out, but without SSL it should just be a simple one-line command to host the HTTP and websocket server with docker compose. For SSL support it is a few more steps, I added steps to the README: one command to build the static HTML (so you can copy it to your web hosting server, which should already take care of SSL), and another to host the websocket server, which can have your SSL certs passed as parameters. But you don't strictly need the websocket server, it should just fail to connect after a few seconds and then you can play the games without network multiplayer. You can even use my websocket server and your own static HTML, just add &ws_server=wss://alexbarry.net:55433 as a URL parameter to your own URL. I haven't self hosted much on my public server, so I'd love to hear feedback on how to better handle SSL certs. Ideally you could just choose to not use SSL for your websocket server, but firefox at least prevents you from connecting to a websocket server without SSL if you're using SSL to visit the page itself on the same server. (On a local network without SSL it's fine, though)

Some features that I'm proud of:

  • the network multiplayer works pretty well, I'm pleased with websockets (previously I was hoping to get WebRTC working but I didn't have much luck). On the wxWidgets and Android prototypes I had a normal socket server working too, but I've focused on the web version since it's good enough
  • an English dictionary for word puzzle games. (aside: loading ~220k English words as javascript strings and a javascript array took like 12 MB of browser memory or more, but I got it down to ~6 MB by moving the dictionary to C managed memory)
  • state sharing via URL: for most games I serialize the state and then you can export it as a base 64 string in a URL. This is useful to keep playing on a different device, send a puzzle that you liked to a friend, or for "word mastermind", to choose your own word and get your friend to guess it.
  • built in autosave, undo/redo, and browsing previous saved states. I used the same code to render state previews that I wrote to render the games for normal play, so all a game has to do is implement state serialization, implement a few APIs to get that state, and call "save_state" whenever the player makes a useful move. Then games can simply call a few lines to add an "undo" and "redo" button, and those can call a one line function to fetch the previous or next state. (I'd like to add a full history tree at some point, but for now if you undo many times and make a new move, you lose the moves that you un-did ("undo-ed"?))
  • playing arbitrary games as zips of Lua files. While the self hosting community might not need this much (since they can just add their own games to the source and rebuild), I figured many people might be interested in writing a game without having to build and host my project. So I added support for unzipping bundles of Lua source files and storing them in the built in emscripten filesystem in the browser. I added an example game and an API reference, see the "Options" menu and the "Upload Game Bundle" section.

Let me know what you think! I'd love to hear feedback, or get new game contributions or bug fixes / features.

 

Wikipedia page: https://en.wikipedia.org/wiki/Tyrian_%28video_game%29

TL;DR: fun back in the late 90's, there's a decent mobile port available on Android. I'd love to hear more recommendations for classic games available on mobile.

I played the shareware version of this when I was young a lot. I loved the starting weapon (pulse cannon?), and then loved the laser and a few others... but hated a ton of them (multi cannon? vulcan canon? Those bomb things with trailing clouds? They all seemed so weak and hard to use effectively, even at the highest levels. It almost felt like they only existed to be avoided in arcade mode, where you changed weapons by touching things that appeared after killing enemies or destroying things).

You could also upgrade your shields, generator, ship, side weapons... I remember different side weapons had wildly different strengths. Some were short burst and a ton of damage (plasma storm! My favourite), others would fire continuously and do a little bit of damage.

I liked the arcade mode too, and I vaguely remember trying the two player mode with friends who had a joystick (one on the keyboard, the other on a joystick), or awkwardly trying to share the keyboard (probably one with WASD, the other with arrow keys, but I can't remember). We might have tried the mouse, but I feel like the keyboard was more effective.

There was even some tanks/aircraft mini game, like Worms Armageddon? I think you had to unlock it, possibly with cheat codes. And as I was writing this I remembered some other special ship (or game type, I forget) where you had to perform gestures to do special attacks? Like tapping move in a direction and pressing shoot would also shoot a bolt of lightning, in addition to your normal weapon? And there were other key combinations to do more powerful attacks.

A few years ago I played through a lot of it (even the non shareware episodes! Childhood goal unlocked) on my Android phone: https://play.google.com/store/apps/details?id=com.googlecode.opentyrian ... I'd share an F-droid link but I'm surprised not to find one. I thought it was all open source now.

I found a bit of other discussion on it in a thread about dos games: https://lemmy.world/comment/248050 (side note: what is the best way to share a comment in a way that works well no matter what your home server is?)

I didn't grow up playing it, but I had heard good things about the "Ur-Quan Masters", a remake of Star Control II (wikipedia link). I still have the app downloaded to my Android phone, but it seems like it was taken down, the link doesn't work unless you're logged in to a google account that already has it downloaded: https://play.google.com/store/apps/details?id=com.sourceforge.sc2 . I found a github link and some other sites that reupload APKs, but I can't vouch for any of them.

Anyway, does anyone else have any recommendations for fun classic games with a decent mobile port? I love to stock up on games like this before a long flight. I'm also interested in iPhone recommendations, I haven't found as many in the Apple app store.

view more: next ›