Monday, June 12, 2006

>A tightly packaged bundle of analogies. Pick up? (Y/N)

So I've offically selected Teeside as my Uni next year for a computer games programming masters.

Today I worked on a C# DirectX Form that's a basic tile engine. With only a DirectX enabled form (clearing a panel to a blue colour) I get around 60fps - though there do seem to be sudden dips now and again, not sure why...

I create a "naive tile render" which fills the panel up with around 750 tiles. Each tile renders itself, setting the stream, transforming the world, setting the texture and drawing it's own quad. It's still runs at 60fps.


public class Map
{
public void Render(Device device)
{
foreach(Tile t in tiles) t.Render(device);
}
}


Okay so I make it render the same thing 3 times each frame so around 2250 tiles, not unthinkable in a game with many different layers items and npcs. Frame rate goes down to about 15fps. So now I've got the base mark. I'll try to improve it by playing with batching. Also I'm running on a portable so speeds are never going to be blistering :D

That actually took nearly all my free time at school, I'm embarrased to say, I was having trouble getting the entire texture to render on the tile ... but then I realized I was putting it on upside down :D

The program also shows the "working memory" though I'm not quite sure what this specifically is. (I found this in System.Environment.WorkingMemory or something, I haven't looked it up yet.)

I also finished reading about Ultima Onlines resource system plans:
Part1
Part2
Part3

I found it interesting as I use to play UO. No recent mmorpgs interests me at all, they are just cooperative, single player style, games in a vast chat room. In UO the game and game goals were more emergent from interaction with the players, especially pre-trammel. One thing unique to UO in my eye was the stories it generated, players told each other story after story of happenings on messages boards, they made websites telling stories of things that happened to them. The modern morpgs are more "I did pre-set quest X", "We attacked guild Y, as per usual". They're more streamlined, plasticy.

2 comments:

Jani said...

If you're just getting max 60 FPS, maybe you have vbuffering on.

afaik it can be disabled either from the drivers settings or with some PresentParams values.


I used to play UO too. From the new mmorpgs, Anarchy Online. I think that was quite nice, although the user interface was difficult at first and things like that.

Was also in City of Heroes EU beta. That one was pretty cool I think, the fighting especially had much feel unlike most of the others where you just set your target and press attack and wait and maybe drink a potion or something.

Those UO articles look intresting. Nice find.

Anonymous said...

Ah thanks for pointing that out.

This was a problem of copy paste code and my ignorance of what DirectX really does :). I have a class called GraphicsCard which does some extremely basic DirectX setup stuff in EINFALL. So I thought I'd use that to get going. But EINFALLs suffering from tearing so I'd tried to prevent this by setting the presentation interval to one.

Mystery solved :D

I set it to immediate and a normal DX form now gives me about 200fps.