Sound Modification and Logic Games

I found a sound tool that’s interesting. I built the SVN version, and while following the Install From Source page I ran into two problems: my ffmpeg wasn’t compiled with –enable-libmp3lame, which apparently resulted in 0-byte output, and I didn’t realize the ‘where ffmpeg’ part of the link was meant for me to fill in, although in retrospect I feel silly. If people are interested in a more in-depth tale I can put together a guide for getting it running under Debian/Ubuntu.

I also discovered via Reddit an interesting logic game called Manufactoria. My sense is that it takes a rather strange type of individual to enjoy it. My complaint is that the music is quiet and the mute button doesn’t actually stop it.

Published
Categorized as Software

Even More Progress

I’ve made big changes to Cavez of Phear!

Because most terminal windows default to 80×24, it now fits in that space. There is no longer a lives system because it was only frustrating and didn’t add anything to the gameplay. A game should not be difficult through starting over again if you make too many mistakes. With the saves and without the lives, it allows for focus on the puzzles. Upon death, the savefile will load if it’s of the same level. I recoded the key bindings to be cleaner, and it now supports multiple keys for a single command. Sortie made very nice tutorial levels.

The editor is much improved and can now place bombs in addition to bomb packs, apply physics to a level, and make changes in rectangles and whole-level fills in addition to single points.  It also is more flexible in opening and saving files. I also fixed the persistent and seemingly vague problem that it sometimes required multiple keypresses to get back to the main menu. It ended up being caused by recursive calls to main_loop(). There’s now yet another while(true) in the main loop that gets break;‘d out of for it to go back to the beginning and load a level or save as needed. I greatly improved the screen dissolve function – it only writes to each position once, and is guaranteed to cover every location in 1840 writes. I fill an array with all possible positions, perform a Fisher-Yates shuffle on it, then iterate over the array, writing spaces. Writing the shuffle algorithm was interesting. The previous one did overwrite – it was pure rand() – and took 10000 writes, which led to horrid performance over SSH, and it wasn’t even guaranteed to clear everything. In general I’ve tried to improve the UI – the reaper on the main menu only comes in from the left on the first run, after which the menu comes up without pause. I’ve cleaned up a lot of code, but there remains is_ready(), which Sortie tells me has something to do with asynchronous file operations, and do_the_monster_dance(), which I’ve been avoiding because it looks messy.

In playtests I’ve had trouble with people getting confused because they don’t read the directions. I’m resisting making big boxes proclaiming what the controls are because I’m assuming players are intelligent, and so far they’ve managed to figure it out. I got embarrassed when I didn’t realize which commits had gone through and made an inaccurate, duplicate commit. I’m worried that I might get caught up in a never-ending parade of new features and not stop long enough to add more levels. I suppose with all the improvements to the editor it’ll be much easier.

Next on the list of feature additions is support for level packs, cleaning up the level code by actually reading the directory instead of relying on a #define, figuring out why the game spontaneously quits on some keypresses and freezes on Ctrl-S, and perhaps reimplementing the menus in light of the knowledge that ncurses has menu functionality.

If you’d like to try it out, either grab PuTTY and ask me for a shell account, or download the source, compile it yourself, (requires ncurses) and have fun!

EDIT: I like to think that my desk’s keyboard platform is falling off because I coded so hard all day and it couldn’t take the greatness. The friggin’ monitor is hot!

Published
Categorized as Coding

Progress

Nine school days until seniors leave! Both my APs are now what amounts to study hours now that testing is over. It’s nice. Comp Physics created some quality quotes yesterday:

“Light pours forth from your rear and keeps you from falling through your chair.” (In reference to photons, the electromagnetic force boson behind most Newtonian forces.)

“We call it the ‘Ultrapurple.'” (Ultraviolet)

I’m working more on Cavez of Phear. The save file format is now one file, the code has been further cleaned up, (Mostly eliminating copy-paste) and I’m working on adding features to the editor. I had some problems with not closing file pointers initially, which caused very strange behavior until I realized what I had forgotten. If anyone wants look at the github repo, it’s here.