Wednesday, 4 August 2010

Gourmet Ranch



I cant believe I haven't talked about this yet.

I spoke about 6 months ago about joining a new startup called Playdemic as the Lead Flash Developer. I couldn't say much at the time as we were in stealth mode. As our first product has been out for about a month however, I think its about time I wrote a blog post on the subject.

Gourmet Ranch is Flash game for face book that follows closely on the heels of the other Facebook game successes such as Farmville and Cafeworld. The premise is simple, you grow crops and animals in your fields and then when the time comes you harvest them and use them to bake recipes. Those recipes are then served to your waiting customers by your waiters.

As the lead flash dev on the project its my responsibility to code all the engine and game play elements. Despite my several years worth of experience with flash games this was a challenging project . Making a game that is a multiplayer game but not a multiplayer game (no client pushing) is definately not for the feint of heart.

Despite the challenges and the occasional heated moment during development I think the product we have produced is excellent and is superior to many of the similar games available on Facebook. The stats for the first month of the game are impressive as can be seen from the data gleamed from AppData.



The main challenge now is to continue the early growth we have seen and retain the existing users we have won. So that means players of the game should be looking forward to regular updates with new content and bug fixing :)

Anyways if you wanna check it out head over to facebook --> http://apps.facebook.com/gourmetranch/


Monday, 2 August 2010

Flex 4 Spark & Rollover Group Containing Rect

Was working on my top-secret Flex-based project over the weekend when I discovered something I hadn't come across before.

The issue is that when you have a Spark Rect GraphicsElement within a Spark Group it seems that the rollover event of the group is triggered even though the mouse doesn't roll over the Rect.

Here is a video I made to explain my issue on Twitter:



The code in the video is as follows:

[codesyntax lang="mxml"]
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">

<s:Group rollOver="trace('ya')">
<s:Rect x="100" y="100" width="20" height="20">
<s:fill>
<s:SolidColor color="0x00ff00" />
</s:fill>
</s:Rect>
</s:Group>

</s:WindowedApplication>

[/codesyntax]

It turns out (after posting the issue on the Adobe Forums) that I was simply missing the "mouseEnabledWhereTransparent" property on the Group. Setting it to false causes the mouse to perform a hit-test rather than a simple bounds check. Thank you Mr Shongrunden for pointing this out to me :)

So this now works:

[codesyntax lang="php"]
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">

<s:Group rollOver="trace('ya')" mouseEnabledWhereTransparent="false">
<s:Rect x="100" y="100" width="20" height="20">
<s:fill>
<s:SolidColor color="0x00ff00" />
</s:fill>
</s:Rect>
</s:Group>

</s:WindowedApplication>

[/codesyntax]

I hope this helps someone else out!