News for hackers. Stuff that matters.
Re:How I made a game played in Notepad by tyingq on Thursday May 28, 2020 @08:31AM (#23336466)
Related, and recently discussed here[1], a ray tracer that uses Notepad for its UI: http://kylehalladay.com/blog/2020/05/20/Rendering-With-Notep...

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

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 glitchc on Thursday May 28, 2020 @10:51AM (#23337959)
> 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.

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 tyingq on Thursday May 28, 2020 @11:46AM (#23338654)
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 by throwaway_pdp09 on Thursday May 28, 2020 @11:02AM (#23338108)
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 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

Re:How I made a game played in Notepad by ai_ja_nai on Thursday May 28, 2020 @08:02AM (#23336265)
Well, the customized editor makes it less charmant. Anyway, big compliments for the patience and the dedication!
Re:How I made a game played in Notepad by tyingq on Thursday May 28, 2020 @08:41AM (#23336553)
Notepad++ has a setting to skip the dialog, if you wanted to replicate this with a bit less work: https://i.stack.imgur.com/WTQo1.png
Re:How I made a game played in Notepad by ALLLOWERCASE on Thursday May 28, 2020 @09:22AM (#23336903)
We spent so much time wondering if we could... we never stopped to think if we should.
Re:How I made a game played in Notepad by acomjean on Thursday May 28, 2020 @11:15AM (#23338306)
Text editors as display engines in not entirely uncommon. Emacs has all manner of games, (in case non-windows users feeling left out..):

M-x tetris

and for the text adventure fans:

M-x dunnet

Re:How I made a game played in Notepad by senectus1 on Friday May 29, 2020 @04:08AM (#23347494)
this is awesome :-D

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

Re:How I made a game played in Notepad by trelonid on Thursday May 28, 2020 @08:37AM (#23336530)
I've seen enough. Get the stake and the fire.