# Saturday, 12 March 2011

Microsoft's XNA is a game development framework which allow the creation of games for various platforms through the use of Managed .Net code. What I found extremely nifty while I was doing some research was that once I had a simple app running on Windows Phone 7. (emulator only since I've run into a little snag trying to obtain deployment credentials)


Since the app code is pretty simple, if I wanted to create a Windows desktop app all I needed was to select Create Copy Of Project For Windows and... Windows version of the same app!


Yes, I realize its because I have no UI code or anything platform specific, but I can't help but geek out a little by selecting Create Copy Of Project For XBOX 360 , added some code to control via the gamepad instead of the keyboard and...


As I've dabbled with DirectX previously in the past its very welcome to know that in XNA you get to worry about the important things like how to write your game then worry about detecting device context, getting exclusive access to hardware, etc. etc.

Hope I'll find more time to play with this.

You can try out the Windows version of the program here. Unfortunately, you need a pretty decent video card before you can run it.

Update – Figured out that there's a lower requirement Reach profile I can compile the program for, you can get it here.

You'll need to install the XNA Framework Runtime if you don't already have it by any other means.

Arrow keys to control the ship, Space to fire, Z to enagage DEATH BLOSSOM mode!

Saturday, 12 March 2011 01:48:31 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Thursday, 03 March 2011

From personal experience, and then what I gathered on the web. That question seem to be asked A LOT! The main issue here is that by default the WPF Listbox scrolls item by item due to control virtualizing, which means it only creates visual controls when needed. This is vital for good performance if you decide to bind a large item source to the listbox, say… a few hundred items?

Unfortunately without smooth scrolling, most people find the item based scrolling very sudden and jarring and overall a bad user experience. For me the effect was even worse on my project that was for a touch based application, item based scrolling just wouldn't work!

Turning off control virtualization was not an option because of the amount of data my project needed to handle.

So I did what I took a deep dive and starting reading up on how to create a layout panel, how does control virtualization work in wpf, how to support scrolling.

And I came up with this.

An ItemPanel that performs control virtualizing AND implements IScrollInfo. You can get the sample here. So now you too can have a listbox in WPF that supports smooth scrolling AND item virtualizing.

It wasn't too hard to make it actually, all the code was available around the net in separate places, I have no idea why no one had put this together before. Or maybe I wasn't looking hard enough?

Problems With The Code

  • The control was designed to work specifically with my project, you should read up on all the links I included in the SmoothVirtualizedPanel.vb file and understand how things work before wondering why it blows up.
  • There are parts of the code (particularly in dealing with the ItemGenerator) which I'm not sure how or why it works. So it might blow up in your face.
  • If you have no idea what an ItemPanel is, you really should read up on all the links I put on top of the source file before trying to do anything else.

This is pretty much research quality code, and hasn't gone through any optimization and proper error handling yet so copy and pasters beware.

Oh… did I mention the code is in Visual Basic? ;)

Thursday, 03 March 2011 03:38:11 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Sunday, 27 February 2011

For record keeping purpose, here's we go.


Don't think I'll be getting the full set though.

Sunday, 27 February 2011 21:49:31 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 

This here is my LG Optimus 7


With it's Gorilla glass protected screen, it would have been ok to just carry it around naked like this. But that was before WZ realized that games on the Optimus 7 is different from games on the iPod, and he would like to have some variety... So I knew I needed some sort of drop protection since it would only be a matter of time before he dropped it while playing for one reason or another.

I decided I would just go for a simple bumper case, tried searching around the local shops but as expected it's not exactly a mass market device here so I couldn't find anything. So I turned to PDAir and found this.


The Luxury Silicone Case!!! The main reason I choose this instead of the soft plastic case was that from experience, those soft plastic case usually made it VERY hard to press the buttons that are covered by the case. So I figured soft silicone would be easier, that and yeah... I really wanted to find out how LUXURIOUS it was. (Curiosity killed the wallet in this case)

The main difference I found between this and other silicone cases I've seen is the surface texture, yes... it's a silicone case with a SURFACE TEXTURE.


It's not just plain smooth like other silicone cases I've seen, feels like some non smoothed leather to me. So... feels like leather means luxury?

The case works as it should, as a soft dampening bumper in case of drops. The main problem when using cases like this is that you've put a frame on your screen and therefore reaching the edges might be a bit tricky. Luckily since it's a silicone case it can be pushed aside easily.

One problem that I do have with it is that, when my hands are dry, and the case is dry. It feels smooth and SLIPPERLY to the touch, does make me worry that it might slip off if my hands are too dry!

Still unsure about the luxury title though!

Sunday, 27 February 2011 00:19:25 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Saturday, 26 February 2011

There are things which no matter how cheap they are, you just don't tell you wife that you bought it, since you'll most likely get the "What the bloody hell were you thinking?!?!?!" speech. This would be one of those things


Yup.. it's a plunger, and yup.. I bought 3 of them


It's hard to think imagine their function is until you see them in use


Yup, these are very small plungers. Basically what you do with them is press them onto any smooth backed device (or something stuck with a suction cup helper I bought in Daisho) and then you can use it as a stand for said device.


Of course, a lot of factors come into play, the device must have a smooth back to allow for maximum suction (that phrase sounds a bit wrong out of context), it works only on a stable surface, and if the device is too heavy it'd probably just collapse onto the poor plunger.

Well.. it works for phones pretty well.


If I made you curious enough to want to buy one of these, you can get it at weird gadget dealer DealExtreme, bonus points if you looked at the packaging picture and went "Oh, that's suprisingly appropriate!"

Saturday, 26 February 2011 23:59:30 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  |