Showing posts with label Computer Science. Show all posts
Showing posts with label Computer Science. Show all posts

Monday, July 8, 2013

Source Code for Uushuvud Released

I have made the source code for my 7DRL Uushuvud available here.

I wrote the code in the span of about five days, so don't expect masterfully clean code. This could surely be improved in many ways.

Thursday, March 14, 2013

7DRL Challenge 2013: Uushuvud (Day Three)

No screenshot today, but there will be probably be one tomorrow. You'll have to be patient. :P

My efforts for day three progressed smoothly. I spent a little time tweaking the level generation, but I kept this to a minimum and focused this time only on fixing real problems with it. Aside from that, I got my item and creature data into a much better state than it was in at the end of day two.

If I release the source code at the end of all this, then some might notice that I am hard coding all my data into tables compiled directly into the program and wonder why I'm doing this. The answer is twofold.

First, I'm used to programming for embedded systems with no file I/O at all.

Second, I'm trying to manage my time wisely. For this project, this means not mucking around with file I/O routines. It's a small game. There's no real need to have my data stored in external files. And there's not going to be any save/restore feature. You have to get through the game in a single go. So there's no file I/O, and I can spend my time working on other stuff.

Last time I tried a 7DRL, I got so carried away with level generation that I think I spent three or four days just on that. There wasn't enough time for everything else, and the game slipped past the seven day mark, and then the fourteen day mark, and now it's more like seven months.

I guess level generation is kind of my thing. I've already spent more time on it for Uushuvud than I had originally intended, but I just really wanted it to be good, even though it's a 7DRL project. That means, first and foremost: No unreachable areas.

My algorithm right now could theoretically produce unreachable areas, but I'm pretty sure it's about 1:10000 for that to happen, and probably like 1:80000 for an unreachable area with important stuff in it (the exit, the player's starting point, etc.). If I make another small change I'm planning that'll take me four seconds, it'll be more like 1:204800000, not really a concern. I'm tempted to write a quick check function that verifies a level has no unreachable areas before showing it to the player, but I really just want to get on with other stuff. Maybe if there's time at the end of development...

Sunday, July 15, 2012

Rorschach

So... long story short... There's a game making exercise at SuperFriendshipClub with a theme of "Symmetry." So I made this little game/kinda-not-really-a-game-thingy:





Click here or here for the files. Sadly, it's Windows only right now.

Feedback?

Friday, March 23, 2012

Null Terminator

I have to preface this entry by explaining who Null Terminator is. Null Terminator is a composer, a sort of kindred spirit to myself, whom I have been working with on and off for some time now on a forthcoming album of electronic music. But there is another Null Terminator. He is the protagonist of the story set forth in the album. He is a sort of space age superhero, granted authority in the late twenty-second century by the Catholic Federation to use lethal force against any of a select group of evildoers, one of whom is called Sentinel, another of whom is called The Void Star.

A week or two ago I dreamed that I was Null Terminator, and I was fighting against both Sentinel and The Void Star simultaneously using advanced martial arts techniques. For some reason, I was also fighting against Batman and Robin and Jackie Chan. They had all ganged up on me in the hopes that through sheer force they might be able to take me down.

Nevertheless, I summarily trounced them, every last one.

~   ~   ~

I should point out that although this entry is very short, the dream was in fact quite long, and the battle was basically just one long sequence of them trying to punch and kick me, me blocking every last attack, and then at the end me incapacitating them with a single blow. Thus, I have tagged it as Important (Long).

Wednesday, November 23, 2011

A Dead Stag

A stag fell dead, for the ebb of ethereal grief tis quicksilvered blood.

The sea rolled back upon its rearward edge
and pressed against a hidden one as you
eftsoon cut to the quick a quickthorn hedge
to form the stormcloud's silver lining true

Monday, February 14, 2011

A Portrait of the Clarinet as a Political Weapon

Last night I dreamed that I was working on a computer program of some kind, and upon achieving some measure of success with it, I was accused of being a hacker. Insisting that I was not seemed futile. My accusers persisted with their lies.

I found a clarinet somewhere and started to play it. I don't play the clarinet, really. I took a woodwind class years ago in which I was required to play one a little, but I don't actually know how to play it properly. Nevertheless, I discovered that I was not entirely terrible. Although I was only messing around with it, a crowd soon gathered around me to listen to my playing.

I stopped to explain to the kids in the crowd what the instrument was and its basic functionality. Knowing, however, that the kids would soon grow bored if I talked for too long, I jumped right into another piece of music.

Miraculously, this time I had a band accompanying me. I also realized suddenly that I was the greatest clarinetist who ever lived. We jumped right into it: at about 160 beats per minute, I played an extended lead part consisting of constant sixteenths with occasional triplets to mix it up. We ramped up the intensity and increased the tempo very gradually, until at last the band dropped out, and I finished off with two full measures of a relentless barrage of notes: sixteenth triplets first, finishing off with a flurry of thirty-secondths.

The band joined in again, and I tossed the clarinet to a nearby roadie. I started to sing. The lyrics are gone now, but they had something to do with finding a place where I could be at peace.

The melody was something like this:


After a single verse, the song was over, and everyone cheered until my accusers had no choice but to leave me alone lest the mob tar and feather them.

~  ~  ~

Ordinarily I reserve the label "Important (Long) Dreams" for those dreams that I flesh out into a sort of short short story. I didn't do that here, because I am busy. In any case, this dream felt important, and thus it should have been so fleshed out. I might have written some notes down for later blogging purposes, but usually what happens when I do that is that the dream never really gets translated into blog form at all. So I opted to write it more simply as I have done above.

I do sometimes dream about writing or playing music or both. What is interesting to me is that the music is usually not bad at all. I'm not sure what exactly this suggests about the human mind and how creativity is related to the subconscious, but it seems to suggest something. I don't know a lot about psychology or neurological anatomy, but as far as I can tell, the subconscious parts of the human brain are not altogether separate or distinct from the parts involved in creating artwork. Or the parts that create artwork are not turned off whilst in a dreamspace.

I also don't know why I played the clarinet in this dream. I play the guitar quite well, so why didn't I play that?

If one of my hundreds of thousands of readers who have extensive experience in the relevant fields would kindly give me some insight, I would be much obliged.

Thursday, December 2, 2010

A Computer Framework for Algorithmic Music Generation

For the last three months or so I have been developing a piece of software that algorithmically generates music. The program works pretty well, but the algorithms that produce the music are still a little bit rudimentary. There is still a lot of room for improvement. The music it generates is usually not quite coherent.

I am giving a presentation about this project at California State University San Bernardino tomorrow. It should be good, because I won't really have to do very much other than explain how the program works and then run it.

Last night I finished up the program, cleaned up the code to make it presentable, and then put together a short PowerPoint presentation.

And then I went to bed and dreamed about another feature that the program needed. "But!" I kept telling myself, "I already finished it! I can't change it now!"

I woke up this morning, and for a second I thought about rushing to the computer to implement the new functionality.

After that second was over I realized that I had no idea what the feature was that I had dreamed about. So I went back to sleep for another fifteen minutes.

I think I might have dreamed about it again.

If so, then I forgot it again the second time I woke up.

Friday, November 19, 2010

Brainf***

Last night I dreamed that I was programming in a little programming language called brainf***. It was really frustrating, as though I just couldn't quite get the program to do what I wanted it to do, or as though the problem I was trying to solve just didn't lend itself well to a language consisting of only eight tokens. I think, now that I'm trying to remember it, that I was attempting to use brainf*** to develop a proof for some stupid theorem or something, but the theorem was really trivial and intuitive, and therefore proving it requires the use of brainf*** to make it more challenging, so that you don't get bored and subsequently die from said boredom. Or something like that. It's very hazy now.

In any case, the reason that I was dreaming about brainf*** is because on Tuesday (in real life) I spent an hour writing a brainf*** interpreter in C++. It works really well, though that's not saying much as it's such a simple language to implement.

Is there some subtle subconscious message coming out of this? I wrote an interpreter for brainf***, and then I dreamed about brainf***. How can I find more meaningful interpretations of my dreams? Et cetera.

In unrelated news (or is it?), I watched a film called White on Rice this week. It is the funniest movie I have ever seen. I recommend it for the whole world.