|
-
Senior Member
Does that mean you would have to edit each levels hash every time you edit a level.
Yes, which is why I often add a "development" or "debug" flag into the game that turns that type of code off until I get close to release. When I implement things like this, I also make a utility that helps reduce overhead. In this case, the level editor could simply provide a hash at the same time it creates the XML.
Do you have an example of the hash being used in this such case?
In which case specifically? As a way to ensure data integrity? Yup. I blog about it in detail here:
http://mikegrundvig.blogspot.com/200...en-client.html
It's a slightly different case (ensuring valid data between client and server) but it's an identical approach. Basically using a hash to create a fingerprint of the data and then comparing the fingerprint later on to confirm that nothing changed. Works great.
The same approach is often used in enterprise systems that transfer files around. They will send the file, then they will send a hash so the recipient can check the hash to ensure transmission succeeded.
Also, the same technique is used by more tech-savy developers all the time. That's why many sites have a MD5 link next to the download. For instance:
http://httpd.apache.org/download.cgi
Have fun!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|