5 ms·
How I made a game played in Notepad
- Aardwolf 6y agoI 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
- ai_ja_nai 6y agoWell, the customized editor makes it less charmant. Anyway, big compliments for the patience and the dedication!
- tyingq 6y agoNotepad++ 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 https://i.stack.imgur.com/WTQo1.png
- fouc 6y ago> 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.
- chabad360 6y agoFrom 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.
- tyingq 6y agoRelated, and recently discussed here[1], a ray tracer that uses Notepad for its UI: http://kylehalladay.com/blog/2020/05/20/Rendering-With-Notepad.html 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 https://news.ycombinator.com/item?id=23246221
- trelonid 6y agoI've seen enough. Get the stake and the fire.
- lvturner 6y agoThis 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.
- ALLLOWERCASE 6y agoWe spent so much time wondering if we could... we never stopped to think if we should.
- glitchc 6y ago> 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.
- umvi 6y agoDoes 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.
- throwaway_pdp09 6y agoNot really AFAIK. it's GC'd so you do as you please and it sorts it out.
- tyingq 6y agoFor the narrow purpose of the change the author made, his statement fits. if (this || that) {dosomething();} Is mostly identical in JS and C.
- Kagerjay 6y agoJavascript 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
- acomjean 6y agoText 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
- senectus1 6y agothis 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