About mariusz

Entries

mariusz's Trophies

The Extremely Hardcore Practical Extraction Reporting and GAming Language (PERGAL) Obfusicated by Design Award
Awarded by pansapiens
on May 5, 2008

mariusz's Archive

LD12 Post-mortem – Mr Blocker

Posted by
Tuesday, September 2nd, 2008 12:55 pm

Thanks to everyone who played my LD12 entry, Mr Blocker. As a number of people observed (myself included), it’s not much fun. Partly this was because I was very limited on time, so I deliberately chose a very simple concept so that I could finish in time.

As the game stands, once you have a reasonable idea of how the disasters work, it’s basically a matter of coming up with a strategy to work around them and following that. The simplicity of the game means that there is little variety in useful strategies. Following a strategy just means dropping blocks in the planned places, so there is not much skill or variety in that either.

My original idea regarding the style of play was that disasters should be unstoppable: the player either builds towers specifically to be destroyed by disasters, or builds towers in such a way that the effect will be minimal. A number of people suggested adding a way to avoid disasters, or allowing a level to be completed as soon as the targets were met, rather than after the time expired. That goes against my original idea, but it might make the game more interesting.

I might release an updated version with tidied code, a readme and key repeat for dropping blocks. Thanks to Morre for pointing out the lack of automatic key repeat; I use a strange keyboard with that built in, so I didn’t notice. I won’t be adding any more levels or other features because I don’t think the game would be entertaining for long enough for them to be worthwhile.

The only complicated part of the code is that which determines whether the targets for the level have been met after the time expires. There is a little complexity in the code to determine what gets destroyed in a disaster. Mostly, the code is fairly straightforward.

Because of the simple nature of the game, I thought there might be some entertainment in working out how disasters behave. However, this seems to have caused some people confusion and frustration. In case anyone is interested, here is how they actually behave and how to deal with them:

(more…)

Mr Blocker v1.0

Posted by
Sunday, August 10th, 2008 6:53 pm

Here’s my entry for LD12. It’s called Mr Blocker. The aim of the game is to build towers by dropping blocks from the top of the screen, while being hindered by earthquakes, lightning and fire.

Source – you need Perl, SDL and SDL Perl to run this.

Linux binary – you need SDL to run this.

Windows binary – just run the executable within.

As I was busy this weekend, I only managed to spend about 12 hours on it. There’s no sound and the graphics are limited to coloured squares, but it’s reasonably complete. I’m afraid the gameplay isn’t terribly deep or exciting, but hopefully it will keep you entertained for a few minutes.

Time to start

Posted by
Sunday, August 10th, 2008 6:03 am

I’m finally ready to start writing. I’ve decided to call my entry Mr Blocker, after the headmaster from classic children’s TV show “Woof”. It will involve blocks and towers.

LD 12 approaches

Posted by
Friday, August 8th, 2008 4:40 pm

It seems to be nearly Ludumdare time again. I’ll be participating again, probably using Perl and SDL under Linux like last time. I’m busy on Saturday, so it’ll probably be more like a 24-hour compo for me. I might try a “simple” sort of game like a text adventure, but who knows? Unfortunately I’m going on holiday next week, so I won’t have much time to play and vote on games either.

Minim Madness V1.0

Posted by
Saturday, May 3rd, 2008 10:45 pm

Here’s a new version of Minim Madness:

Highlights:

  • Completed in-game instructions.
  • Added easy difficulty mode for people who found the original too hard. Activate it by pressing D to toggle difficulty.
  • Added playback/recording mode.

This version includes some recordings of me playing the game. There aren’t any new levels, but hopefully I’ll manage another release in another couple of weeks.

LD11 entry – Minim Madness

Posted by
Sunday, April 20th, 2008 5:57 pm

Here it is:

http://portal.acad.cai.cam.ac.uk/~mml27/minim.tar.gz

Details to follow shortly.

Minim Madness Title Screen

Posted after close of competition:

Windows port: http://portal.acad.cai.cam.ac.uk/~mml27/minim.zip

Linux par/pp version: http://portal.acad.cai.cam.ac.uk/~mml27/minim-ld11-a-pp.tar.gz

Time-lapse video (2 minutes, 15 Mb). Warning: this video contains bright, rapidly flashing colours.

So what’s it all about?

I decided to interpret minimalism in a minimalist way, namely “minim” (half-note to Americans). You get a load of musical notes moving about the screen like particles and you have to guide them to certain points. You do this by drawing minims with the mouse. The notes then bounce off the minims. You can get more detailed instructions by running the game and waiting at the title screen.

How do I run it?

Linux users: download the tarball above and extract. Run minim.pl. You need SDL, Perl and SDL-Perl (Debian package libsdl-perl).

Windows users: download, extract and run the zip file above. It seems not to support fullscreen mode. The port includes a 1-line fix for a graphics glitch that didn’t show up on my Linux system. Linux users can get updated source here.

Linux users who can’t get a working version of SDL-Perl: download the par/pp version above. Extract and run “minim” (not minim.pl). You still need SDL, but not Perl or SDL-Perl. This version includes the graphical glitch fix mentioned above.

What’s missing in the 48-hour compo entry?

Some of the demo screens are missing animations showing how to draw minims. You can’t load in user-defined levels from an external file. There aren’t as many levels as I would have liked. I intend to add these last few things and post a second version some time in the next week or so.

Why is the game so hard? Why can’t I draw minims?

Drawing minims takes quite a bit of practice. It’s meant to be tricky, especially when you’re running out of time and panicking and can’t draw steadily. It may be helpful to know a bit about how the game judges minims. The most important things are where you start and finish the minim: these points become the ends of its stick. If you fail to draw a minim, you’ll notice a stick with a cross on the end appears nearby. This represents the shape the game expects you to draw. The head of your minim needs to pass through all four quadrants marked out by the cross, without deviating too far from it. Ultimately, this means that you have to start (or finish) your minim at a point on the stick about half-way up the head. One thing I noticed while making levels is that, because you can’t draw mirrored minims, it’s a lot easier to bounce semibreves to the left than to the right. I’ve tested all the levels to make sure they can be completed, but some of them will probably take a few attempts. Keep trying! Or (if you get fed up) cheat by pressing “S” to skip to the next level.

How did you make it?

My development machine is a 3 GHz Pentium 4 with 1.5 Gb RAM, running Debian GNU/Linux (unstable). The game is written in Perl, using SDL Perl (1.20.3) for graphics, sound and input. My text editor is joe; my window manager is FVWM2. For playing the game I used a Wacom Graphire 2 tablet. Sound effects were produced by my voice, recorded and cut in Audacity, but otherwise unmanipulated.

As SDL Perl has no line or circle drawing facilites, I had to implement them myself using a putpixel routine. This was far too slow to be used every frame, so most things are pre-rendered and blitted onto the application surface.

The collision detection routines are not optimised. If you have a large number of semibreves and minims on-screen at once, the game is likely to slow down.

How did you make the Windows port?

Using par/pp. The documentation for how to do this is rather scattered, so here’s a summary.

The problem is that you need versions of Perl, SDL, SDL-Perl, PAR and pp for Windows that will all work together. Perhaps you can build from source, but as I’m not a regular Windows user, I’d rather just download binaries that work.

Perl is distributed freely for Windows by Activestate. I downloaded and installed version 5.8.8.822. 5.10 builds are available, but it’s more difficult to find all the other libraries for it.

Activestate’s Perl includes a utility called ppm for installing Perl packages built on Windows. That can be used to install the remaining packages. SDL-Perl was a little tricky to find. As this page says, you can install the package with the command:

ppm install http://www.broadwell.org/dl/ppm/5.8/win32/SDL_perl.ppd

The package includes the SDL DLLs needed to use SDL from Perl with SDL-Perl.

Now I could run my Perl program on Windows, but I wanted a way to distribute it without requiring the user to install Perl. For that I used PAR and pp. First I installed Activestate’s package of PAR using the graphical ppm utility. Next, following the links on the PAR website to bribes.org, I found a package of pp that I installed with:

ppm install http://www.bribes.org/perl/ppm/PAR-Packer-588_820.ppd

Note that pp packages may be specific to a certain build of Perl.

With everything installed, I could now create a Windows executable of my game:

pp -o minim.exe -gui minim.pl

The -gui switch stops a console window from opening when you launch the executable. The executable still needs the SDL DLLs to run. You can pack them in the executable with pp’s -l option, but I find it easier just to copy all the DLLs into the directory and zip them up for distrubution. On my installation, the DLLs are in C:\perl\site\lib\auto\SDL_perl\ .

Where is your time-lapse video?

Here (2 minutes, 15 Mb). Warning: this video contains bright, rapidly flashing colours. The music is “Corporation” from Makke’s album “It’s Binary, Baby!”. Buy it! It’s really good!

I had a few difficulties with mencoder, so here’s a short description of how I got it to work. For some reason, mencoder crashed on trying to encode the video. Perhaps it didn’t like one of the frames. I got it to build an MJPEG-like video:

mencoder “mf://*.jpg” -mf fps=25 -o output.avi -ovc copy

However, mplayer wouldn’t play that normally. It would write the frames to PNGs, though:

mplayer -vo png output.avi

That gave me a directory of PNGs that it was happy enough to encode normally.

My time lapse sceenshots came to just under 2 minutes (the length of the music), so I thought I’d add a few seconds from my game to the beginning and a still to the end. I used SDL Perl’s save_bmp() grab frames from the game, converted them to PNGs with ImageMagick’s convert (ls | xargs -i convert ‘{}’ ‘{}.png), then resized them (ls | xargs -n 1 mogrify -background black -extent 640×512) and changed them to 8-bit colour (ls | xargs -n 1 mogrify -depth 8) with mogrify. The still at the end I made using GIMP. Renaming them into the right order with rename, I could then join them together with mencoder’s “mf” video source:

mencoder “mf://*.png” -mf fps=25 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4:vhq

After that I used -audiofile to add the music (ripped from CD with cdparanoia):

mencoder output.avi -o minim.avi -ovc copy -oac mp3lame -audiofile cdda.wav -lameopts preset=64

Just over 24 hours to go…

Posted by
Saturday, April 19th, 2008 5:20 pm

…and I’ve nearly finished the core of my game engine.

After the uproar on IRC at the choice of topic for this competition, I thought it would be entertaining to interpret it in a silly fashion. So I’ve gone for a minimalist interpretation of “minimalist”, namely “minim”. I understand that minims are more commonly known as “half-notes” in the USA.

The concept is fairly simple: a stream of semibreves (particles) appears on-screen and you have to guide enough of them into a container before the time runs out. You do this by drawing minims on the play area, which deflect or accelerate the semibreves. Part of the difficulty is drawing good enough minims; badly-drawn minims don’t do anything.

All the difficult graphics, physics and drawing recognition is (I hope) done now. I still need to add creation of the semibreve streams and a place for them to be collected. Once that’s done, I can start thinking about adding some concept of a level and some levels to play. Perhaps if I have time I’ll add sound too.

I’m afraid my meals have been fairly ordinary so far this weekend. For breakfast I had cereal (Just Right) and hot chocolate. For dinner I ate some pork with carrots and potatoes, followed by fruit and biscuits. For supper I had a selection of meats, cheeses, bread, biscuits and tomato soup, followed by fruit and a yoghurt. Isn’t that exciting?

Minim Madness at end of Day 1

Getting ready for LD11

Posted by
Thursday, April 17th, 2008 4:46 pm

Hi there. I’m planning to participate in Ludum Dare 11. I’ll probably be using Perl and SDL on Linux. Hopefully I’ll be able to produce a Windows package too.

I entered LD1, but haven’t entered any since then. Perhaps I’ll post a picture of my entry or maybe even a port to Perl/SDL at some point.

[cache: storing page]