<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://www.cokeandcode.com">
<channel>
 <title>Coke And Code - Java Games and Games Development - Geek</title>
 <link>http://www.cokeandcode.com/taxonomy/term/10/0</link>
 <description>Geeky things, be fairly warned young jedi!</description>
 <language>en</language>
<item>
 <title>Hour Oriented Game Development</title>
 <link>http://www.cokeandcode.com/node/1258</link>
 <description>&lt;p&gt;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&#039;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 &lt;a href=&quot;http://www.puppygames.net&quot;&gt;Cas&lt;/a&gt; about what he was doing). Anyway, back to the drink, few glasses of wine later I&#039;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&#039;d check progress, if it wasn&#039;t working out or it stopped being fun I&#039;d just go back to my isometric project (see below).&lt;/p&gt;
&lt;p&gt;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 &lt;a href=&quot;http://www.ludumdare.com/&quot;&gt;Ludum Dare&lt;/a&gt; competitors feel. This is how it went:&lt;/p&gt;
&lt;p&gt;&lt;H3&gt;Hour 1 - Making it work&lt;/H3&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.cokeandcode.com/demos/gempop/log/pop1.png&quot;&gt;&lt;img src=&quot;http://www.cokeandcode.com/demos/gempop/log/pop1.png&quot; width=&quot;320&quot; align=&quot;left&quot; style=&quot;margin: 5px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Development started at about 11pm. I knew the game idea revolved around bubbles appearing on the screen. I&#039;d talked to Cas about it earlier (see above) and one of things he&#039;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&#039;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.&lt;/p&gt;
&lt;p&gt;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. &lt;/p&gt;
&lt;p&gt;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. &lt;/p&gt;
&lt;p&gt;&lt;H3&gt;Hour 2 - Making it Pretty&lt;/H3&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.cokeandcode.com/demos/gempop/log/pop2.png&quot;&gt;&lt;img src=&quot;http://www.cokeandcode.com/demos/gempop/log/pop2.png&quot; width=&quot;320&quot; align=&quot;right&quot; style=&quot;margin: 5px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next I thought I&#039;d make it look pretty. Thanks to the wonderful &lt;a href=&quot;http://www.fasticon.com/&quot;&gt;www.fasticon.com&lt;/a&gt; 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&#039;s there now at least, maybe it&#039;s not quite bubble like but it works pretty well. &lt;/p&gt;
&lt;p&gt;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&#039;s getting lower and lower? What had I done!? &lt;/p&gt;
&lt;p&gt;Well it turns out I wasn&#039;t getting rid of the bubbles after they&#039;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. &lt;/p&gt;
&lt;p&gt;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&#039;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 - &quot;why can&#039;t I click the bubbles to pop them?&quot;. Well thats not the game, you have to draw lines - &quot;meh&quot;.&lt;/p&gt;
&lt;p&gt;A discussion then broke out about what the game should be like. They&#039;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!&lt;/p&gt;
&lt;p&gt;&lt;H3&gt;Hour 3 - Making it Playable&lt;/H3&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.cokeandcode.com/demos/gempop/log/pop3.png&quot;&gt;&lt;img src=&quot;http://www.cokeandcode.com/demos/gempop/log/pop3.png&quot; width=&quot;320&quot; align=&quot;left&quot; style=&quot;margin: 5px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The background is a kevglass original, the font some stock thing I&#039;ve hanging around pushed through &lt;a href=&quot;http://slick.cokeandcode.com&quot;&gt;Hiero&lt;/a&gt; for a bit of shading and shadows.&lt;br /&gt;
The game idea ending up being a simple matching game. The game shows you a fruit, you need to click all the fruits of that type - the more you click, the more points you get. I decided to add a timer to limit game play and score was updated based on the size of the bubble - smaller bubble = higher score.&lt;/p&gt;
&lt;p&gt;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&#039;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.&lt;/p&gt;
&lt;p&gt;&lt;H3&gt;Hour 4 - Rethinking the Game Play&lt;/H3&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.cokeandcode.com/demos/gempop/log/pop4.png&quot;&gt;&lt;img src=&quot;http://www.cokeandcode.com/demos/gempop/log/pop4.png&quot; width=&quot;320&quot; align=&quot;right&quot; style=&quot;margin: 5px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hour 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&#039;m not an artist as you can tell :)&lt;/p&gt;
&lt;p&gt;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&#039;ll find it interesting in a few months looking back.&lt;/p&gt;
&lt;p&gt;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&#039;s a couple of hours left in the budget :) I&#039;m pretty determined not to let development time go over 8 hours at the moment, looks like it should be enough.&lt;/p&gt;
&lt;p&gt;&lt;H3&gt;Hour 5 (and a little more) - Making it a complete game&lt;/H3&gt;&lt;/p&gt;
&lt;p&gt;This evening&#039;s first hour started around 8. The game play needed to be changed. Talking on IRC had led me to the following changes:&lt;br /&gt;
&lt;OL&gt;&lt;LI&gt;There would be no timer, thats just a lame cop out&lt;/LI&gt;&lt;LI&gt;Lifes would be added, you lose of life if you click the wrong fruit&lt;/LI&gt;&lt;LI&gt;A score multiplier would be applied which ticks up as you click, and ticks down as you don&#039;t&lt;/LI&gt;&lt;/OL&gt;Adding these features was about 20 minutes of effort. All the code was really already there, it just needed moving about. However, it was now that I decided I need a title page, some instructions and a few more graphics (well one, for the lifes indicator) to make it feel more like a game. &lt;/p&gt;
&lt;p&gt;The graphics were easy, just visit fasticon.com again. The title page also didn&#039;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. &lt;/p&gt;
&lt;p&gt;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&#039;t know, I really don&#039;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&#039;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. &lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;H3&gt;Hour 6 - Tuning and Polish&lt;/H3&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.cokeandcode.com/demos/gempop/log/pop5.png&quot;&gt;&lt;img src=&quot;http://www.cokeandcode.com/demos/gempop/log/pop5.png&quot; width=&quot;320&quot; align=&quot;right&quot; style=&quot;margin: 5px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So 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.&lt;/p&gt;
&lt;p&gt;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:&lt;br /&gt;
&lt;UL&gt;&lt;LI&gt;Making library code that you share with others - Slick has worked out ok for me! Lots of bugs reports have made it more reliable library for me as well&lt;/LI&gt;&lt;LI&gt;Chatting on IRC - IRC is a wonderful source of instant feedback for me. While I know what I like in a game, it&#039;s obvious that&#039;s not mass appeal and without the IRC channel I&#039;d have little hope of sorting out problems early on.&lt;/LI&gt;&lt;LI&gt;Writing blogs - I&#039;ve been looking forward to writing this blog since the first bubbles started showing up. It&#039;s been one of the goals and a great motivator.&lt;/LI&gt;&lt;/UL&gt;I&#039;m not sure any of the above is really a pattern, but I think I&#039;d say that you&#039;re as productive as you are. The things that are perceived to make you more or less probably have a very low percentage impact on your real output.&lt;/p&gt;
&lt;p&gt;&lt;H3&gt;What now?&lt;/H3&gt;&lt;/p&gt;
&lt;p&gt;Well the game will be available to play after a couple of hours more development time (maybe not tonight). It look like it&#039;s some extended features and a bit of polish before it&#039;s done. Two more hours should give me time to add a couple of ways of getting bonus scores at least. &lt;/p&gt;
&lt;p&gt;This blog is of course self indulgent nonsense, but it&#039;s just one of them things about being a geeky chap I suppose - you just need to tell others about the code you&#039;re pushing out. It&#039;s fun for me, it really is, but it&#039;s more fun if I get to show and talk to other people about it.&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/6">Code</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/39">Random</category>
 <pubDate>Tue, 03 Jun 2008 21:21:52 +0000</pubDate>
</item>
<item>
 <title>Game Specification</title>
 <link>http://www.cokeandcode.com/node/1225</link>
 <description>&lt;p&gt;When working in a team of developers, or even when hoping to succeed with a single developer project it&#039;s important to have an overall common shared concept of what the final game is going to be like. Of course, this being games development, this is open to change during the creative process, but the specification of the game describes what the game is, how it&#039;s going to work, whats going to make it fun and what&#039;s going to keep people coming back. This is especially true when working with distributed group of contributors.&lt;/p&gt;
&lt;p&gt;Before the Java folks start jumping around, I&#039;m not talking about software design/specification here. For small games it&#039;s often not worth worrying about software design documentation since the majority of it is just following known patterns that most capable developers don&#039;t really have to think about. For larger ones software specifications are still only largely interesting to the developers. The game specification sets the mood/feel of the game which should feed into every aspect (art, sound, development, etc.)&lt;/p&gt;
&lt;p&gt;Anyway, this came up due to yet another conincidence. Yesterday someone was asking about how to write them, and today I was hopefully joining a team thats developing a game which needs a specification. So, while I&#039;m not terribly proud of them here&#039;s the examples I have of some game specification:&lt;/p&gt;
&lt;p&gt;Two reasonably complete ones from a while ago :-&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.cokeandcode.com/specs/retailopia&quot;&gt;Retailopia&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.cokeandcode.com/specs/battlescapearmada&quot;&gt;Battle Scape Armada&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And one that I posted recently thats still in progress :-&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.cokeandcode.com/expanse&quot;&gt;Into the Expanse&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;They might not be great but at least they might stir some mental juices.&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/6">Code</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/17">Games</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <pubDate>Wed, 14 May 2008 11:35:39 +0000</pubDate>
</item>
<item>
 <title>Puttonandonandon</title>
 <link>http://www.cokeandcode.com/node/1218</link>
 <description>&lt;p&gt;The putty prototype is continuing. Prototype #3 (see previous entry) is being refined to use a couple of new features and have a goal.&lt;/p&gt;
&lt;p&gt;I&#039;ve just been testing out #1 again (the one with physics and morphable shapes). It&#039;s the only one that really floats my boat so I think I may go back and try and solidify the engine so the response on morphing is crisp. Still can&#039;t quite see the game but I definitely preferred the full control - at least thats how I feel today :)&lt;/p&gt;
&lt;p&gt;In other news, never do anything but assignment in a constructor. It&#039;s bad, and wrong and evil - especially when you then try to convert that system to make use of a IoC Container.&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/6">Code</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <pubDate>Tue, 22 Apr 2008 11:51:47 +0000</pubDate>
</item>
<item>
 <title>Some days arn&#039;t so good...</title>
 <link>http://www.cokeandcode.com/node/1209</link>
 <description>&lt;p&gt;She&#039;s still ill, or at least sad. There doesn&#039;t seem to be anything we can do to cheer her up and the throat is still keeping her up. I haven&#039;t slept properly for a week now. She&#039;s generally better, but still not eating. &lt;/p&gt;
&lt;p&gt;The last two days have been long work days, around 11 hours a day. Finally work is coming back up, I&#039;m starting to get somewhere - but the lack of sleep is starting to make it hard to focus. Understand that I spend a lot of the night coding anyway, so it&#039;s not that unusual for me to get 4 hours sleep and be fine. Right now, it&#039;s just not even reaching that stage. Still, at least I&#039;ve made some progress this week.&lt;/p&gt;
&lt;p&gt;Now, home stuff is really suffering. I&#039;ve done no game stuff since the weekend, apart from update the spec for the *big* game. Now I check the Slick forums, and while people seem to be using it theres a definite trend away - I guess thats to be expected given how long it&#039;s been going. &lt;/p&gt;
&lt;p&gt;What I need is a little game to write now, tonight, to get me awake and alive again, but the lack of sleep just isn&#039;t letting me think of anything. Time to hack..&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/7">Life</category>
 <pubDate>Thu, 10 Apr 2008 21:05:12 +0000</pubDate>
</item>
<item>
 <title>Library Naming</title>
 <link>http://www.cokeandcode.com/node/1205</link>
 <description>&lt;p&gt;Libraries are funny things, coding is ok, I can sorta get that bit working but the rest of the stuff around pimping a library I just can&#039;t get right.&lt;/p&gt;
&lt;p&gt;First, apparantly it needs to have a website. I was just going to pop in on the forums and see if anyone bothered to try it. Now it has a website.&lt;/p&gt;
&lt;p&gt;Second, name. What happens if you let Kev try and name a library - well you get something like &quot;Phys2D&quot; - you see it&#039;s physics and it&#039;s in 2D, so it&#039;s uh, Phys2D! Enough said, I&#039;m not good at these things. Woogley was kinda enough to name Slick for me, I believe my original name was YASL (yet another sprite library). I was going to call this network code &quot;commet&quot;. COMMunications, nETworking. Ok, very lame. It&#039;s now got a a happening name.&lt;/p&gt;
&lt;p&gt;Finally logo. I like logos, they&#039;re cool and surprisingly motivating. The slick one is pretty lame, I did that. It&#039;s functional. The phys2d almost makes up for the terrible name, it&#039;s a great logo. The guy that did it just roughed up a bunch in a few minutes - I liked the rough one so much it&#039;s stuck. This time a new Slick user popped up with a new logo (and he actually came up with the new name). Cheers!&lt;/p&gt;
&lt;p&gt;So here it is, &lt;a href=&quot;http://www.cokeandcode.com/noodles&quot;&gt;Noodles&lt;/a&gt;. And yes, I know I can&#039;t design websites either. &lt;/p&gt;
&lt;p&gt;EDIT: Oh, for those that have read past posts, this one doesn&#039;t need pimping anywhere. It&#039;s just not ready for *real* users :)&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/6">Code</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <pubDate>Mon, 07 Apr 2008 21:25:08 +0000</pubDate>
</item>
<item>
 <title>Another thought...</title>
 <link>http://www.cokeandcode.com/node/1204</link>
 <description>&lt;p&gt;What a pita this network stuff is, time to find something else to do. &lt;/p&gt;
&lt;p&gt;The space trading game is going to be great. Did you play PSI 5 Trading Company? Do you know Java and feel like working as part of a team. Let me know!&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/6">Code</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <pubDate>Sun, 06 Apr 2008 21:10:08 +0000</pubDate>
</item>
<item>
 <title>Platformer Demo</title>
 <link>http://www.cokeandcode.com/node/1202</link>
 <description>&lt;p&gt;Felt like a hack last night. Hacking is good for motivation, though sometimes not good for focus ;). Theres a few things I&#039;m running in parallel at the moment:&lt;/p&gt;
&lt;p&gt;1) Slick - updates and fixes.&lt;br /&gt;
2) Networking Library - this is taking a long time. Hopefully be worth it&lt;br /&gt;
3) New Applet Game Idea - this is outside of Slick, it&#039;s good old Java2D - but it&#039;s a winning idea, so heh.&lt;/p&gt;
&lt;p&gt;As part of 1) I&#039;m trying to produce a few demos to show how different game types might be started. I&#039;m not planning to write full games but simple tech demos that hopefully give people somewhere to start. As normal I&#039;m trying to make the code useful and readable over making it particually clever. &lt;/p&gt;
&lt;p&gt;So, back to this hack, I&#039;d been meaning to take a look at Platformers. Chman had asked how to use Phys2D to make a platformer (though quite a few others had asked before). I realised I hadn&#039;t tried it, so all I could do was point him at SlickSet (I know Jon has achieved some cool platformer related stuff).&lt;/p&gt;
&lt;p&gt;Anyway, so last night I hacked at some platformer code using phys2d. This is what came out:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.cokeandcode.com/demos/platformer/plat1.png&quot;&gt;&lt;img src=&quot;http://www.cokeandcode.com/demos/platformer/plat1.png&quot; width=&quot;400&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can try it via &lt;a href=&quot;http://www.cokeandcode.com/demos/platformer/platformer.jnlp&quot;&gt;Webstart&lt;/a&gt; and the source &lt;a href=&quot;http://www.cokeandcode.com/demos/platformer/platformer-src.zip&quot;&gt;available&lt;/a&gt;. The code and implementation is expected to develop a bit over the next few days to provide a decent sample, right now it&#039;s still buggy - doesn&#039;t have good performance - just about trying stuff out.&lt;/p&gt;
&lt;p&gt;So why is this hard? It comes down to what I guess is pretty obvious. Generic platformers (think Mario, Sonic, Zool) don&#039;t use physics engines, infact they&#039;re not even following the rules. When you try and use a physics engine you have to fudge stuff to make it feel more like a traditional platformer while leaving enough of the physics engine intact to allow the rest of the world to make use of the engine (that is of course what we want, a mashup between real physics and platformer dynamics).&lt;/p&gt;
&lt;p&gt;Hat&#039;s off to Jon, this isn&#039;t some tiny task that you can just do. It takes a lot of fiddling. Getting the physics engine to act like a platformer is pretty simple, getting it to allow you to interact with other objects while maintaining the platformer nature - thats a git.&lt;/p&gt;
&lt;p&gt;Still, last night I did start from nothing and got the tile combination stuff working, a simple renderer, a tiny engine (named Penguin) and a silly little demo that shows up a lot of the issues. Initial indications are that it&#039;s totally possible to mix the two worlds and end up with something uniquely fun.&lt;/p&gt;
&lt;p&gt;Hopefully one of the enterprsing folks will take it futher. &lt;/p&gt;
&lt;p&gt;Now.. which demo next?&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/7">Life</category>
 <pubDate>Thu, 03 Apr 2008 11:39:41 +0000</pubDate>
</item>
<item>
 <title>Cluster Maps</title>
 <link>http://www.cokeandcode.com/node/1134</link>
 <description>&lt;p&gt;See that little map at the bottom right of the page, that&#039;s cool to me that is :)&lt;/p&gt;
&lt;p&gt;It shows where the visitors to this site have come from, it does it without me having to do any more than cut and paste some HTML from the cluster maps site into mine. It&#039;s also free. Isn&#039;t that just wonderful?&lt;/p&gt;
&lt;p&gt;I added it a couple of weeks ago and I&#039;m astounded by the range of people that are visiting, presumably the majority are bots and crawlers but it&#039;s still pretty interesting. It&#039;s also been nice to get some external view of the number of people visiting. I tried google analytics for a while but it just seemed to stall on me. &lt;/p&gt;
&lt;p&gt;Free Stuff + The Internet = Cool :)&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <pubDate>Mon, 10 Dec 2007 08:49:10 +0000</pubDate>
</item>
<item>
 <title>Tor!</title>
 <link>http://www.cokeandcode.com/node/1133</link>
 <description>&lt;p&gt;Probably way out of the loop here, but I just stumbled upon the &lt;a href=&quot;http://www.torproject.org/&quot;&gt;Tor Project&lt;/a&gt;. Seems like a pretty cool system for protecting your identity and location while playing around on the net.&lt;/p&gt;
&lt;p&gt;Does worry me that it&#039;d be abused but then I suppose that&#039;s not the tool&#039;s fault, just the users. &lt;/p&gt;
&lt;p&gt;Neat stuff.&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <pubDate>Mon, 10 Dec 2007 08:46:45 +0000</pubDate>
</item>
<item>
 <title>&#039;No Fun and No Code make Kev Something Something&#039;</title>
 <link>http://www.cokeandcode.com/node/1124</link>
 <description>&lt;p&gt;&#039;Go Crazy?&#039; - &#039;Don&#039;t mind if I do!!!&#039;&lt;/p&gt;
&lt;p&gt;Life is a bit on the lame side at the moment. At least 2 of the three members of my household have been ill for the past month an a half. Work wise I&#039;ve been sat on the same low priority but critical work for the last 3 months - not really going anywhere fast. No code involved at work and no energy to code at home. &lt;/p&gt;
&lt;p&gt;Haven&#039;t been out in a while, no pub, no trips, not much fun. Don&#039;t have time to play games even though I&#039;ve had Wii Paper Mario sat on the shelf for the past month. Christmas is coming and I can&#039;t begin to get excited. This time last year we were preparing to come home which could have been the worst mistake we&#039;ve made. Coming back was great from a family perspective but pretty much everything else has been a bit of a read through.&lt;/p&gt;
&lt;p&gt;What&#039;s more the idiocy of the world at large is begining to annoy me again. Road users - why oh why - just because something is legal doesn&#039;t mean it&#039;s sensible. Just because something is temporary doesn&#039;t mean it&#039;s automatically ok. No, there arn&#039;t double yellow lines - but parking there will still block the road. Bike users - weaving in and out of traffic is legal, but if it&#039;s cold, wet and early it&#039;s still dangerous as hell. And as to the woman that parked on the roundabout so she could &quot;just pop in&quot; to McDonalds to get her breakfast - I mean seriously, what sort of brain dead moran are you?&lt;/p&gt;
&lt;p&gt;Recieved a phone at work yesterday. This might not seem like a big deal worth blogging about but consider that I&#039;ve been working for a telecommunications company for 3 years and this is the first time I&#039;ve had a phone on my deak. It&#039;s pretty big news. Now, if it only actually worked it&#039;d almost be a positive aspect of my day.&lt;/p&gt;
&lt;p&gt;Meg is still coughing alot, she can&#039;t shake this bleady cold any more than anyone of us. However, she is still giggling and trying to walk and falling on her butt alot. Some how she&#039;s really into drawing now - she&#039;s just over 1, so it seems a bit bizarre - but she loves her crayons that she now takes everywhere with her in a little red handbag. There has to be a game concept in there somewhere.&lt;/p&gt;
&lt;p&gt;Talking of which, I&#039;ve decided to write 4 games in parrallel, the logic being that even if I give up one or two I should still get futher with some. So, the run down seems to be two that have been around for a while, Scorched Turf and Mootox and two new ones currently called Samson and Dumb Bots. Should I ever make it back to the computer at home I&#039;ll be pushing on with the golf game first since it&#039;s core engine is shared between all 4.&lt;/p&gt;
&lt;p&gt;Finally, I&#039;ve blogged again. Almost feels like normal if a bit random and tangenty. Anyone know of anything gamedev related in the Cardiff area let me know, I need to get motivated again!&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/31">BabyBlog</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/6">Code</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/17">Games</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/7">Life</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/39">Random</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/8">Rants</category>
 <pubDate>Thu, 29 Nov 2007 08:29:25 +0000</pubDate>
</item>
<item>
 <title>10 Bits of Feedback for Google&#039;s Android SDK - Slick and First Impressions</title>
 <link>http://www.cokeandcode.com/node/1123</link>
 <description>&lt;p&gt;Google recently released a new &lt;a href=&quot;http://code.google.com/android/&quot;&gt;SDK&lt;/a&gt; to develop on a new mobile platform called &lt;a href=&quot;http://www.openhandsetalliance.com/android_overview.html&quot;&gt;Android&lt;/a&gt;. It appears to be essentially a new &quot;standard&quot; backed by some huge players and produced by the ever-so-MS-like Google. So, now that the antibiotics have kicked in I&#039;ve been fiddling with the SDK and the emulator. To not pass comment before you&#039;ve tried it, I&#039;ve ported a large chunk of the renderer for Slick onto it, enough so that I can render SVG using the Slick renderer into the handset emulator:&lt;br /&gt;
&lt;center&gt;&lt;img src=&quot;http://slick.cokeandcode.com/images/slickdroid1.png&quot;/&gt;&lt;/center&gt;&lt;br /&gt;
So, it works. Thats a good start... good things:&lt;OL&gt;&lt;br /&gt;
&lt;LI&gt;Eclipse integration - thumbs up. It&#039;s simple and quick to get going when you&#039;re a normal Eclipse user.&lt;/LI&gt;&lt;LI&gt;OpenGL ES is part of the platform - double thumbs up. Open and well known APIs for rendering. Yes Android provides yet another custom graphics context but portability wise, I&#039;d rather stick with something nice and common.&lt;/LI&gt;&lt;LI&gt;Most of the Java SDK is there. No more of this mobile = no API stuff. So far I haven&#039;t had to recode anything due to missing classes or features (though I have had to recode, see later)&lt;/LI&gt;&lt;LI&gt;The provided Emulator is pretty and seems to be running a real implementation underneath. Thats a step over past emulators for mobiles that were just best effort wrappers. Hopefully this will cut down on the &quot;but it worked on the emulator&quot; syndrome&lt;/LI&gt;&lt;LI&gt;Money - $10 million has been put out there to try and stimulate developers. Thats a good step, even if all the best programmers code for free ;). It&#039;s what we&#039;d call over here &lt;i&gt;Putting your money where your mouth is&lt;/I&gt;&lt;/LI&gt;&lt;/OL&gt;Ok, too positive for Kev I think. Time for the bad points:&lt;OL&gt;&lt;br /&gt;
&lt;LI&gt;The Emulator - ok I know I said this was good above but actually using the thing and integrating with IDE is appalling. Sometimes the package gets to the emulator, some times it doesn&#039;t. When it gets there sometimes it&#039;s activated, some times it just fails. This isn&#039;t due to changes, this can be the same distro every time. Get used to typing &quot;adb kill-server&quot; alot.&lt;/LI&gt;&lt;LI&gt;The JDK implementation - well, they broke a few things by not matching the API. Most notably for me the DOM implementation, just something as simple as returning null instead of the empty string for unset attributes can break anything that used the contracted as stated... lots of recoding here&lt;/LI&gt;&lt;LI&gt;The Eclipse plugin doesn&#039;t grok project dependencies - this is absolute killer for work flow. You can&#039;t keep projects separate but joined, constantly having to build a JAR of the dependencies sucks for rapid development. The packaging process also can&#039;t handle there being more than one version of a class in the classpath - that&#039;d going to get really interesting when integrating with version-ed libraries.&lt;/LI&gt;&lt;LI&gt;Resource handling under Android blows heartily. In Java it&#039;s extremely common to use the class path to reference resources that your code makes use of, be they SQL scripts or game sprites. In fact, large chunks of the JDK are dependent on this very feature. In the land of Android all the classes are baked down into this .DEX file - which is used on the platform. This doesn&#039;t account for non-class files placed in the class path so you need some other method. Ideally it would have been something simple, like the resources got packed into a zip file along side the DEX which could be accessed in the normal manner - but oh no, lets go back to the dark ages. It&#039;s like working with flipping Flash or MSDEV. Every resources gets an ID - like it didn&#039;t have one before - these resources have to be a specific directory. The proper way to access these resources is using a constants class which is created by reading the directory by the IDE. Ick Ick Ick Ick! I&#039;ll probably just code round this one, but it&#039;s really a misunderstanding of java practice&lt;/LI&gt;&lt;LI&gt;Performance advice - is given along with the SDK. It essentially says employ all the J2ME hacks you always have. Is this really a step forward or just an extension of the existing API? While and API extension would be welcome, it&#039;d be a lot nicer to see those nasty little hacks disappearing&lt;/LI&gt;&lt;br /&gt;
&lt;/OL&gt;All in all, it&#039;s looking pretty good, especially for a first release. I&#039;m sure at least some of the negatives above are listed on FAQ and readmes some where - but heh, who reads them? The did do one thing very right, very stylish logo:&lt;br /&gt;
&lt;center&gt;&lt;img src=&quot;http://www.openhandsetalliance.com/images/android_robot.gif&quot;&gt;&lt;/img&gt;&lt;/center&gt;&lt;br /&gt;
&lt;br&gt;Hopefully, assuming these tablets work, I&#039;ll get some more time to work with the beast and we&#039;ll see how it goes.&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;hr width=&quot;50%&quot;/&gt;Wow I got dugg, why don&#039;t you &lt;a href=&quot;http://digg.com/submit?phase=2&amp;amp;url=http://www.cokeandcode.com/node/1123&quot;&gt;Digg It&lt;/a&gt;&lt;br /&gt;
&lt;hr width=&quot;50%&quot;/&gt;&lt;/center&gt;&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/6">Code</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <pubDate>Sun, 18 Nov 2007 14:39:59 +0000</pubDate>
</item>
<item>
 <title>I CAN HAS MAC?</title>
 <link>http://www.cokeandcode.com/node/1114</link>
 <description>&lt;p&gt;I have an early christmas present, I am now a member of the OSX generation and the proud owner of a old skool Mac Mini. It&#039;s going to be used as a server for some other bits of hardware and for testing my games against (yay, Mac compatibility here I come!). &lt;/p&gt;
&lt;p&gt;So far, so good. It&#039;s not the quickest machine in the world, it&#039;s only an old G4, but everything seems to respond pretty well and the install was pretty painless (apart from irritations with the wireless keyboard and mouse not syncing). &lt;/p&gt;
&lt;p&gt;Its going to take some getting used to though, most of the apps and configuration is where I&#039;d expect but the whole framework for applications - the single menu bar, the visibility of running tasks is generally confused me at the moment.&lt;/p&gt;
&lt;p&gt;On the bright side I&#039;ve tested a couple of games against it and both play fine (albeit with a known bug showing up in one of them). &lt;/p&gt;
&lt;p&gt;I&#039;ll report back as and when I find something good or bad about the box. So far, it&#039;s fine but no better or worse than any other system - well, with a little extra visual candy :)&lt;/p&gt;
&lt;p&gt;Blogging from MacMini, test 1 complete!&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/7">Life</category>
 <pubDate>Sat, 03 Nov 2007 21:42:56 +0000</pubDate>
</item>
<item>
 <title>Mighty Morphin Power Diagrams</title>
 <link>http://www.cokeandcode.com/node/1113</link>
 <description>&lt;p&gt;Was talking to Dan yesterday about possible ways of getting that &quot;Another World&quot; look without doing any real physics - morphing shapes seems to be the order the day. So, a few hours these evening and I have morphing shapes. An hour or so afterwards, I have morphing from one SVG diagram to another (assuming IDs and point indexs stay the same - morphing!).&lt;/p&gt;
&lt;p&gt;So, with my limited artist skill I take this:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.cokeandcode.com/images/walkcycle03.jpg&quot;&gt;&lt;/p&gt;
&lt;p&gt;And build a few SVG, morph then in Slick and get:&lt;/p&gt;
&lt;p&gt;&lt;object width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/OYTh3E2AaKY&amp;amp;rel=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/OYTh3E2AaKY&amp;amp;rel=1&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/6">Code</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <pubDate>Wed, 24 Oct 2007 22:11:49 +0000</pubDate>
</item>
<item>
 <title>Game Match Maker</title>
 <link>http://www.cokeandcode.com/node/1082</link>
 <description>&lt;p&gt;If you&#039;ve ever played a session based multiplayer game (CounterStrike, QuakeWorld etc), then you&#039;ve probably used a game match maker. In essence it&#039;s a way of registering a session being provided by a client so that other clients can find it and connect. Normally you&#039;re presented with a list of regsitered games which you can click on, starting the game in that session.&lt;/p&gt;
&lt;p&gt;This basic register/connect functionality is generally extended with a &quot;lobby&quot; chat that allows the potential players to talk and discuss which session to join etc. &lt;/p&gt;
&lt;p&gt;These basic features make networking gaming much more approachable for a new user, removing the need to pass IP addresses around etc. However, it comes at a cost for the developer. &lt;/p&gt;
&lt;p&gt;Imageine you&#039;re in the situation, I am currently. My game is intended to be played peer2peer - i.e. no central server (though one of the players becomes the server). This is great, I can make the game available and I have to provide no resources (i.e. no central server, or central server process) to support players. Now I need to make the game easy to setup, I need a matchmaker. Damn, now I need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A central, reliable server&lt;/li&gt;
&lt;li&gt;An account that lets me run my match maker server process&lt;/li&gt;
&lt;li&gt;Server code to support chat and match maker functionality&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The third requirement there seems trivial until you realise the expectations spoilt users have from chat. If the common chat features (PMs, /me, etc) arn&#039;t present you&#039;ll soon hear about it.&lt;/p&gt;
&lt;p&gt;All three points make it costly and potentially risky to provide this sort of service. So, is there a way round it, well there&#039;s &quot;a&quot; solution that might help:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.cokeandcode.com/images/ircmm.png&quot;&gt;&lt;/p&gt;
&lt;p&gt;The game client talks to a light client side API that makes the services behind look like a normal Java based match maker service. The API lets you do simple things like &quot;register&quot; and &quot;list&quot; games from the match maker. It also abstract away the chat into the very basics.&lt;/p&gt;
&lt;p&gt;Behind this API you setup two components - both of which are off the shelf and cheap as the proverbial potato product. &lt;/p&gt;
&lt;p&gt;Why write a chat server when IRC already exists? You can either use a custom channel on a public or set up a private IRCd. Using a public channel has it&#039;s downfall with other IRC users having the potential to intefere with your lobby, but this could be secured out with private channels. Private IRCd is more work and more cost, but at least you&#039;re not having to write and maintain the chat server.&lt;/p&gt;
&lt;p&gt;The second component provides the match maker itself. A set of PHP scripts provide a web interface into the match maker database. The client API uses HTTP to access the PHP, which can of course be hosted on any cheap space you can your hands on. Since the scripts will only register games against the source IP of the http request it&#039;s also pretty secure - neat? The only downside here is that games don&#039;t by default timeout, the first person to connect to game that has shutdown detects the fault, and the game is removed from registration. This could be automated with something as complicated as a cron job (see drupal ;))&lt;/p&gt;
&lt;p&gt;Anyway, I think it&#039;s a neat and cheap solution. Now if I can only get Endolf to make the match maker code available as a package we won&#039;t have to write it again and again :)&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/6">Code</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/17">Games</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <pubDate>Tue, 18 Sep 2007 11:59:33 +0000</pubDate>
</item>
<item>
 <title>Time for a change...</title>
 <link>http://www.cokeandcode.com/node/1081</link>
 <description>&lt;p&gt;Considering a change of look for Coke and Code. Maybe just a new theme for drupal, but I think I&#039;d like something more subtle.. with shades of greys and pale pinks. I think. When am I going to find time?&lt;/p&gt;
&lt;p&gt;Maybe after writing the new tutorials heh?&lt;/p&gt;
</description>
 <category domain="http://www.cokeandcode.com/taxonomy/term/10">Geek</category>
 <category domain="http://www.cokeandcode.com/taxonomy/term/7">Life</category>
 <pubDate>Tue, 18 Sep 2007 11:46:33 +0000</pubDate>
</item>
</channel>
</rss>
