Hey Xotor! about the MapMaker/Editor - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Hey Xotor! about the MapMaker/Editor

how would i use RLE-BMPs. what would the code look like(seudo-code)?

and what would be better to use?


Comments

  • : how would i use RLE-BMPs. what would the code look like(seudo-code)?

    : and what would be better to use?


    Well I use the Allegro Library, which has built in sprite blitting and such. I'd just store all the loaded bitmaps into RLE bitmaps within my program and then blit them as sprites (since I'd want to have transparency and omition of "invisible" pixels).


    Pretend that this is a small bitmap:


    1112224444444422244444443333111111155555


    A RLE (Run Length Encoded) Bitmap would compress it this way:


    3132843274437155


    Where the first number tells how many of the second one to repeat. I'm sure the format is different in real RLE encoded bitmaps but that's how they basically work. It really shrinks most Bitmaps.


    I personally like using Allegro (http://www.talula.demon.co.uk/allegro/), which uses DJGPP or Linux GCC or Visual C++. It does RLE blitting (sending to screen) for you. All you do is load the graphics from a file or DAT archive (which you can have them compressed), and then load them as RLE sprites. They blit really fast and since you're dealing with tiles, you don't need any special things like rotation and such, only transparency, and invisible pixels.


    I would prescribe using a DAT file system using ordinary BMP files. Then compress the DAT file (with built in compression) to make it small.


    Allegro also has a nice (well sort of nice) GUI system included with it, so you can make your own GUI for the program.


    -Xotor-


  • : : how would i use RLE-BMPs. what would the code look like(seudo-code)?

    : : and what would be better to use?


    : Well I use the Allegro Library, which has built in sprite blitting and such. I'd just store all the loaded bitmaps into RLE bitmaps within my program and then blit them as sprites (since I'd want to have transparency and omition of "invisible" pixels).


    : Pretend that this is a small bitmap:


    : 1112224444444422244444443333111111155555


    : A RLE (Run Length Encoded) Bitmap would compress it this way:


    : 3132843274437155


    : Where the first number tells how many of the second one to repeat. I'm sure the format is different in real RLE encoded bitmaps but that's how they basically work. It really shrinks most Bitmaps.


    : I personally like using Allegro (http://www.talula.demon.co.uk/allegro/), which uses DJGPP or Linux GCC or Visual C++. It does RLE blitting (sending to screen) for you. All you do is load the graphics from a file or DAT archive (which you can have them compressed), and then load them as RLE sprites. They blit really fast and since you're dealing with tiles, you don't need any special things like rotation and such, only transparency, and invisible pixels.


    : I would prescribe using a DAT file system using ordinary BMP files. Then compress the DAT file (with built in compression) to make it small.


    : Allegro also has a nice (well sort of nice) GUI system included with it, so you can make your own GUI for the program.


    : -Xotor-


    Thanx! very much!


Sign In or Register to comment.