Programming, Xamarin

ListView improvements in Xamarin Forms

Since becoming open source, it has become possible to find out potential upcoming features in Xamarin Forms by just poking around the active branches in the repository (macOS support was visible in the repo before any announcement).

One of them is lv2spike.

From just reading the commit messages, it seems this is a new CollectionView, based on UICollectionView for iOS and RecyclerView for Android.

This is something that has been needed for a while, but is a big enough undertaking that I understand why it has taken a while. After all the branch suggests this is still just a spike.

There are quite a lot of feature requests for the Xamarin Forms ListView that are just not possible (like this one for horizontal layout) mainly because the iOS implementation is based on UITableView. This will open lots of possibilities. My biggest concern is that despite the push forward with features, Xamarin Forms is accruing bugs even faster, and with the expanded platform support this could just get worse…

Android, Entertainment, Games, Programming, Xamarin

Tic-tac-toe Collection open beta

For various reasons I decided to write a Tic Tac Toe game in Xamarin Forms.

At the moment it supports variable board sizes, variable win line size (so it implicitly supports Gomoku) and a few custom rules like misère, a pie rule and disallowed overlines. It currently functions on Android, iOS and Windows, but is only released on Android for now.

Apart from experimenting with various features of Xamarin Forms (as well as managing Nuget packages), my goal is to try and add all the options. Features I’m planning:

  • Ultimate Tic-tac-toe
  • Quantum Tic-tac-toe
  • 3D (and 4D) Tic-tac-toe
  • Online multiplayer
  • Order and chaos
  • Wild Tic-tac-toe

Download Tic-tac-toe Collection from the Google Play Store.

Programming, Xamarin

[SOLVED] Unable to cast object of type ‘Xamarin. Forms. Xaml. ElementNode’ to type ‘Xamarin. Forms. Xaml. ValueNode’.

When writing XAML for Xamarin Forms, you may across the error:

Unable to cast object of type 'Xamarin.Forms.Xaml.ElementNode' to type 'Xamarin.Forms.Xaml.ValueNode'

This is nearly always caused by assigning a value to an event in XAML, instead of specifying a method name.

A common example is:

<Switch Toggled="{Binding IsToggled}" />

Toggled is the name of an event. The property that was probably intended is called IsToggled.

<Switch IsToggled="{Binding IsToggled}" />

Computers, Entertainment, Games, Technology, Video Games

Overcooked – Fun Coop Multiplayer Action

I recently a recorded a bunch of videos of the game Overcooked on Xbox One.

Your goal is to assemble meals out of various ingredients, cook them, and serve them. Over time the meals get a bit more complicated and the levels get a lot more complicated. It is strongly designed to be played cooperatively with up to four people, and even supports two players on a single controller.

My only complaint would be the difficulty is based too much on complicated level design (and jumps up a bit too quickly). Some times the controls are not exactly tight and you can end up selecting the wrong thing – having levels with moving targets or slippery floors for instance just accentuates an otherwise minor problem. I would have preferred more meal variations (that are also more complicated) on simpler levels.

But despite all that it’s a fun party game that almost anyone can play. And of course it is made in Unity.

One final note. The first video in the playlist above was generated by Google Photos. It turned out well, except for its automatic cropping.

Entertainment, Games, Programming, Unity, Video Games

Visualizing Gravity

Unity has a pretty cool feature called “gizmos”, that are things rendered only in the scene view of the Unity editor. Many built in game object types render a gizmo of some sort, but you can freely add your own. This can be very useful for debugging.

This is a visualization of the gravity (more precisely it’s the low resolution grid of gravity mentioned in the previous post). The direction of the line is the direction of the gravity, and the length is the strength.