<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
    <channel>
        <title>Jp's site</title>
        <link>http://www.byond.com/members/Jp</link>
        <description></description>
        <lastBuildDate>Fri, 24 May 2013 22:59:12 +0000</lastBuildDate>
        <language>en-us</language>
    
                <item>
            <title>GIAD 2011 entry</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=119099</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=119099</guid>
            <pubDate>Mon, 26 Sep 2011 09:04:30 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=119099#comments</comments>
            
            <description>This year I wrote a quick-and-dirty roguelike using a bit of every theme. Runs in text-mode, has a few bugs, is a bit simplistic.&lt;br&gt;
&lt;br&gt;
EDIT:&lt;br&gt;
The hub is &lt;a href=&quot;http://www.byond.com/games/Jp/GIAD2011&quot;&gt;here&lt;/a&gt;</description>
        </item>
                <item>
            <title>My roguelike senses are tingling</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=116709</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=116709</guid>
            <pubDate>Wed, 03 Aug 2011 14:40:08 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=116709#comments</comments>
            
            <description>A thought I've had floating around for a while, that I've begun implementing for coding tonight (and will likely take me a while to get somewhere workable) is that it would be possible to implement an interesting sense system into a roguelike, both from the point of view of players sensing things and players trying to not be sensed by monsters.&lt;br&gt;
&lt;br&gt;
Leave aside implementation for now, just think about it from a player's point of view. Let's say. for now, that there are just three relevant senses (sight, smell, hearing). More esoteric senses like being able to detect magic in the vicinity (ring of detect magic?), or detect life in the vicinity (because you're a vampire?) are obvious extensions.&lt;br&gt;
&lt;br&gt;
So first things first, sight is pretty obvious to begin with. It might be a thing to have a state between &quot;Can't see it, it's too dark/small/sneaking&quot; and &quot;Can see it perfectly&quot; where the players knows that something is there, but don't get any more information than 'something is there'. They get a grey generic silhouette rendered where the creature would be, and can cast spells at it, attack, whatever as they would any creature. Maybe the silhouette is customised between some types of monster - it's hard to miss that a dragon looks different than a goblin, no matter how hard they are to see - and maybe the player gets a small textual description.&lt;br&gt;
&lt;br&gt;
Depending on the thing you're hearing and how good you are at hearing things, sound can range from &quot;There's something to hear&quot; to &quot;There's something to hear in roughly this direction&quot; to &quot;There's something to hear over here&quot; to being basically as good as sight. This can be rendered as, respectively:&lt;br&gt;
&lt;br&gt;
- Some kind of 'sound mark' on the player character, with textual output&lt;br&gt;
- &quot;sound waves&quot; being drawn coming to the player from some direction&lt;br&gt;
- Some kind of 'sound mark' drawn somewhere on the map&lt;br&gt;
- Just the thing being drawn (maybe a washed-out, decoloured version?)&lt;br&gt;
&lt;br&gt;
Smell ranges from &quot;Something smells&quot; to &quot;Something smells and it's here&quot;, again depending on how good the creature is at smelling. &quot;Something smells&quot; is just a 'scent mark' drawn above the player, with description. 'smells over here' is maybe a little scent cloud drawn on the map, with description. The biggest use case here would be creatures leaving scent trails you could sense if you had enough scentiosity - because you've cast a spell to make yourself smell really well, or because you're a wolf monster, or something.&lt;br&gt;
&lt;br&gt;
I might post some stuff regards implementation all this as I start fiddling with it. Note that any implementation is going to be assuming single-player turn-based roguelike, so some of the solutions may not be appropriate to other contexts.</description>
        </item>
                <item>
            <title>Using external dlls for dynamic lighting</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=116665</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=116665</guid>
            <pubDate>Tue, 02 Aug 2011 15:03:48 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=116665#comments</comments>
            
            <description>A &lt;a href=&quot;http://ale.chenonetta.com/blog/2011/08/blagofest/&quot;&gt;few&lt;/a&gt; &lt;a href=&quot;http://leaflocker.blogspot.com/2011/08/augustinians.html&quot;&gt;friends&lt;/a&gt; of &lt;a href=&quot;http://john.chenonetta.com/&quot;&gt;mine&lt;/a&gt; have gotten me to do some kind of blagathon challenge thing where I'm apparently supposed to write five blog posts a week with them. This ties in quite nicely with something I've been doing over the last few days, where I try to do some hobbyist programming every day, and email myself (using the quite handy &lt;a href=&quot;http://gmailblog.blogspot.com/2008/03/2-hidden-ways-to-get-more-from-your.html&quot;&gt;plus addressing&lt;/a&gt; feature of gmail) about what I've done to try and reinforce the habit.&lt;br&gt;
&lt;br&gt;
So with intent to start playing this game, here's what I've been working on tonight:&lt;br&gt;
&lt;img src=&quot;http://files.byondhome.com/Jp/blogathon/dm_lighting%202011-08-03%20001220.png&quot; alt=&quot;A terribly impressive demonstration of dynamic lighting in DM&quot;&gt;&lt;br&gt;
&lt;br&gt;
The idea is to use an external DLL to generate a per-client lighting mask that can just be rendered as a single client.screen obj over the top of everything, so we get nice pixel-by-pixel lighting. The current implementation is only a few hours old, so it doesn't do a lot yet - doesn't really work in circumstances where the client eye shifts around (readily fixable), probably not really fast enough for proper realtime use (less fixable), doesn't have any kind of concept of opacity (potentially fixable - need to think about that a bit), but it basically functions. Source is available &lt;a href=&quot;http://files.byondhome.com/Jp/blogathon/dm_lighting.zip&quot;&gt;here&lt;/a&gt;. The DLL is written in C++ using the &lt;a href=&quot;http://qt.nokia.com/products/&quot;&gt;Qt&lt;/a&gt; framework. And, as is my usual wont, it's not exactly documented.&lt;br&gt;
&lt;br&gt;
If this intrigues and interests you, &lt;a href=&quot;http://www.byond.com/developer/DarkCampainger/StaticLightingGenerator2&quot;&gt;DarkCampainger&lt;/a&gt; has done some similar, very clever things.&lt;br&gt;
&lt;br&gt;
Extensions, and Places Where This Could Go:&lt;br&gt;
&lt;ul&gt;

&lt;li&gt;Isometric mode, not just topdown mode (Would just require some maths to do the lighting in the right coordinate system)&lt;/li&gt;

&lt;li&gt;Coloured lights (Should actually be pretty easy)&lt;/li&gt;

&lt;li&gt;Just how fast can this be done? (Almost certainly much faster than I'm currently doing it, but the call from DM to the DLL is likely going to always be the bottleneck)&lt;/li&gt;

&lt;li&gt;Opacity. (Problems here include: How much precision do you want with the opaqueness? How do you light the tops of walls? How do you pass the information about location of opaque things to the DLL?)&lt;/li&gt;

&lt;/ul&gt;
&lt;br&gt;
&lt;br&gt;
EDIT: Added a DLL to the zip file. It's build for Windows, 32-bit, and does still require the Qt libraries, so I'm afraid running this will require a little work. Maybe I should host it...</description>
        </item>
                <item>
            <title>Well that's interesting</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=107160</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=107160</guid>
            <pubDate>Mon, 17 Jan 2011 12:48:32 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=107160#comments</comments>
            
            <description>Just updated my ye-olde Fedora 10 install to Fedora 14. Ejected the disk, rebooted, and am presented with...&lt;br&gt;
&lt;br&gt;
grub&amp;gt;&lt;br&gt;
&lt;br&gt;
The grub prompt. Huh. That's kind of worrying.&lt;br&gt;
&lt;br&gt;
After a bit of fiddling around to try and refresh my memory as to the syntax of filesystem access, I locate my boot partition (hd0,0), and attempt to boot the kernel.&lt;br&gt;
&lt;br&gt;
grub&amp;gt; kernel (hd0,0)/vmlinuz-2.6.STUFF&lt;br&gt;
&lt;br&gt;
Error SOME_NUMBER: Unsupported executable format.&lt;br&gt;
&lt;br&gt;
Also sort of worrying! Well, okay, let's at least look at the config.&lt;br&gt;
&lt;br&gt;
grub&amp;gt; cat (hd0,0)/config-STUFF&lt;br&gt;
&lt;br&gt;
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????&lt;br&gt;
&lt;br&gt;
Error 24: Attempt to access block outside partition&lt;br&gt;
&lt;br&gt;
Well I have no idea what's happened. Browsing the Fedora bugs database at the moment, will have to boot into rescue mode at some point and see what it's done to the partitions I told it to make/install into.&lt;br&gt;
&lt;br&gt;
It doesn't appear to have screwed up the partition table any - I've got some other partitions on there that are quite visible in Windows and don't appear damaged, so *shrug*.&lt;br&gt;
&lt;br&gt;
EDIT: Some helpful people on the Fedora IRC channel pointed out to me that /boot is supposed to be &amp;gt;300 mb in Fedora 14, and that my /boot was ~half that. Reinstalling with a fixed partition setup appears to have resolved that problem. Of course, I did manage to kill ntldr in the process of fixing this, so I'm not quite out of the woods yet. :P</description>
        </item>
                <item>
            <title>What is Jp doing for GIAD?</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=102395</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=102395</guid>
            <pubDate>Sun, 26 Sep 2010 04:32:56 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=102395#comments</comments>
            
            <description>&lt;img width=&quot;320&quot; height=&quot;320&quot; src=&quot;http://www.byond.com/members/Jp/files/2010%2D09/Jp%2D0001/GIAD2010%202010%2D09%2D26%20140717.png&quot;&gt;&lt;br&gt;</description>
        </item>
                <item>
            <title>Directed at 'Forum_account'</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=98707</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=98707</guid>
            <pubDate>Fri, 16 Jul 2010 13:31:30 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=98707#comments</comments>
            
            <description>(This is a response directed towards the user 'Forum_account', following the forum thread rooted at http://www.byond.com/members/DreamMakers/forum?id=753427.)&lt;br&gt;
&lt;br&gt;
I think you're playing semantics. The halting problem is provably unsolvable in that it is undecideable, and if one assumes the Church-Turing thesis, all undecideable problems are uncomputable - that is, it's impossible to solve the problem, no matter what model of computation you use, because they're all equivalent to the Turing machine. I assumed that in your last post your point was that proved undecideability was not a sufficient condition for the halting problem to be considered proved unsolvable because there could be other modes of computation in which it isn't undecideable - something not Turing-equivalent. Did you perhaps mean something else, or were you pointing out that 'unsolvable' isn't a CS term? I thought it was pretty clear that what I meant by 'unsolvable' was 'it is impossible to write a program to do it in a finite amount of steps'.&lt;br&gt;
&lt;br&gt;
I'm not talking in a completely precise manner here. I'm fully aware of that. There's a number of reasons - I'm an engineer, not an academic computer scientist, so I've not exactly been immersed in the pure light of mathematical algorithmic analysis, it's a public forum, not a scientific journal, and because the reason I brought up the matter was to demonstrate that yes, things can be impossible (the halting problem was the first thing that came to mind), and then I continued it because Falacy didn't think about the problem and I thought he could do with hearing about it and digging into it on his own time. I don't think picking apart minor issues in terminology (the biggest one being 'program' versus 'algorithm') in a forum post intended primarily to gently poke people with mathematics exactly constitutes a service to the community.&lt;br&gt;
&lt;br&gt;
My intention wasn't to stroke my own ego - it's mostly that the 'nothing is impossible' attitude irritates me. I picked the Halting Problem because it's mathematically demonstrable and reasonably simple to understand, whereas something like Godel's Incompleteness Theorem is a bit trickier and the First Law of Thermodynamics is empirical in nature. The original post was only a few words long, for Eris' sake! It's kind of hard to fit ego-stroking into that many words.&lt;br&gt;
&lt;br&gt;
And I'm not sure how it was presented in a way that &quot;wouldn't help anyone here&quot;. There's enough there to make people like Falacy have a look into the matter and maybe learn something in the process.</description>
        </item>
                <item>
            <title>Getting a Little Bit Done</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=96200</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=96200</guid>
            <pubDate>Mon, 31 May 2010 11:19:54 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=96200#comments</comments>
            
            <description>Well, it's 8:27 PM on the 31st of May over here, so I figure I may as well let everyone know what I've managed to Get Done for IainPeregrine's excellent Get Something Done challenge.&lt;br&gt;
&lt;br&gt;
For the TL;DR group amongst you, here's the link: &lt;a href=&quot;http://www.byond.com/members/Jp/files/dreamcatcher.zip&quot;&gt;http://www.byond.com/members/Jp/files/dreamcatcher.zip&lt;/a&gt; . That's a zipfile containing the source and a makefile for building the source. The makefile builds it using GNU flex and bison, which are freely available: &lt;a href=&quot;http://flex.sourceforge.net/&quot;&gt;flex&lt;/a&gt;, &lt;a href=&quot;http://www.gnu.org/software/bison/&quot;&gt;bison&lt;/a&gt;. Your local equivalent of lex or yacc may be appropriate - I don't know.&lt;br&gt;
&lt;br&gt;
This is not likely to be easy to build on a Windows system, I'm afraid. For that matter, it's probably going to only be a bit easier for someone on a UNIX-like system to build. Rest assured that as of yet, Dreamcatcher does very little of use - you're not missing out.&lt;br&gt;
&lt;br&gt;
Anyway, what was my Get Something Done project? Well, I described my original goals &lt;a href=&quot;http://www.byond.com/members/Jp?command=view_post&amp;post=94808&quot;&gt;here&lt;/a&gt;. How well did I do?&lt;br&gt;
&lt;br&gt;
Not so well, I'm afraid. I'd like to say that real life intervened, but while I'm busy, I wasn't so busy that I couldn't code. I was just lazy for most of this month. Sorry.&lt;br&gt;
&lt;br&gt;
But I have done some work, and I've gone a bit beyond where I was last time I fiddled with this stuff.&lt;br&gt;
&lt;br&gt;
Dreamcatcher as it is currently built is capable of extracting the object tree, including variables, from a single DM source file without preprocessor statements, procedures, or verbs. It only works on 'usual-ish' DM files - no braces for block structure, no spaces for indents. parent_type isn't understood, nor are some technically legal but kind of odd constructs, like leading derived types with a / character or using ? as an identifier. There are probably more restrictions I can't see because I'm right up against the code. Some of them are a matter of writing a few lines in the flex code, some of them are a little trickier.&lt;br&gt;
&lt;br&gt;
So what can it do?&lt;br&gt;
&lt;br&gt;
Well, this:&lt;br&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
a&lt;br&gt;    b&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/c&lt;br&gt;    d/e/&lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/f&lt;br&gt;    &lt;br&gt;    &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/a/b&lt;br&gt;        g = &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Test variable&amp;quot;&lt;/span&gt; &lt;span class=&quot;dmcomment&quot;&gt;// This variable is a test&lt;/span&gt;&lt;br&gt;        &lt;br&gt;    &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;&lt;br&gt;        d&lt;br&gt;            e&lt;br&gt;                h = 5 + &lt;span class=&quot;dmcomment&quot;&gt;/* This is a constant expression */&lt;/span&gt; 6 &lt;span class=&quot;dmcomment&quot;&gt;// Yes, this is kind of odd code.&lt;/span&gt;&lt;br&gt;                &lt;br&gt;i/&lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/j = &lt;span class=&quot;dmstring&quot;&gt;{&amp;quot;Oh no!&lt;br&gt;This giant string will devour us all!&lt;br&gt;And it's FULL of funny characters!&lt;br&gt;&amp;quot; \&quot;} &amp;quot;\} &amp;quot;&amp;quot;}&lt;/span&gt;&lt;br&gt;&lt;br&gt;k/&lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/l = &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;This one is also kind of odd \&lt;br&gt;and also spans two lines \&quot;&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
parses out to:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;
root
        a
                b
                        var
                                c
                d
                        e
                                var
                                        f
                var
                        a
                                b
                                        g
                var
                        d
                                e
                                        h
        i
                var
                        j
        k
                var
                        l
&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
Notice that names that appear more than once aren't collapsed into a single instance (all those 'var' nodes), but that's mostly a matter of data representation. The current code is very proof-of-concept.&lt;br&gt;
&lt;br&gt;
Is this at all useful? Probably not. But hopefully it'll lead to something more interesting.</description>
        </item>
                <item>
            <title>String magic</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=95968</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=95968</guid>
            <pubDate>Wed, 26 May 2010 08:38:27 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=95968#comments</comments>
            
            <description>&lt;pre&gt;
void magic(char* c) {
        size_t len = strlen(c);
        char temp;
        short toggle = 0;
        
        for(size_t it = 0; it &amp;lt; len; it++) {
                for(size_t i = toggle; i &amp;lt; len - 1; i+=2) {
                        temp = c[i]; c[i] = c[i+1]; c[i+1] = temp;
                }
                
                toggle = (toggle+1)%2;
        }
}
&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
An algorithm that may be useful to constructors of conveyor-belt-driven robot-sorters.</description>
        </item>
                <item>
            <title>I've been nerd-sniped</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=95887</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=95887</guid>
            <pubDate>Mon, 24 May 2010 11:43:53 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=95887#comments</comments>
            
            <description>I blame Skyspark for this:&lt;br&gt;
&lt;img src=&quot;http://www.byond.com/members/Jp/files/GoldbergStrikesBack.png&quot; alt=&quot;Rube-Goldbergian contraption to add 1 to a binary string&quot;&gt;&lt;br&gt;
&lt;br&gt;
He's got me hooked on a generally-awesome game called &lt;a href=&quot;http://www.kongregate.com/games/PleasingFungus/manufactoria&quot;&gt;Manufactoria&lt;/a&gt;, in which you construct programs out of conveyer belts.&lt;br&gt;
&lt;br&gt;
That mess you see above interprets the string of dots in the robot being processed as a binary number and adds 1 to it.</description>
        </item>
                <item>
            <title>A grammar for nested lists</title>
            <link>http://www.byond.com/members/Jp?command=view_post&amp;post=95457</link>
            <guid>http://www.byond.com/members/Jp?command=view_post&amp;post=95457</guid>
            <pubDate>Fri, 14 May 2010 14:52:22 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Jp?command=view_comments&amp;post=95457#comments</comments>
            
            <description>&lt;pre&gt;
definitions: definition definitions |

definition: IDENTIFIER NEWLINE definition_contents | IDENTIFIER '/' definition
definition_contents: INDENT definitions DEDENT |
&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
That's a very simple grammar for something approaching the basics of a block structure language. Accepts these sorts of constructs:&lt;br&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
a&lt;br&gt;    b&lt;br&gt;    c&lt;br&gt;    d/e&lt;br&gt;        f&lt;br&gt;    h&lt;br&gt;&lt;br&gt;i&lt;br&gt;    j
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
See if you can figure out how it works. You read it like this:&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;
definitions: definition definitions |
&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
A 'definitions' is a 'definition' followed by a 'definitions', or it's nothing (':' is assignment, '|' is alternation)&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;
definition: IDENTIFIER NEWLINE definition_contents | IDENTIFIER '/' definition
&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
A 'definition' is an IDENTIFIER followed by NEWLINE followed by 'definition_contents' or an IDENTIFIER followed by the character / followed by a 'definition'.&lt;br&gt;
&lt;br&gt;
&lt;pre&gt;
definition_contents: INDENT definitions DEDENT |
&lt;/pre&gt;
&lt;br&gt;
&lt;br&gt;
A 'definition_contents' is an INDENT followed by a 'definitions' followed by a DEDENT&lt;br&gt;
&lt;br&gt;
Note: Whether this works on tabs or braces or whatever is entirely dependent on the lexer - as long as it returns INDENT and DEDENT tokens when an indent or a dedent happens, it's all good. This also has a NEWLINE occurring before an INDENT and doesn't accept spurious newlines, which is sort of a problem</description>
        </item>
            
    </channel>
</rss>

