haskell – increpare games https://www.increpare.com let's try something out here... Fri, 18 May 2018 22:16:47 +0000 en-US hourly 1 https://wordpress.org/?v=4.8.2 Blendings https://www.increpare.com/2010/04/blendings/ https://www.increpare.com/2010/04/blendings/#comments Tue, 06 Apr 2010 01:03:02 +0000 http://www.increpare.com/?p=1468 Windows version
.t3 version

If you’re using Linux or a Mac, download the .t3 version. Unzip the file and run it with an interpreter from this page (such as spatterlight).

source code (TADS 3 + Haskell)

]]>
https://www.increpare.com/2010/04/blendings/feed/ 6
1D tessellation in haskell https://www.increpare.com/2008/11/1d-tesselation-in-haskell/ Mon, 17 Nov 2008 16:54:04 +0000 http://www.maths.tcd.ie/~icecube/?p=825 This is what the game I posted a couple of days ago, Endless Cavern, was essentially based around.

The haskell code is simple (not awfully efficient, but that’s not a concern just yet), and I’ve tossed it here (32kb). You can control the prototype by pressing left/right on the keyboard.

]]>
Endless Cavern https://www.increpare.com/2008/11/endless-cavern/ https://www.increpare.com/2008/11/endless-cavern/#comments Sat, 15 Nov 2008 16:21:57 +0000 http://www.maths.tcd.ie/~icecube/?p=822

Strange well in Arkham country—water gives out (or was never struck —hole kept tightly covered by a stone ever since dug)—no bottom—shunned and feared—what lay beneath (either unholy temple or other very ancient thing, or great cave-world).

An entry for the TIGsource Commonplace Book competition.

DOWNLOAD:

Windows (1MB)
Mac OSX 10.5 (2MB)
Source (4MB)

The source is, on the whole, a bit gross, owing partly to my inability to wrap the fmod library properly. If there’s any interest at all, I can easily make an easy-to-compile soundless and generally tidied-up version of the game available.

CONTROLS:

space – to progress through title menus
left/right – to move left/right
up/down – to turn off/on ‘thrust’

PREMISE:

Procedurally-generated tessellated-cavern flying game of sorts.

SCREENSHOTS:

]]>
https://www.increpare.com/2008/11/endless-cavern/feed/ 5
GTTM-based Chord Progression Generator https://www.increpare.com/2008/11/lerdahl-based-chord-progression-generator/ Sun, 02 Nov 2008 22:23:05 +0000 http://www.maths.tcd.ie/~icecube/?p=801 I’ll be posting some articles about the theory of Lerdahl very very soon. In anticipation of them (and to put something up so I can submit it to the Haskell Activity Report), here’s my implementation of a toy-model based roughly around his theory. It’s restricted to the process of chord generation.

Here‘s a simple playing by me of a chord-sequence that it produced. Here‘s a midi example that it produced by itself when I had it more developed.

There’s still a reasonable amount of work to be done on it, but it’s at a stage where it’s presentable.

Anyway, the current version of the haskell source code is here. Hopefully I’ll have more developed versions up in the future.

]]>
lightcone: prototype 2 https://www.increpare.com/2008/10/lightcone-prototype-the-second/ Thu, 09 Oct 2008 01:47:53 +0000 http://www.maths.tcd.ie/~icecube/?p=762 I decided to try doing a one-player prototype of this game, and to do it in haskell this time as an exercise instead of C++. It’s a much more bare-bones things, but might be of interest to some people (requires OpenGL and GLUT to be installed).

In this demo, you are a red or blue block, the enemies are red blocks, moving in various patterns. When you overlap with an enemy block, your colour changes.

I’m not bothering with a binary distribution, but the source is here.

]]>
Basic Haskell Midi file output https://www.increpare.com/2008/10/basic-haskell-midi-file-output/ https://www.increpare.com/2008/10/basic-haskell-midi-file-output/#comments Tue, 07 Oct 2008 20:21:17 +0000 http://www.maths.tcd.ie/~icecube/?p=723 I thought it would be an unpleasant task, but it turned out it to be an entirely lovely task to deal with haskell and MIDI files directly (without having to deal with the current work-in-progress that is haskore).

The source file is here. To produce a major scale in ghci, do something like the following:


:l miditest
createMidi "test.mid" [50,52,54,55,57,59,61,62]

I even managed to do something useful with this sort of code, that I’ll post some time in the near future.

]]>
https://www.increpare.com/2008/10/basic-haskell-midi-file-output/feed/ 2
Consonance-preserving maps. https://www.increpare.com/2007/06/consonance-preserving-maps/ Mon, 11 Jun 2007 19:19:44 +0000 http://www.maths.tcd.ie/~icecube/2007/06/consonance-preserving-maps/ Grrr. Baaad program. But I’m putting it up anyway, because it’s not *that* bad.

Basically, say we had a scale, and a gradus suavitatus on that, a measure of consonance, so that given any two intervals, you can say if one is more consonant than the other. Now given two scales, it might be a worthwhile thing to look for things that preserve relative consonance; that is to say, a function f from one scale to another will have to satisfy the rule a>b => f(a)>f(b).

So, I wrote a program to do it. No interface yet, it’s to be run from within ghci; specific details of how to use it are given (in a very rambling sort of way) at the top of the source code. It seemed like it might be most useful in looking for interesting transformations of melodic motives that have a small number of notes. However, I can’t say I have been able to do anything useful with it, alas.

For an example of the program’s output, see this file:

Harmony-preserving maps example ( ps | pdf ).

For the code itself, here’s the source file:

Harmony Preserving Maps Generator V0.1 ( hs )

So yeah. Out.

]]>
Counterpoint Analysis Program https://www.increpare.com/2007/06/counterpoint-analysis-program/ https://www.increpare.com/2007/06/counterpoint-analysis-program/#comments Fri, 01 Jun 2007 17:37:32 +0000 http://www.maths.tcd.ie/~icecube/music/counterpoint-analysis-program/ Counterpoint Analysis Program

V0.1 as of June 01 2007

So, this is a program that, when you input various melodies, will attempt to find contrapuntal relationships between them. I use something like a slightly weakened version of the 1st species counterpoint rules of Fuchs for this. As you may guess from the version number, this program is chiefly for my own use. However, I think it’s usable enough that it’s conceivable that other people might also use it. Oh, disclaimer: it doesn’t always (or even mostly) give great counterpoint examples, but that wasn’t so much the motivation; I wrote it because I’m never sure when writing fugues that I’m not missing some particular combination of themes that sounds especially nice; with this, I get straight away a bunch of combinations to play about with; many which I wouldn’t have seen without it I think (of course, I won’t limit myself to what this program outputs, but it’s a very good starting point I think), this makes it useful as a compositional tool for me.

No, no no, don’t expect any pictures (yet); it’s a console program (so far), so! And please, if you’ve anything to say about it, don’t hesitate to say it, either here or via email – I’m unlikely to do any work on it otherwise (as it fulfils my personal needs rather well in its current form).

Download Zip – Contains windows binaries, basic documentation, and Haskell source (should you wish to recompile it on a different platform).

Worked Example

]]>
https://www.increpare.com/2007/06/counterpoint-analysis-program/feed/ 2