When Hello World is one hundred lines long

So I thought I'd mess around a bit in Playstation Mobile to get familiar with it. I hit up some tutorials and stuff, and thought maybe I could program something really simple. Just a bunch of text on screen or something, like is standard. Easy, right?

... Well, the tutorial was outdated, and trying to adapt its code to my program just wasn't working out. So, I looked at some of the sample code that came with the PSM install.

Now, in XNA, you can do this in like, ten lines of code. Declare and initialize your SpriteBatch when your program loads its content, then do a Begin/DrawText/End sequence in your render function and you're good to go. Done. That's it.

Well, as much as it sucks, PSM doesn't come with anything as convenient for drawing text on a screen like SpriteBatch... or at least, even if it does, it's nowhere in the samples. What it does come with, is a Font and Image class, where you can programatically define a font and draw text to an image with that font. It comes with Texture2D, which can set its own pixels to that of an image you have sitting around.

But beyond this, you're messing with the vertex buffer directly, and what's more, you gotta code your own shader from scratch! Not that the shader part is very hard (both your vertex and fragment shaders total three lines barring function declarations), but it sure is tedious declaring your own vertices for your quad and slipping them into the vertex buffer yourself. And while MSN will conveniently handle projection and view matrices for you with SpriteBatch, in PSM you gotta set those yourself.

Which means that I spent a few hours digging through sample code to figure out what function calls made all this work, and in what order they had to be done... then my simple text displaying program ended up being a hundred lines long.

Well, I suppose just writing text on a screen is a little harder when you don't have a console window, but 3D space. I think I'll have to make my own library for simple things like this to make things easier on me.