zomgistania

Main page | About | Articles | Previous Posts | Archives

Thursday, June 29, 2006

Flashy

I've been tinkering with Flash 8 a bit. I made a tank which moves around with the arrow keys and the turret follows the mouse cursor. Yes, I know the turret rotates wrong if you turn the tank.

ActionScript seems like a rather easy to learn language. I doubt I will start making anything "serious" with Flash, but I might have to code some ActionScript for a project soon so I thought I'd practice.



Regarding the game project, I've been pretty stuck. I've been browsing through the code but haven't written any. There's just something... wrong... in it. I think it's the batching thing. It's not as flexible as I'd want it to be, at least not at the moment. I think I'll have to make the changes to it which I was talking about here.

And I still hate the text drawing method. It's just so crap compared to how it works in winforms.

How it works now is that you pass a size, font, text and colors to a CustomText Control, which in turn creates a texture with the text and coloring and you can then place the CustomText control wherever you want to show the text at... the problem is that the text quality is so horrible. I want crisp fonts!
Adjusting the size and stuff takes quite much effort now.. it can be done this way too but meh... it's troublesome.

I know you could probably do something like bitmap fonts, but I find it clumsy.
Another method would be saving the whole block of text into a pre-made texture and using that, which would work fine for static text, but what if you want to make a list of... let's say, maps. That list can obviously change so you'd need to make a texture for the map text... not good.



Well in any case, I'll have to do something about the rendering. Also the z order stuff is troubling... I added z order sorting to the pipeline, but that doesn't work very well as things with the same z order may get a different rendering order which then may cause flickering.

This is one of the things what is wrong with the rendering. Previously I could just stuff things to it and render away and they would appear in correct order because the quad vertices were ordered properly. Now if I separated the pipelinebuffers so that the maps would have it's own and the objects and the GUI and they could each be rendered separately.. then I'd get rid of the z order prob too. First render the map, then the objects and then the gui. Problem solved. Of course there's also the issue of using the vertices Z position and the z buffer but that would make them appear wrong because I'm not using ortogonal projection.


Whatever. Maybe I'll get something done when I get bored with Sim City =)
And here's the link for today..
Here are some good MDX tutorials, including a pretty extensive ones about GUI.

0 Comments:

Post a Comment

<< Home