Can you check the theory behind my graphics engine?
Ok, i need to find out if this is the best idea...I kinda want this to be somewhat "normal" for the industry...
I''m using ddraw 7. to build a 2D engine that should look something like Super Mario Bros. It''s (eventually) gonna support 24 bit sprites, and texture-mapped polygons. It will run in both windowed and full screen mode, but will only support 16 and 32 bit colors. (8 would complicate things too much, and 24 is too uncomon). In full screen, it will run in 32 bit mode, and will run in 16 bit when that doesn''t work.
Right now I have a class called CPolygon to handle polys. it will does everything you need to do with a polygon, including drawing.
Drawing is done by passing the DDSURFACEDESC2 of a locked surface to the Draw() method. the method then figures out the surface BPP, pitch, and draws it (using a software raterization procedure...unless i can do a hardware one with ddraw 7).
the bitmaps sprites are drawn in a similar fashion.
what do you think?
Programmers of the world, UNTIE!
Drawing surfaces to screen or backbuffers should definitely be done with the Blt function(which is included in ddraw 7) since it is much faster since it uses hardware acceleration, so for optimization reasons stay away from software rasterization, if a video-card supports directx 7, it definitely supports hardware blitting, so use that
hope this was helpful
--------
Runtime errors should be renamed to runtime terrors
[edited by - Eskhan on February 15, 2003 12:54:21 PM]
hope this was helpful
--------
Runtime errors should be renamed to runtime terrors
[edited by - Eskhan on February 15, 2003 12:54:21 PM]
--------------------Though this program be madness, yet there is a method in't
well, yeah...the for bitmaps you call draw() and then it blts it to the specified surface....i probably should have explained that.
is the theory good for the polys??
is the theory good for the polys??
Programmers of the world, UNTIE!
You're not exactly giving many details. All you've really said is "I'm making a 2D engine that draws sprites and polys."
OK, go for it then.
EDIT: Personally, I would just use Direct3D. Nice sprite rotation and alpha blending, plus the poly drawing is hardware accelerated and texture maps are a breeze to apply.
Then again, making your own rasterizer could be fun. Whatever floats your boat.
[edited by - micepick on February 15, 2003 7:36:49 PM]
OK, go for it then.
EDIT: Personally, I would just use Direct3D. Nice sprite rotation and alpha blending, plus the poly drawing is hardware accelerated and texture maps are a breeze to apply.
Then again, making your own rasterizer could be fun. Whatever floats your boat.
[edited by - micepick on February 15, 2003 7:36:49 PM]
Yes, it is. It's almost unfortunate how easy it is, since you don't even have to know anything about 3D graphics to make things using D3D. I'm working on a 2D game with it right now, and I still don't quite understand the theory behind the transformations that are going on.
I'm going to learn 3D graphics theory before I start on an actual 3D project, though.
Wow, that was completely off topic, wasn't it. The answer is, yes, Direct3D is caek once you get past all the initialization crap.
EDIT: Direct3D 8 is easy, that is. I've never used Direct3D 7, but people say it's pretty hard.
[edited by - micepick on February 15, 2003 9:39:37 PM]
I'm going to learn 3D graphics theory before I start on an actual 3D project, though.
Wow, that was completely off topic, wasn't it. The answer is, yes, Direct3D is caek once you get past all the initialization crap.
EDIT: Direct3D 8 is easy, that is. I've never used Direct3D 7, but people say it's pretty hard.
[edited by - micepick on February 15, 2003 9:39:37 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement