会员
T恤
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
trap
thorough
首页
新随笔
联系
订阅
管理
随笔 - 46
文章 - 0
评论 - 1
阅读 -
14557
2015年6月3日
Unity 异步网络方案 IOCP Socket + ThreadSafe Queue
摘要: Unity IOCP Socket + ThreadSafe Queue1.Socket.BeginReceive系列接口在unityweb下是不正常的,页面刷新会导致问题2.自己维护线程,会带来一点小麻烦3.下面采用iocp+threadsafequeue 来实现异步网络```public cla...
阅读全文
posted @ 2015-06-03 14:49 summernight
阅读(2119)
评论(1)
推荐(0)
2015年2月9日
unity 四元数, 两行等价的代码
摘要: Vector3 tmpvc;1. tmpvc = Quaternion.Euler (new Vector3 (0, 30, 0)) * new Vector3 (0, 0, 1);2. tmpvc = new Vector3 (sin (30.0f), 0, cos (30.0f)); ...
阅读全文
posted @ 2015-02-09 15:29 summernight
阅读(268)
评论(0)
推荐(0)
2015年1月31日
golang的项目结构 相关知识
摘要: ### 项目结构```├── bin│ ├── login│ └── main├── pkg│ └── darwin_amd64│ └── login│ └── auth1.a├── src│ ├── cfg│ │ └── testcfg.go│ ├── db│ │ ├── ...
阅读全文
posted @ 2015-01-31 16:48 summernight
阅读(427)
评论(0)
推荐(0)
2015年1月29日
stencil in unity3d
摘要: Pass { Stencil { Ref 1 Comp Always Pass REPLACE } AlphaTest Gr...
阅读全文
posted @ 2015-01-29 17:04 summernight
阅读(285)
评论(0)
推荐(0)
2015年1月26日
一段tcl代码
摘要: #!/usr/bin/wishproc icanspeak {} { set name [.ent get] if {[string length $name] != 0} { exec s $name }}label .lab -text "Enter word:"...
阅读全文
posted @ 2015-01-26 23:16 summernight
阅读(253)
评论(0)
推荐(0)
2015年1月21日
16_游戏编程模式ServiceLocator 服务定位
摘要: ####简单说,就是某个系统作为一个服务,对全局系统可见.Service Locator (服务定位)```//简单粗暴的代码, 使用声音系统// Use a static class?AudioSystem::playSound(VERY_LOUD_BANG);// Or maybe a sing...
阅读全文
posted @ 2015-01-21 15:09 summernight
阅读(333)
评论(0)
推荐(0)
15_游戏编程模式EventQueue
摘要: #### 两个例子1.GUI event loop```while (running){ // 从事件队列里获取一个事件 Event event = getNextEvent(); // Handle event...}```2.Central event bus 不同系统公用的通信中心...
阅读全文
posted @ 2015-01-21 13:31 summernight
阅读(341)
评论(0)
推荐(0)
2015年1月20日
14_ Component 游戏开发组件模式
摘要: # component不同作用的程序需要保持互相隔离我们不想ai 物理 渲染 声音 等等功能 耦合在一起,像下面这样```//bad if (collidingWithFloor() && (getRenderState() != INVISIBLE)){ playSound(HIT_FLOOR)...
阅读全文
posted @ 2015-01-20 18:17 summernight
阅读(249)
评论(0)
推荐(0)
11-13 游戏编程行为模式
摘要: ### Behavioral Pattern#### interpreter pattern string -> code instruction set: 提供基本操作virtual machine: 执行指令front-end: 生成效率更高的字节码```void setHe...
阅读全文
posted @ 2015-01-20 17:38 summernight
阅读(182)
评论(0)
推荐(0)
MonoBehavior lifecycle
摘要: awake 只调用一次, awake在所有obj都初始化之后被调用. 用途: 初始化游戏状态 设置脚本间的引用 ### ExecuteInEditMode 编辑模式下```这个模式下,脚本编译,会自动reload[ExecuteInEdit...
阅读全文
posted @ 2015-01-20 15:38 summernight
阅读(394)
评论(0)
推荐(0)
下一页
最新随笔
1.Unity 异步网络方案 IOCP Socket + ThreadSafe Queue
2.unity 四元数, 两行等价的代码
3.golang的项目结构 相关知识
4.stencil in unity3d
5.一段tcl代码
6.16_游戏编程模式ServiceLocator 服务定位
7.15_游戏编程模式EventQueue
8.14_ Component 游戏开发组件模式
9.11-13 游戏编程行为模式
10.MonoBehavior lifecycle
我的标签
gameprogrammingpatterns
(12)
say
(7)
unity3d
(6)
game
(5)
network
(4)
swift
(3)
latency
(3)
socket
(2)
shader
(2)
rust
(2)
更多
随笔档案
2015年6月(1)
2015年2月(1)
2015年1月(25)
2014年12月(1)
2014年8月(2)
2014年7月(2)
2014年6月(14)
阅读排行榜
1. Unity 异步网络方案 IOCP Socket + ThreadSafe Queue(2119)
2. erlang的map基本使用(1829)
3. 7_DoubleBuffer 游戏编程中的双缓存模式(1172)
4. unity3d mvvm c#(706)
5. 1_Command 游戏开发命令模式(482)
评论排行榜
1. Unity 异步网络方案 IOCP Socket + ThreadSafe Queue(1)
最新评论
1. Re:Unity 异步网络方案 IOCP Socket + ThreadSafe Queue
能解释一下用线程安全的队列接收数据是什么意思吗
--菜鸟的编程之路
点击右上角即可分享