Computer Graphics

Moderators: Sephiroth
Number of threads: 1241
Number of posts: 2641

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
Putting a BMP picture into a game made in BGI. Posted by Tk3King on 20 Jun 1999 at 8:17 PM
Is there a way to draw a sprite in paint or another drawing program, then put that picture into a game that I am making in BGI graphics? Any info on this will be very helpful.


Edit Report
Re: Putting a BMP picture into a game made in BGI. Posted by jack sotac on 21 Jun 1999 at 12:54 PM
: Is there a way to draw a sprite in paint or another drawing program, then put that picture into a game that I am making in BGI graphics? Any info on this will be very helpful. <p>
First, I would think about abandoning the BGI library if you need speed.It is slow and cumbersome. Yes, it is possible using a program like Window's Paint to put that bitmap picture in your game. You will need the BGI's putpixel routine. Also you should get the image files' format of the image file type you are going to use (bmp,pcx,tga,etc.). <br>
What you do is read the image file header,its palette information,and then the raw image data.<br>
Now all you have to do is draw the image data on the screen,at the spot you want,using a putpixel type routine.<br>
The exact sequence depends on the graphic mode used,the number of bytes per pixel, and the image file type. If you need more info,I have it.<p>



Edit Report
More help please... Posted by Tk3King on 21 Jun 1999 at 3:07 PM
: Is there a way to draw a sprite in paint or :another drawing program, then put that picture :into a game that I am making in BGI graphics? :Any info on this will be very helpful. <p>
:First, I would think about abandoning the BGI :library if you need speed.It is slow and :cumbersome. Yes, it is possible using a program :like Window's Paint to put that bitmap picture :in your game. You will need the BGI's putpixel :routine. Also you should get the image files' :format of the image file type you are going to :use (bmp,pcx,tga,etc.). <br>
:What you do is read the image file header,its :palette information,and then the raw image data.<br>
:Now all you have to do is draw the image data on :the screen,at the spot you want,using a putpixel :type routine.<br>
:The exact sequence depends on the graphic mode :used,the number of bytes per pixel, and the :image file type. If you need more info,I have it.<p>
<br>
What other cheap, but good, graphics programs are there? Where can I get them? Where do I learn how to use them? Also, how exactly do I do the things you said above? I am using VGA mode with only 16 colors (including black) on a 640 by 480 screen. I have only been in one programming class for one year, and I have another one this year. So I don't have very much experience.<br>
BTW, thanks for the information! I really appreciate it.


Edit Report
Re: More help please... Posted by AcheronX on 22 Jun 1999 at 7:28 AM
You can get 320x200x256c and 320x240x256c libs at the URL<br>
below. They're sprite libs, ie. the don't draw circles, etc,<br>
just blit sprites. However, if you download the BINARTX program<br>
at the same area, you can use it to dump PCX files to a much<br>
more simple format, from which you can display them to the screen.<br>
However, the library isn't that easy to use, as it uses Seg:Ofs<br>
rather than pointers.


URL:http://acheronx.resnet.tamu.edu/home/16bit.htm




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.