5,828 karma · joined Feb 16, 2010 (16y ago) · 420 submissions
Blog: https://phoboslab.org/
comment 5y ago · link · parent
[1] https://www.vsynctester.com/
[2] https://phoboslab.org/log/2012/06/measuring-input-lag-in-bro...
comment 5y ago · link · parent
I was confused for a second why this game made its way to HN again (there's a making of for the game itself from 2018[2]). This seems to be a port of the game to D[3] as a demo for a WASM runtime, Spasm, which is also written in D[4].
[1] https://phoboslab.org/underrun/
[2] https://news.ycombinator.com/item?id=18031024
[3] https://github.com/skoppe/spasm/tree/master/examples/underru...
comment 5y ago · link · parent
JS13k, the contest this game was made for, has the 13kb size limit for a ZIP containing all necessary files. The build process[3] produces a q1k3.zip[4] that sits at 13309 bytes.
Granted, the JS and assets without ZIP compression are a bit bigger, but when sent out over http with fast gzip compression there's still only around 15kb going through the wire.
[1] https://github.com/phoboslab/q1k3/blob/master/source/map.js
[2] https://github.com/phoboslab/q1k3/blob/master/source/model.j...
comment 5y ago · link · parent
The collision detection however builds a grid out of these, so the game can quickly look up any position within the game world[2].
[1] https://github.com/phoboslab/q1k3/blob/master/pack_map.c#L78... [2] https://github.com/phoboslab/q1k3/blob/master/source/map.js#...
comment 5y ago · link · parent
Play: https://phoboslab.org/q1k3/
Code: https://github.com/phoboslab/q1k3/commit/a522cb597d805ef7e9d... - curiously this only increased the final ZIP size by one byte. 13309 bytes in total now. ZIP compression (and by extension: Roadroller compression) can be very non-intuitive.
comment 5y ago · link · parent
15 years back I did some hobbyist programming for the GameBoy. Drawing a status bar there was comparatively easy. The hardware allowed you to set some registers to define a "window region", overlaying the main background map.
69.
Appfleet Joins Cloudflare(appfleet.com ↗)
3 points · by phoboslab · 5y ago · discuss
70.
Freespin – demo running on c64 floppy drive(youtube.com ↗)
6 points · by phoboslab · 5y ago · 1 comment
comment 5y ago · link · parent
comment 5y ago · link · parent
No one here can pay for their pizza delivery through SEPA. Intermediaries like PayPal are still needed. I'm baffled that banks can't get their shit together to offer an instant payment solution that works over the internet (ie. no card reader) for small purchases.
What's the problem?
comment 6y ago · link · parent
This feels similar. The blog post and the site is beautifully designed (really!) but I have a hard time figuring out what I'm buying. Is it access to a chat where everyone tries to sell you their "startups"?
I guess it's not for me, but congratz to your success!
comment 6y ago · link · parent
https://github.com/phoboslab/jsmpeg#example-setup-for-stream...
comment 6y ago · link · parent
Gameplay falls a bit short, but in my opinion it's the technically most impressive entry this year.
comment 6y ago · link · parent
We have a few hundred Raspberry Pi in operation at customer sites, running 24/7. Back when we started our business we used generic Micro SD (can't remember the brand). They would fail after 2-6 months. This was a big hassle. We have customers all over Germany and would need to ship them a complete RPI as a replacement, as the customers are usually not tech-savvy enough to just replace the SD.
We now use SanDisk's "Industrial" Micro SD and haven't had this problem since.
Also, reducing writes to the SD is certainly a good idea. Ideally - if you can - mount the system as read only.
comment 6y ago · link · parent
comment 6y ago · link · parent
I was able to get latency down to 50ms, streaming to a browser using MPEG1[1]. The latency is mostly the result of 1 frame (16ms) delay for a screen capture on the sender + 2-3 frames of latency to get through the OS stack to the screen at the receiving end. En- and decoding was about ~5ms. Plus of course the network latency, but I only tested this on a local wifi, so it didn't add much.
[1] https://phoboslab.org/log/2015/07/play-gta-v-in-your-browser...
comment 6y ago · link · parent
comment 6y ago · link · parent
For a reddit-like social site, we have a Maria database with around 3 billion rows in total, with the largest table (votes) spanning about 1,5 billion rows.
We can select data within ~3ms for about 20k-40k concurrent visitors on the site. Our setup is a simple Master-Slave config, with the slave only as backup (not used for selects in production). Our 2 DB servers have 128gb of RAM and cost around 200 EUR/month each - so, nothing special.
Of course you have to design your schema with great care to get to this point, but I imagine PG to be as lost as any other database if a crucial index is missing.
comment 6y ago · link · parent
Disclaimer: I wrote PL_MPEG, but not the N64 port.
[1] https://github.com/phoboslab/pl_mpeg
[2] https://www.reddit.com/r/n64/comments/dr15py/i_just_started_...
85.
Deep Thoughts Engineering Speaker Series: John Carmack(youtube.com ↗)
1 points · by phoboslab · 6y ago · discuss
comment 6y ago · link · parent
A while ago I ran a (quite naively written) nodejs application that maxed out at ~700k WebSocket connections per server - using only 4GB of RAM. Here CPU became the bottleneck.
comment 7y ago · link · parent
The MPEG-2 state object you linked to looks a lot like the private data of my decoder already[2]. I wonder if there's any restriction on when a packet may be concluded. I.e. do MPEG-PS packets have to contain full slices, or can they be cut off in the middle of slice?
The "hairy" part with my current design would be to reproduce the call stack. Again, if the decoder would live in its own thread, it would be a no-brainer.
> and it's been done successfully by every major decoder implementation afaik
As far as I can tell, ffmpeg's decoder does not allow for this. It always searches for the next picture's START_CODE before starting to decode the frame. Similarly, the libmpeg2 source you linked to doesn't seem to provide any functionality to resume decoding from anywhere in the stream either!? The NEEDBITS and DUMPBITS macros just assume there's always more data.
[1] https://github.com/phoboslab/jsmpeg-vnc/blob/master/source/e...
[2] https://github.com/phoboslab/pl_mpeg/blob/master/pl_mpeg.h#L...
89.
MPEG1 Single file C library(phoboslab.org ↗)
96 points · by phoboslab · 7y ago · 25 comments
90.
The world's worst video card? [video](youtube.com ↗)
3 points · by phoboslab · 7y ago · discuss