您的位置:首页 > 其它

捕龙项目版本迭代说明(20160304、20160307、20160315)

2016-03-15 19:23 453 查看
Project Rebuild Required
Your project was last opened with an incompatible version of Unity(5.0.1f1).
D:/hxhwin7/U3d5.1.1/U3dlongtest5.0.1
We need to rebuild the project for the current version(5.1.1f1),which may take a few minutes.
【Rebuild】【Quit】
捕龙项目日志
20150420-Revision9
Statistics
54.3FPS(18.4ms)
CPU:main 18.2ms render thread 1.9ms
Batches:39 Saved by batching:0
Tris:106.9k Verts:100.8k
Screen:1135*638 - 8.3MB
SetPass calls:31 Shadow casters:12
Visible skinned meshes:2 Animations:0
隐藏大龙long2后:
49.3FPS(20.3ms)
CPU:main 20.3ms render thread 1.8ms
Batches:30 Saved by batching:0
Tris:55.5k Verts:54.1k
Screen:1135*638 - 8.3MB
SetPass calls:26 Shadow casters:9
Visible skinned meshes:1 Animations:0
隐藏大龙long2、小龙long3后:
48.6FPS(20.6ms)
CPU:main 20.6ms render thread 1.0ms
Batches:21 Saved by batching:0
Tris:4.1k Verts:7.4k
Screen:1135*638 - 8.3MB
SetPass calls:20 Shadow casters:6
Visible skinned meshes:0 Animations:0

单个场景Scenes/test01.unity
1、弩钩预制体Prefabs/Hook01.prefab
弩钩脚本Scripts/Hook.cs
暴露给编辑器的公有变量:
Speed=5
Live Time=8
Power=1
弩钩模型test01sc/rocket.fbx
弩钩材质球rocket1
弩钩碰撞体组件Box Collider
Is Trigger打钩
2、玩家对象Player1、玩家预制体Prefabs/Player.prefab
玩家脚本Scripts/Player.cs
暴露给编辑器的公有变量:
Rot Angle L=100
Rot Angle R=260
Rotate Speed=40
Hook Rate=0.09704454
Hook=Hook01(Transform)
玩家模型test01sc/Player.FBX
3、龙对象long2、long3、龙预制体Prefabs/long1.prefab
龙脚本Scripts/Longtest01.cs
暴露给编辑器的公有变量:
Life=2
Speed=1
Rot Speed=30
Timer=3
Rot Step=10
Rot Step X=0
Rot Step Y=0
Rot Step Z=0
右边的大龙long2:
Step X=-0.03
Step Y=0.01
Step Z=0.01
左边的小龙long3:
Step X=0
Step Y=0
Step Z=0
龙刚体组件Rigidbody 1个
龙碰撞体组件Capsule Collider 4个
龙模型test01sc/fly-2.FBX

使用Profiler工具分析CPU占用、GPU占用、内存占用情况

待机界面+Profiler CPU Usage
CPU:1.30ms GPU:0.00ms
A. WaitForTargetFPS:
Total=0.0%,Self=0.0%,Calls=1,GC Alloc=0B,Time ms=0.00,Self ms=0.00
Vsync(垂直同步)功能所,即显示当前帧的CPU等待时间
B. Overhead:
Total=18.9%,Self=18.9%,Calls=1,GC Alloc=0B,Time ms=0.24,Self ms=0.24
Profiler总体时间-所有单项的记录时间总和。用于记录尚不明确的时间消耗,以帮助进一步完善Profiler的统计。
C. Physics.Simulate:
Total=0.7%,Self=0.7%,Calls=1,GC Alloc=0B,Time ms=0.01,Self ms=0.01
当前帧物理模拟的CPU占用时间。
D. Camera.Render:
Total=28.1%,Self=5.9%,Calls=4,GC Alloc=0B,Time ms=0.36,Self ms=0.07
相机渲染准备工作的CPU占用量
E. RenderTexture.SetActive:
Total=0.1%,Self=0.1%,Calls=1,GC Alloc=0B,Time ms=0.00,Self ms=0.00
设置RenderTexture操作.
底层实现:
1.比对当前帧与前一帧的ColorSurface和DepthSurface.
2.如果这两个Buffer一致则不生成新的RT,否则则生成新的RT,并设置与之相对应的Viewport和空间转换矩阵.
F. Monobehaviour.OnMouse_ :
Total=0.6%,Self=0.0%,Calls=1,GC Alloc=0B,Time ms=0.00,Self ms=0.00
用于检测鼠标的输入消息接收和反馈,

SendMouseEvents.DoSendMouseEvents

Total=0.5%,Self=0.5%,Calls=1,GC Alloc=0B,Time ms=0.00,Self ms=0.00
G. HandleUtility.SetViewInfo:
Total=0.1%,Self=0.1%,Calls=1,GC Alloc=0B,Time ms=0.00,Self ms=0.00
仅用于Editor中,作用是将GUI和Editor中的显示看起来与发布版本的显示一致。
H. GUI.Repaint:
Total=8.7%,Self=3.3%,Calls=1,GC Alloc=1.4KB,Time ms=0.11,Self ms=0.04
GUI的重绘(说明在有使用原生的OnGUI)
HI.Event.Internal_MakeMasterEventCurrent:
Total=0.3%,Self=0.3%,Calls=1,GC Alloc=0B,Time ms=0.00,Self ms=0.00
负责GUI的消息传送
J. Cleanup Unused Cached Data:
Total=0.2%,Self=0.2%,Calls=1,GC Alloc=0B,Time ms=0.00,Self ms=0.00
清空无用的缓存数据,主要包括RenderBuffer的垃圾回收和TextRendering的垃圾回收。
1.RenderTexture.GarbageCollectTemporary:存在于RenderBuffer的垃圾回收中,清除临时的FreeTexture.
2.TextRendering.Cleanup:TextMesh的垃圾回收操作
K. Application.Integrate Assets in Background:
Total=0.0%,Self=0.0%,Calls=1,GC Alloc=0B,Time ms=0.00,Self ms=0.00
遍历预加载的线程队列并完成加载,同时,完成纹理的加载、Substance的Update等.

待机界面+Profiler Rendering:

Used Textures 使用的纹理5 - 21.5MB
The number of textures used to draw this frame and their memory usage.
绘制该帧使用的纹理数和它们使用的内存。
Render Textures
渲染纹理1 - 1.4MB
The number of Render Textures and their memory usage. The number of times the active Render Texture was switched each frame is also displayed.
渲染纹理的数量和它们使用的内存。每帧切换激活纹理的次数也显示。

SetPass Calls=7
Draw Calls=11
Total Batches=11
三角面=11,顶点数=172
VRAM usage显存使用=10.5MB to 32.2MB(of 128.0MB)【Win7台式机显存大小1696MB】

Approximate bounds of current video memory (VRAM) usage. This also shows how much video memory your graphics card has.
当前显存(VRAM)的使用情况的大约范围,同时显示你的显卡有多少显存。
VBO total=49 - 316.8KB
顶点缓冲区对象总数
The number of unique meshes (Vertex Buffers Objects or VBOs) that are uploaded to the graphics card. Each different model will cause a new VBO to be created. In some cases scaled objects will cause additional VBOs to be created. In the case of a static
batching, several different objects can potentially share the same VBO.
上传到图形卡的唯一网格(顶点缓冲区)的数量。各种不同的模式,将导致要创建新的VBO。在某些情况下缩放对象会导致要创建额外的VBO。在静态批处理的情况下,然而对象数量可以共享相同的VBO。

首先打开Profiler选择Memory选项,在游戏运行的某一帧查看Simple/Detailed选项数据
Simple模式的数据很直观,可以知道内存大体被哪部分占用了
待机界面+Memory Profiler+Simple:
A. Used Total:
当前帧的Unity内存、Mono内存、GfxDriver内存、Profiler内存的总和
总共用了253.8MB=Unity用了139.9MB+Mono用了11.8MB+GfxDriver用了49.0MB+FMOD用了15.2MB+Profiler用了53.1MB
B. Reserved Total:
系统在当前帧的申请内存
总共申请0.63GB=Unity的496.7MB+Mono的42.1MB+GfxDriver的49.0MB+FMO的15.2MB+Profiler的60.0MB
C. Total System Memory Usage:
当前帧的虚拟内存使用量=0.93GB,通常是我们当前使用内存的1.5~3倍
D. GameObjects in Scene:
当前帧场景中的GameObject数量=269
E. Total Objects in Scene:
当前帧场景中的Object数量=1199(除GameObject外,还有Component等).
F. Total Object Count:
Object数据1199+ Asset数量2518=3717
G. Textures:1361/89.6MB

渲染数据统计窗口Rendering Statistics Window
一、待机界面:
1、Animations动画=0
The number of animations playing. 正在播放动画的数量。
2、Visible Skinned Meshes可见蒙皮网格=0
The number of skinned meshes rendered.
渲染蒙皮网格的数量。
3、Screen屏幕=1188*668 - 9.1MB
The size of the screen, along with its anti-aliasing level and memory usage.
屏幕的大小,连同其抗锯齿级别和内存的使用率。
4、Tris and Verts三角面=78与顶点数=172
The number of triangles and vertices drawn. This is mostly important when optimizing for low-end hardware
绘制三角形和顶点的数目。为低端硬件的优化时(optimizing for low-end hardware),这多是重要的。
5、Batched (Draw Calls)=11
批处理(描绘调用)
6、Time per frame and FPS
每帧的时间=5.4ms和FPS=184.6FPS
二、选坦克界面:
1、Animations动画=12
2、Visible Skinned Meshes可见蒙皮网格=0
3、Screen屏幕=1188*668 - 9.1MB
4、Tris and Verts三角面=104与顶点数=224
5、Batched (Draw Calls)=24
6、Time per frame and FPS
每帧的时间=3.8ms和FPS=261.8FPS
三、战斗场景
1、Animations动画=0
2、Visible Skinned Meshes可见蒙皮网格=0
3、Screen屏幕=1188*668 - 9.1MB
4、Tris and Verts三角面=16.3k与顶点数=25.8k
5、Batched (Draw Calls)=122
6、Time per frame and FPS
每帧的时间=8.6ms和FPS=116.8FPS

20150521-Revision118

Assets/DynamicWater
Dynamic Water System交互式水面系统
Assets/EasyWater逼真水面制作插件
Assets/Graph_Maker在Unity3D中实现复杂图标的绘制,包括折线图,饼状图,柱状图等

GameManager.cs
用UILabel控件显示积分数、弩箭数、龙币数
Longbasic.cs
弩箭预制体标签Hook01、脚本hookbasic
播放捕获音效,获取积分和经验
public AudioClip m_capturedClip;
m_audio.PlayOneShot(m_capturedClip);

20150509-Revision87

Assets\Toon_Level_Kit卡通场景合集

Assets\TerrainComposer地形制作插件

Assets\ReliefPack
Relief Terrain Pack地形材质插件、编辑器地形扩展插件

Assets\QuickRopes 2制作绳索的专用插件

Assets\NGUI 3.7.8版的

Assets\LeanTween补间动画插件

8个炮位Pos

Pos01~08

炮位0处的弩对象Ballistatest02
炮位1处的弩对象Ballistatest
炮位6处的弩对象Ballistatest03

8个炮位处的UI对象UI Root
000~006

射击音效
D:\hxhwin7\U3d5.1.1\20150509-Revision87\longtest4.640508\Assets\FX\music\fire.wav
Ballistatest.cs脚本挂在弩预制体上

功能4:背景音乐
D:\hxhwin7\U3d5.1.1\20150509-Revision87\longtest4.640508\Assets\FX\music\BGM1.mp3
GameManager.cs脚本挂在Script游戏对象上

//背景音乐
public AudioClip m_musicClip;
//声音源
protected AudioSource m_Audio;

m_Audio = this.GetComponent<AudioSource>();

Update中添加:
//循环播放音乐
if (!m_Audio.isPlaying) {
m_Audio.clip =m_musicClip;
m_Audio.Play();
}

20150430-Revision59

Assets\Ultimate Game Tools\RopeEditor

Ultimate Rope Editor插件
一个用于Unity3D游戏开发的绳子插件,便于实现制作绳索等物体

Terrain游戏对象

箭对象:
HookwithRope.Awake:JianwithRope
HookwithRope.Awake:HookwithRope(Clone)

功能2:空格或左键发射弩钩
Hookgun.Count=1
HookwithRope.Awake:HookwithRope(Clone)
i=0position=(-0.8, 2.9, -4.5)rotation=(0.0, 0.0, 0.0, 1.0)

功能3:射击音效
D:\hxhwin7\U3d5.1.1\20150430-Revision59\longtest4.640430\Assets\FX\shoot.WAV
Ballistabasic暴露给编辑器的公有成员变量:

// 声音
public AudioClip m_shootClip;
// 声音源
protected AudioSource m_audio;

m_audio = this.GetComponent<AudioSource>();

// 播放射击声音
m_audio.PlayOneShot(m_shootClip);

JianwithRope游戏对象
HookwithRope预制体
HookwithRope脚本
Jian1游戏对象
Jian1预制体
Hookbasic脚本
jian 1.fbx模型

弩对象:

Ballistabasic.Awake:Ballistatest01

功能1:按A键弩向左旋转,按D键弩向右旋转
RotateAnglesA=(0.0, -0.3, 0.0)
euleranglesleft=(0.0, 179.7, 0.0)
RotateAnglesA=(0.0, -0.5, 0.0)
euleranglesleft=(0.0, 179.3, 0.0)
……
RotateAnglesA=(0.0, -0.2, 0.0)
euleranglesleft=(0.0, 94.8, 0.0)

RotateAnglesD=(0.0, 0.3, 0.0)
euleranglesright=(0.0, 180.3, 0.0)
RotateAnglesD=(0.0, 0.3, 0.0)
euleranglesright=(0.0, 180.6, 0.0)
……
RotateAnglesD=(0.0, 0.4, 0.0)
euleranglesright=(0.0, 260.2, 0.0)

Ballistatest01游戏对象
Ballistatest01预制体
Ballistabasic脚本

8个炮位
Pos
Pos01~Pos08逆时针,中间4个,右边2个,左边2个
PaoPosindex=0~3,4~5,6~7

20150708-Revision226

之前版本20150430-Revision59、20150509-Revision87就实现的功能:
功能1:按A键弩向左旋转,按D键弩向右旋转
7.3摇杆左右方向键实现弩炮左右旋转
功能2:空格或左键发射弩钩
功能3:射击音效
功能4:背景音乐
这个版本新增的功能:
功能5:龙群轨迹
功能6:用UGUI实现主界面、排行界面

1.unity

8个玩家位置(下4上4)
Canvas2
CameraUI2

排行界面
Canvas0
CameraUI0
功能7:8手柄输入功能

选择编辑|工程设置|输入,在输入管理器设置8个水平轴和8个垂直轴
7.1左方向键顺时针、右方向键逆时针选择炮座,B键选定炮座功能

驯龙项目上一个分支:

20150912-Revision571~20160316-Revision1695
LongSpawnNormal.Awake:LongSpawnNomal

龙轨迹预制体放在下面的目录:

G:\XunLong20160119\Assets\Project_hm\Prefabs\DragonsWithTracks 10.19

G:\XunLong20160119\Assets\Project_hm\Prefabs\Tracks7.14

Long01@fly_v2

PathGeneratorSpecial.cs

Round-TopRight-G 20

Longbasic.cs

Key=1

1号龙小葛伦科


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: