{"id":4440,"date":"2016-04-06T16:59:14","date_gmt":"2016-04-06T14:59:14","guid":{"rendered":"http:\/\/www.kameli.net\/marq\/?p=4440"},"modified":"2017-03-10T00:16:07","modified_gmt":"2017-03-09T22:16:07","slug":"petscii-editors-design-thoughts","status":"publish","type":"post","link":"http:\/\/www.kameli.net\/marq\/?p=4440","title":{"rendered":"PETSCII editors \u2013 design thoughts"},"content":{"rendered":"<p>After more than two\u00a0years of improving and honing <a href=\"http:\/\/www.kameli.net\/marq\/?p=2717\">my own project<\/a>, and checking the competition I got the urge to share some of my thoughts on what makes or breaks a PETSCII editor. A lot of this stuff is actually pretty self-evident in the end, but it has taken hours and hours to figure it out. Bear with me \ud83d\ude42<\/p>\n<h3>Not pixels<\/h3>\n<p>When comparing a PETSCII editor to a generic paint program there are plenty of similarities, but also notable differences. Instead of tens of thousands of individual pixels we&#8217;re dealing with a relatively low-resolution grid consisting of predefined symbols. On the one hand it is easier to deal with text, since tools such as lines, ellipses and curves are rather useless, but on the other hand there is a constant need to effectively choose and alternate between\u00a0the available symbols, which requires different kind of thinking altogether. In other words, adopting tried and tested methods from paint programs alone will not lead to optimal outcome.<\/p>\n<p>Among the most powerful features of <em>PETSCII<\/em> (the editor) are smart rotation and flipping of a selected area which take into account the form of the character. I take no credit for these, as it was Tero who came up with the idea in the first place and wrote the remapping tables. Not every character\u00a0can be rotated or flipped, but even so you&#8217;ll save a lot of time when working with symmetric forms. See the following image for an example of how &#8220;smart&#8221; flipping works as opposed to simply moving the characters:<\/p>\n<p><a href=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/flippi.png\" rel=\"attachment wp-att-4441\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4441\" src=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/flippi.png\" alt=\"flippi\" width=\"447\" height=\"219\" srcset=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/flippi.png 447w, http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/flippi-300x147.png 300w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/a><\/p>\n<h3>Typing vs. drawing<\/h3>\n<p>In essence there are two main methods to get characters on the screen. The traditional way, typing, was initially the only possible option and is still heavily present in modern-day editors (for example AAE). A mouse is something of a rarity on C-64s and graphical symbols can be conveniently found on the keys, so\u00a0on a real machine typing makes all sense \u2013 but a lot less so on your PC or Mac which has a different keyboard to begin with.<\/p>\n<p>I&#8217;ve included a half-assed typing mode in <em>PETSCII<\/em>, mostly for the sake of actually writing\u00a0text, even though all the symbols can be typed too if it&#8217;s really necessary. In any case, drawing\u00a0with a mouse was the preferred metaphor right from the beginning. There are pros and cons to both, but using a mouse definitely makes it quicker to sketch forms in the spirit of direct manipulation. A little but important detail is to show the character before it is actually placed: otherwise you end up constantly undoing the operation.<\/p>\n<h3>Character selection<\/h3>\n<p>When drawing, a great deal of time is spent on selecting the next character. The first thing to do was to reorganize the otherwise messy character set to group related symbols together (thanks go to Tero again). <a href=\"http:\/\/petscii.jambonbill.org\/\">Jambonbill<\/a> went even further and repeated the same characters multiple times to create visually continuous groups.<\/p>\n<p><a href=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/char-charts.png\" rel=\"attachment wp-att-4443\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4443\" src=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/char-charts-300x183.png\" alt=\"char-charts\" width=\"300\" height=\"183\" srcset=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/char-charts-300x183.png 300w, http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/char-charts-768x468.png 768w, http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/char-charts-1024x624.png 1024w, http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/char-charts.png 1054w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>A well-organized character selector is a good start, but much more can be done to facilitate an efficient workflow. For example in <em>PETSCII<\/em> the aforementioned rotate and flip operations work with individual characters as well: press a single key and get the next corner for a window or a box. In the same lines I came up with &#8220;smart sets&#8221;, predefined sets that you can walk through with a keypress. Another little bit that arose from a real need was to let the user quickly shift stick characters (used for various lines) right\/left\/up\/down.<\/p>\n<p>As a piece of PETSCII\u00a0art is drawn, you typically start accumulating useful characters and their combinations in the image itself. Instead of always going for the selector \u2013 which in <em>Playscii<\/em>\u00a0even occludes part of the canvas \u2013 it makes sense to quickly pick a character from the surroundings.<\/p>\n<h3>Grid<\/h3>\n<p>You <em>can<\/em> get away without a grid if the images are comparably small, but all in all a well-working grid can be of great benefit\u00a0when selecting regions and aligning symbols with each other. After at least three complete rewrites of the drawing code I&#8217;ve eventually come up with the following findings:<\/p>\n<ul>\n<li>Don&#8217;t make the grid intrusive (thick, contrasty etc.)<\/li>\n<li>No single color works for the grid alone. Instead, darken light colors and lighten dark colors to keep it harmonious.<\/li>\n<li>It&#8217;s\u00a0useful\u00a0to have a quick on\/off toggle<\/li>\n<\/ul>\n<p>Below a few real-life examples of how\u00a0the grid\u00a0looks like in different editors.<\/p>\n<p><a href=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/gridit.png\" rel=\"attachment wp-att-4452\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4452 size-medium\" src=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/gridit-300x101.png\" alt=\"gridit\" width=\"300\" height=\"101\" srcset=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/gridit-300x101.png 300w, http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2016\/04\/gridit.png 728w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3>File formats<\/h3>\n<p>The file formats supported by an editor tend to reveal its intended use. Some editors are clearly geared toward actual machines, stick to their limitations and facilitate easy exporting to formats like .prg, which can be run on real hardware. At the other end of the spectrum you might get only PNG\u00a0files or GIF\u00a0animations out for easy distribution on the web.<\/p>\n<p>I&#8217;ve been balancing between the two extremes myself: initially the idea was to support software development and participate in demoscene competitions. However, it soon became evident that\u00a0many people needed and wanted to distribute their works online for easy viewing, so I had to give in and add a PNG exporter. Supporting multiple exporters for multiple machines obviously means plenty of error-prone extra work.<\/p>\n<p>Automatically converting existing images to PETSCII is a different discussion altogether. Having said that, many users would welcome\u00a0such a feature for, say, converting their self-portrait into retro character art. In addition, an\u00a0artist can benefit from a reference image, as some of them prefer sketching on paper first before firing up the actual editor.<\/p>\n<h3>Animation and other fancy features<\/h3>\n<p>Creating proper support for animation is probably as big\u00a0a task as all the others combined. As of now there are animation features in multiple editors, but none of them really go beyond simple copy\/paste and playback of\u00a0the frames. Think of\u00a0a proper video or animation editor to realize how many possible features there could be.<\/p>\n<p>Undo and redo aren&#8217;t exactly &#8220;fancy&#8221; features from a user perspective, but it takes some\u00a0effort to include them in your editor. It&#8217;s definitely a good idea to implement\u00a0them early on, as adding them as an afterthought might prove painful \u2013 speaking from experience \ud83d\ude42 There are more and less sophisticated ways to go about undo, but as we&#8217;re dealing with quite little data it&#8217;s not all that bad to just save the buffers between operations for undoing\u00a0or repeating the steps. Another welcome safety network comes in the form of automated backups.<\/p>\n<p>There are a couple of editors that support layers, approximately in the lines of your familiar photo editing software. I can definitely see some uses for them, for example for separating the background from foreground figures. Then again, to <em>fully<\/em> support layers requires considerable effort, and they\u00a0aren&#8217;t quite as useful\u00a0as in photo editing, as you can&#8217;t really have things like translucency or color manipulation.<\/p>\n<h3>Accessibility<\/h3>\n<p>While some users are after a genuine user experience \u2013 tapping away on a real C-64 \u2013 most seem to welcome the ease of cross-development. Supporting the three main desktop platforms (plus their different flavors) is tedious at best, and thus\u00a0some of the editors run on Windows only. Being\u00a0a Mac\/Linux user myself this was, of course, out of the question, but luckily <a href=\"https:\/\/www.processing.org\/\">Processing<\/a> lets you export multiplatform applications with little extra effort. On the downside, Java is required on the target machine, which will turn off some possible users (and rightfully so).<\/p>\n<p>As I see it, the best bet these days would be to develop for the web. In spite of the possible troubles with browser compatibility, web applications tend to be multiplatform by nature. In addition, you don&#8217;t need to go through the trouble of installing anything on the local computer. If I were to start from scratch, I&#8217;d probably take this route. As of now there are two online editors already, even if neither of them is quite complete yet (see my <a href=\"http:\/\/www.kameli.net\/marq\/?p=4365\">previous post<\/a>).<\/p>\n<p>Another angle to accessibility follows from the fact that people use laptops and tablets with a crammed keyboard. Therefore, relying on numpad or function keys beyond F10 is obviously out. Likewise, touch pads (esp. Apple ones) might not have more than one or two mouse buttons available, which requires some thought. Even more so for touch screens, which again introduce a new set of challenges.<\/p>\n<h3>Documentation<\/h3>\n<p>I can wholeheartedly relate to programmers that want to spend their free time on\u00a0interesting coding problems instead of writing documentation. Even if it&#8217;s not exactly fun, there is a need for at least some product\u00a0support: be it a manual, online help or a website. A few nice example works done with the editor definitely don&#8217;t hurt, as they show what&#8217;s possible and spark user interest.<\/p>\n<h3>Conclusion<\/h3>\n<p>Cross-development tools for PETSCII\u00a0are a surprisingly new phenomenon. As far as I know, they&#8217;ve been around for not much more than five years, after which things have really started picking up speed. The threshold of starting to do\u00a0character art has probably never been lower, and new authors are popping up every now and then.<\/p>\n<p>All in all, the challenge of\u00a0programming a PETSCII editor is twofold: there&#8217;s the tech and then there are the users. It&#8217;s not hard to put\u00a0together basic minimum functionality, but going beyond that has\u00a0turned out so laborious that most\u00a0projects have been abandoned shortly after their initial release. <em>PETSCII<\/em> too would require quite an overhaul by now to accommodate any new major features \u2013 feature\u00a0requests are, of course, neverending.<\/p>\n<p>Implementing new modes, tools and so on is one thing, but thinking\u00a0about the workflow and making the features <em>useful<\/em> is another. If you&#8217;re not much of an artist yourself, it&#8217;s at least good to have one in the loop: user feedback or even going so far as to observe someone&#8217;s work over their shoulder provide valuable insight and motivation.\u00a0Ok ok, that was the design teacher in me speaking \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After more than two\u00a0years of improving and honing my own project, and checking the competition I got the urge to share some of my thoughts on what makes or breaks a PETSCII editor. A lot of this stuff is actually pretty self-evident in the end, but it has taken hours and hours to figure it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,17,25,15,24],"tags":[],"class_list":["post-4440","post","type-post","status-publish","format-standard","hentry","category-demoskene","category-filosofointi","category-koodi","category-retro","category-softat"],"_links":{"self":[{"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/posts\/4440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4440"}],"version-history":[{"count":20,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/posts\/4440\/revisions"}],"predecessor-version":[{"id":4933,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/posts\/4440\/revisions\/4933"}],"wp:attachment":[{"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4440"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}