GPWiki.org
GPWiki.org
It is currently Fri May 24, 2013 4:31 pm

All times are UTC




Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Oct 03, 2011 11:10 pm 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
twobitcoder wrote:
Well, I had good results with GDI with a smooth scrolling layer and sprites over the top. There were reports of it running slowly on some PCs, because the scrolling algorithm was never optimized (book code...). I have meant to update that code but never got around to it yet. The slowdown occurs when the scroll buffer is copied to the back buffer without any logic--just does a complete draw every frame regardless of whether the player has moved or not. Very wasteful, but it was about function not speed at the time. With an optimization flag halting the large buffer copy until movement occurs, it would run probably 4-8x faster, and I was already seeing 100+ fps on my system (an old Core2Quad with a Geforce 8600). Never had any speed issues whatsoever with animation even with lots of sprites and GUIs on the screen. I wonder if GDI has a bad rap without anyone actually writing benchmark code, just a lot of yapping without any proof?

I think it's just the perception that GDI+ is not HW-accelerated (I know the old GDI wasn't, not sure about GDI+... maybe some cross-talk going on there?). As we all know, software that isn't accelerated by hardware is useless in *any* given context. :rolleyes

That said, I'm mainly going to be using GDI+ for tools and such (mainly since I am leaning more toward OpenGL, or XNA, for the actual game itself). I have no concerns about GDI+ being underpowered for that. And really, GDI+ isn't horribly inefficient -- it is fine for most applications and the kinds of games an actual lone-wolf/indie will actually be able to work on and complete.

(And for what it's worth, my initial comment was directed at GDI, not GDI+ -- maybe I took the original post too literally. Get your names straight, people!)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Mon Oct 03, 2011 11:25 pm 
Octogenarian

Joined: Thu Aug 04, 2011 12:00 am
Posts: 87
Location: Arizona
Jasmine wrote:
Quote:
I wonder if GDI has a bad rap without anyone actually writing benchmark code, just a lot of yapping without any proof?


I imagine it's a case of fast hardware compensating for slow code.

If you run your program on an older machine -- a Pentium3 for example -- then compare framerate results with what you know Pentium3s are capable of with DirectX.



That's a VERY good point, but who uses hardware like that today? So, sure, GDI sucks from the perspective of comparing it to DirectX, even the old DirectDraw, but who uses the old hardware anymore? And so, does that matter? No one would use GDI for a serious high-end game, but for small games? I found it charming to work with GDI after doing so much engine coding and shader rendering for so many years.. it was a real nice change.

_________________
Amazon Author Page
Game Dev Forum
Facebook Page


Top
 Profile  
 
PostPosted: Tue Oct 04, 2011 12:51 am 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
twobitcoder wrote:
Jasmine wrote:
Quote:
I wonder if GDI has a bad rap without anyone actually writing benchmark code, just a lot of yapping without any proof?


I imagine it's a case of fast hardware compensating for slow code.

If you run your program on an older machine -- a Pentium3 for example -- then compare framerate results with what you know Pentium3s are capable of with DirectX.



That's a VERY good point, but who uses hardware like that today? So, sure, GDI sucks from the perspective of comparing it to DirectX, even the old DirectDraw, but who uses the old hardware anymore? And so, does that matter? No one would use GDI for a serious high-end game, but for small games? I found it charming to work with GDI after doing so much engine coding and shader rendering for so many years.. it was a real nice change.

I think Jasmine's main concern has to do with software becoming so typically large-scale and resource-intensive that it's making hardware more obsolete, more quickly. I believe the rest has to do with which side of the progress-fence you're on. (Progress based on necessity, or progress for the sake of progress.)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Tue Oct 04, 2011 10:19 am 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
twobitcoder wrote:
That's a VERY good point, but who uses hardware like that today?

I have a pentium 3 (as well as something newer). I also have a laptop that has a PowerPC processor that's much like the Pentium3. Lots of people have netbooks which offer comparable performance to the P3. But that's not really the point: We can allow hardware to compensate for slow code to an extent, but take that too far and it becomes very unattractive.

It may just be because I'm technically minded, theoretical, and idealistic: So if a game looks to me like it should run on a 486, then I think it should run on a 486. Similarly, if a simple pong game is holding a Pentium3 at 90% cpu usage, then I would think a lot less of it. And a lot of indie games do actually feel like that!

Quote:
No one would use GDI for a serious high-end game, but for small games? I found it charming to work with GDI after doing so much engine coding and shader rendering for so many years.. it was a real nice change.


I've used GDI myself, and I can understand the pleasure in its simplicity. But it would be nice if GDI calls were as high performance and as versatile as those in directx. A user here Spodi made a generic RPG engine in visual basic that used GDI (vbgore), and it was quite an impressive feat! As time goes on, we'll no doubt see some more generic game engines made using GDI. It's a fun to do as an exercise, and it's a way for less experienced programmers to produce something nice. But as these games and engines become popular and get distributed, we have to start looking at the bigger picture, and ask "is this really what we want the future of software to be?"

The general trend being that software is made less efficiently over time, because hardware is accelerating in such a way that it's always able to compensate for code that's gotten a bit slower... and that's a slippery slope.

I love older software, because it's leaner and more efficient than most of the stuff that's turned out today. Almost all of the software on my computer happens to be >8 years old, and it's not that I'm being stubborn: I also use the Pazera suite, which is relatively new software, and was a gem to find. I like it because it is lean and efficient. As a customer, those are the qualities I look for. :)

_________________
I ain't pushing no moon buttons.


Top
 Profile  
 
PostPosted: Wed Oct 05, 2011 2:03 am 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3809
Location: Ferriday, LA, US
Jonathan, it looks like I got some waiting to do. Amazon is saying I won't receive the book until Oct. 12... (For the record, I ordered it Oct. 3, and paid for 3-5 day shipping... :x)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Wed Oct 05, 2011 4:27 pm 
Funky Monkey

Joined: Mon Aug 16, 2004 2:48 pm
Posts: 1604
Location: Minneapolis, MN USA
btw, I've written most of a GDI+ based graphics engine in VB.Net ... I read a lot of Bob Powell's GDI+ FAQ for help. While the rendering around image-drawing was a bit slow, it allowed for a lot of nice features like resizing and alpha-blending. It also is much easier to draw text and primatives (circles, rects, etc.).

However, I decided to go back to using SlimDX with VB.Net for the graphics piece ... I'll let you know how that turns out, if I get back to it and finish it. ;)

-Bryk

_________________
www.mwgames.com ... Dicey Curves, Space Mission, Jump Gate, Gem Raider, DareBase, Castle Danger, Keeps & Moats Chess


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group