scut
相关资料
- (官网)[http://www.scutgame.com]
结构分析
数据库访问
网络服务器及访问
参考链接
Http服务器
协议发送与处理
日志系统
Timer系统
GameServer系统
线程系统
参考链接
1 | 打开 Visual Studio 2012 工具命令提示终端,这样VS环境就设置好了,否则在多版本VS下会出很多问题 |
编译boost
进入libs/config1
bash configure
将当前目录生成的user.hpp拷贝到boost/config下,覆盖同名文件
–layout=tagged 生成带-mt的库名,mongo-cxx-driver-legacy-1.0.0需要这种名字的库
-j4 并行编译1
./b2 --with-chrono --with-date_time --with-regex --with-system --with-thread --build-type=complete --layout=tagged -j4 --prefix=/usr/local threading=multi install
配置文件 boost/config/usr.hpp
说明文档:Boost.Config
工具bcp
1. 安装git,从程序目录打开 "Git Bash"
2. 键入命令:ssh-keygen -t rsa -C "github account"
"github account"是github账号
3. 提醒你输入key的名称,输入如id_rsa
4. 在C:\Documents and Settings\Administrator\下产生两个文件:id_rsa和id_rsa.pub
5. 把4中生成的密钥文件复制到C:\Documents and Settings\Administrator\.ssh\ 目 录下。
6. 用记事本打开id_rsa.pub文件,复制内容,在github.com的网站上到ssh密钥管理页面,添加新公钥,随便取个名字,内容粘贴刚公钥
boost库最好是从官网下预编译的,自己编的,在编mongoclient的时候可能会出现种问题
mongo-client-install\include\mongo\client\autolib.h 查看要哪个库文件
打开 Visual Studio 2012 工具命令提示终端,这样VS环境就设置好了,否则在多版本VS下会出很多问题1
2>scons --prefix=E:\work\xbdg\program\dep\mongo-client-install --sharedclient --dynamic-windows --cpppath=E:\work\xbdg\program\dep\boost_1_57_0 --libpath=E:\work\xbdg\program\dep\boost_1_57_0\lib32-msvc-11.0 --disable-warnings-as-errors --32 --dbg=off --msvc-version
=11.0 install
mongo-client-install\include\mongo\client\autolib.h 查看要哪个库文件
编译boost
–layout=tagged 生成带-mt的库名,mongo-cxx-driver-legacy-1.0.0需要这种名字的库
-j4 并行编译1
./b2 --with-chrono --with-date_time --with-regex --with-system --with-thread --build-type=complete --layout=tagged -j4 --prefix=/usr/local threading=multi install
编译mongo-cxx-driver-legacy-1.0.0
只能编动态库,静态库无法使用1
scons --prefix=/usr/local --disable-warnings-as-errors --64 --dbg=off --ssl -j4 --sharedclient --cpppath=`pwd`/../boost_1_57_0 --libpath=`pwd`/../boost_1_57_0/stage/lib --runtime-library-search-path=`pwd`/../boost_1_57_0/stage/lib install
好像3.0版后认证要用SSL
对于C++11程序要特别注意:
如果程序使用了C++11编译,则该Driver也要用C++11编译,否则就都不要使用C++11编译。
关于C++111
2
3
4
5
6
7ATTENTION FOR C++11 USERS:
If you want to use this driver for a project which gets compiled with c++11 features enabled (-std=c++11), you have to add --c++11 flag to scons, otherwise intialize the driver will crash with segmentation fault (see https://jira.mongodb.org/browse/CXX-458).
I can't enable this flag by default, because your project has to compile with -std=c++11, too. I could create an other package for reflecting this issue, if someone ask for it.
Otherwise current develop-branch of this driver is for c++11 only, but will take some time until it's usable (at least for testing).
Django模板为了防止XSS,缺省情况下会自动将HTML进行转义。
有的时候我们确实想输出一些含有HTML代码的内容(比如Web编辑器产生的文章内容数据),如何关闭自动转义?
方法1:使用过滤器。1
|safe
1 | { { data|safe } } |
这样data的内容就会原样输出,不会被转义。请确保data中的数据不会产生XSS。
方法2:关闭整段代码的自动转义。1
2
3{ % autoescape off % }
{ { data } }
{ % endautoescape % }
时区代码参考
中国上海时区代码:Asia/Shanghai
ImportFBX Errors: TimeRange (447392) for translation curve(s) on node ‘Bone005’ on take ‘Take 001’ larger than maximum allowed(100000)
在播放动画后,人物旋转值不对。
##
1 | UIGrid grid; |
-5.2没有问题
-4.1.5不能自动检测到VSTU的包,要自己找到安装路径里的VSTU包
#快速原型
Unity3D 模型换肤技术
Unity里的人物驱动/换装备/换武器/换衣服/动画重定位
换装demo时美术遇到的问题详解
这是为了应付不同模型同一装备要挂在不同位置而提出的解决方法。如果整个工程只能一个角色模型,那也就只用固定的挂点了,而程序也不用知道这个挂点在哪,用默认的就行了。
unity中武器替换的注意点
Melee Weapon Trail–Unity刀光插件分享
Unity5 中基於物理的著色器
基于物理着色(PBS)的材质系统
Unity3d 如何找到游戏对象并改变其颜色
IClone地形编辑器结合T4M插件在Unity3D使用
iClone
视频: iClone動畫教學12地形轉換
t4m
Object2Terrain
MAKING YOUR MOBILE GAME A SUCCESS. PART ONE: F2P GAME DESIGN
MAKING YOUR MOBILE GAME A SUCCESS. PART TWO: THE PREMIUM OPTION
MAKING YOUR MOBILE GAME A SUCCESS. PART THREE: ACQUIRING USERS
UNITY 4: AAA GRAPHICS AND PERFORMANCE FOR YOUR MOBILE GAMES
a 设置模型骨骼的根节点,bip骨骼一般是Bip 001
b 动画的Rig->Avatar Definition选择Copy From Other Avatar,Rig->Source选择对应骨骼的Avatar(也可以选择Create From This Model,然后设置根骨骼为Bip 001)
c 查看动画的面向是否正确,不正确则Aniamtions->Root Transform Rotation->Based Upon(at Start)选择Original
1 | animator.Play(animState) |
渲染顺序
在ZTest开启的情况下,由Z值决定。
其它情况下,渲染顺序为:Render queue > sorting layer > order in layer
UGUI的UI内部由节点顺序决定前后关系。UI在transparent queue,所以有时候可能会和粒子的显示顺序产生冲突,此时可以调整UI的Sorting layer
127.0.0.1 通过TCP连接可指定端口
localhost 通过unix socket连接,不能指定端口,指定了也不生效
MySQL中的锁(表锁、行锁) 并发控制锁
MySQL Innodb 事务隔离级别
#FAQ
无法连接数据库的一些原因
1 密码不对
2 未给用户设置密码
3 未给用户usage权限
连接权限:GRANT USAGE ON . TO ‘root’@’%’ IDENTIFIED BY ‘rootpassword’;
所有权限:GRANT ALL PRIVILEGES on . TO ‘root’@’%’ WITH GRANT OPTION;
更新密码:UPDATE mysql.user set password=PASSWORD(‘jubian@2013’) where user=’root’;
更新权限:flush privileges;
如何安全启动mysqld_multi
mysqld_multi –mysqld=mysqld_safe start 1,2,3..