Developers' Diary

Cabinet vs. Wardrobe

by fetjuel on June 2nd, 2009 1:26 to Code, Development, Paraplu

Not a whole lot of work today, but I’m trying to keep some momentum going. I added a wardrobe object (with awful programmer art, of course) to accompany the cabinet object in the atelier. Now, different types of items are stored in the different containers: materials in the cabinet, and costumes in the wardrobe. We’ll need to add a vanity for accessories, too, once we have some of those.

It occurred to me lately how strange it is that at work I’m a designer who keeps his hands off the code, and in MOMO PAX I’m a programmer who keeps his hands off the graphics.

K Groove

by fetjuel on May 31st, 2009 18:06 to Code, Development, General, Paraplu

I had a nice time coding in the little food court at Whole Foods today.

10685915

- After several hours of work, taught our most basic enemy how to avoid obstacles. This is way harder than it seems, and I had to write in a bunch of psychedelic drawing effects to visualize what what happening in the code. It turned out I was telling it to go in a direction only if any obstacle existed that it wouldn’t hit, rather than if there were no obstacles that it would hit.
- Fixed a weird string-length bug that became apparent when resetting the description box for an item.
- Started moving the main character to a specific spot on the screen when moving between areas, so that you can’t arrive stuck inside a bush.

A Groove

by fetjuel on May 30th, 2009 13:36 to Code, Development, General, Paraplu

I was determined to get into a Paraplu groove today, because it was the first time in a couple of months that I had a significant chunk of free time to myself. After getting energized by some bass-playing, coffee, pinball, and Ar tonelico music, I sat down to plow through some coding and planning tasks. It went well!

- Designed a master chart for all enemies, the items they drop, item rarities, and crafting recipes.
- Wrote a system for enemy spawners.
- Added a spawning effect for when enemies appear from a spawner.
- Wrote the item drop probability system. Enemy types have the possibility of dropping one of each of a common, uncommon, or rare item. The probabilities of dropping one of these rarities of item, or any item at all, is customizable per enemy.
- Made it so that items you collect in adventures properly appear in your inventory when you visit your atelier.
- Filled in all of the items, rarity rates, and recipes for the items we have in the game so far. You can theoretically craft a Peasant Dress in the game now if you keep at it, but once I collected the ingredients I immediately got stuck inside a bush.

**Update:** I’m unstoppable!

- Subclassed Interface as TextBox and ViewBox, because once again that class had gotten huge. It was taking up half of the “guys” source file! Really cleaned up how the interface guys work.
- Added enemy portrait and description, in their own little boxes, to the bestiary system.
- Added item description, in its own box, to the inventory system. We have written lots of cute little bits of text about the inhabitants and artifacts of Nettle-Belfry, so this is a big step.

**Update:** My unstoppability continues!

- Set up statistics for how many times you have beaten a certain type of enemy.
- Made the bestiary hide enemy info until you beat that enemy at least once.

Paraplu: GMS + GMI

by Jules on April 29th, 2009 11:25 to General

Progress is steady now. I am working pretty much every evening on Plu, and managing to tick off boxes every day. Feels good! We will soon have all the parts required to make a working, fun level, which is a very important step to take, obviously. We are simultaneously slimming down un-needed parts of the game to speed up progress, and overall the feeling of progress is wonderful!

vivstatic_downmushskullidolboth2

Arc

by fetjuel on April 25th, 2009 22:06 to General

Visited Julian’s house today, and got to work on our stationary stone idol enemy. It spits magma-veined eggs at you, which explode on impact. Figuring out how to make objects fly in parabolic arcs within our pretty 2-dimensional system was fun.

Item icons in text boxes!

by fetjuel on April 23rd, 2009 20:51 to Code, Development

This was surprisingly difficult to keep from clashing with our line-break-insertion system, because item names can contain spaces. But now, like in so many classic games, we can insert item icons into our boxes, inline with the text! This will work for any Interface object, whether it’s a menu, a dialog box, or a speech bubble.

pastedgraphic

Maths

by fetjuel on April 21st, 2009 19:09 to Code, Development

My work was canceled this afternoon so that people could go outside and enjoy the first really nice day in Seattle this year, but I only got as far as the lobby. I made an iced soy latte and got to work on improving the main character’s movement in Paraplu. The protagonist (or “Ship”, as it’s still called in the code because of Soft Landing) had a pretty naïve way of moving, such that you can run diagonally √2 times as fast as you can run orthogonally. Also, all of the inertia code from SL was ripped out for the time being.

I set about improving the movement algorithms to yield consistent speeds in all directions, and incorporating an inertia system. I tried several complicated methods which failed in colorful ways, before settling on a cleanly simplified but almost precisely correct method. Now, it takes a moment to get up to speed, change direction, or stop, and it takes twice as long to turn around.

We got a whole lot / going on and on and on

by Jules on April 21st, 2009 10:33 to General

Had really good crack at getting some illustrations done last night and something isn’t right. I’m not sure if it’s just normal “hiatus sickness” or my own sensitivity to the environment I am working in (different computer, different application, different hardware, different location). I am having a hard time feeling comfortable drawing, and the machine I have isn’t really powerful enough to properly run Photoshop, which in turn isn’t as nice as OpenCanvas. Despite all that I am a pretty firm believer in the philosophy that you shouldn’t blame the tools for your own shortcomings. Maybe I am just rusty. Regardless, it’s difficult and depressing to spend hours trying to do something you know you can do, only to ultimately have nothing to show at the end of it.
Ugh, here’s hoping I can get through this rough patch quickly and get something back into it. The mind is willing.

On that note, anyone have a powerful laptop they aren’t using? :D

No? :D

Oh well, worth a shot.

Optimization

by fetjuel on April 15th, 2009 1:12 to Code, Development, Paraplu

Well, today I did some serious drawing engine improvement.

We now have a new type of Guy called Scenery, which has a strictly limited functionality consisting of sitting there and doing nothing at all. At the moment they can’t even animate, be transparent, or have a tint. We could add those functions in later if we find that we need them.

We now only redraw the map layer guys when a moving guy passes over them. This means we save a ton of cost that we were expending to redraw every single map tile every single frame. I made an awesome effect to test this; it causes the color of the scenery to fluctuate wildly each time it’s redrawn. (Jules, you can see it by uncommenting line 217 in guys.py.)

I started an experimental algorithmic shadow rendering that I think is kinda neat.

I hope Sofuran isn’t too lonely.

by Jules on April 14th, 2009 10:12 to General

Poor Sofuran.

Welcome home, big bro.

by Jules on April 13th, 2009 14:38 to General

Working on character artwork. I haven’t been drawing for a long time so just trying to work out the kinks right now. Ordered a new, smaller tablet (Wacom Bamboo Small), I’ve always found the GIGANTOR one that I’m stealing/borrowing from hachi to be a little cumbersome, and usually just corral a tiny area in the middle for use anyway. I hope this will present me with more opportunity to do artwork in the later hours of night\wee hours of the morning more frequently.

Seeing Fet’s beautiful work recently and playing the almost unbearably excellent Persona 4 has been immensely inspiring, and I’m feeling pretty gung-ho about making games right now.

Let’s see how that goes!

1D Inventory

by fetjuel on April 9th, 2009 19:36 to Code, Development, General, Paraplu

Goodness, has it really been 8 months since I posted? We have been very busy with real-life stuff, but the Momo Pax spirit continues. For a while I was working on implementing a 2-dimensional inventory grid like in Diablo, but it turned out to be pretty prohibitively complex. In the *getting something done* spirit that started Paraplu in the first place, I scrapped the 2D inventory and whipped up this 1D one in about half an hour.

1d-inventory

Paraplu: Ordered Layers!

by fetjuel on August 11th, 2008 18:22 to Code, Development, General, Paraplu

Whoa, I just completed the ordered layer drawing system. Before, all Guys on a particular layer were drawn in whatever dang order the game pleased. This was fine in Soft Landing, because it had a purely side-on view and it was unlikely to matter which of any given pair of peers on a layer draws in front of the other. But Paraplu has a kind of hybrid top-down and side-on view, like A Link to the Past. So when two Guys overlap, it’s important for the one that’s higher up on the screen to appear behind the one that’s lower down.

Python made this pretty easy with its custom comparison functions for sorting. These ordered layers just use this loop for drawing:

for oneGuy in sorted(layer.sprites(), cmpY):

Instead of this one:

for oneGuy in layer.sprites():

And the cmpY function is just this:

return -cmp(a.rect.bottom, b.rect.bottom)

Super simple! Thanks, Python and Pygame!



Paraplu: Sequential dialog boxes

by fetjuel on August 3rd, 2008 15:31 to Code, Development, Paraplu

It was surprisingly tricky to create a system for a series of dialog boxes that appear one after another. Soft Landing’s novel part is based on conversation scripts for doing just that, but in Paraplu’s running-around-shooting-stuff engine, we didn’t really have any way of doing it. Now the game keeps track not just of whether there’s a dialog on screen to be dismissed, but also what kind of dialog it is, so that it knows whether to bring up another when that one is gone. Currently the only thing that uses this is the “workshop” where you can craft items into other items, but in the future we might want to be able to just load arbitrary lists of strings in there and set up long narratives.

Paraplu: Items

by fetjuel on July 31st, 2008 14:23 to Code, Development, Paraplu

Julian and I both love items. One of the aims of Paraplu is to be delightfully item-rich. You should be excited to discover and collect items, admire their cute little icons, read their descriptions, and carefully consider how you’re going to budget them to craft other items. Yesterday I started in on the item system: enemies now drop stuff when you kill them, and when you collect items they are added to your inventory.

We’ll need to decide on a mechanism for which enemies drop which items. At the moment I’m thinking of a system in which: each item is assigned a rarity; each level is assigned a list of possible items; each enemy is assigned a likelihood to drop items of a each rarity. I wonder if Common, Uncommon, Rare, and Unique, to blend a bit of Magic the Gathering with a bit of Diablo, would be enough.

Event Queue

by fetjuel on June 23rd, 2008 20:29 to Code, Development, General, Paraplu

My friend Nathaniel was just watching me code, and he suggested using the event queue to process input instead of polling for every type of input every frame. To be honest I don’t exactly understand how the event queue is any faster than polling (like, at some level there must be some logic checking every key, right?), but it is much faster. Since most of the controls involve holding down keys, I’ve got a lot of code to go through and rework to use the event queue!

Chipping away at level editor

by fetjuel on June 21st, 2008 23:25 to Code, Development, Paraplu

I’ve been implementing a level editor feature or two each day. Now we have a little display on screen that tells your current tile coordinates, which paves the way for our status display of health, items collected, and so on.

There’s also a neat little blinky cursor that shows exactly where your tile will land if you place one; this is nice because the reticle can actually move one pixel at a time, making it hard to know which tile you’re in at any given moment. I was going to make the cursor its own special item when I realized I could just use our existing particle system: I make the reticle spawn tile-sized square particles every 11 frames, which fade away just as the next one is being created.

It’s great how much of the code for Paraplu is stolen directly from Soft Landing as I need it. Much of the coding is just simplifying and generalizing the existing code. When we return to working on Soft Landing, I’ll copy that code right back in, cleaner and faster and more flexible.

Paraplu: Layered Editing

by fetjuel on May 19th, 2008 21:24 to Art, Code, Development, Paraplu

So Paraplu’s level editor has so far only supported changing the map layer of a level. But there are two other layers in each level: objects and “entities” (meaning enemies or townsfolk). It was surprisingly difficult to adapt the level editor to work on these other layers, because each layer was kind of a special case in itself, and used its own batches of images and such. So I had to rearchitect the way ground tiles and objects are loaded, such that they’re all living in one big list of dictionaries now, with data about what kind of thing they are, instead of being in their own special lists. Now I can use the same logic for editing all of the different layers: when you cycle through the palettes, each one just knows what type of palette it is, and thus which layer it should draw on. If we need to, we can add an arbitrary number of layers on top of the three we already have!

Oh yeah, and Jules drew these gorgeous trees and shrubs and rocks, which is the reason I wanted to get objects working in the level editor anyway. Please don’t let my random level-editor testing style ruin your perception of his source art, though. :D

Paraplu: Drawing this was harder than it looks

by fetjuel on May 15th, 2008 18:56 to General

Paraplu: Text

by fetjuel on April 24th, 2008 19:00 to Code, Development, General, Paraplu

I just transplanted what’s probably the most complicated class in all of Soft Landing, “Interface”, into Paraplu. Along the way I chopped off a ton of messy code that I’m planning on rewriting. This is the class that draws all of our text boxes, menus, health bars, and so on. It’s not gorgeous, but it’s working: