NetworkProtocolNotes
From MountainfortWiki
for
NetworkProtocolNotes
Jump to:
navigation
,
search
== general == * connecting webgl+javascript in browser via html5 websocket (tcp) to lua/c++ server * websocket(tcp) maybe doesn't support binary data but only utf8 "text" blocks * jason encoding for structured network messages might be good for speed on clientside (javascript slow?) and utf8 as well as debugging * 8x8x8 terrain chunk might be transferred as 512byte long utf8 text string, if blocktype is encoded as printable utf8 char == server-sent content (type registration rather than life map) == * tiles (box) types : texture url, name (tooltip) properties * monster/creature "models" (pixel art flat sprites first, later maybe simple modelling from big-pixel textures and rect-blocks?) * player skin ? == map, show/hide/create/destroy, movement == * mapdata (update) : tile by tile (chunk) or single tile update ** each tile consists of 1 byte tiletype info and 1 byte parameter (4 bits) + lighting (4 bits) info ** collision (solid/empty/liquid), texture is tiletype based ** special infos like direction or liquid fill level is handled via the extra parameter * player * enemies/npcs (mobiles) ** actions/animations * items (on ground and in backpack/inventory. pickup?) * buildings (look like multiple blocks but might be highlighted/tooltipped in client somehow) --> würde ich glaube ich erst mal nicht unbedingt machen, da man ja via klick auf ein tile (egal welches) mit der werkbank interagieren kann * particle effects? ** area effects like rain/snow? * time/weather * sound/music effects * chat == gui == * chat * playerlist ? * building placement (list of available buildings and required resources) * items crafting inside buildings (list of available items and required resources) * other building functions (switches/levers,heal/sleep?) == player actions == * use selected tool on environment (client sends which block or only direction?) ** weapons : direction (ranged) ** place blocks / construct walls * activate object ? (switches) * drop items (pickup automatic?) * construct building * use building (starts crafting gui) === construction === * blocks * buildings/workshops ** different sizes but simple shapes : 1x1, 2x2, 3x3 with height 1 each * crafting = gameplay notes = (different wiki page, just noting from chat) * simple axe : stoneage like : use bare hands on : ground->small stones, tree->sticks, combine:stone-axe, slow but gets real wood * mining stone should not be so easily achievable, need pickaxe : metal ** 1 pick total per TEAM as start equip? npc trade? nope =) ** a bit ore findable in soil layers ? (burn wood->coal ->smelt ore ->metal : stone anvil + coal + stone hammer -> crude metal tools) *** metal hammer, metal anvil : better tools = naming conventions = * "tile" is a unit box, used for terrain and similar, 1x1x1 * "chunk" is a group of 8x8x8 tiles * the term "block" is avoided as it is ambigious and could be understood as 1x1x1 or 8x8x8
Return to
NetworkProtocolNotes
.
Views
Page
Discussion
View source
History
Personal tools
Log in
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Search
Toolbox
What links here
Related changes
Special pages