|
So, I had a few drinks yesterday evening, a rarity for me. Mostly to celebrate my wife getting offered a new job - woo woo. I'd been ranting at work about how mindless clicking games are so successful when other better games (putty of course ;)) go unappreciated. I had an inkling of an idea about bubbles and lines between them (I realised later this was probably derived from talking to Cas about what he was doing). Anyway, back to the drink, few glasses of wine later I'm spouting my normal nonsense on IRC and I start coding this idea up without really thinking about it. At the start I decided every hour I'd check progress, if it wasn't working out or it stopped being fun I'd just go back to my isometric project (see below). Well, this hourly thing works for me. It was really fun pushing to see how much could be stuffed in within an hour. I guess this is how the Ludum Dare competitors feel. This is how it went: Hour 1 - Making it workDevelopment started at about 11pm. I knew the game idea revolved around bubbles appearing on the screen. I'd talked to Cas about it earlier (see above) and one of things he'd mentioned in the past was how to get the bubbles to push each other aside. First, lets spawn some bubbles. Create a basic slick state based game, default state and a class representing the bubble. The bubbles can draw them selfs and can be updated, for a change I allowed the bubbles to return an indication whether they'd changed size or not. This made the game loop very easy - loop through all the bubbles updating them, if none of them changed size spawn another. The next step was a bit more complicated. When a bubble grows it needs to push the others out of the way. I took my normal discrete collision based approach. Limit the bubble to a 1 pixel growth. After the growth check for collision. If anything collides with the bubble that has grown move it away from the grower and add it to the list of pushed bubbles. While there are still pushed bubbles pick the first one and repeat. This was the first brute force approach that came to mind and it seems to work fine. So, the first hour was spent fiddling with setup and boilerplate classes, getting some rendering and basic logic in. Assessment after the first hour was that watching the growing and pushing red circles was enticing, especially in my now growingly inebriated state. Hour 2 - Making it PrettyNext I thought I'd make it look pretty. Thanks to the wonderful www.fasticon.com I had some nice looking fruits very quickly (though originally they were going to be gems). I lost 15 minutes or so hunting round for a bubble until asking on the #lwjgl channel and being told just to paint a gradient across a circle. Strangely it kinda worked, I like what's there now at least, maybe it's not quite bubble like but it works pretty well. Having replaced the circle drawing with images I noted a huge speed increase (circle drawing was taking up a lot of polys). So, I sat for a few minutes watching the spawn of fruity bubbles. Oh, thats good I thought. Hmm, whats going on with that FPS - it's getting lower and lower? What had I done!? Well it turns out I wasn't getting rid of the bubbles after they'd left the screen. So the pushing code was slowly pushing more and more bubbles. As a result I added some little bits of code to determine if a bubble was on the screen and whether the mouse was over it. I stuck on a background (which you can see in the next screenshot) and started thinking about showing other people. Slick has some useful build scripts, so I grabbed one of them, updated it for the project - ran it and had a webstart ready to try. Webstart for anyone who doesn't know lets us Java type show each applications and games with minimal effort (including keeping it updated). Posted the link to it onto IRC and waited for a response. General approval - woo hoo - "why can't I click the bubbles to pop them?". Well thats not the game, you have to draw lines - "meh". A discussion then broke out about what the game should be like. They're a nice bunch of people, with good ideas. The game idea I had was reshaped into something a lot easier to play and enjoy. Mindless clicking for the win! Hour 3 - Making it PlayableThe background is a kevglass original, the font some stock thing I've hanging around pushed through Hiero for a bit of shading and shadows. Searched for, found and added a few sound effects for bubbles popping etc. A simple pitch changed based on the size of the bubble seemed to give it a comfortable feel. With the constant spawning of bubbles this was already quite fun. The changes didn't take long but there were bugs galore. Just stupid silly bugs. I was getting tired by this point, it was pushing on to 2am. At 2am-ish I ran the build script and pushed out another version and decided to call it a day. There was still feedback coming in but work in the morning etc. Hour 4 - Rethinking the Game PlayHour 4 was, as often is the case, my lunch break at work. I decided to go the local canteen to save some time so I could read the feedback, chat a bit and design a logo. I wanted to call the game something suitably generic and corny - Super Bubble Pop Fruit Drop Deluxe Edition. 20 minutes of my lunch disappeared just designing the logo you see to the right. I'm not an artist as you can tell :) Having processed the feedback and got the logo sorted I spent 10 minutes writing down a plan of attack for this evenings coding session. The last item on the list was writing this blog post. Why? Well, because I think I'll find it interesting in a few months looking back. The list also included the game play changes that needed to be made and the idea of porting the whole thing into Java 2D. That still might happen - there's a couple of hours left in the budget :) I'm pretty determined not to let development time go over 8 hours at the moment, looks like it should be enough. Hour 5 (and a little more) - Making it a complete gameThis evening's first hour started around 8. The game play needed to be changed. Talking on IRC had led me to the following changes:
The graphics were easy, just visit fasticon.com again. The title page also didn't take long, slap the logo from lunch on the page and added a in code flag for the starting page. Made the logo wobble a bit because it seemed cute. Hurts your eyes if you watch it too long though :). The instructions however zapped up loads of time. First, I ummed and ahhed about whether to just define the instructions text as a string in code or in a separate file. Why? I don't know, I really don't. Next I wanted it displayed as a marquee, but drawing the whole string each time would have been super slow - so how to do it? Each part of the message is a separate object which only draws if it's on the screen. A quick inner class, a bit of buffered loading and a simply bit of maths for clipping the text off the screen. Annoyingly, this actually took me longer to get right than anything else so far. Finally for this hour I spent an age searching around for sound effects for when the fruit changes in game. All I wanted was a beep beep beep timeout sound, no luck. Eventually found one hanging around in one of my local game resource directories right under my nose. Sounds pretty good in game now. Hour 6 - Tuning and PolishSo far this 6th hour has been tuning and adding polish touches suggested by testers and myself. Tuning parameters like how long between extra lifes showing up, how long fruits are current for and how quickly the multiplier drops back is really interesting simply because of the massive effect it has on the way the game plays. And of course, half of this hour (a little more now) has been spent writing this blog which I hope has something readable in it. There are several things people say hurt productivity:
What now?Well the game will be available to play after a couple of hours more development time (maybe not tonight). It look like it's some extended features and a bit of polish before it's done. Two more hours should give me time to add a couple of ways of getting bonus scores at least. This blog is of course self indulgent nonsense, but it's just one of them things about being a geeky chap I suppose - you just need to tell others about the code you're pushing out. It's fun for me, it really is, but it's more fun if I get to show and talk to other people about it. |
DisclaimerNote that the views on this page are not intended to offend. If they do, you might be taking the content too seriously. TODO Game: Start Robuzzle ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 2D OpenGL Based Game Library ![]() 2D Game Physics Engine in Java Game Developers How about a list of the developers doing interesting things in java gaming. Game Dev Resources Looking for Game Development Resources? Check out the List! |