Live data from Hacker News

How I made a game played in Notepad

sheepolution.com

11–17 of 17 posts

Re: How I made a game played in Notepad

#11
post #10

> An experienced Javascript programmer should have no trouble reading and understanding the general idea of C code. Sigh, how I wish that were generally true.

Does JavaScript even have a concept of stack vs heap? Seems like someone who has only used pure JS would be missing a lot of fundamental knowledge on how C works.

Re: How I made a game played in Notepad

#12
post #11
post #10

> An experienced Javascript programmer should have no trouble reading and understanding the general idea of C code. Sigh, how I wish that were generally true.

Does JavaScript even have a concept of stack vs heap? Seems like someone who has only used pure JS would be missing a lot of fundamental knowledge on how C works.

Not really AFAIK. it's GC'd so you do as you please and it sorts it out.

Re: How I made a game played in Notepad

#14
post #11
post #10

> An experienced Javascript programmer should have no trouble reading and understanding the general idea of C code. Sigh, how I wish that were generally true.

Does JavaScript even have a concept of stack vs heap? Seems like someone who has only used pure JS would be missing a lot of fundamental knowledge on how C works.

For the narrow purpose of the change the author made, his statement fits.

if (this || that) {dosomething();}

Is mostly identical in JS and C.

Re: How I made a game played in Notepad

#15
post #11
post #10

> An experienced Javascript programmer should have no trouble reading and understanding the general idea of C code. Sigh, how I wish that were generally true.

Does JavaScript even have a concept of stack vs heap? Seems like someone who has only used pure JS would be missing a lot of fundamental knowledge on how C works.

Javascript sort of does

Stack - the event loop uses this for handling callback executions

Heap - memory addresses for objects. For instance if you copy over an array of objects, you are copying the pointers to those memory addresses inside the array. Also memory leaks to some extent with eventListeners especially when you use a framework like React

Re: How I made a game played in Notepad

#16
post #4

> With this feature unlocked, I basically created an ASCII based renderer. Haha this is great, having an external program that watches a text file for changes and then writes to it, and forcing a text editor to not complain in order to make it merely an "ASCII based renderer" is a neat concept. Also very interesting that the interaction with the game involves a sort of awkward GUI where you have to bring the cursor t…

From what the video showed, it seems that some of the interaction in the game actually involves modifying or copying the "graphics" in the center window (to clean a window, or obtain an object for example). So it seems that he actually really developed this dynamic quite a lot. It really makes me want to play.
Post reply on HN