Re:How I made a game played in Notepad
by lvturner on Thursday May 28, 2020 @08:58AM
(#23336683)
This reminds me of a time at a games company one of the tasks we had to do was to fake the game running in a browser for a demo (this was around 2008) easy trick as you just had to change the render handle to any window handle and you were done.
In fact, initially that's what I thought this article was going to be about.
Wish I hadn't dismissed it as too easy and joined the team, as the accolades and attention they got for demoing the game 'running' in Notepad made me quite jealous, especially knowing how technically trivial it was!
The lesson here, I think, is that there is nearly always something compelling about recontextualising something mundane that people are familiar with into something dynamic and unexpected.
Re:How I made a game played in Notepad
by fouc on Thursday May 28, 2020 @08:03AM
(#23336268)
> 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 to the right spot and then type an 'x' in order to click.
This is a stellar example of a GAAUI. Graphical ASCII Art User Interface.
Re:How I made a game played in Notepad
by chabad360 on Thursday May 28, 2020 @01:21PM
(#23339920)
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.
Re:How I made a game played in Notepad
by umvi on Thursday May 28, 2020 @10:55AM
(#23338006)
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
by Kagerjay on Thursday May 28, 2020 @11:59AM
(#23338804)
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
by Aardwolf on Thursday May 28, 2020 @07:49AM
(#23336181)
I gotta say, I was expecting a form of interactive fiction that makes you go to certain parts of the text using "find" and maybe type custom text here and there for personalization or keeping state, and/or something like the vim tutorial which takes place entirely in standard vim and lets you practice cursor movements etc...
Still neat, with the animations it's more like an ascii art terminal or text mode game
Though the ray tracer used a more complicated, and more efficient way of manipulating the Notepad "framebuffer".
[1] https://news.ycombinator.com/item?id=23246221
In fact, initially that's what I thought this article was going to be about.
Wish I hadn't dismissed it as too easy and joined the team, as the accolades and attention they got for demoing the game 'running' in Notepad made me quite jealous, especially knowing how technically trivial it was!
The lesson here, I think, is that there is nearly always something compelling about recontextualising something mundane that people are familiar with into something dynamic and unexpected.
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 to the right spot and then type an 'x' in order to click.
This is a stellar example of a GAAUI. Graphical ASCII Art User Interface.
Sigh, how I wish that were generally true.
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
if (this || that) {dosomething();}
Is mostly identical in JS and C.
Still neat, with the animations it's more like an ascii art terminal or text mode game
M-x tetris
and for the text adventure fans:
M-x dunnet
nice work man.. My son (12) (who has just started writing text based games in batch shell) is super keen. I think you've given him ideas :-D