Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    422070

Untitled

Sign in to follow this  

67 views

Long time no update... Not a lot to report really.

I've just finished getting word wrap and text alignment working in my engine. Pointless screenshot time:
Woo, text alignment!
(Click to enlarge)

Thing really fancy going on there, for example the text in the middle is created as so:

pText = new EText(pFont, L"Middle aligned text\nboth horizontally\nand vertically",
FloatRect(0, 0, (float)s_nWidth, (float)s_nHeight), EText::ALIGN_Middle, EText::VALIGN_Middle);
pText->SetColour(EColour(255, 128, 0));
ESceneMgr::Get().Add(pText);



The sharper among you might have noticed that the FPS is pretty shitty. I've yet to find out what's going on there - if I get rid of all the text apart from the stats text in the upper left, I gain another 30 FPS or so in debug builds, and pretty much nothing in release builds. So it looks like my STL stuff is slowing me down in debug builds.

Nothing much else to report really. I need to give text a priority level, so I can Z-sort properly - Currently each letter is its own sprite, and the Z order is determined by the order the sprite is in the sprite manager. If I want to do GUI stuff, I'm definitely going to need Z-order stuff.


That's it on the hobby project stuff really. I got to set up a Wii devkit at work today, so I'll hopefully get to tinker with that tomorrow. I spent nearly an hour trying to get it to work before I realised I hadn't plugged it in. It's got 3 USB cables and one serial cable that need plugged in. Plus power cable, IR cable and TV out. So it's a bit like a big black box with wires sticking out of it really.
On the plus side, my desk looks awesome now - a Wii devkit, 2 DS devkits, 2 monitors and a TV all on the same desk that's about 2m wide. I'll take a picture tomorrow maybe.

I have the dentist on Friday (I'm getting a filling, although I still don't think I need one - I'm one of these people who'll put it off till it actually starts to hurt) so I'm off work. Then watching the rugby and getting drunk on Saturday. Fun times.

And now I'm off to read the Wii programming manuals, since I've just spent the past 3 hours synching to my work's source control via VPN. Joy joy joy.
Sign in to follow this  


2 Comments


Recommended Comments

VC STL iterators are pretty slow in debug builds. It goes even worse if you use iter++ instead of ++iter.

Share this comment


Link to comment
Quote:
Original post by Demirug
VC STL iterators are pretty slow in debug builds. It goes even worse if you use iter++ instead of ++iter.
Yeah, most of my sprite code uses iterators all over the place. I always use ++iter though.

I also need to set some preprocessor define to remove secure CRT stuff in release mode, that apparently speeds it up. I almost want VC6's STL back - it optimised pretty well ISTR, since iterators just became pointers and suchlike.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now