Finding your way around the Stendhal Web Client Code
This doucment describes the code structure of the experimental Stendhal web client. Please see How to setup an experimental Stendhal HTML5 Environment? for information on how to setup a development environment.
The web client is in the srcjs folder, which is next to the src-folder for Java. It makes uses of the marauroa client to handle network communication.
|Folder / Files||Content|
|lib/||external libraries, mostly used for polymer|
|stendhal/actions.js||Actions sent from the client to the server|
|stendhal/data/||data structures for maps and image caches|
|stendhal/entities/||entities (a combination of Entities and EntityViews in the java client)|
|stendhal/events.js||events sent from the server to the client|
|stendhal/main.js||main entry point|
|stendhal/ui/stendhal-.../||web components for buddy list, chat bar, chat log|
- The world view and the minimap are canvas based
- The draw logic for world view and minimap is inside stendhal/entities.
- The buddy list, chat bar and chat log are web components using HTML
- The inventory (character, bag, keyring) are HTML based at the moment, but it might be a good idea to use canvas drawing for them to handle the quantity display nicely
- https://stendhalgame.org/client/stendhal.html is the entry point for the web client.
- https://stendhalgame.org/client/stendhal-admin.html is the entry point for a simple text-only admin-client without graphics
- https://stendhalgame.org/client/webclient-todo.html TODO for a minimal playable client
- On a local development environment the urls are just http://localhost:8080/stendhal.html and http://localhost:8080/stendhal-admin.html