Live data from Hacker News

Snakisms

pippinbarr.github.io

41–50 of 148 posts

Re: Snakisms

#41
Existentialism performed exactly like I imagined. Endless banality of reality symbolized by continuing borders.

I had to switch it off because I started to project myself to this small square pixel that elongates in the backdrop of pitch dark oblivion staring back into my empty soul.

Re: Snakisms

#44

The games awesome. Capitalism: "You can't afford the apple". Excellent. I didn't like the auto mail.

Lol at narcissism - when you die it sends an email to the creator about how much you love his work.

Brutally honest - snowflake is not a snowflake if it doesn't announce itself.

Re: Snakisms

#45
post #33
post #25

Earlier quoted context omitted.

Funny you should ask. I translated it to Javascript a few months ago, fixing a couple of bugs in the original game in the process[1]: http://www.kylem.net/stuff/gorilla/gorilla.html [1] and surely introducing a couple bugs of my own. I almost got it pixel-perfect, but I couldn't figure out QBasic's arc-drawing algorithm! (And the "slow rendering" is artificial delays. Because whole frames are drawn at a time with HTM…

I think I found a bug the original game didn't had (or my dad fixed on my version...), but suiciding results in you getting the score. (example: I suicided as "player 2", the "player 1" made his victory dance, but the score counted 1 point for player 2)

Thanks! Scorekeeping was always a part of the code I was unsure about, and I thought I saw some scoring inaccuracies while playing the game, but somehow never identified what they were.

If you're curious, the HITSELF constant in the original game is 1, but I was testing a boolean against HITSELF using strict equality (===). Thus, you were just scored based on how many gorillas you hit with a banana.

(fixed)

Re: Snakisms

#46

Great game, but why does it consume soooo much CPU?

JavaScript, probably. More serious answer: it's using HTML5 canvas, which is quite inefficient as rendering APIs go. For example, if you use n colours when rendering a frame, and your game runs at m frames per second, you are invoking the browser's CSS parser n×m times a second, because CSS colour strings are the only way to express colours, and it is an exclusively immediate-mode API. The engine in use might be laye…

That's only if you switch colors frequently. Canvas can be quite efficient.

It's irrelevant here-- the game is using Phaser, which can render as either Canvas or WebGL (WebGL in my case), but it's spending most of it's time in engine code updating expensive transforms every frame.

Re: Snakisms

#47
post #29

some options like Apocalypticism seem normal, without any special effects.

For Apocalypticism you randomly die at some point for no reason. For me it happened around 40 points

I died randomly before reaching the first food.

Re: Snakisms

#48
post #25

Earlier quoted context omitted.

Funny you should ask. I translated it to Javascript a few months ago, fixing a couple of bugs in the original game in the process[1]: http://www.kylem.net/stuff/gorilla/gorilla.html [1] and surely introducing a couple bugs of my own. I almost got it pixel-perfect, but I couldn't figure out QBasic's arc-drawing algorithm! (And the "slow rendering" is artificial delays. Because whole frames are drawn at a time with HTM…

Wow, that's a faithful reproduction. Did you use a translator or are you doing this totally by hand? The reason I ask is that even the effects like the Sun showing a reaction when hit by a banana is nicely reproduced. Edit: If you have the source online, link please. I would love to make it networked :-)

I did it by hand by reading the original QBasic source code. One reason I did it was to reacquaint myself with QBasic, the first programming language I learned. Another was the challenge of converting a program which relied on blocking behavior to HTML5, which shuns anything of the sort; the solution I used was generators to simulate my own "IO monad."

The IBM EGA font came from an image someone kindly had of the complete character set, which I converted to JS: http://www.kylem.net/stuff/gorilla/ega8x14.js

The source code is http://www.kylem.net/stuff/gorilla/gorilla.js

Feel free to do whatever you want with it!

Re: Snakisms

#49

Earlier quoted context omitted.

JavaScript, probably. More serious answer: it's using HTML5 canvas, which is quite inefficient as rendering APIs go. For example, if you use n colours when rendering a frame, and your game runs at m frames per second, you are invoking the browser's CSS parser n×m times a second, because CSS colour strings are the only way to express colours, and it is an exclusively immediate-mode API. The engine in use might be laye…

That's only if you switch colors frequently. Canvas can be quite efficient. It's irrelevant here-- the game is using Phaser, which can render as either Canvas or WebGL (WebGL in my case), but it's spending most of it's time in engine code updating expensive transforms every frame.

Ah, I see. I did check the source to see if it was using canvas 2D, but I failed to check if it wasn't using WebGL.

Re: Snakisms

#50
post #38

Is Conservatism the same as the classic Snake game? That makes sense, but it would be interesting to see it contrasted against a Progressivism or Liberalism version.

It's philosophical conservatism, not political conservatism. The Snake game works as it is, why change it?

Of course the rest of the work is itself a rather potent rebuttal to that idea. In the context of the Snake game, at least.

Post reply on HN