Between Scylla and Charybdis Developer Diaries, September 2013

by Nox

on 10.13.13

9/4/2013

Game Maker’s Box2D binding is so incredibly gimped.

The ability to respond to collisions is diminished from raw Box2D. For instance, since we cannot register a pre-solve callback we also cannot access the force inflicted by individual collisions, which can be useful for causing things to break apart. You also can’t modify a fixture without creating a new instance.

Try staying sane while editing a collision shape with an unusably featureless and broken editor, only to have all of your work lost because of a serious bug that annihilates all of your beautiful Box2D collision shapes. Yes, that happened , and it was big pain in my ass…making a physics-based game.

Anyway, I've been working on ice sheets, and they seem nice, but it’s difficult, as a solo programmer, to pull the trigger on something that you know is going to take a lot of work to do correctly, so I have to make sure that they're a feature that I want before I waste my time making them work nicely.

I've obviously got a lot of half finished features going on right now, and that does make me uncomfortable, but it’s all part of the design process. I look forward to that imaginary time where everything falls into place and the way forward becomes clear.

Debugging mode enabled so that I can see bounds of various sorts, and many other things, including the ability to tweak certain variables that I've registered with the system.

9/7/2013

I've been doing a lot of design work and experimentation lately, trying to make the second level. I like to wait until I have a solid idea of the totality of an idea before I work on implementing it, but even so, I miss things, and I know I'm going to have to toss a few of the things I've been working on lately. I needed to experiment in order to move forward, just because it’s better than sitting here fruitlessly thinking in circles. I have some idea of the wave structure for the ice level, but I'm sure it’s subject to change. There probably won’t be sliding across the ice sheets, although I busted my ass getting it to work, because I can tell that it will never work quite right. It’s also completely unecessary, but I know that can be fun sometimes, that’s why I even bothered to try it out, but it’s not meant to be. Grabbing with the turtle’s mouth probably isn’t meant to be either, but I've thought of including it in an unlockable mini-game.

Moving forward, I'll spend the next few days getting the ice level into a prototypical state, with programmer art and an appropriate wave structure, so that I can do some playtesting and design iteration and let Lux know what assets I'll be needing. If progress is slow, it’s because my time is split between several projects right now — and I'm depressed as fuck.

9/10/2013

I experimented with the frost effect today, and made it so that you have to go into a beam of light in order to defrost. This is a lot better than ticking down over time, as the player now has to deliberately go out of their way to do something in order to defrost—this is gameplay. I think a beam of light might be too challenging to make look nice, so I've been coming up with alternatives. Right now, I think that warm tropical currents are my best bet, but I'm still not at all sure what they might look like. It just seems more feasible than sun beams. For one, I can associate the warm current with tropical debris, palm trees, flamingos, etc., which is cool since basic debris is so easy to add. The warm current idea also goes nicely with the possibility of wind, since most ocean currents are wind driven.

Next, I'd like to make most of the sea ice, except for icebergs, breakable in the same way that the turtle’s shell is. Then, the ice can break with succesive impacts, and also progressively deteriorate in the warm current.

9/13/2013

We're far behind with art assets, so I have to proceed with implementing things in terms of shitty sprites that I whip together in 30 seconds flat…which is troublesome in a lot of ways, especially when the features are so heavily dependent on the exact graphic used. For instance, I've been painstakingly charting the locations of ice chunks relative to where they break off from for the past hour, in Photoshop, and I've only completed 3 of 11 chunks, it’s purely grunt work, but it’s not something worth toolizing unless its going to be used more than a few times. This needs to be done for everything that I want to shatter into physically simulated pieces. Right now, it’s just ice, but even that is going to be a big job. I'm not even sure that it can be toolized, at least given our current workflow. I think we'd need something more than rasters upstream. Anyway, I just fucked up the first 3 pieces by using a bad coordinate grid, so I have to start over, but hopefully shattering ice sheets is worth it.

9/15/2013

The day of work is not over, but I feel like writing now anyway. I continued chopping up the ice sheet today and importing the pieces into Game Maker. It seems to work as I expected, and that’s nice. Breaking ice sheets is much better than sliding over them. It’s also the more expected behavior.

I developed, on paper, an implementation for warm currents. Oceanic currents are mostly wind-driven, so I may make them coincide with the wind effect that I developed earlier. Or maybe not. I've thought of applying a local force effect to things in the path of the current, that might be better.

I think that at the end of the level, the entire screen freezes over, and you have to walk around on the ice sheet without dying. It may be slowly freezing over for the duration of the level, but that might be too obstructive, so I'll have to try it out to know.

It’s going to take me about a month to get this level finished, and that’s probably just with programmer art, so add another week or two to tweak it into shape for the nice art. That’s not so good, so I might have to start working on even more projects in order to maximize my output. I'd like this game to be further along so that I can either release it or crowdfund its continued development, but the game is more difficult to make than I anticipated, in part because of trying to contort Game Maker into making something that it was never intended to make. This game didn’t start with such high ambitions, we were only supposed to spend 2 months on it. I don’t regret it, because the product is much better for it, I just hope that it pays off and that people appreciate how much we've put into it.

The turtle slides across an ice sheet which then shatters into pieces. The shell is also seen to break as the turtle narrowly escapes death.

9/22/2013

I spent the last couple of days working on other things, publishing the August developer diaries, and implementing warm currents, which turned out very nicely. I generate the currents procedurally right now, but depending on the results of Lux’s research into how to accomplish currents visually, they may have to become more constrained, or even pulled from a fixed set of currents. I hope we can keep them dynamic. That would be more in the spirit of the current game, which is heavily founded in randomness, with tighter ochestration asserted only at select times.

Currents were easier to do than I figured they would be, but only because I've got a lot of experience with working around Game Maker’s Box2D implementation now. To get collision detection and response to work correctly, I had to make each segment of the current in to its own Game Maker object so that it could have its own body, because there’s no way to introspect a collision and find out anything about the particular fixture attached to a body that was hit in a collision. We can only respond on a per-body basis. So, while you can connect multiple fixtures to a body, in order to get around the vertex count or convexity limitations of Box2D, the fixtures can’t have unique collision responses without being on their own bodies.

I also fixed a bug where the offscreen spawner was spawning things too far away from the edge of the screen, so that they were coming in too late after I wanted them to.

Tomorrow, I'm going to start scheduling things realistically in the ice level. Up until now it’s just been a dumping ground for all of the new features I've been testing — not much structure. I've designed some wave structures for this level before, but now I've settled on a different set of features than anticipated, so I'll have to adapt prior designs or start from scratch. I still don’t have polar bears, snow flurries, auroras, a visible frost effect, or very good fish, but I've got to keep moving forward. I need to keep playing the game with these planned features in mind, to see what the gameplay suggests to me, if anything at all. That’s my process. Follow the gameplay.

A warm current is visible with some programmer art on the left side. A second current appears before the turtle arrives, and the currents can be seen to push the turtle.

9/25/2013

I started using currents to melt ice, which was their intended purpose, but it brought some issues to light.

Since we don’t have dynamic cracking, cracks can only form on breakables in predefined places. What I've been doing until now is having it so that each crack, originating from each cracking point, had a critical value that would mortally wound the crackable object. Each crack was independent of every other crack, so, for instance, you could crack every side of a square object 3 times, for a total of 12 cracks, but a 4th crack anywhere would destroy the object. This is OK, gameplay wise, but possibly overcomplicated. More importantly, it’s probably impossible to make this type of cracking look visually attractive with our current setup. So, now, everything that can crack will only do so from one crack point at a time. So, if the first impact does not cause a mortal wound, succesive impacts just deepen the crack formed by the first. I studied the fracturing properties of materials, and this is would actually be a realistic behavior for some materials. Whether it’s a realistic behavior for turtle shells and ice sheets or not, I don’t know or care much, because it’s plausible enough.

What I really wanted for melting was a physical shrinking effect, but we don’t have the artistic capacity for that either, and I'm not even sure that it can be done in Game Maker/Box2D, anyway. For now, I say that melting softens the object, causing an increased propensity to trigger cracking in itself on impact. It also triggers an instant mortal wound when a certain melting threshold has been reached. That is, ice can melt to death.

Lux gave me a test graphic for giant kelp today, so I'll be working on some rope physics to try that out soon.

On the right is a sketch, and on the left is an example combination of segment and leaf pieces that can be semi-randomly glued together to create dynamic kelp.