views:

147

answers:

1

I've been toying with the idea of building a web-based Roguelike game using Silverlight (or maybe just a desktop game using WPF).

If you don't know what a Roguelike is, it's a type of graphical RPG where the graphics are rendered using text. Because the graphics engine is relatively simple, you get to spend your time building features into the game and it's possible for one person to quickly build something fun.

For instance, a typical screen might look something like this (the @ is the player, # is a wall, the other characters are things like monsters, stairs, and items):

I'm an experienced ASP.Net dev and I'm just getting started with Silverlight. Is there a particular approach I should take for this?

To provide some background, in Winforms, most standard approaches are too slow -- the text ends up updating with a visible, ugly blink. I'm thinking something to do with the Canvas might be appropriate, but even better would be to somehow draw a screen into a buffer and then instantly flip that onto the screen so that it becomes visible instantly.

But I don't really want to mess around with DirectX right now - I'm hoping WPF can get me to where I need to be without a big learning curve.

Any thoughts?

+1  A: 

WPF should be able to handle this, pretty easily.

Silverlight would probably work, but it doesn't have the same hardware acceleration that WPF provides, so the performance will be lower.

There are lots of options for actual implementation. You could use a canvas and render yourself. Alternatively, if you're getting update issues, a grid of canvases (only updating the ones as needed) might help the retained mode rendering system perform a bit better, but I doubt, with standard screen resolutions, you'd have any issues with this amount of text in WPF.

Reed Copsey