• Advertisement

Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

Displaying PCX/BMP in DOS..

This topic is 6748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
I suggest that you start game programming in windows, because graphics programming in windows (using directx from microsoft) is very different from DOS. anyway, if you still want to program first for DOS, I suggest that you start making simple text games (for C++) or simple graphic games (for QBasic). I use Visual C++ and Delphi, and if you have Delphi, I suggest you start with it, because it has great stuff for making games (not shipped with it, but you download that stuff from the net). One more thing. My first game was not a tetris clone. It was a simple RPG, in which you control a guy and can kill some monsters that try to kill you; there is collision detect, simple AI and basic things. And it was pretty good! And I took "just" 5 weeks to make it (after making some tests). other tip: try to make an "engine" for your games, specially at the beginnning. try to make your own functions for drawing, for objects/sprites, 2d maps, things like that. and then make your game, after some tests with the engine. GOOD LUCK!!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I'm just starting game programming in C++, and I'm just doing stuff in DOS for now (because I need some money to get a better windows compatible compiler...). The first game I'm starting with is Pong. It's simple and doesn't take much coding compared to most games. So far I have about 630 lines on it. I have a 2d dos game engine that uses pcx files, sprites, sprite scaling, sprite rotation, collision detection...etc. I just can't get it working with my compiler at the time. I'm just using the simple egavga.bin driver for the graphics and using lines, circles, and text for the graphics. If you need the functions to display the graphics I'll see what I can do.

Share this post


Link to post
Share on other sites
I too would suggest forgetting about DOS and learn the basics of Windows and DirectX. It's actually much easier than programming in DOS since you don't have things like drivers to worry about. The code to display a bmp using DirectX is trivial after you get everything initialized. If you want I can send you some sample code or just post it.

Share this post


Link to post
Share on other sites
But once you've conquered DOS fundamentals you learn a lot that you can still use in windows. I had been programming windows apps for a while when I decided to tackle games. DX was a pain. Most of the game tutorials I could find were relevent to DOS. I went out and found a copy of Borland C++ 4.5 just so I could do 16bit DOS stuff. After a month of playing with hardware, gfx & sound routines, I jumped back to windows. Now it's a snap to write my own blitters in DX and load images other than BMP's. I think actually doing the dirty work in DOS helps learning a great deal.

Share this post


Link to post
Share on other sites
Getting back to the subject:
I recommend that you come up with your own graphics file format (try to create a converter that changes BMP to your own format). I recommend that you use raw pixel data in these files (or a little header, the structures are really good for this). This way you can load images very fast and save them to your memory (or videocard's memory for you DX people). Then use blit in DX or put pixel by pixel in DOS.
When you're running out of memory you can save multiple files. For example: when you have a grass level load the grass sprites and when you enter a castle level load the castle sprites. For using DirectX: this way you can put all the sprites in video memory.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Well,

I have read the replies, and I guess it would be wiser to start with windows. I already know a good amount of c++, however I have not actually done anything for windows (VB does not count ), so it difficult to start mainly because there is just too much junk to deal with before you can actually accomplish anything. Anyway, I guess I will start with windows and maybe create the next PONG clone.

Can anyone provide me with any good resources for windows programming, and if at all possible, the sourcecode used to open and display files, bmp,jpg,pcx,etc. Once I understand how the program works with the files then I am sure I can move on to creating my own file formats. Any source would be greatly appreciated.

One more thing: Can anyone recommend any good windows programming books, game programming books, sites. I here Windows game programming for dummies (by Andre LaMothe) is good.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hey, I was programming in DOS for 5 years before switching to windoes with DX, and I think you should be able to make a game in dos, before yo goto windows. Almost all of the game code will go straight into a windows game as I did. My dos game was 8200 lines, 8000 went into the windows game, 200 was just DJGPP, and video specific code, which is easy to change:-)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hello there,

I am new to game development. I know basic/intermediat c++. At the advice of many game creating articles, I have decided to make a tetris clone. I want to start in DOS so I get the basics down before moving on to windows.

Anyway, my question is how would I display a pcx or bmp as a background in my game? Whats the maximum size (width,height) that can be displayed in dos? And whats do I need to do to create the game area (area where the blocks fall). Is that just a box specified by
x and y co-ordinats ? Any help would be greatly appreciated.

Thanks in advance.

Share this post


Link to post
Share on other sites

  • Advertisement