radeusgd / mmotest

HTML5/JS + Node.JS simple multiplayer game server and client with elements of rpg, procedural etc. experimentation
GNU Lesser General Public License v3.0
6 stars 0 forks source link

Inventory UI #3

Open radeusgd opened 9 years ago

radeusgd commented 9 years ago

Inventory UI system. Rendering a grid of items. The grid "window" can be dragged. Simple list view, no dragging - on click - submenu - button move to etc. 2d array of items, or nulls It should allow for item drag&drop, and after such action it should invoke net_protocol's move_item(from_container, (x,y), to_container, (x,y)), where containers are container ids (specified during creation of "window" or 0 for world).

Moving will be handled by a custom event message to inventory, so the plugin approach still holds.

Custom containers (chests) will be done later and will use similar or inherited scripts.

radeusgd commented 9 years ago

~~As we want to test modular design, let's make inventory a "plugin", as in a special item with all these abilities. To pull that off we need a player ability system (special item that player accesses from menu) + items API to be able to show DOM and execute remote JS and send/receive events. Probably through eval or files on client.~~ Probably integrate right into server for now to not overcomplicate. Also for now a simple list with actions - interact+drop.