{"assets":[],"author_link":"author\/mjau\/","author_name":"mjau","cat":"MiniLD","categories":["MiniLD"],"comments":[],"epoch":1220671440,"event":"LD12","likes":0,"metadata":{"p_key":"76258","p_author":"mjau","p_authorkey":"0","p_urlkey":"284021","p_title":"Wall of text!","p_cat":"MiniLD","p_event":"LD12","p_time":"1220671440","p_likes":"0","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1218153600","event_key":"89","event_name":"LD12"},"source_url":"2008\/09\/06\/wall-of-text\/","text":"<p>My first thought when I saw what the theme would be for this MiniLD was, this is the perfect chance to finally start making that pixel\/paint program I\u2019ve been meaning to do for literally half a decade! So far I\u2019ve gotten by with Gimp, but I really don\u2019t like its interface, and it\u2019s pretty obvious it wasn\u2019t made with pixel art in mind at all, among other things. Its tablet handling is also buggy, though to be fair that\u2019s actually a GTK issue. (On the other hand, GTK was made for Gimp, so, uh.)<\/p>\n<p>Anyway, a gfx editor needs an interface. This is part of the reason it\u2019s been delayed for so long, there just hasn\u2019t been any cross-platform interface lib that I\u2019ve been satisfied with, and apart from GTK\u2019s buggy support I haven\u2019t found any cross-platform tablet libs either. Tablet support isn\u2019t exactly essential for a pixel editor, but if I put that in it wouldn\u2019t be just for pixels. And it doesn\u2019t <em>have<\/em> to be cross-platform, the Linux tablet evdev interface is pretty easy to use (or was, until Xorg started blocking it), but it\u2019d be nice. Still, I\u2019ve made some half-hearted false starts on a tablet-less version using a custom interface in SDL, but SDL is also limited to one window, which is really not that big of a deal either, but still, multi-window support <em>would<\/em> be nice.<\/p>\n<p>While these things shouldn\u2019t have prevented me from getting it done, they have been.. irksome. Which bothers me. That\u2019s the problem with being a perfectionist, if you want something to be perfect the first time around you\u2019ll never actually get anything done. But! I\u2019ve been getting slightly better at avoiding that problem, not least of which thanks to Ludum Dare and some other game compos. If you\u2019ve seen some of my entries you know what I mean =)<\/p>\n<p>Also, SDL 1.3 has been getting to a usable state lately. It\u2019s still in development, but it supports multiple windows and pressure-sensitive tablets, and it\u2019s cross-platform. This kinda leaves my excuses baseless.<\/p>\n<p>In short, it\u2019s time to make this thing.<\/p>\n<p>It still needs that interface, though! I actually started working on a simple library for that earlier this week with the intention of getting it done and ready to be used before the compo started, so that I could use it for my tool and maybe others could, too. While that didn\u2019t happen, I did get some things done, and I like how it\u2019s turning out. It\u2019s based on SDL 1.3, using Lua for the interface. You can do stuff like this:<\/p>\n<pre>    Frame {\r\n        w = 100,\r\n        h = 100,\r\n        Button {\r\n            label = \"Click\",\r\n            onclick = function () print \"whee\" end\r\n        },\r\n    }<\/pre>\n<p>But it also supports a kind of hybrid immediate mode!<\/p>\n<pre>    if Button{ x=10, y=5, label=\"Click\" }.clicked then\r\n        print \"hurray\"\r\n    end<\/pre>\n<p>I say hybrid because I\u2019m not sure it could be called a true IMGUI, since some things like drawing are really delayed actions (though it happens behind the scenes, so you usually don\u2019t have to care about this). This way immediate and retained mode can be freely mixed, so you could eg. have immediate-mode stuff inside a retained-mode frame\u2019s onhover handler, and it\u2019d all combine seamlessly.<\/p>\n<p>I call it \u201cSIF 2\u201d for now, but that might change. (If you\u2019re wondering about SIF 1, that\u2019s an ancient project that never really got anywhere. I guess I could just call it SIF. Or probably something completely different.)<\/p>\n<p>Anyway, it\u2019s not quite ready for use yet, so now I\u2019ve got to decide what I want to do for this MiniLD! Do I keep working on the interface lib, even though that means I cheated by starting way before the deadline? Or, do I make some other tool without using the interface lib, so I can keep it within the 48 hours? I do have an idea for another very simple tool that could possibly be slightly useful. Decisions..<\/p>","time":"September 6th, 2008 3:24 am","title":"Wall of text!"}