[4E4] Random-tiled Maps

Published June 14, 2005
Advertisement
Well, looks like my maps are working. Still need to write a map loader for them, though. I also found some other old tree sprites, so I threw them in there too.



There's a problem right now drawing the surfaces to the screen: its giving me a horrid framerate (~50 fps). I'm pretty sure I'm not converting the surfaces to the same format as the main screen surface, so SDL does it every pass. Which is a "NOES!"

Back to work.
Next Entry Untitled
0 likes 9 comments

Comments

Stompy9999
You should take your screenshots in PNG format, they look better.
June 14, 2005 02:23 PM
Mushu
I'm too lazy to convert them. Oh, and I rewrote the surface loading code; now it converts the surface format to the native format, and forces them into hardware memory. Rendering a map screen and 100+ objects gives me 70 fps. Sweeeet.
June 14, 2005 02:25 PM
Jesse Chounard
Is that 70fps capped at the vertical refresh rate, because I'd expect you could do alot better.

Are you using the built in alpha blending? Software alpha is really slow.
June 14, 2005 03:10 PM
JTippetts
Looking pretty good Mushu. 2D games > *. This is not something that is open to discussion. [grin]
June 14, 2005 03:14 PM
Mushu
Jesse: no, its not capped (sadly). SDL uses RLE (Run-Length Encoding) to optimize alpha functions, and I enable it wherever possible. In all honesty, it would probably be just as slow to manually do alpha operations since I'd be doing them on system RAM too :(

SDL wasn't really made for speed, rather, portability and ease of use. That said, I'm not expecting to have 100+ units on screen very often simply because the gameplay focuses a lot more on strategy than mass numbers*. But yeah, my final product target is 30+fps on my low-end machine. Considering all the loss of speed is caused by the inefficency of the gfx API, I'm not too worried about it.

I'll run a profiler on the code if things get really bogged down by something or another. Yay optimization.

VertexNormal: Yase! [grin]

* uhh... except for zombies. Zombies pretty much just hoarde rush you + eat your brains + hoarde rush next guy...
June 14, 2005 04:14 PM
Muhammad Haggag
Mushu, this is looking very nice. Really, I love it. Keep up the good work - I'd love to play your game someday [smile]
June 14, 2005 06:12 PM
Mushu
Emphasis on the someday. Turns out I had to rewritefuktor all my file handling classes because they were coded like crap.

Right now I'm procrastinating on writing a parser for the map loader. Ugh, I hate parsing. And I've got a tummy ache :(

Its only 20h00. I'll probably get it done tonight ish.
June 14, 2005 07:12 PM
Washu
Hey, didn't you write a VB game where I was the last boss?
June 15, 2005 01:32 AM
Rob Loach
More treezorz!
June 15, 2005 06:02 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Untitled

5336 views

Untitled

1046 views

Untitled

1189 views

Untitled

1103 views

Untitled

1148 views

Untitled

1433 views

Untitled

1101 views

Untitled

1003 views

Untitled

1007 views

Untitled

1186 views
Advertisement