News for hackers. Stuff that matters.

Unit520

Re:Setris – Tetris with Sand Physics on Tuesday May 30, 2023 @10:56AM (#36125610)
Destructible Tetris blocks: https://unit520.net/deadtrees/

Silly physics fun in the browser, but not a complete game (yet).

Re:Ask HN: When did corporate America become so flaky? on Thursday August 11, 2022 @03:07PM (#32430295)
Some sort of systemic corruption in corporate culture must have emerged at least around the time when Personell was renamed to "Human Resources". I mean, think about it for a second, if you were to hire some people to help you with something, would you unironically call them "human resource"? Even if you might think about them in private as easily replaceable and therefore not of much value, would you go ahead and call them "human resource" to their face without feeling weird at all?

Something strange is going on here.

Show HN: ColorTiles Browser Game

https://colortiles.net/

Hello HN!Here is a little game I made, colorful tiles must be placed next to other tiles and match in symbol or color. This game is inspired by Passage 3 and similar games like Qwirkle, Rummy or Dominoes. There exist some browser-based versions here and there, but I wasn't completely satisfied with any of them, so I made my own.This is optimized for a broad range of screen sizes and...

( Read More... | no comments | 3 points | on HN )
Re:Show HN: Tetris, but silly on Friday May 06, 2022 @10:19PM (#31291624)
This is actually written in C++ and I compile it to a native executable during development, and yet it crawls to a stop exactly the same, so I'm afraid that that one's on me. :D (It's an inefficiency related to the breakage particles and waits patiently on a big pile of other code TODOs at the moment.)

Nevertheless, I don't disagree with you on your general sentiment towards browser games, I like fast native executables as well.

Re:Show HN: Tetris, but silly on Friday May 06, 2022 @06:33PM (#31290250)
Thank you all for your nice comments and suggestions, be assured that I read every comment even if I didn't reply to you personally!

I'm glad you liked it and will continue to work on it some more, you had some great suggestions that I certainly want to try out.

Re:Show HN: Tetris, but silly on Friday May 06, 2022 @05:24PM (#31289741)
Thanks for reporting!

Yeah, I'm aware of this error, it seems to be related to the shared hosting I'm using, I can't replicate it when serving locally. But as long as it is "falling back to ArrayBuffer instantiation" all is good, and I didn't investigate further because this fallback mechanism actually loads the WASM module faster than the "streaming compile" method (these things are provided by Emscripten).

I have no idea why it didn't load on the first try for you though.

Re:Show HN: Tetris, but silly on Thursday May 05, 2022 @06:30PM (#31279085)
Thanks for the feedback, using the phone's accelerometer is actually a great idea! As others mentioned, there are web APIs for that these days, I'll try to include something like that in the next version.

Show HN: Tetris, but silly

https://unit520.net/deadtrees/

Hello HN!You can read this [1] blog post if you want to know more about some ideas that I have for this thing. This is just an experiment right now, there isn't any real game (yet). Any feedback would be appreciated, do you think this could become something that would be fun to play?[1] https://unit520.net/posts/dead-trees-an-absurdist-block-layi...

( Read More... | 96 comments | 389 points | on HN )
That's exactly the stack I use as well: C++, OpenGL and Dear Imgui compiled via Emscripten. You can take a look at Hexmap [0] which is built this way.

All in all the performance is great for highly interactive stuff that does some fair amount of client side data processing.

[0] https://unit520.net/hexmap

Hello HN!

This web app is a different take on the typical hex editor/viewer tool. Using this graymap visualization you can easily get a quick overview over binary data and spot interesting structures.

One good example to try out is the Windows Media Creation Tool (MediaCreationTool21H2.exe). If you throw that in you'll quickly see that almost half the data of the 18 MB executable consists of uncompressed bitmaps, which seems kinda wasteful.

Re:The smallest and worst HDMI display on Thursday March 31, 2022 @02:47PM (#30870863)
Very cool hack indeed! One thing I learned from this is that having an HDMI port gives you a free I2C port on top as well, as long as you have an old HDMI cable lying around to cut open.

Small note on using these OLEDs with 5V: Typically they expect 3.3V Vcc and logic levels, although almost all of them seem to work just fine with 5V. In my experiments with a regular 5V Arduino some OLED modules made weird coil whining noises, I presume this is from the charge pump circuitry. Driving them with 3.3V as specified removed the coil whine completely.

Re:Curious lack of sprintf scaling on Sunday February 27, 2022 @08:48AM (#30488380)
Reading this article motivated me to take a closer look at printf/iostreams alternatives, and I have to say, the mentioned {fmt} library finally made me switch, so thanks for that!
Re:React Renderer for Three.js on Sunday August 15, 2021 @11:41PM (#28194722)
WebAssembly has no access to the outside world at the moment, that is correct. It is only able to call (and be called by) JS.

A C++ application compiled via Emscripten ships (a fairly large amount) of JS glue code that exposes all relevant Browser APIs like WebGL, Fetch or other HTML5 stuff to the actual WASM program. As others commented, for WebGL an additional API translation is applied. If the source targets OpenGL ES 2 (or 3 for WebGL 2), this step has almost no overhead however.

He most likely just didn't pay enough close attention or thought about it I guess.

And I agree that MS set themselves up for success with this type of scenery, it is fascinating how well the end result looks overall.

Slightly off-topic, but still anecdotal how far CGI has come, I recently showed my dad who hasn't played any video games for at least 20 years this [0] video of the current MS Flight Simulator. It is produced in a documentary style, so there are no real cues to it being a game. After watching it together, my dad said: "Yeah that's a nice documentary about this difficult airport, but I thought you wanted to show me that new game?". You can imagine his face when I told him that we've in fact watched just that.

[0] https://www.youtube.com/watch?v=UtAF1I_H01w

Outrageous, this can't be! But seriously, it is saddening sometimes to see so much mindshare and engagement wasted on poorly thought out "solutions" to whatever issue is currently trending on Twitter. Even worse, the constant social media outrage machine seems to reduce the inherent kindness that most people have in them (before discovering Twitter).
Re:Why WebAssembly is innovative even outside the browser on Sunday August 08, 2021 @09:50PM (#28111930)
Upcoming versions of Google Docs will use canvas based rendering [0], and I presume their custom renderer might be compiled to WebAssembly. WASM and Canvas (potentially using WebGL) are definitely an interesting combination right now.

[0] https://news.ycombinator.com/item?id=27129858