package
0.0.0-20190416103724-ee7ecfed3662
Repository: https://github.com/gfandada/gserver.git
Documentation: pkg.go.dev

# README

Entity包介绍(持续开发中)

名词介绍:
Entity:实体,是player,monster,npc甚至是防御塔等游戏实体的基类,内置了aoi,属性,道具
等属性。
Space:空间,本身也是一种Entity,这里定义为Entity的容器,既然叫做空间,自然拥有AOI计算的能力。
AOI:Area Of Interest,即实时关注区域,实质是一种数据结构,用于记录变动的位置和关注信息。
Entity管理:
	1. 实体Entity-ID和实体Entity的映射关系
	2. 网络层和实体Entity的映射关系
	3. 服务service和实体Entity的关系(举个例子:LOL中温泉是个实体,它提供了一种回血和攻击的服务)
	4. 提供注册Entity的能力
Space管理:
	1. 实体Space-ID和实体Space的映射关系
	2. 提供注册Space的能力
AOI管理:
	AOI管理其实被抽象成十字链表算法,维护着Entity进入、离开、移动时的位置和邻居信息,
	它的存在就是实时记录实体Entity的位置信息和实时计算实体Entity的关注区域
路径管理:
	路径管理封装了a*寻路和基于矩形的碰撞检测,目前还没有实现RVO碰撞检测。
	
规划:
A 所有实体的aoi的由服务器控制(aoi由单进程调度,相比于多进程互斥锁的调度方式更好).
关于进程的使用,建议使用封装后的goroutine
space中统一管理着entity的进入,离开,和移动
entity有哪些:
1. player
2. 小兵
3. 防御塔
...
B 技能系统是一套独立的系统,普通攻击也算是一种技能,每种有技能的实体都会绑定一棵AI行为树.

# Functions

No description provided by the author
No description provided by the author
新建一个实体 @params flag:实体类型 name:实体名称 useAOI:是否具有aoi属性 persistent:是否需要持久化.
No description provided by the author
渲染世界 FIXME 仅用于测试.
渲染世界通过csv文件.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

默认的战斗场景.
阻挡.
起点.
山峰.
路径点.
平原.
河流.
终点.
空场景.

# Variables

定义消耗.
用于渲染 FIXME 仅用于测试.
用于渲染 FIXME 仅用于测试.
这部分跟导出的地图数据结构相关,完全可以自定义.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
位置.
No description provided by the author
No description provided by the author

# Interfaces

aoi计算器.
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

单位.
No description provided by the author
No description provided by the author
No description provided by the author
路径点构成的世界 map[WayPoint.X]map[WayPoint.Y]*WayPoint.