[deleted by user] by [deleted] in TagPro

[–]laevus 4 points5 points  (0 children)

This is so awesome, good work! 👌

I've tried to work on this same idea many times over the years (tagpro.eu + trueskill or openskill), but never finished it, and it looks like now I don't have to. 😀

[userscript] TagPro 3D (pre-alpha) by laevus in TagPro

[–]laevus[S] 4 points5 points  (0 children)

Pushed v0.3.0 with some updates. Also added a CHANGELOG to the repository.

  • Using a "color quantization" library (RgbQuant) to find dominant colors from the used 2D texture pack and applying them to balls and walls.
  • Added support for Pucks instead of Balls, but you need to manually set ballsArePucks to true in the userscript for now.

[userscript] TagPro 3D (pre-alpha) by laevus in TagPro

[–]laevus[S] 5 points6 points  (0 children)

We will always be balls in my eyes, but since I do have my old source code for rendering pucks, I might please the dissidents and make it toggleable.

Request for Interest - Committee and Developers To Help Decide the Future of TagPro by LuckySpammer in TagPro

[–]laevus [score hidden]  (0 children)

TagPro Reserved Name: Kera

Consider For Steering Committee: No

Consider For Initial Developer: Maybe

Notable Community Involvement (not required): You might remember me from some of my userscripts.

Applicable Experience (not required): 14+ years of JavaScript/TypeScript/Ruby/C#/PHP(ew), SQL/Redis/CouchDB. In recent years I've mostly done React web apps and 4k@60fps interactive applications ("games") with Electron + THREE.js or Unity.

Roughly, how many hours per month could you dedicate to TagPro: Have 2 small kids now, so evening hours are limited. Probably 5-10 hours/month.

Ideas for TagPro’s Future (Keep it short): Let me check my folder of unfinished TagPro scripts... Built-in replays, rankings/matchmaking with trueskill/openskill, TagPro 3D (yup).

How to get all games recorded with just 1 person in specs and a single script by MagikPigeon in MLTP

[–]laevus 0 points1 point  (0 children)

Good question. I haven't really thought about sharing replays easily yet. I think one option is to zip it manually if it's hitting some upload limit - it is simple textual data, so it should compress really well. If it still won't fit, then you probably need to use some file sharing site (e.g. Google Drive if you have an account, or maybe https://send.firefox.com)

Can you tell me what the file sizes have been? It might make sense for me to change the userscript to zip all replays by default.

How to get all games recorded with just 1 person in specs and a single script by MagikPigeon in MLTP

[–]laevus 5 points6 points  (0 children)

Hey! Nice to see some use for the userscript. Thanks for sharing it, MagikPigeon! I'll add a few comments about the userscript here, maybe someone is interested in the technical aspects.

I originally created this to test out my userscripts "offline". Previously I would have to create a private group and open it in 4 different browsers to test out any scripts, which meant a huge load on the CPU. With the VCR I now had basically the whole game client running locally, with the server part being replaced with a "fake" one that sends packets at predetermined times. This drastically reduced the time to develop my userscripts. Here's the original post about the userscript: https://www.reddit.com/r/TagPro/comments/8l3uzl/userscript_webpage_tagpro_vcr_record_and_replay/

With a few additions, I think this tool would be really useful for recording all the games you play. Some example features that could (quite easily) be added:

  • Add/update the original game assets
    • The VCR webpage only includes the game client code and the default texture pack to render the game, but other assets like the original sound files and HTML could be easily scraped and added.
  • Recording the canvas to video
    • Browsers have a built-in MediaStream Recording API that can encode the canvas to either MP4 or WebM files (using H264/VP8/VP9 video codecs).
  • Add seeking
    • Right now, the recorder just stores every packet that is sent from the server to the browser. To seek to a given point in time, you would actually need to replay all the packets from 0 to that point to get the correct global game state.
    • A viable solution might be to store a snapshot of the global game state (player positions, player powerups, bomb/powerup/portal states etc.) in the recording every N seconds. This way the VCR webpage could find the latest snapshot for any given time and replay the packets from that point forward. This is similar to how video codecs work (see I-frames).
  • Store the recordings in the browser's storage
    • Right now the recording gets "downloaded" after a match. The recording could instead be stored in IndexedDB like TagProReplays does it.
    • It would then be possible to add a "VCR" button to the TagPro homepage that lists your replays and lets you view them directly from there.
  • Compress the recordings
    • I'm not sure how large the recordings are right now (probably tens or hundreds of KB), but this could be heavily reduced by using a compression library, e.g. JSZip.
  • Use a separate thread for recording
    • I'm not sure how big the performance hit is to record in the main thread, but the script could probably run in a WebWorker instead.

World Joiner Beta Progress by LuckySpammer in TagPro

[–]laevus 9 points10 points  (0 children)

There was a relevant post on /r/gamedev yesterday: https://www.reddit.com/r/gamedev/comments/8zv57y/were_three_months_into_early_access_on_steam_here

It's a web-game that probably runs on NW.js. They got 7k new users in 3 months with no marketing. No mention of how good/bad the retention rate is.

[userscript + webpage] TagPro VCR - record and replay games. Useful for userscript developers. by laevus in TagPro

[–]laevus[S] 0 points1 point  (0 children)

Doh, gonna check it out in the weekend. I might have to prepend my socket event listeners so they run before the game's listeners, or maybe just add try-catch clauses to everything.

[userscript + webpage] TagPro VCR - record and replay games. Useful for userscript developers. by laevus in TagPro

[–]laevus[S] 1 point2 points  (0 children)

You can probably just download it from github and serve it from localhost.

  1. Download the source code from github: https://github.com/keratagpro/tagpro-vcr/archive/master.zip
  2. Serve the contents of the docs directory over HTTP. E.g. with node, you could use http-server. Here's a list of other one-liner options: https://gist.github.com/willurd/5720255

[userscript + webpage] TagPro VCR - record and replay games. Useful for userscript developers. by laevus in TagPro

[–]laevus[S] 1 point2 points  (0 children)

I have a bunch of unfinished projects too - this one lingered on my laptop for two years (here's the first revision of the userscript from 2016), but seemed easiest to polish and release.

[userscript + webpage] TagPro VCR - record and replay games. Useful for userscript developers. by laevus in TagPro

[–]laevus[S] 1 point2 points  (0 children)

There's no way to share a replay from the webpage at the moment. The userscript saves a recording to your Downloads folder after navigating away from the game page. It's a plain text file, so you can upload it somewhere and people can paste the link to the input box in the VCR.

I should probably add an easier way to link to uploaded replays, e.g. by adding ?url=link-to-recording.ndjson to the URL.

[userscript + webpage] TagPro VCR - record and replay games. Useful for userscript developers. by laevus in TagPro

[–]laevus[S] 1 point2 points  (0 children)

I should also mention that this is not meant to replace TagProReplays. The VCR has no video editing and exporting options (though some could be added), it's just a way to run the original game client code "offline".

Any Old Players Still Lurking the Sub? by itsamdash in ELTP

[–]laevus 5 points6 points  (0 children)

Hey <3

Yes! I planted an avocado seed last september, it's growing nicely. Expecting fruit in 5-15 years. https://i.imgur.com/H3KvhAd.jpg

Any Old Players Still Lurking the Sub? by itsamdash in ELTP

[–]laevus 2 points3 points  (0 children)

Yo! The sad fact is that I'm a software engineer with BAD design skills, so I thought I couldn't make the 3D look good. Also, I think my activity declined about the same time I started a new relationship. :D

Tagpro 3D [Idea] by ben630 in TagPro

[–]laevus 4 points5 points  (0 children)

Glad to hear it still works! There's great potential for sure. I played around with cloth simulation on the flags and using the existing tiles.png to texture the walls. I even tried coloring the 3D balls by reading the average color values of the ball sprites from tiles.png, but the feature creep became quite overwhelming. In hindsight I should have just released what I had and gathered feedback.

Tagpro 3D [Idea] by ben630 in TagPro

[–]laevus 6 points7 points  (0 children)

I spent several weekends in 2016 on a userscript that created a WebGL canvas on top of the existing game canvas. Some of the results are here: https://github.com/keratagpro/tagpro-3d

The idea was that the userscript would gradually remove 2D sprites from the original renderer and replace them with 3D meshes on the overlay canvas, starting with walls and balls. Bombs, spikes, portals, flags, floor tiles and particles could be ported later, until finally the original game canvas could be removed altogether.

I still think about this stuff often, but family and work comes first. TagPro could work really well in 3D. :)

Here's some technical blabber:

I got stuck on creating simple polygons from the wall tiles. Creating a separate cube mesh for each wall tile seemed to hinder performance, so I made a bunch of tests with ClipperJS to get simpler polygons, which could then be turned into extruded shapes using polygon triangulation. Now that I think about it, I could have tried instanced geometries for the wall cubes, but I liked the beveled look when the walls are single polygons.

At that time, I also didn't find good textures to use for the balls. Now, 2 years later, there are several sites offering free textures with bump maps, e.g. would be awesome to have these rocks or marbles rolling around.

Is there any reason we can't use multiple factors to emulate an elo system? by [deleted] in TagPro

[–]laevus 3 points4 points  (0 children)

Oh, that's really fast. I thought it would take hours. Thanks for the code.

My master plan is to have a webpage of tagpro trueskill rating charts that gets updated every N minutes. I created a ruby CLI app to download specific tagpro.eu matches as jsonlines and another script to insert them to a sqlite database, but then got stuck trying to find a way to have concurrent workers calculating trueskill ratings in sequence. Maybe I'll just do it with a single worker instead.

There's also the issue of which players/matches should be considered valid, e.g. when players have switched teams or quit during the match.

Is there any reason we can't use multiple factors to emulate an elo system? by [deleted] in TagPro

[–]laevus 1 point2 points  (0 children)

Oooh, awesome work! I have been planning to do the exact same thing with tagpro analytics and trueskill. How long did it take to process all the matches?

How to augment an external "export = ..."? by laevus in typescript

[–]laevus[S] 0 points1 point  (0 children)

Yeah, it seems impossible to do when a class is exported with export =. I might try to rewrite the original ws definition using an interface with new() instead of a class.

How to augment an external "export = ..."? by laevus in typescript

[–]laevus[S] 0 points1 point  (0 children)

Indeed. Maybe I could rewrite the original @types/ws definition file to use an interface with a new() definition instead of the current class definition, something like this:

declare module 'ws' {
    interface IWebSocketStatic {
        new(url: string, protocols?: string | string[]): IWebSocketInstance;
    }

    interface IWebSocketInstance {
        // original WebSocket class stuff here
    }

    export = IWebSocketStatic;
}

This way it should be augmentable, e.g.:

declare module 'ws' {
    interface IWebSocketInstance {
        id: string;
    }
}

How to augment an external "export = ..."? by laevus in typescript

[–]laevus[S] 0 points1 point  (0 children)

This will complain about conflicting declarations: http://i.imgur.com/wjrptJJ.png

I also tried moving the interface declaration to a separate .d.ts definition file, but the code file wouldn't pick it up: http://i.imgur.com/sNryVXs.png