About DrPetter
DrPetter's Trophies
![]() Seriously... EVERYONE uses SFXR Awarded by PoV on December 15, 2010 | ![]() Master of Distraction Awarded by LunarCrisis on April 21, 2008 | ![]() The "I'd rather do it in C" Prize Awarded by philhassey on March 3, 2008 |
![]() Glorious Particles Award Awarded by Cthulhu32 on February 25, 2008 | ![]() RSS Triumph Awarded by philhassey on February 4, 2008 | ![]() The Über Awesome Sound Tool Award Awarded by Endurion on December 19, 2007 |
DrPetter's Archive
DESK!
Well, kitchen table at least. All these photos of computers-at-windows made me relocate to this unorthodox spot. It’s the most window-facing point in my apartment, and I must say the light is quite inspiring compared to being stuck between two walls and a closet. Seen in foreground is the comfy chair, complete with soft cushion and keyboard-in-lap action.
PSDImage class
I might want to use this for my entry, so I’m putting it up for free download to avoid cheating.
Just some loader code for PSD images, you can retrieve image data for each layer in the image through pointers to regular 32-bit ARGBÂ pixel buffers (with individual bounding boxes and positions in the image). Haven’t tested it extensively, and it will probably crash for some images… but if it works for you then go ahead and use it. My idea is to do level layout and similar stuff in Photoshop to remove the need for a level editor. Being able to draw scenery (and collider geometry?) in multiple layers should be enough to make something interesting, and do it conveniently.
Get: psdimage.zip
Nitro Butts!
![]()
Some more project additions on my shiny new site. New design really makes adding stuff a lot more convenient compared to what I had before. Actually one of the updates is a project entry on that very system; SPCMS (the morbid can have fun looking through some source code on that one)
Mainly though, I finally got around to releasing Nitro Butts – an old game from 2005 that me and my brother made out of oldschool boredom. It’s actually quite a bit of fun and you can even do co-op if you have a gamepad and additional human around.
An entry this is not, I think…
Considered doing something for the compo, but kept getting into other stuff (fun stuff, important stuff, interesting stuff) so time ended up running out. I decided to make a mockup screenshot instead, of something weird that could have been. Maybe. Anyway, behold:
Oh, I also happened to make an asteroids game during the compo… didn’t mean to do that, but technically I guess it could have been an entry. Not quite weird or unexpected perhaps, but at least it’s asteroids. Windows-only.
http://www.cyd.liu.se/~tompe573/asteroids.zip
Now where’s the Inquisition game? Me want play!!!
More good old stuff
Homepage has been padded with another couple of old projects – go see
This time around it’s a semi-usable animation editor (for making PNG images move around in a neat way) and a video smoothing experiment (no download, but lots of text and a demo video!)
Page update
Today I’m standing in for my RSS feed which seems to have gone haywire. By the look of things it’s still refreshing even though I removed the xml file!? Phil?
Anyway, updated the page with two more projects from 2007. Go see while they’re hot… uh, pretending they’re not already 4-6 months old.
Pelly suggestion
Someone asked for a pelly. I made one. It’s simple and boring, but I suppose it’ll do if nothing better comes along.



Here’s a psd file with suitable layers for making variations to suit all the themes: pelly_layers.psd
(I’m too lazy to do them now)
Wordy final entry follow-up
Ok. Managed to upload and post the thing properly, so now I can relax and write some stuff about it.
This one was a shaky ride for sure. Throughout the first day I kept a laid-back attitude and sort of held a leisurly pace. Spent a lot of time on IRC and elsewhere, but still got a fair amount of code done. Second day started well, with some bugfixing and new implementation. Halfway through though, I started realizing that I didn’t really know exactly where I was going with this in terms of gameplay, and sensed a wall rising before me.
I was stuck for a few hours incabable of deciding what direction I should go with things and actually considered (briefly) forfeiting the whole thing… I came to my senses though and decided to salvage it as best I could by making some fun gfx and audio. As soon as I got a “living” player character and some sound effects in there it suddenly felt a whole lot better. I should have done that way earlier. With just one or two hours left on the clock I was all inspired again… dang.
The last hour was a blur of stressed music-making, panicked code-juggling to get it playing in the game, and some begging to get a few minutes to wrap things up in a respectable manner before making the final post. But it worked out in the end (sort of).
I just wish I could bend my sense of time/planning to actually fit reality a little better. I always act like I have all the time in the world until I’m literally running right out of it. THAT’s the point where I start doing actual work, and kicking straight into highest gear. If I had started working on the media 5 hours earlier (back when I didn’t do much of anything anyway) I would have had time to properly tweak things and maybe make a “good” song rather than a doesn’t-quite-make-you-rip-your-ears-off one.
Anyway, despite the little crisis and gloomy bughunts I will remember this compo fondly. I did have a lot of fun on IRC over the first day and a half, and the last pull-together of stuff for my entry made all the difference between a sense of failure and modest accomplishment. The final product didn’t end up being a proper game (as usual) but at least I’m not embarrassed of it.
I have an exam in 2.5 hours that I neglected studying for, so I’ll just sleep for a bit instead I think. Life’s tough, but you need to get your priorities straight… I’ll re-take it in March or thereabouts.
As for food, I don’t hold any sort of lightsource to the grand masters who have been posting here, but I did consume something like 10x the amount of sugar that I’d normally do over this time period. Lots of candy and soda, yuk. My tummy doesn’t quite like me atm. Also downed some chicken, pasta, vegetables and milk (which constitutes my staple diet) – and pilsnerkorv!
I kept a slightly more detailed/rambly timelog in my main.cpp which is included in the submission zip. Check it if you’re interested. Oh, also I forgot/neglected to put in some library code that’s needed for the game to compile… tinyptc, portaudio and playmu (which is my sort of in-development musagi playback library, used it for LD9 as well). I don’t see much point in uploading them at this point, but they’re available to anyone who might ask. I’ll have to clean up playmu at some point and upload it to my homepage properly.
Looking forward to checking out all the entries soonish, after some R&R. Congrats to everyone who joined/tried/failed/succeeded!
Looks familiar?
It’s Q*bert!
…not really though, but you can sort of modify the landscape by raising or lowering tiles, and the rest adapts to remove any greater-than-two differences between neighbors (basically a hack to avoid situations my draw sort can’t handle
)
I’m trying really hard to think of a way to use this for gameplay, but it looks like I might be drawing a blank. There’s another mechanic in there as well though, the chain reaction one, but it’s sort of shaky too. It would be nice if I could at least come up with some pathetic game-ish behavior for all of it before I start digging my nose into gfx and music… but maybe it is not to be. I should probably start tinkering with gfx for now and see if something comes to mind.
Yuck, I need to speed this up.
I’m still spending most of my time hawking the IRC and tinkering with my playlist… I’ve managed to write a little todo list of the most important things remaining, but so far only one (out of 8 or so) has been ticked off. No signs of actual gameplay or chain reactions yet, but they’re next on the list. All gfx are still placeholder and will hopefully be entirely replaced by the end of it. If I spend more than another 4-5 hours without having the gameplay “pretty much done” then I’ll be in serious trouble. I need at least 5 hours for content creation and then a healthy bunch for final tweaking as well. Tick tock.
Day 1 – it’s over!
Yeps. Will try to get a bit of sleep now (a little bit, not too much!), before going at it again tomorrow. I’ve managed to put in a number of things for one day and I guess I should be pleased. Haven’t spent my time very efficiently but I never do. Done maybe 6 hours of work in total so far.
So what I have to work with for tomorrow is this little placeholder guy able to walk 8-directionally and jump/fall on an isometric map. All that’s left of the groundwork is to size the level up, make it scroll and put in some animation code. Then we proceed to game stuff and graphics/audio.
Preparing for the compo I intended to focus primarily on the gameplay and objectives this time around, before doing anything too technical or diving into graphics. So far… no. Will have to keep reminding myself tomorrow that priority #1 is to get it playable and fun if possible. But then again… if it’s still crap when I only have 5-6 hours left I’ll probably leave it like that and make some snazzy gfx anyway, ’cause pretty crap beats crappy crap!
Slow going
It’s been another 4 hours almost, and not much has happened as it seems. I’ve wrestled a bit with drawing order for mobile objects in the isometric world, and I think I’ve got something usable now. It’s not as good as I’d like it, but good enough to move on. I might get back to it later. The main problem is probably that I handle map tiles and sprites similarly, despite map tiles having a clear 3D shape that allows more accurate Z ordering. Maybe I’m just stuck in a stupid line of thought here. My approach is to treat objects as billboards and apply a shaky offset thing to make moving objects from poking through the floor, but maybe I could do it in more of a cube/square fashion, using the isometric coordinate system instead of screen coords… I’ll give that some thought tonight, for now things at least look ok in most occurring cases.
Time to eat some and start putting in a bit of gameplay code. Ideal scenario would be to have the majority of code done tonight so I can focus on media and polish tomorrow (oh, and studying for my exam… but that’s a bonus for if I get some extra time left over
)
There be more organized map elements and a placeholder player sprite with shadow. Topmost blue tile is broken, need to figure out why…. oh right, just struck me – I iterate from 1 and up in the drawing loop instead of starting at zero
First signs of life
Ok, thought of proto-idea last night. Got a lot of sleep. Refined idea this morning in bed and in shower. Started work on framework code etc (kind of happy with it). Finished that after some 2 hours. Put in a few placeholder sprites and coded simple map drawing.
Prediction: Come voting I’ll get flak for blocky graphics and questionable theme adherence. Just the way I like it. At least this time it won’t be a sidescroller.
More info to come as I implement stuff.
sfxr – sound effects for all!
Been tinkering with this over the last couple of days.
EDIT: Official sfxr homepage – http://www.drpetter.se/project_sfxr.html
As the audio geek I am, I find it a bit unfortunate that most LD48 entries are usually silent. I figure it’s probably due to the authors not having a quick ‘n’ easy application at hand for making sound effects and therefore neglecting that aspect of the game in favor of code and, usually, graphics. Even simple sound effects can add a huge amount of immersion and fun to a game, though.
What I present here is, if you will, an MS Paint for sound effects… or something along those lines. It’s meant to make it dead easy for anyone to whip up a few simple sound effects and save them as .WAV files for playback using most game/media libraries like SDL or pygame.
Basic usage involves clicking the left-most buttons to automatically generate random sounds loosely targeted at certain categories. For more advanced users it’s possible to spend some additional time to manually create fairly varied and interesting sound effects.
The interface is based entirely around sliders for controlling sound parameters, along with a few buttons. Even if you don’t want to spend time learning about all the sliders you can still have some fun just hammering away at them and listening to the various sounds that come out.
Hopefully this will mean that there’s no longer any valid excuse for anyone to get N/A in sound!
Download: sfxr.zip (win32, 48 kB) – Latest update: 2007-12-15 (see screenshot)
EDIT: Apparently it sort of works in wine 0.9.50, though with some stability issues. Fortunately though, the good Gerry JJ/mjau managed to port it properly. Here’s a copy of his post:
I ported DrPetter’s excellent sfxr (info) to SDL, so it can now be compiled and run natively in Linux!
Download: sfxr-sdl.tar.gz
Just type ‘make’ to compile. You need SDL and GTK 2.
Source code is obviously included in the portable archive, and anyone is free to use or modify it for anything they please. There’s no need to credit me, although it would be nice if you did. I would also appreciate a little email note if you do create something cool based on my code.
If I get around to making a little update I’ll include source code in the win32 archive as well.
My nameless LD24h8.5 entry
It’s got MOON, it’s got NO TEXT, and it’s got blocky pixels, chirpy audio and all the other essentials!
This was a strange “compo”, but several interesting games came out of it and I had a good time working on mine. The 24-hour time limit was rather severly busted, but that’s fine I suppose. DQ means surprisingly little around here, especially since this compo had no voting.
As usual for me, the main idea was a technical one and involved using a sphere-mapped rectangular playing area. As one theme was “moon”, this seemed easy enough to work in. The actual game concept was undetermined until rather late in the process. At first I was thinking that maybe you’d drive across the moon in some vehicle, collecting things… but that didn’t happen, so I changed it. The final game is pretty cool imho, where you drop/stack colored chips onto the moon to make them disappear.
This all sounds very lame and boringly puzzly in theory, but the main challenge is the hideous control scheme. You don’t control your position directly, or even your speed, OR the acceleration – but the next-higher derivative! Tap right and you’ll see very little happen at first, but after a few seconds the moon starts slowly rotating in the chosen direction, and then it goes faster and faster unless you compensate in the other direction. It’s very easy to overcompensate and end up in an oscillating back-and-forth motion where you have no real grasp of what the hell you’re doing, but play the game enough and you can enter into a sort of zen state where you can “feel it” and get along pretty well. This is really essential, since you need to position yourself very accurately over the chips to avoid missing (and thereby creating a new stack which needs to be completed and removed).
Unsurprisingly, most people that tried the game hated it. Once I realized where it was going I pretty much tried to make it as evil as possible, much like a lot of old C64 games which you find in some old dusty drawer without a manual and have no idea whatsoever what to do with. You’d start a game and almost instantly die, and the controls weren’t obvious at all or severely broken. Ah, the heritage.
I’m really happy with the music though, sets the mood nicely. Imho the game is worth playing a few minutes for that aspect alone if you’re a retro geek.
Scroll down to the bottom of this post to read some instructions (that you shouldn’t really get if you want the full frustrating experience).
Download: Windows version (575 kB)
-
-
-
Quick instructions: Arrow keys to move/rotate, Z to drop chips. Do not drop like-colored chips on top of each other.
There’s a small cheat which might make the controls a tad easier to grasp – type “showyou” at any point to bring up an acceleration graph in the top-right corner.
7th Swarming of the Machines
Ah, great compo this was. Tons of sweet games. Unfortunately that also meant fierce competition, and I only managed to snag a best position of 3rd in Fun (which is unusual for me, as I normally do better in the technical categories).
Base idea for the game was to have the level be “swarming”, for an unexpected approach. I figured there could be loose platforms drifting around in space and you’d try to jump around between them, doing… stuff. The gameplay part of it was sketchy at best.
I suppose the better part of the first day was spent getting the platform movement and interaction working, and then I think much of the second day I just sat and tweaked it, fixing bugs. The gameplay elements and final graphics/audio were added in the last two or three hours.
Windows download: 128 kB zip (exe, data, source)
Linux port: 16 kB tar/gz (needs above file for data)
Arcade build a’la Lerc.









