Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / I really want to like DB over BB, but look at this....

Author
Message
Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 17th Aug 2006 21:30
Wotcha, folks.

I really wanna like DBp over BlitzBasic, but I can't help feeling I'm missing something fundemental about DBp.

In another post, I detailed problems getting a bitmap to show. When I got it to show, it seemed to distort the image. This happened regardless of the resolution, windowed mode, etc.

So, can someone tell me why this code for BlitzBasic:


..shows this

And this code for DBp:



..shows this

Both use exactly the same .bmp file, but DBp seems to blur or squash it!

As I say, I've tried it at loads of resolutions and screen modes.

Am I missing something fundemntal ?

Tobo
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 17th Aug 2006 21:35 Edited at: 17th Aug 2006 21:36
Don't panic.

All you have to do is put an extra parameter of 1 at the end your load image, making your code look like this-



The squashing you are seeing is mipmapping which is used to make multiple levels of detail based on distance and is useful for making a program run faster with lots of textured models.

Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 17th Aug 2006 21:50
Well bleedin' well!

Thanks, Daemon.

The DBp community wins again.
Whisper Wind
21
Years of Service
User Offline
Joined: 5th Apr 2003
Location:
Posted: 18th Aug 2006 09:52
You should be aware that you probably shouldn't be loading the image every single loop... you only need to load the image one time, otherwise it will just slow your program down.

Searching for files named 'sanity'...
No files were found.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 18th Aug 2006 22:23
That's a good point, you shouldn't even be creating the sprite every loop either.

Login to post a reply

Server time is: 2024-11-26 14:32:06
Your offset time is: 2024-11-26 14:32:06