stwe / MDCII

An unofficial project making from scratch to create an editable Anno 1602 world.
GNU General Public License v2.0
7 stars 2 forks source link

Grammar for COD/GAD/INC files #28

Closed mbugert closed 9 months ago

mbugert commented 1 year ago

Not a real issue, just for discussion.

I wrote a grammar that accepts all COD/GAD/INC files in the KE version, plus an interpreter that converts haeuser.cod and figuren.cod into python (json-like) objects. It could be interesting to you for debugging, or if you ever want to go down the rabbithole of rewriting your COD parser. Link: https://github.com/mbugert/anno1602-script-parser

siredmar commented 1 year ago

Nice! I've done my own cod parser (https://github.com/siredmar/mdcii-engine/blob/master/source/mdcii/mdcii/src/cod/cod_parser.cpp) that currently finds usage in this project. You might want to check it out. I don't know if i have all rules implemented. But i think it is a good base to advance. Its great that people are still interested in this cool game!

stwe commented 1 year ago

Another COD reader is good because it can be used to compare values that have been read out. So really good for debugging purposes. Thanks.

I'm just thinking about how I can simplify the rendering processes a bit without sacrificing speed. Very large maps with many islands are currently possible, but buffer management is a bit suboptimal. So it goes on, but some changes take time.