Hacker News new | past | comments | ask | show | jobs | submit login
Favicon Dino Game (mashpoe.github.io)
102 points by popcalc on May 8, 2023 | hide | past | favorite | 38 comments



Everything old is new again. Back in the Windows 95 days, there were a handful of freeware games that played with no window and entirely by displaying a changing icon in the system tray. I remember having executables for clones of Pong, Space Invaders, Tetris, and chess that played this way with the icon as their only 'screen'.


I had a little sheep which walked on top of windows, and occassionally fell off them.

When I switched to Linux, I was astonished that sheep.exe worked on Wine, too. This was ca 2000.


I guess because it's nothing more than a transparent window that is reading out information about other windows and changing its own position. So pretty basic WinAPI calls.


There’s a web version we can embed on our personal websites now!

https://adrianotiger.github.io/desktopPet//desktopPet/



Oh, I remember that one, too! I think it's time for a modern revamp.


Great game. I feel this is an excelent resoultion for games, with a splash of colour, it would suffice for most arcarde style games.

Now I am thinking, what is a minimum viable screen resolution for a given game concept, for it to work, ie be playable? Ordering/classifying all games by ascending resolution.


You might like: Making Survival Game with 1 Pixel https://youtu.be/rM0ic5Ii-5w


The Tetris playing field is 10 blocks wide, and (visibly) about 20 high. Each block can be a monochrome pixel.


PICO-8 is quite a popular game engine/emulator. 128x128 screen.


This PICO-8 demake of Sonic in 16x16 pixels hits my nostalgia:

https://www.lexaloffle.com/bbs/?pid=97365


Incredible (iff you have previously played the real thing), thanks for sharing!


To the people who played this game successfully: You must have pretty good eyesight.


I got 423 :)

The navigations between #0 and #1 are instant all right. Are they just being used because it's a static site that can't have a catch-all route?


It might be to force a refresh of the favicon? Never tried rendering 10 frames per second to it, but have definitely seen cached icons when devving locally.


That part is clear to me. What isn't clear is if they could get the same effect by using pushState to go from /0 to /1 rather than #0 and #1

Of course, since there's only 2 pages it switches between, they could create those pages on GitHub pages even though it doesn't support a catch-all route like surge.sh, firebase hosting, vercel, netlify, etc. allow on otherwise static sites.


If going between #0 and #1 works (which it obviously does), then that saves having to change the URL to something the browser considers a different page (I'm not a web dev, so not sure if there's a way of changing the URL to a different page without needing to do a page reload, but having only one page seems cleaner either way).


That's what pushstate does, is change the URL without changing the page. I'm not sure if the browser never does any extra work or if it just mostly doesn't do any extra work at that time. If the user goes to the url again later on it won't have an entry in the cache though.


455

That's the smallest 'screen' that I have ever played a game on for sure!

Brilliant work.


Now that we know games are possible, I think the obvious next step is getting Doom to work within a favicon.



What a time to be alive


Weirdly did not work in Firefox on Ubuntu. Switched to Chromium and got 1182 before deciding to quit. The framerate was pretty slow, which I think is the only reason I got > 1000. :)


So, I did some investigation and know what's broken, but I don't know why. The game uses `canvas.toDataURL()` to replace the favicon for each frame. It draws it, essentially like this jsfiddle https://jsfiddle.net/trLkd1ys/

The fiddle works in both Chromium and Firefox for me (a 16x16 green filled square), but the data URL produced by Firefox results in vertical line rainbow. In Chromium it works fine.

FF: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAQUlEQVQ4T2O83OR55grL9sMTZ1tdefydOU2t5o50tbH8dc+a8h8pYZ8fZ71cboZPnnHUgMejYfB5NAyAeWUYpAMAFY8jzzH0m5oAAAAASUVORK5CYII="

Chromium: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAB5JREFUOE9jZGhg+M9AAWAcNYBhNAwYRsOAYViEAQCDTRgBEA8acQAAAABJRU5ErkJggg=="

https://onlineimagetools.com/base64-decode-png can be used to quickly see if you're inclined.


works fine on firefox 108 here on fedora


It displayed a random rainbow of vertical lines for each frame. Not sure why, and didn't attempt to debug.


Works for me, FF 112.0.2 on Arch.


Hmm. Same version for me. The only difference is my FF comes from a Snap. Perhaps that has something to do with it.


398. Had to come back here and read the comments because I literally didn't notice the little fellow in the favicon and wasn't sure what the game was! Once I figured it out, I felt exhilaration similar to what the parents did in Honey I Shrunk the Kids and the concern that I had to pay careful attention to something very, very small.


962, but it didn't register my last jump. was this a bug? I was shooting for 10k to see what would happen to the number as it wrapped the space.


I got to 1706, which seems to indicate you didn't hit a bug at 962. I guess.




Didn't work on Safari on MacOS, had to switch to Firefox. Wonderful!!


228 and it seems impossible


Why doesn't mobile have favicon?


Si


Todo




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: