Google Nexus S Twitter Puzzle Solutions

December 8, 2010

Google has recently launched a new campaign of posting puzzles on it’s twitter page. I am a big fan of puzzles and although I have turned up late to these first two puzzles I am going to document the solutions I got for them. Positing the first correct answer for the Nexus S campaign will win you… you guessed it – a Nexus S!

To begin with you need to go to:

http://twitter.com/googlenexus

to know what I’m talking about!

(more…)

4

Facebook fb:multifriendselector in iFrame

August 19, 2010

Just a quick post to try and help people who are having trouble with the Facebook multi-friend-selector in an Iframe. It took my ages to figure out how to get it not be cut off using the new Javascript SDK.

As you know you need to use the fb:serverFbml tag in order to display an fb:multifriendselector on your page, but the facebook developers documentation is misleading as to how to set the width of the fb:serverFbml frame.

The Facebook developer documentation says to display it like so:

<fb:serverFbml style="width: 755px;">  
     <script type="text/fbml">
        <fb:fbml>
            <fb:request-form
                action="<URL for post invite action, see fb:request-form docs for details>"
                method="POST"
                invite="true"
                type="XFBML"
                content="This is a test invitation from XFBML test app
                <fb:req-choice url="see fb:req-choice docs for details."
                    label="Ignore the Facebook test app!" />
             ">
             </fb:request-form>
                <fb:multi-friend-selector
                    showborder="false"
                    actiontext="Invite your friends to use Facebook." />
         </fb:fbml>
    </script>
</fb:serverFbml>

The key mistake is in the line

 <fb:serverFbml style="width: 755px;">

Browsers seems to ignore the style attribute completely! Instead you need to use:

<fb:serverFbml width= "755">

This works correctly and causes the popup that is displayed when you click “Send Invitation” to display WITHIN the frame.

Hope this helps someone else! Any queries just ask in the comments and I will clarify/add to this post

8

Collision Textures and 2DRenderTargets in XNA

December 28, 2008

I started making a Tower Defense Game which I will be sharing soon, including all my trials and tribulations and the theory behind it. Whilst making it I came across an interesting problem, which was how to tell whether or not the user could place the tower where they currently have the cursor. I thought about it for a while and then decided that the best method would be a sort of collision texture whereby you have a texture ‘underneath’ the main texture which outlines the areas where a tower can and cannot be placed (thought this texture is never actually rendered).

(more…)

4