Skip to main content
gamedev.net
🔒 Locked

Inefficient?

Started by hammerstein_02 5 replies 250+ views
Original Post
hammerstein_02
hammerstein_02
I am putting thought to my level, which is gonna be an upward scrolling level. Now I want the level to differ slightly and was wondering, is it inefficient to store one large bitmap and scroll round that say (800*1800). Or is a tiled method a better method, say with 128*128 tiles ( I really don''t want that much detail) =*= If things seem bad, think that they can get a whole load worse, and they don''t seem so bad anymore =*=
bishop_pass
bishop_pass
Well, 1800 x 800 is pretty darn small, so do it that way if you want. That is a terribly trivial problem with 3d texturing hardware. Kind of like asking if a truck is big enough to haul your groceries home. If you''re not familiar with how to do it using 3d hardware, you might want to learn. Basically, you''d use one textured quad rendered in an orhographic view.

Now, if your level was 8000 x 18000, then, yes, you should tile it.
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in
hammerstein_02
hammerstein_02
Sorry for not making myself clear, I forgot that most people use 3d now. I am using DirectDraw, didn''t think about it being relevant to a specific API when I asked.

=*=
If things seem bad, think that they can get a whole load worse, and they don''t seem so bad anymore

=*=
Ingenu
Ingenu
Since 1995, NEC engineers recommend to use 3D hardware for all cases.
It has Texture compression, geometry processing, it''s damn fast, and it''s not hard to use for 2D.

Just us the available hardware, it would be stupid not too.
Forget about 2D APIs they are no obsolete

-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-
Zorodius
Zorodius
To be fair, OpenGL completely sucks for 2D work, and if you were writing a game aimed at an extremely low-end machine, you would benefit greatly from sticking to something better suited to 2D.
You don't need to vote for the "lesser of two evils"! Learn about Instant Runoff Voting, the simple cure for a broken democracy!
bishop_pass
bishop_pass
quote:
Original post by Zorodius
To be fair, OpenGL completely sucks for 2D work.

Really? I can''t think of anything better. With sprites using an alpha component for masking, you get full antialiasing when drawing sprites on top of each other. You also get full scaling and 2d rotation for your sprites, again with filtering for perfect antialiasing, no matter what size they are drawn on screen. And everything is hardware accelerated as well.

Just use an orthographic projection.

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in
directrix
directrix
here''s an idea, load the large bitmap, split it into smaller tiles, compare the tiles against each other and delete any duplicates, delete large bitmap, and render the tiles.

This way you can make a tile based world in an image editor, but your engine would find the tiles and place them into their own surfaces, then delete the large bitmap, so you wouldn''t be using up a ton of memory. Also seeing that your using directdraw, you could put as many of the tiles as possible into video memory (which you can''t do, or would have problems doing, with the large bitmap) which would increase performance alot (rendering from video memory can more than double your fps)



digital radiation

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.