Forum > Games

Porting a strategy game from Turbo Pascal

(1/4) > >>

ZsurzsaLaszlo:
Hey everyone,

I have the old source code of my strategy game I wrote when I was 18. (Video: https://www.youtube.com/watch?v=Jd5ajcdmlHk). As you can see see in the description of the video, the whole 'engine' had every program that you would need to create a game:
    1. Sprite editor
    2. Terrain editor
    3. Game engine (Never finished fully)

I tried to retrieve the color codes from Turbo Pascal but was not successful. Years passed, I still have the whole source code but can't do a lot whit it. I started to remove the 'bottom layer', the draw logic and replace it with OpenGL but it would be hard without the color codes of TP (would like to save the assets that I hand draw :D).

Does somebody have experience with porting a game from TP to FreePascal? I would love to finish this game one day! Maybe making it open-source would be the best choice (would need to clean up the code before :P)

Every answer is highly appreciated!
   

Bart:
What do you mean by "color codes of TP"?

Video looked nice.
What was it, 320 x ??? resolution?
Using assemble to generate video output?
Maybe even using the famous gfxfx unit?

Bart

ZsurzsaLaszlo:
Resolution of the game was 320x200. Low level pixel drawing was done with assembly yes. The colors where used from the standard 256 color palette from this graph mode. Sorry for the sloppy words, with color codes I wanted to mean RBG values.

Besides some assembly and writing to de video memory I didn't use any graphics library.

soerensen3:
I have no experience with turbo pascal but maybe you mean this: https://en.wikipedia.org/wiki/Enhanced_Graphics_Adapter#Color_palette

Handoko:

--- Quote from: ZsurzsaLaszlo on May 01, 2018, 11:42:36 pm ---Resolution of the game was 320x200. Low level pixel drawing was done with assembly yes. The colors where used from the standard 256 color palette from this graph mode.
--- End quote ---

Then it should be Mode 13h:
https://en.wikipedia.org/wiki/Mode_13h

The conversion table for Mode 13h to RGB value should be:
000000 0000AA 00AA00 00AAAA AA0000 AA00AA AA5500 AAAAAA 555555 5555FF
55FF55 55FFFF FF5555 FF55FF FFFF55 FFFFFF 000000 101010 202020 353535
454545 555555 656565 757575 8A8A8A 9A9A9A AAAAAA BABABA CACACA DFDFDF
EFEFEF FFFFFF 0000FF 4100FF 8200FF BE00FF FF00FF FF00BE FF0082 FF0041
FF0000 FF4100 FF8200 FFBE00 FFFF00 BEFF00 82FF00 41FF00 00FF00 00FF41
00FF82 00FFBE 00FFFF 00BEFF 0082FF 0041FF 8282FF 9E82FF BE82FF DF82FF
FF82FF FF82DF FF82BE FF829E FF8282 FF9E82 FFBE82 FFDF82 FFFF82 DFFF82
BEFF82 9EFF82 82FF82 82FF9E 82FFBE 82FFDF 82FFFF 82DFFF 82BEFF 829EFF
BABAFF CABAFF DFBAFF EFBAFF FFBAFF FFBAEF FFBADF FFBACA FFBABA FFCABA
FFDFBA FFEFBA FFFFBA EFFFBA DFFFBA CAFFBA BAFFBA BAFFCA BAFFDF BAFFEF
BAFFFF BAEFFF BADFFF BACAFF 000071 1C0071 390071 550071 710071 710055
710039 71001C 710000 711C00 713900 715500 717100 557100 397100 1C7100
007100 00711C 007139 007155 007171 005571 003971 001C71 393971 453971
553971 613971 713971 713961 713955 713945 713939 714539 715539 716139
717139 617139 557139 457139 397139 397145 397155 397161 397171 396171
395571 394571 515171 595171 615171 695171 715171 715169 715161 715159
715151 715951 716151 716951 717151 697151 617151 597151 517151 517159
517161 517169 517171 516971 516171 515971 000041 100041 200041 310041
410041 410031 410020 410010 410000 411000 412000 413100 414100 314100
204100 104100 004100 004110 004120 004131 004141 003141 002041 001041
202041 282041 312041 392041 412041 412039 412031 412028 412020 412820
413120 413920 414120 394120 314120 284120 204120 204128 204131 204139
204141 203941 203141 202841 2D2D41 312D41 352D41 3D2D41 412D41 412D3D
412D35 412D31 412D2D 41312D 41352D 413D2D 41412D 3D412D 35412D 31412D
2D412D 2D4131 2D4135 2D413D 2D4141 2D3D41 2D3541 2D3141 000000 000000
000000 000000 000000 000000 000000 000000

Source (public domain):
https://commons.wikimedia.org/w/index.php?title=User:Psychonaut/ipalette.sh&oldid=8607095

Navigation

[0] Message Index

[#] Next page

Go to full version