惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Security Latest
Security Latest
Know Your Adversary
Know Your Adversary
S
Schneier on Security
K
Kaspersky official blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Google DeepMind News
Google DeepMind News
Project Zero
Project Zero
Recorded Future
Recorded Future
T
The Blog of Author Tim Ferriss
P
Palo Alto Networks Blog
Engineering at Meta
Engineering at Meta
MyScale Blog
MyScale Blog
L
LINUX DO - 热门话题
The Register - Security
The Register - Security
B
Blog
V
Vulnerabilities – Threatpost
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
Cyberwarzone
Cyberwarzone
Latest news
Latest news
Webroot Blog
Webroot Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
D
Docker
G
Google Developers Blog
T
Threatpost
F
Full Disclosure
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
Application and Cybersecurity Blog
Application and Cybersecurity Blog
月光博客
月光博客
D
DataBreaches.Net
WordPress大学
WordPress大学
F
Fortinet All Blogs
S
Secure Thoughts
Y
Y Combinator Blog
博客园 - Franky
Scott Helme
Scott Helme
Apple Machine Learning Research
Apple Machine Learning Research
Hacker News: Ask HN
Hacker News: Ask HN
酷 壳 – CoolShell
酷 壳 – CoolShell
Cloudbric
Cloudbric
N
News | PayPal Newsroom

博客园 - 我们的游戏世界

最新贴图[Sumtec] [公告]Framework组的最新进展[Sumtec] 终于快忙出头了,开了个FTP给大家用[mikespook] 非常抱歉没有为大家做点什么[吹雪] 框架结构图(二)[Sumtec] DGF的详细解说[Sumtec] Framework组的工作报告[Sumtec] 提交了CsharpC&C DEMO的代码在cvs[steeven] 更加详细的ThreadPool测试报告[Sumtec] ThreadPool 测试结果的第一时间发布[Sumtec] GC的一个问题 [Koffer] [工作报告] Framework组的工作报告[Sumtec] [讨论] 分布式计算的Action,我的解决方案[Sumtec] [游戏]服务器和客户端之间的同步策略[steeven] 代码更新了。[Sumtec] Framework组最近的工作报告[Sumtec] [引用资料][转帖] 玩家行为基本模式[[ IceSharK - PP.Poet ]] 微軟用.net開發的遊戲例子 mikespook 你的任务有没有进展啊?[Sumtec]
同学们,准备干活了[steeven]
我们的游戏世界 · 2004-05-26 · via 博客园 - 我们的游戏世界

第一个节目C#C&C
游戏模式前面说过了,下面开始考虑怎样施工

游戏模式是网络游戏:
Server端先不考虑画面,负责玩家的管理,Mission的开始结束,产生运动脉搏.Server上执行关键计算,接收玩家操作指令,仅仅发送给客户端必要的状态改变.
Client端从Server接收改变后的状态,体现在屏幕上.同时监视玩家键盘鼠标等事件,发送命令到服务器.部分可以本地处理的指令直接本地计算.

客户端结构上MVC分开.
Render属于客户端的事情.MapRender/ObjectRender
MapRender,用来画地图.一个ObjectRender,用来画地图上的物体的.
Render采用事件方式来侦听Model发生的变化,把变化体现在地图上.
初级阶段Render可能只是Winform下的UserControl.
Model是和服务器上一样的GObject,属性发生变化时要引发相应事件给Render画图.

客户端屏幕上由UI组成:
RadarUI: 雷达信息
InfoUI: 玩家信息
ToolUI: 工具框
LogUI: 消息记录
MapUI: 游戏屏幕.处理鼠标键盘事件
每个UI都监听GameModel,或者定时从GameModel取得必要数据.

原来想像的Model层次可能要简化:
Game{
  IList Players{get;}
  event MapChanged;
  Map Map{get;}
  Player Me{get;}
  IList Tools; //可以建造的兵种/车辆/建筑...
  AddNpc();
}
Player{
  IList Groups;//0:all units, 9:active units
  Money;
  Color;
  event Failed;
}
Map{
  IList Items;
  IList GetRadarInfo(Unit);
}
Unit{
  UnitAttriubte Attr;
  Location;
  Speed;
  Angle;
  ...
}
不同Unit的静态属性用Attriubte标记.

欢迎大家提出自己的想法.这里还留下一个课题,Server端怎么得到变化的属性,判断哪些需要通过什么方式发送给客户端.