BT1 clone in Python

Any developer realated stuff
Desmet Irkm
Posts: 35
Joined: Fri Nov 11, 2011 2:50 pm
Location: .de
Contact:

Post by Desmet Irkm »

No, not at all. I don't want to keep anybody from editing anything. I mean, the code is in Python, you can plug in any map you want - e.g. you can see my first try still in src/bt/old/city_map.py (defunct now). However, then I found this site and all the information on how to decode the files and used that first, because I thought, then I don't have to enter all that map stuff myself.

The reason I don't put the decompressed files in, is more or less the following: the format they use is stupid anyway: not all data is in the map files, but hard coded by checking coordinates e.g. for the taverns, the statues, the temples... If you define a map format, that should define everything - if you move around the Scarlet Bard on your map, you should not be forced to modify some coordinates in some removed piece of code - this is totally braindead.

So, what I plan to do is: come up with some decent format on how to easily specify a map with *all* information in a text editor, then convert the data from the city.pat and city.nam file into that format, add missing information that is only in the executable, and then use only this as map file (which anybody can easily edit). In my view there should be three or four bytes per grid cell, which I would code as printable characters:
1) 0=street, 1-4 building type
2) street name index
3) special index (probably two chars for that, general and specific)
So '01SS' could mean the Samuarai statue on Rakhir, '10T2' could mean the Greater Gods temple, '4000' is just a plain building with facade number 4 (the rough rocky front), etc. And a map file would then look like

Code: Select all

1000,2000,10T1,...
4000,0700,07SD,...
...
The size of the map could just be inferred from the file and line lengths. What do you think?

BTW: If you're interested I can put up a version which looks much nicer, as there are now the C64 fonts as TTF used and you can load your msdos characters (albeit do nothing with them)...
Desmet Irkm
Posts: 35
Joined: Fri Nov 11, 2011 2:50 pm
Location: .de
Contact:

Post by Desmet Irkm »

@Maven Hmm, and by the way: have you looked at my Huffman decoder in Python (src/bt/extract/btfile.py). It's just so cool, I had to leave it in ;-) And without Huffman files there would be no need for that right? :(
dulsi
Posts: 242
Joined: Thu Mar 22, 2007 7:15 pm

Post by dulsi »

I've been working on a BTCS clone in C++ with the eventual plan to support all BT games in the program. It is called btbuilder. Right now I support the BTCS file formats and an xml version which is pretty much the same thing but in xml. I'd be willing to collaborate on a file format if you'd like.

I've actually been thinking of moving development to github but haven't gotten around to it yet.
Caracas
Posts: 89
Joined: Thu Jan 20, 2011 9:16 am
Location: Belgium

Post by Caracas »

btw Desmet Irkm (where did Daem go?)

I was browsing Github and I noticed in the msdos file list that you are still looking to decompress bard.exe?
I used pklite112.exe for that. Original bard.exe is 83Kb, decompressed it's about 215Kb

Not sure if you still needed that.
Desmet Irkm
Posts: 35
Joined: Fri Nov 11, 2011 2:50 pm
Location: .de
Contact:

Post by Desmet Irkm »

Should have been Desmet D. Irkm, but I somehow forgot my middle initial when registering and couldn't change that afterwards ;-)

Yes, that's what I was looking for. However, I can't find a tool to decompress bard.exe that works under Linux. Maybe, you can send me the decompressed exe by pm?
Caracas
Posts: 89
Joined: Thu Jan 20, 2011 9:16 am
Location: Belgium

Post by Caracas »

I can't seem to attach files to a pm.
maybe I can upload it in Github? or you pm me a mailaddress where I can send it.
Desmet Irkm
Posts: 35
Joined: Fri Nov 11, 2011 2:50 pm
Location: .de
Contact:

Post by Desmet Irkm »

@dulsi I've seen your project. Very, very nice. You got much more going than I have. I would have considered joining your project too, however I'm not so fond of C++ anymore. Currently, I use Python and I'm very enthusiastic about it, because I'm as productive in that language as I've never been before in any other (and there were quite a few..).

But anyway, it may be a good idea to develop and use the same file formats. It would be good if we could communicate about that and develop and put some specifications online (maybe on github?). The same with the game logic. It would be good to have some documents, that say what happens exactly when...
Post Reply