Best approach to update game screen

Started by
2 comments, last by georger.araujo 8 years, 4 months ago

Dear Gentlemen and Ladies,

Environment

  • DosBox
  • Borland C++ 3.1

Objective

  • Generally learn programming a basic game in DOS with C++
  • Learn to merge multiple files into single or limited bigger files

Description

I would like to merge multiple files like bmp images and sounds in a single bigger file without leaving them as readable single bmp of sound file. Finding some suggestions on internet I find that someone convert BMP to .H to include it into the EXE using the compiler.

Before starting to write a class library to manage it I would like to ask if you have any suggestions about that.

Thank you in advance.

GioCo

Advertisement

I wouldn't include resource files inside the EXE like that. What you most likely want is a resource file like Doom's WAD files. You can find more info about WADs here: http://doom.wikia.com/wiki/WAD

Note that the WAD format is just an example file format, but it's a good example since it's easy to understand and implement. There's more advanced formats out there that include file compression and whatnot.


Learn to merge multiple files into single or limited bigger files

Do you want to learn how to do it yourself, or you just want files packed?

In latter case look at https://icculus.org/physfs/

Dear Gentlemen and Ladies,

Environment

  • DosBox
  • Borland C++ 3.1

Objective

  • Generally learn programming a basic game in DOS with C++
  • Learn to merge multiple files into single or limited bigger files

Description

I would like to merge multiple files like bmp images and sounds in a single bigger file without leaving them as readable single bmp of sound file. Finding some suggestions on internet I find that someone convert BMP to .H to include it into the EXE using the compiler.

Before starting to write a class library to manage it I would like to ask if you have any suggestions about that.

Thank you in advance.

GioCo

You could probably use Fabien Sanglard's article about how to build Id Software's Wolfenstein 3D from 1992 as a starting point -- he mentions how they packed the assets, and the dev environment is the same as yours.

This topic is closed to new replies.

Advertisement