Code Hackery #2: Characters on a Texture

Alright so I said every week, but I really meant week-ish. To be honest, I’ve had some trouble actually finding some nice code to put for this post, so I’m going to more explain something I recently did with the Wurm client. I cannot post the actual code for NDA reasons, but I’ll give some examples. This week is a bit of easy code I whipped up for the Wurm client when I was working on replacing the old, notoriously slow text rendering code. I originally had the FontTexture object drawing all of the ASCII characters to a texture, and believed that would be enough (and in terms of performance, it would’ve been), but this also meant that any other characters that were previously supported – cyrillic, greek, etc – would either crash everything, or just show nothing.   In Wurm there are plenty of different people playing, plenty of … Continue reading

Code Hackery #1: Map Resize Dialog

In an effort to pump out more posts and make this website less of a dead-zone, I’m going to try and create a weekly post with a bit of code I have managed to hack together that works perfectly against all odds.   First up is this Map Resize Dialog I created for the WPlanner rewrite I completed a couple of weeks ago. For those that had used the old WPlanner build, the resize dialog was a bit empty. All it had were 4 spinners for each cardinal direction, and a label stating the new size. When I was rewriting it for the new version, I decided to bite the bullet and design it the way I wanted it originally (but couldn’t be f’d at the time to do) since I had Eclipse’s nifty new Swing GUI builder to use. The idea was pretty simple: each spinner (north, south, east … Continue reading