2014-09-11 22:26:24|?次阅读|上传:huigezrx【已有?条评论】发表评论
关键词:Unity3D, 游戏, 虚拟现实|来源:唯设编程网
Unity Manual > Advanced > Web Player Streaming
Unity手册->高级->web播放器流
Web Player Streaming is critical for providing a great web gaming experience for the end user. The idea behind web games is that the user can view your content almost immediately and start playing the game as soon as possible instead of making him wait for a progress bar. This is very achievable, and we will explain how.
Web播放流是至关重要的提供良好的WEB游戏体验为最终用户。WEB游戏背后的想法是用户可以查看你的内容几乎尽快立即开始播放,而不是让他等待一个进度栏的游戏。这是完全实现的,我们将解释如何。
Tuning for Portals 调整门户
This section will focus on publishing to online game portals. Streaming is useful for all kinds of contents, and it can easily be applied to many other situations.
本节将集中发布到在线游戏门户网站。流媒体是有益的各种内容,并且可以很容易地应用到许多其他情况。
Online game portals expect that some form of game play really starts after downloading at most 1 MB of data. If you don't reach this makes it that much less likely for a portal to accept your content. From the user's perspective, the game needs to start quickly. Otherwise his time is being wasted and he might as well close the window.
在线游戏门户网站预计部分游戏的形式真正追求最多1 MB的数据下载启动。如果你没有达到这使得它不可能为一个门户网站接受你的内容。从用户的角度来看,游戏需要快速启动。否则,浪费他的时间,他也学关闭该窗口。
On a 128 kilobit cable connection you can download 16 KB per second or 1 MB per minute. This is the low end of bandwidth online portals target.
在一个 128千比特电缆连接,您可以下载16kB的每秒或每分钟1 MB。这是在线目标门户网站的带宽的低端。
The game would optimally be set up to stream something like this:
游戏将设立最佳流像这样:
The key point to keep in mind is to think in wait times for a user on a slow connection. Never let him wait.
关键的一点要记住,想一想通过慢速连接用户是在等待时间。从来没有让他等待。
Now, don't panic if your web player currently is 10 MB. It seems daunting to optimize it, but it turns out that with a little effort it is usually quite easy to structure your game in this fashion. Think of each above step as an individual scene. If you've made the game, you've done the hard part already. Structuring some scenes around this loading concept is a comparative breeze!
现在,不要惊慌,如果您的网页播放器目前是10 MB。看来优化是艰巨的,但结果是一点点的努力通常是很容易的以这种方式结构化你的游戏照。想想每个个别场景上述步骤。如果你做的游戏中,你已经做了困难的部分。构建解决此加载的概念是一个比较轻微的一些场面!
If you open the console log (Open Editor Log button in the Console window ) after or during a build, you can see the size of each individual scene file. The console will show something like this:
如果你打开控制台日志(打开编辑器登录到控制台窗口按钮)后或在编译过程中,你可以看到每个=的场景文件的大小。控制台会显示这样的:
***Player size statistics***
Level 0 'Main Menu' uses 95.0 KB compressed.
Level 1 'Character Builder' uses 111.5 KB compressed.
Level 2 'Level 1' uses 592.0 KB compressed.
Level 3 'Level 2' uses 2.2 MB compressed.
Level 4 'Level 3' uses 2.3 MB compressed.
Total compressed size 5.3 MB. Total decompressed size 9.9 MB.
This game could use a little more optimization! For more information, we recommend you read the reducing file size page.
此游戏可以用多一点的优化!欲了解更多信息,我们建议你阅读减少文件大小页面。
The Most Important Steps最重要的步骤