Thanks to the Hippoman topic, I decided to post this.
I've written a simple C# .NET library that uses Direct X and handles 2D sprites, TTF text and provides a simple interface for keyboard and mouse input. I have a couple test projects that use it and I can post some examples/more info here.
It could be a quick way to write up an 'ASCII' game (it's all bitmaps, of course). By default, it uses a 16x16 tileset that I got for DF and can render any of the tiles in any colour combination for foreground/background. PNG transparency is supported, of course.
So, I'd like to know if anyone would be interested in this?
I made it because I've been thinking of throwing together an adventure-style game with the library. It might be fun to collaborate, if someone wants to do that.
Why C#?C# uses C-style syntax, it provides very good performance, and it makes things
much easier when compared with C/C++. If you're new to programming, it will definitely be easier and faster to learn.
LimitationsTTF text is experimental and not very useful, at this stage.
Starting outStarting a project is very simple. Just start Visual Studio Express and click on the template to make a default application.
Important: It seems you'll have to locate the GroboLib.dll, manually. Right-click on references and select 'Add'. Then, Browse and locate the DLL in templates.Requirements:
DirectX Updateshttp://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=enVisual C# (Express)http://www.microsoft.com/express/vcsharp/.NET Framework (3.5)http://www.microsoft.com/downloads/details.aspx?FamilyId=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=enDownloadhttp://www.sendspace.com/file/6zcm9jInstallationUnzip the file into
My documents\Visual Studio 2008\Templates\ProjectTemplatesExample codeFor fun, here is some example code. Just create a project and add these files to it. The code demonstrates a little with classes and what-not. The player can be any creature.
http://www.sendspace.com/file/jtqv79Controls:
U - Add a human at the mouse pointer
D - Add a dwarf at the mouse pointer
G - Add a goblin at the mouse pointer
E - Add an elf at the mouse pointer
K - Kill (remove) the creature at the mouse pointer
Arrow keys move the player.
Mouse-over shows the creature name.
Screenshot
Demohttp://www.sendspace.com/file/59n7zqA binary demo game, similar to the above code but with a few changes:
X - Kill (remove) the creature at the mouse pointer
K - Add a kobold at the mouse pointer
C - Cut down tree at the mouse pointer
This version has a simple friend/enemy battle system. Certain races will attack others and defend others.