|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: BMPs again:)
First off thanks again everyone! To answer the question of am i loading it each frame - I believe so yes. I'm using one of the tutorials from www.gamedev.net under the directdraw section. And yes i was also loading and displaying them in the same function. Although Im not quite comfortable with threads yet i think i see what you mean by pre loading it and then drawing it once per frame. By pre loading do you mean during init - in other words not loading it once per frame, just drawing it once per frame. Anyways thanks for the help so far and sorry to bother you guys with such simple questions. I'm still pretty new at writing fast games. Simple games aren't that hard. Its making them run fast that is hard. So thanks everyone. --- "Ben Humphrey" <DigiBen@GameTutorials.com> wrote: >Yah, speaking of slow.... you are crazy if you think you should load a >bitmap and display it at the same time... :)It's not like you are working on >a game boy and need all the memory to save. > >You should use LoadImage(), and PRE load the images. Then just blit them >when you need them. Of course, you don't have to load them all at the >beginning, but pace yourself when you load them in if needed. Like, load >them a minute before you need them... perhaps on a different thread if you >want the peak performance and not slow down. > >Try that. > >Ben Humphrey >Game Programmer >Digiben@GameTutorials.com >www.GameTutorials.com >----- Original Message ----- >From: "stephen healy" <steven.h@e-garfield.com> >To: <gameprogrammer@topica.com> >Sent: Monday, March 25, 2002 2:38 PM >Subject: Re: BMPs again:) > > >> Thanks for the quick answers! Now the reason I'm so concerned with speed >is that I want to do an Action side-scoller game and from my experience with >LoadImage() after loading about 2 128x128 images it drops to about 5 fps. I >could be doing it wrong though. Like i said before if anyone knows any more >tutorials that would be great. Thanks for the FAQ by the way. If you've >been able to get LoadImage() to blit pretty fast please tell me how you did >it. Thanks again. >> >> --- Christian Gyrling <christian@gyrling.com> wrote: >> >If you are so concerned with speed, I would suggest to write a program >that >> >loads BMPs and stores them the exact way you are storing them in memory. >> >That way you can read a file in no-time. So, read the BMP into your own >> >struct and save that struct as is directly to a file. >> > >> >Just a word of caution - "Don't optimize what don't need optimization" >> > >> >/C >> > >> >----- Original Message ----- >> >From: stephen healy <steven.h@e-garfield.com> >> >To: <gameprogrammer@topica.com> >> >Sent: Monday, March 25, 2002 2:09 PM >> >Subject: BMPs again:) >> > >> > >> >> Sorry for asking such a boring question that has probably been asked >and >> >answered a million times already but here goes. I've read all those >> >tutorials on loading .bmp's and they all use the slow method of reading >in >> >bitmaps using the LoadImage() function and all the windows garbage. I >would >> >like to know how to load one by reading it in. Any good tutorials would >> >help too. I'm using DirectX and I plan on using fread() but if you know >a >> >better reading function that's fine with me. >> >> Thanks again. >> >> >> >> _____________________________________________________________ >> >> Calling all cartoon fans! >> >> >> >> Garfield keeps millions of newspaper readers laughing over their >morning >> >corn flakes...now he's waddling into cyberspace to spread his mirth (and >> >girth)! >> >> >> >> You can now get the full-color Garfield comic strip e-mailed to you >every >> >day of the week -- absolutely FREE! Just go to >> >http://www.garfield.com/signup/ to register! >> >> >> >> >> > >> >> _____________________________________________________________ >> Calling all cartoon fans! >> >> Garfield keeps millions of newspaper readers laughing over their morning >corn flakes...now he's waddling into cyberspace to spread his mirth (and >girth)! >> >> You can now get the full-color Garfield comic strip e-mailed to you every >day of the week -- absolutely FREE! Just go to >http://www.garfield.com/signup/ to register! >> >> >> _____________________________________________________________ Calling all cartoon fans! Garfield keeps millions of newspaper readers laughing over their morning corn flakes...now he's waddling into cyberspace to spread his mirth (and girth)! You can now get the full-color Garfield comic strip e-mailed to you every day of the week -- absolutely FREE! Just go to http://www.garfield.com/signup/ to register! ==^================================================================ This email was sent to: list@gameprogrammer.com EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrGcz.bV8N8c Or send an email to: gameprogrammer-unsubscribe@topica.com T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================
|
|