Author Topic: Problems/Thoughts/Discussi related to ingame downloads/crc checks in current svn  (Read 1320 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Hi, yesterday I tested with someone who was using the just the new binary without the data updates.
He connected to my server and he was told that his tech tree is incompatible.

bugs:
1. As a result he was offered a download. I think this is wrong. No download should be offered in this moment. Thats something that can be either ignored or solved manually only. A download should only be offered if the client has no data with this name!

2. After this I disabled the tech tree download over internet on my computer ( in the options ) and started again. Now he got a message about a crc different techtree, but no information about the tileset ( which he did not have ). I think In this case he should be offered the tileset as a download.



- general: We should really change the messages that are given when there are problems resulting form the crc check.
CRC is quite technically and I think we need much more speeking things like:
Client "titi" has different techtree data than server ( maybe a start will fail )
Client "titi" does not have the tech tree "Japanese_new"
Client "titi" does not have the tileset "forest_with_fog"
Client "titi" has a different tileset named "forest_with_fog"
( and if possible these messages should only be shown to those who are involved )

All in all I don't like the crc pre-check too much, as it does respect the the way its loaded later. It can just say "maybae" it will not work, not more.
But this will be hard to understand for the playing kids ....

- As we now have a "ready" state for each client it can maybe be combined with a "non ready" while downloading ...



Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
The CRC check is mostly accurate, it loads the CRC for all xml files in the techtree, or tileset. That means the margin for error exists when peopel are doing editing in those folders, or adding unused xml files in those fodler (or extra factions) in which case the warning is good since it tells you there is something different in the folder (which there should not be).

I did some testing and did not get a prompt for download when crc's did not match, only when things are missing did it prompt me fopr download. Is it possible in your testing the client was not using the latest svn (there were bugs related to this in earlier revisions)?

With that said what really is remaining and needed to be done in this area?

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
If you can load from within zip files - its a very easy format to parse - you can see the precalculated crcs.

Other hashes like md5 can take considerably longer to compute.

A file has four key attributes - name, crc/hash, length and last-modified.

Jumpiing ahead to a world where you have some kind of physfs:

If you are the owner of the game, the datestamp is useful when there is a name collision - if you have 2 archer.xmls, the newer is the one you want.  Then others join the game, and they send up a total bytes, number of files and a compund hash of all crcs.  If it differs, we know we need to sync more and you can send the names, lengths and crcs of all files.

Finally to sync files you can of course send them over the game link, or give the location of files on a server.  I'm a fan of using the game link, so that you can play unreleased mods.

In glestng I envisage storing all the files you have to download in a .cache folder with the crc mangled into the name.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Ok now we have a better way of pre-caching content CRC so its more consistent. If techtree CRC's don't match, users will now be shown which factions do not match (so if someone has more factions in their techtree you will know or if a faction has different XML that faction will also be identified).

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Would this cause problems to standalone games made with Megaglest?
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
It shouldn't affect single player in any meaningful way.

 

anything