Richard's Blog

  • Tabbed Page in Xamarin Forms XAML

    The TabbedPage page is a bit like a navigation page in that it is a collection of other pages. However instead of a navigation bar you are shown a collection of tabs. Each tab has a title and may have an icon. Create a new content page using File > Add new, and then change the XAML to this (making sure your x:Class and xmlns:local are correct for your project) and also change the base class in the code behind to TabbedPage:

    <!--?xml version="1.0" encoding="UTF-8"?-->

    <TabbedPage

    xmlns="http://xamarin.com/schemas/2014/forms"

    xmlns:x="http://schemas.microsoft.com/winfx/2009/ …

  • Navigation Page in Xamarin Forms XAML

    A NavigationPage makes it very easy to create a browser like navigation stack of pages with a back button. It is a container for your pages so the XAML to for your ContentPage doesn't change, but when the app starts and you first create the page you put it inside a NavigationPage like this:

    public static Page GetMainPage()

    {

    return new NavigationPage(MyPage());

    }

    Now we have a navigation page, you'll need a new page to navigate too, so create a new page and then on your first page add a button like this:

    <Button Text="Press me" Clicked="OnClicked"/>

    You'll then need to add an event …

  • Content Page in Xamarin Forms XAML

    The simplest of the Xamarin Page controls is the ContentPage. There is a template for this in Xamarin Studio so you can use the Add > New File... option. Here is the XAML so you can see a ContentPage along with a placeholder BoxView control so there is some content to see.

    <!--?xml version="1.0" encoding="UTF-8"?-->

    <contentpage

    xmlns="http://xamarin.com/schemas/2014/forms"

    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"

    x:class="NogginXamarinFormSample.MyPage"

    title="A Content Page">

    <boxview color="Silver" />

    </contentpage>

    To show …

  • Simple Blender Editing Commands

    Dalek drawn in Blender

    Blender is as amazing as it is overwhelming. To be fully productive in this 3D modelling tool you need to know a lot of different keyboard shortcuts. Here are the keyboard shortcuts that I have found particularly helpful when viewing and editing an existing model in edit mode:

    Selection

    A - Select all / none

    Pressing A will select all objects if nothing is selected, or will deselect everything if anything is selected.

    B - Box selection

    To select all elements in a sqaure region, press B. Then press the right mouse buttton, hold, drag and then release to select the region.

    Ctrl L - Select …

  • Finding the best Windows 8 Apps

    There is a media war raging between the various app stores about how many apps there are, but to turn this on its head, as Richard Cambell off of .NET Rocks said 'Over 100K apps in the Windows Store is a disaster'. No one needs that many apps and how are you supposed to find the ones you need. Also, a lot of them are rubbish.

    I often find myself asking what's the best x app for Windows 8 such as "what's the best eBook reader for Windows 8", or "what's the best RSS reader for Windows 8". It was to help answer these questions that I created the site Appy Ninja. It also seemed like a good excuse …

  • Dizzy Dalek at NDC 2014

    The video of my talk on MonoGame and 3D (featuring a dizzy dalek) is now live on Vimeo:

    You can find the demo code on GitHub.

    Other NDC Game Development Related talks

    If you enjoyed this talk, you may also enjoy:

    Cross-platform physics-based gaming using MonoGame and Farseer

    Game and Simulator Physics for Developers, Gamers and Petrol Heads

    Porting Quake III to F#: A Journey to Functional Programming

  • Game development talks at NDC 2014

    It's less than a week to go till NDC 2014. I've been going through the talks for ones I want to see and already found so many great ones that there is no chance I will get to see them all, particularly as some of them are on at the same time.

    As I'm talking about game development and the other talks on this subject also look excellent here are the talks I will definitely not miss:

    Game and Simulator Physics for Developers, Gamers and Petrol Heads – Alan SmithWednesday 17:40 - 18:40

    Cross-platform physics-based gaming using MonoGame and Farseer – Rune Andreas GrimstadThursday 13:40 - 14:40 …

  • Tower Blocks March Report

    So, I'm 3 months in and Tower Blocks has not yet become an Internet sensation. Also, I've been really busy with client projects and found it really hard to find the time to focus on Tower Blocks. This must be the dip I've heard so much about and experienced on most projects I've ever worked on. I've still got lots of ideas for this project, but I've also got new project ideas and it's very tempting to abandon this one and move on to new green pastures.

    In March the iOS version of Tower Blocks went live, but I didn't have enough time to get the problems I've got with the Windows Phone 8 …

  • Putting iAds in a MonoGame game

    Here is the code you need to add to Main.cs in you game to get iAds working. You don't need to add any unique IDs. The iAd SDK is able to work out what you app is by magic. Everything will work fine as long as your app is registered for iAds in iTunes Connect.

    I call the method SetupAdvert at the end of FinishedLaunching in Main.cs:

    private object _adBannerView;

    private bool _advertPausedGame;

    private void SetupAdvert()

    {

    int width, height;

    var view = (game.Services.GetService(typeof(UIViewController)) as UIViewController).View;

    if (view.Bounds.Width <= 320)

    { …

  • The Monument Valley Gap

    There's a great quote by Ira Glass, captured nicely in this video. The quote is about learning to writing stories, but I'm going to apply it to creating games. It talks about the gap between your skill to produce something and your taste to recognise something truely special. Sometimes the gap is so painful to see that you want to quit, but all great creative people making interesting stuff have stuck with it through the gap till their skills caught up.

    Monument Valley for iOS recently came out and I was reminded of the gap between my taste in games and my current ability.

    If you haven't …