Fast bitmap loading

Started by
12 comments, last by Usako 22 years, 7 months ago
Hi ^_^. I wanted to load bitmaps fast on an already existing offscreen surface (with directdraw 7). It''s working now but it''s not really fast. Anyone knows a good way to do this? And is there a (big) speed difference between loading bmp/gif/jpeg/png etc.? Thanks ^_^
Advertisement
While there always ways to do something a little faster loading
images tends to take time. Thats what every game is doing
while you are staring at a load screen. The best way to load
things will kinda depend on your current need. Talk abit more
about what you are doing and what you need. Sometimes its
posible to load parts of what you need and finnish after you''ve
started things running to give the illusion of a speedy load time
but that may not be possible in your case. Maby your loading
more than you need at the time. Like I said talk more about
what your doing and someone may have a good idea as to a better
aproach. Ultimatly your just moving data around and there may
be little more you can do that hasn''t already been done. You
job is to find the best order to move the data for your program.
------------------------------------------------------------- neglected projects Lore and The KeepersRandom artwork
ok, I''ll explain some more ^_^.

I am sorta ''copying'' the graal online engine (but then offline ^_^) just as a practice (I''m practicing c++/directdraw). In graalonline you can have alot of people (that would be npc''s in an offline version) on the screen the same tile, all with different heads/bodies/swords/shields. Now I was wondering on how''d they do that
File I/O no matter which format is going to be slow. Any file formats which use compression will take even longer to load (I.E Jpeg, and PNG). The only way you can "Speed things up" for the end user is to stream the data in while other things are going on for instance while your title screen is showing you could be slowly loading in your bitmap data with out their knowledge.
Joseph FernaldSoftware EngineerRed Storm Entertainment.------------------------The opinions expressed are that of the person postingand not that of Red Storm Entertainment.
I haven''t seen the game you are refering to but if I understand
the need correctly my guess is they are loading all the individual
pieces and using them to build a range of characters. Sort of
like using a few tiles to create varied maps, or building with legos.
Even it thats not what they did you could. It would be alot tricker animation to start with if you''ve havent done much yet.
There are probably a few ways to do this and I probably can only
give you an idea to start with but I''m sure someone else can
give you a great way of doing it. You might need standard way
points for each item type. Say shield always apear in this location.
Helmets always start here. That sort of thing. You may need
to tweek it alot to make sure things dont look disjointed but
I''m sure its more than posible. Seams like a solid idea for
creating skads of chars. Hell you could even randomly generate
new ones without haveing to make them yourself. Sega made
a game called cyborg justice. You could make up to like 200+
robots by picking a body, arms, and legs. And even during game
play could rip of parts of other robots an make yourself into
a new bot. Basicly what I''m talking about. You might see about
tring to get a look at it. It''s cheeeeep at any retro game store
or you may be able to find a gen. emulator and the rom on the net.
I did. Hope that gives you some direction.
------------------------------------------------------------- neglected projects Lore and The KeepersRandom artwork
There is an alike topic - allready posted by Paradigm Shift 2000. Please pos your replies there, so we can get a discussion ongoing

-------------
E-)mil
http://eej.dk

- Just another crazy dane
Emil Johansen- SMMOG AI designerhttp://smmog.com
If I found the right post this is not the same topic. Thats
a tech post about how to code the loading of a bitmap onto
a DD surface. This a "How did they do that." Besides
Usako ask a question and it should get some responses.
------------------------------------------------------------- neglected projects Lore and The KeepersRandom artwork
I can already draw people in my game, it''s just not very fast (if I load the bmp''s directly) and I wondered on how''d they do that ^_^.

Anyway, here''s a screenshot of the game:

http://www.graalclassic.com/site/screenshots/shot1001.gif

And in graal they use gifs and png''s for the pictures and it''s quite fast

Loading a bitmap has nothing todo with drawing it.
And with that said, if drawing your bitmaps is to slow, then something very oddish is going on, if you reading this realize that you load the bitmap everytime you draw it then reread what i wrote first in this message.
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
Hey that thing looks cool! This is the game you are trin''
to recreate right? anyway, DigitalDelusion is right. If you
are having trouble with displaying images durring runtime something
is horribly wrong. Like he said make sure you are not loading
as you go along. Preload everything you are going to need at
a moments notice. Unless you have a very slow machine you souldn''t
be noticing any slowdowns with bliting this early on. If you
havent already make sure you take the time to go through all
of the articles and resources here do so. If there is something
you dont get there are plenty of people to help you sort it out.
Right now it is sounding like you are rushing a bit. Tring to
do something that you dont have a complete grasp on yet. The basics
the load logic shoul look something like this.

1.figure out what images I will need for now. This level or whatever
2.Load these images from disk to DirectDraw surfaces.
3.Keep Them There! Dont release something until you know you
know have no more use for it.

U will do most of you loading and dumping of images before and
after the program starts. I hope this isn''t stuff you already
knew and I''ve just insulted your inteligence or anything but
I''m not sure right now where you are having the actual problem.
anyway good luck.
------------------------------------------------------------- neglected projects Lore and The KeepersRandom artwork

This topic is closed to new replies.

Advertisement