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 / BITmap v.s. Image (Whats the difference)

Author
Message
ADawg
18
Years of Service
User Offline
Joined: 2nd Apr 2006
Location:
Posted: 4th Apr 2006 00:24
what is the difference between an image and a bitmap and in what way would i use each, also i heard that only one bitmap could be put on screen at a time and that its because the bitmap has a number 0 itll be drawn to the screen is this true.
Twu Kai
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 4th Apr 2006 01:21
Don't think so. I've been able to use more than one sprite at a time.

I came, I saw, I programmed!
ADawg
18
Years of Service
User Offline
Joined: 2nd Apr 2006
Location:
Posted: 4th Apr 2006 02:30
but whats the difference between a sprite an image and a bitmap and where can u use them
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 4th Apr 2006 02:56
a sprite is a bitmap wich can also be called an image.

visit my site (unfinished)
www.freewebs.com/dbnewbie
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 4th Apr 2006 03:10
A bitmap is a format - an arrangement - of graphic data that will produce an visual image (in the common sense of the term) on a display or printed page. There are other formats, such as vector based formats. An Image, in DBPro, is a reference to a section of memory which stores the graphic data. Conceptually, its a picture stored in the program as opposed to a picture stored in a file. A Sprite is the digital form of what animators of old called a cel (from celluloid). If they wished to animate a character against a background that was not changing, they would place a transparent celluloid sheet over the background and draw the character on it, so the background would show through around the character. Next frame - another transparent sheet, which means that the background did not have to be redrawn for every frame. A Sprite is a rectangular graphic image which can have transparent sections and thus permit the background to show through.
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 4th Apr 2006 11:47 Edited at: 4th Apr 2006 11:54
as far as the user is concerned

bitmap:
you can use the print,draw and sprite commands to alter a bitmap, so for example you can draw all the hud info for your game to a bitmap and then use get image to make the hud a sprite (a sprite is an image that is placed onto the screen and persists)

image:
is a picture, you can`t alter it, the only way to alter an image inside a game is to make it into a bitmap and then alter the bitmap, then make it back into an image

heres an example of using a bitmap to draw new imformation to a "floating" hud by copying imformation written to a bitmap into the image used for a sprite, this is the only way to alter the image inside the program, by modifying the bitmap, think of the bitmap as a hidden screen you can draw to and grab images from, you can only have up to 32 bitmaps iirc, but hundreds of thousands of images.



in this example the "hud" is an oversized mouse pointer and the information is just random characters, but there is no reason why you can`t print score, screen fps etc to the bitmap and have that floating about in the hud, just change the bit inside the if/then section to display whatever messages you like.



Dr Frankenstiens mum told him to make some new friends, not knowing where this was going to lead.

Login to post a reply

Server time is: 2024-11-27 22:26:20
Your offset time is: 2024-11-27 22:26:20