Where to start developing a game engine based on xml data?

I have already encoded my own XML / XPath API used to manage properties for my game objects, but it does not update on the fly and does not directly reflect any game object. So now I would like to make it updatable at runtime using all available available recommendations.

I also have some questions about the APIs:

1), which file monitoring API can I use to intercept changes in xml files? How much can the polling stream on different files reduce performance and how to implement a good file monitoring / polling stream?

2) Can I intercept events on org.w3c.dom.Document or am I required to use SAX?

3) Currently, I use the global game registry of connected keys / objects, I installed any "ObjectHandle" there that has an active link / status with the game logic and scenes. What insight could I use? proxy interfaces or something like that a good choice for implementing a hook?

+3
source share
1 answer

Do not use polling to detect file changes. Use something like

http://jnotify.sourceforge.net/

Or on the edge of the bloodstream java

http://blogs.oracle.com/thejavatutorials/entry/watching_a_directory_for_changes

This explains inotify (on linux)

http://www.infoq.com/articles/inotify-linux-file-system-event-monitoring

+2
source

Source: https://habr.com/ru/post/1756561/


All Articles