It’s been a couple of weeks, so what have I been up to? In summary, “less than I had intended”. I was house-sitting for family for a couple of weeks in October, and their internet decided to be so unreliable as to be useless. As such, I couldn’t play around with snõwkit like I’d hoped – I’ll find the time to eventually though! I got back on the 24th, so what have I been doing in the week since then?
Back in September, I had an email exchange with a Quick Quote user who mentioned that being able to categorise items would be helpful, and that they were planning on using it on multiple devices. So as soon as I got back, I started work on a Quick Quote update. As of now, categories system is in place and working smoothly. The update should go out before the end of the month, assuming nothing catastrophic happens. As well as categories, there will also be a way to export your quote-items to a file, and then import them, to save having to enter them multiple times. Plus, there are some improvements to how forms handle mistakes or invalid input.
Quick Quote is an Android app, available for free, for creating quotations and estimates from your phone or tablet while out and about. Save quotes for later, and email them to your customers without needing a computer. Upgrade to Quick Quote Professional for more features, including the new categories system and import/export functions mentioned above.
The first update to F!shing since release, version 1.4 introduces combo-multipliers, and makes the game more varied by randomising more things. Plus, the game now has a permanent lower price! As always, you can pick the game up from the F!shing website, or the widget below!
A full change-list is available at the bottom of this post, but first, let’s get technical!
In game development, sometimes things don’t work out. Maybe a game mechanic isn’t fun, maybe an effect looks bad, or maybe you just don’t have the budget and have to cut things. In the case of F!shing, I can’t get disco mode to run smoothly enough on Android – I had hoped that it was only on devices with high-res screens, but it appears to be bad on everything. I’m not comfortable putting a game out there that runs so slowly it’s unplayable. However, I do want to release all of the other improvements and bug fixes I’ve made to the game over the past few weeks. Even without disco mode, it’s a much better game now than it was. So, version 1.4 will be releasing soon but without the ‘night’ and ‘disco’ modes enabled.
If all goes well, I’ll come back to F!shing in a month or so and get disco mode fast enough that I’m happy to release it. Hopefully taking a break from the project will enable me to find a solution when I do return to it. In the mean time, I’ll be experimenting with snõwkit for a week, and then making some improvements to Quick Quote. Busy busy busy!
So, what have I been doing the last couple of weeks? Firstly, the disco modifier!
The spotlights sway back and forth, the colours cycle, and the little dot lights spin around. (I want to show a gif of it, but the file-size is enormous. :() My current plan is to have it be pretty rare, but once you’ve seen it once,it unlocks as a secret option on the main menu, so you can enjoy it in all its glory whenever you want!
I had to learn a bunch of new shader tricks to get any of this to work. I was pretty happy, and then I tried it out on my Nexus 10 tablet and it ran at 11 frames per second, which is pants. Once I’d added an FPS counter, I discovered that even with only the subtle water ripples it was running at 55FPS, and the night shader at 33. So, a lot of time was spent trying to make these things faster. The end result is that with just the ripply water, 56FPS; the night shader at 48; and the disco shader at 20. (Disco reached 24, but then I added the player-light-circle because it was hard to see where you were, which dropped it to 20.) Optimising shaders was… interesting, as I barely know enough to make them work at all, and shader performance is almost a dark art. Simple things like using if statements to avoid doing work can be slower than just doing the unnecessary calculations. Someone explained somewhere that operations don’t really have a time cost: if a sin() takes 4 cycles, and a matrix operation takes 4 cycles, sometimes both together also take 4 cycles. So, my method was almost entirely trial and error.
You can save a bunch of time by doing calculations in the vertex rather than fragment shader, but the interpolation it does isn’t always what you want. For example, the weird blue lines on the water in the above screenshot are supposed to follow the spotlights, but the in-between values it calculates are wonky. You can see where the background is composed on two triangles from where the sharp bend is. In the end, I decided to leave it like this as, after all, it’s supposed to be a disco so goofy lighting is appropriate.
20 frames per second is not really good enough. I wouldn’t be happy unless the entire game always ran at 60. But, it seems the high-resolution on my tablet combined with mobile GPUs not being great might mean it’s impossible. I’m not trying to make excuses – I genuinely don’t know whether it can be any faster, or whether the hardware prevents that. On my desktop PC, with a graphics card that was OK in 2007, it’s fine. I’d love to be able to make it better, but ultimately I have to ship the game, and it’s not the end of the world. The 48/55 fps aren’t noticeable unless you’re looking, and 20 isn’t as awful as it sounds. I’ll have to see how it performs on other hardware.
I had one last idea for speeding the game up: using the depth buffer. To explain briefly, OpenGL can store a number for each pixel on screen, representing how near what’s drawn on that pixel is to the camera. Then, it only draws pixels that are closer than what’s already drawn. This way, you can avoid drawing on the same pixels over and over, wasting time. Now, currently the game draws back-to-front: first a fat blue rectangle is drawn, then fish, then the water’s surface, then the ground, then the player and plants, and finally the score and pause menu and such. Using the above screenshot as an example, this means that some of the pixels are drawn five times: behind the word “Score” is a tree, some grass, the water surface, and the blue background, and each of these is drawn onto those pixels. With the depth buffer, I could instead draw front-to-back, with “Score” being drawn first, and then skipping the tree, grass, etc. as they’re behind. (Not exactly, as semi-transparent things need to be drawn after what’s seen through them, but it would definitely cut out a lot of wasted work.)
So, why didn’t I do this? Because I discovered that the 2d-rendering parts of LibGDX are incompatible with the 3d rendering parts, so that I couldn’t swap things out, but would have to rewrite a significant portion of the library before I would know if this rewrite would make any difference. Unfortunately, I can’t devote that amount of time to this. Especially as this multi-week patch was supposed to be a minor fix to the Lake of the Day being stuck on a single game mode! I’m susceptible to feature creep, but not quite to that extent.
So, current plans: I have a few things left to clear-up before the next F!shing release, and then onto all the other projects I’m supposed to be doing! Some improvements to Quick Quote Professional are planned, to help with managing large numbers of quotable items, and multiple devices. Then, the business app that I barely started before F!shing distracted me. Once that’s done, I’m not sure, as I’ll probably have changed my mind multiple times before I get to it.
I’m also in the process of writing-up my month’s worth of shader experiences, things learnt and mistakes made. Not because I’m an expert, because I’m not, but because it’s such a confusing topic and I’d like to help other people be less confused. I’d been wanting to try writing shaders for ages before I finally dived in.
Depression’s still giving me a bit of a kicking, so things are slow. This is the worst part of depression, I think – being unable to do anything some days, with no tangible reason.
Game-wise, the first improvement is to the water, as above. Using more shaders (because shaders are fun) the water sways back and forth. (I called it “wibbly-wobbly” in the code, because I can!) Fish are now drawn behind the ‘water surface’ texture, so finally it doesn’t look like they’re floating on the surface. I tried redrawing the water art with a different technique, and, well, you can see below why I decided not to keep it. 😉 It was actually my second go at having it fade between two images, and it’s just way too distracting and ugly. So, wobbly circles will stay, until I try to replace them again!
In therms of actual gameplay, I’ve done a fair amount of tweaking and balancing to make things more fun, mostly to stop the lake becoming flooded with fish, or emptying entirely. You’ll still get lakes that are busier or quieter than others, but they’ll be consistent within that lake. Maybe that makes sense, maybe it doesn’t, but it’s a good thing, anyway!
The biggest feature I’ve left until last, as I’m still in the middle of implementing it: Combo Multipliers! Catch fish quickly, without catching any junk, and you’ll build-up a points multiplier that can drastically improve your score. Throughout development, I’ve wanted to add more ways to reward skilled play, and this should really help you show your friends who’s best!
I’m still hoping to get Disco Mode in for the next release, though I haven’t really decided what it will involve, except for disco music and ridiculous lighting effects. Maybe that’s enough.
So, the results for Ludum Dare 30 are in! Lorries in SPAAAAACE! did well enough, though nowhere close to the top 100. (Though being #68 in the Humour(Jam) category is nice.) Considering it’s not a very original game, and lacks polish, I’m pretty pleased.
The two big take-aways for me are 1) I can actually make games that people enjoy! (Judging by the positive comments I received.) This was so important, as after F!shing flopped I was wondering if I’m even any good at this game development lark. 2) Unity really is as quick and easy as I’d hoped! This is also encouraging, as the games I want to make (strategy/management/city-building) are quite large, so I need to be able to work quickly if I have a hope of finishing one. I’m not yet ready to embark on an epic, multi-year project.
As for Lorries in SPAAAAACE! itself, I do have some plans to expand it into a full game, but as always I have other projects to finish first. 😉 If only I had infinite time, maybe all the games in my head would get made and released.
Last week I had a nasty bout of depression and got almost nothing done, hooray! Back to normal now though.
A F!shing update is in the works! I noticed a couple of bugs, then thought while I was at it, I’d improve the ‘Game Mode’ system, and it’s grown a fair bit. In the current released version of the game, Game Modes are very fixed – they have some randomness to them, but they play roughly the same each time. The ‘Lake of the Day’ and ‘Random’ options would just pick one of the existing modes to play. Now, I’ve broken the gameplay up into ‘modifiers’ (Fish, Junk, Clams, and Shark) and given each of them a random element. For instance, you might only get one type of fish, or you might get only a few at a time, or there could be dozens at once! This has added more variety to the existing modes. The ‘Lake of the Day’ and ‘Random’ now use a random combination of modes. It’s less predictable, and hopefully more interesting.
I’m also adding some new modifiers to the coming update, and the first one is ‘Night’, which you can see above. Any lake you play has a chance of being set at night, and the limited visibility adds an extra bit of challenge. It’s my first go at using ‘shaders’ – basically, code that runs on the graphics card. It was a bit fiddly to get working, but now I should be able to add other graphical effects in the future.
Lorries In SPAAAAACE! is a management or “tycoon” game where you run an interplanetary haulage company. Buy space-lorries, give them orders to buy goods at one planet and sell them on another, and gradually expand until you can buy whole planets. You win when all the planets belong to you, and the goal is to do so as quickly as possible. It takes around 8 minutes to play through.
This was the first time I really got my teeth into Unity, and it went really well! Development was rapid, as I’d hoped, and meant that I’ accomplished what I’d planned within the 48 hours. I carried on into Monday in order to add a way to win, and to add polish, and even then I was done hours before the deadline. Unity is quick to work with, even though I wasn’t that familiar with it, so I’ll definitely be using it in future game jams, and future games.
So, it’s been a couple of weeks since the last dev log. Firstly, I spent the week after F!shing was released attempting marketing things, and relaxing a bit. I’ve also been playing around with Unity, preparing to work on Mycronation. However! There are two projects that you’ll see before I continue with that.
Firstly, it’s Ludum Dare #30 right now! LD is a regular game jam that takes place over a weekend, where the goal is to make a game from scratch that fits a given theme. The theme this time is “Connected Worlds”, and I decided to make a game about managing a haulage company IN SPAAAAAAAAACE! So far, I have some randomly-generated planets with goods they want to buy or sell. It’s giving me a proper Unity workout too!
Then after this weekend, I’ll be working on a business-focussed Android app. Someone suggested it to me a year or two ago, and twice I’ve attempted to develop it and ended-up sidetracked, but this time I will complete it! 😉
I’m thinking of weekly development livestreams for F!shing, as I’ve got a big list of things to add to the game still, and it might help get the game more publicity. They won’t begin until September, but I’m hoping to do them every Friday. If you want to get an email when I start streaming, you can follow me on Twitch.tv.
The game is finished now: stable as far as I can tell, and it feels complete. Are there things I would like to add to it? Of course! Will there be future updates? Maybe, but it depends on how successful the game is. I’d like to do more testing before I’m happy to release on Mac or Linux, even though it should work. GameStick and Ouya are also possibilities, and I’d love to add local multiplayer… lots of plans, but only if things work out. 🙂