<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>游戏开发 &#8211; Bright Games</title>
	<atom:link href="https://brightgames.top/category/%e6%b8%b8%e6%88%8f%e5%bc%80%e5%8f%91/feed" rel="self" type="application/rss+xml" />
	<link>https://brightgames.top</link>
	<description>梦想启程的地方-分享游戏制作的技术与发现</description>
	<lastBuildDate>Mon, 06 Dec 2021 15:50:20 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>

<image>
	<url>https://brightgames.top/wp-content/uploads/2020/03/cropped-cropped-image001-1-1-32x32.png</url>
	<title>游戏开发 &#8211; Bright Games</title>
	<link>https://brightgames.top</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>UnityVR练手——夏夜的宁静海滩</title>
		<link>https://brightgames.top/admin/372</link>
					<comments>https://brightgames.top/admin/372#respond</comments>
		
		<dc:creator><![CDATA[NuclearGPU]]></dc:creator>
		<pubDate>Tue, 22 Jun 2021 11:18:25 +0000</pubDate>
				<category><![CDATA[游戏开发]]></category>
		<guid isPermaLink="false">http://101.34.254.142/?p=372</guid>

					<description><![CDATA[宁静的夏夜，伴随着海浪与海风，沙滩乐和篝火，进入悠闲的VR世界，整个人都治愈了。这是花了两天做的VRChat世 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="491" src="https://cdn.brightgames.top/wp-content/uploads/2021/06/image-1024x491.png" alt="" class="wp-image-373" srcset="https://brightgames.top/wp-content/uploads/2021/06/image-1024x491.png 1024w, https://brightgames.top/wp-content/uploads/2021/06/image-300x144.png 300w, https://brightgames.top/wp-content/uploads/2021/06/image-768x368.png 768w, https://brightgames.top/wp-content/uploads/2021/06/image-1536x736.png 1536w, https://brightgames.top/wp-content/uploads/2021/06/image-2048x981.png 2048w, https://brightgames.top/wp-content/uploads/2021/06/image-1020x489.png 1020w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-video"><video controls src="https://img.brightgames.top/VRChat%202021-06-22%2018-51-47%2000_03_55-00_08_04.mp4"></video></figure>



<p>宁静的夏夜，伴随着海浪与海风，沙滩乐和篝火，进入悠闲的VR世界，整个人都治愈了。这是花了两天做的VRChat世界“低多边形悠闲海滩”，实验了一些基本的VR交互，为之后制作更大规模的VR世界做准备。之前寒假的时候其实在制作上古卷轴5的模组，熟悉了一些游戏素材的制作流程，以后说不定可以派上用场。</p>



<p><a href="https://vrchat.com/home/world/wrld_e70b5f10-2e07-4276-a1bf-3bc216490a0c">VRChat地图链接</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://brightgames.top/admin/372/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://img.brightgames.top/VRChat%202021-06-22%2018-51-47%2000_03_55-00_08_04.mp4" length="78589735" type="video/mp4" />

			</item>
		<item>
		<title>制作一个Ragdoll风格人物控制器</title>
		<link>https://brightgames.top/admin/269</link>
					<comments>https://brightgames.top/admin/269#respond</comments>
		
		<dc:creator><![CDATA[NuclearGPU]]></dc:creator>
		<pubDate>Thu, 21 May 2020 08:46:51 +0000</pubDate>
				<category><![CDATA[游戏开发]]></category>
		<guid isPermaLink="false">http://101.34.254.142/?p=269</guid>

					<description><![CDATA[Ragdoll系统在现代游戏中已经非常常见，而ragdoll式的人物控制器在近几年也颇受欢迎，人类一败涂地中就 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Ragdoll系统在现代游戏中已经非常常见，而ragdoll式的人物控制器在近几年也颇受欢迎，人类一败涂地中就有这样让角色看起来软乎乎的角色控制器。</p>



<p>最近在做的游戏也想做成这种软乎乎的风格，于是开始了尝试。</p>



<p>使用的素材是unity免费公开的角色unity chan，免费角色配免费动作和完整的碰撞体是完美的测试素材。在场景中添加一个ragdoll，绑定unitychan的骨骼，准备工作就完成了。</p>



<figure class="wp-block-video"><video controls src="http://101.34.254.142/wp-content/uploads/2020/05/ragdollplayer-1.mp4"></video><figcaption>刚设置完</figcaption></figure>



<p>但是仅仅这样unity酱是站不起来的，ragdoll状态下的角色没有控制只是瘫倒在地而已。所以要添加configurable joints ，将Angular X Drive和Angular YZ Drive的Spring和Damper属性调大，我填了1000和300，这个属性可以帮助角色直立。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="904" height="703" src="https://cdn.brightgames.top/wp-content/uploads/2020/05/1055581D-C4F2-475B-A9C4-C4BC5EED9D0C.png" alt="" class="wp-image-281" srcset="https://brightgames.top/wp-content/uploads/2020/05/1055581D-C4F2-475B-A9C4-C4BC5EED9D0C.png 904w, https://brightgames.top/wp-content/uploads/2020/05/1055581D-C4F2-475B-A9C4-C4BC5EED9D0C-300x233.png 300w, https://brightgames.top/wp-content/uploads/2020/05/1055581D-C4F2-475B-A9C4-C4BC5EED9D0C-768x597.png 768w" sizes="(max-width: 904px) 100vw, 904px" /></figure>



<figure class="wp-block-video"><video controls src="http://101.34.254.142/wp-content/uploads/2020/05/ragdollplayer-2.mp4"></video><figcaption>Configurable Joint可以强行让unity酱站立</figcaption></figure>



<p>可以看出Unitychan直接站立后就如被气球吊起一般，无法正常站立，排查后发现是因为角色的小腿只有capsule形状的collider，接触地面的面积不够，给角色脚上增加了box Collider后问题解决。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="741" src="https://cdn.brightgames.top/wp-content/uploads/2020/05/620C0CCC-6746-4600-84C4-6728BEDEF1B1-1024x741.png" alt="" class="wp-image-283" srcset="https://brightgames.top/wp-content/uploads/2020/05/620C0CCC-6746-4600-84C4-6728BEDEF1B1-1024x741.png 1024w, https://brightgames.top/wp-content/uploads/2020/05/620C0CCC-6746-4600-84C4-6728BEDEF1B1-300x217.png 300w, https://brightgames.top/wp-content/uploads/2020/05/620C0CCC-6746-4600-84C4-6728BEDEF1B1-768x555.png 768w, https://brightgames.top/wp-content/uploads/2020/05/620C0CCC-6746-4600-84C4-6728BEDEF1B1-1536x1111.png 1536w, https://brightgames.top/wp-content/uploads/2020/05/620C0CCC-6746-4600-84C4-6728BEDEF1B1-1020x738.png 1020w, https://brightgames.top/wp-content/uploads/2020/05/620C0CCC-6746-4600-84C4-6728BEDEF1B1.png 1922w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>改变了接触面积</figcaption></figure>



<figure class="wp-block-video"><video controls src="http://101.34.254.142/wp-content/uploads/2020/05/ragdollplayer-3.mp4"></video><figcaption>一个bug，最后通过减小configurable joints 的angular drive的damper解决</figcaption></figure>



<p>角色动画控制方面需要点小技巧，因为ragdoll不能直接套用animator，所以要用一个标准的角色模型作为参考，将animator放置于没有设置rigidbody的模型上，使用我写的targetJoint.cs连接ragdoll角色的骨骼与动画控制角色的骨骼，因为人的关节活动受限，所以只模拟rotation就能够很好的同步动作。</p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public class TargetJoint : MonoBehaviour
{
    public float strength = 10;
    public Transform targetTransform;
    private void FixedUpdate()
    {
        Rigidbody body=GetComponent&lt;Rigidbody>();
        float lerpValue = Time.fixedDeltaTime * strength;
        //Vector3 targetPosition = Vector3.Lerp(body.position, targetTransform.position, lerpValue);
        //body.MovePosition(targetPosition);
        Quaternion targetRotation = Quaternion.Lerp(body.rotation, targetTransform.rotation, lerpValue);
        body.MoveRotation(targetRotation);
    }
}
</pre>



<figure class="wp-block-video"><video controls src="http://101.34.254.142/wp-content/uploads/2020/05/ragdollplayer-4.mp4"></video><figcaption>测试各种动作</figcaption></figure>



<figure class="wp-block-video"><video controls src="http://101.34.254.142/wp-content/uploads/2020/05/ragdollplayer-5.mp4"></video><figcaption>最后给角色加上控制器后即可操作角色</figcaption></figure>



<p>参考资料：</p>



<p><a href="https://youtu.be/u661TmGPbok">https://youtu.be/u661TmGPbok</a> Making a ragdoll game in unity | my unity journey</p>



<p><a href="https://youtu.be/MElbAwhMvTc">https://youtu.be/MElbAwhMvTc</a> Fixed, Spring, Hinge, Character &amp; Configurable Joint explained &#8211; Unity Tutorial</p>



<p><a href="https://youtu.be/sjRE4qW_giU">https://youtu.be/sjRE4qW_giU</a> how to Balance Active Ragdoll Unity 3d in 1 line of code tutorial</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brightgames.top/admin/269/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Unity制作游戏——GGJ2020作品《SYSTEMERROR》</title>
		<link>https://brightgames.top/admin/240</link>
					<comments>https://brightgames.top/admin/240#respond</comments>
		
		<dc:creator><![CDATA[NuclearGPU]]></dc:creator>
		<pubDate>Mon, 16 Mar 2020 15:52:48 +0000</pubDate>
				<category><![CDATA[游戏开发]]></category>
		<guid isPermaLink="false">http://101.34.254.142/?p=240</guid>

					<description><![CDATA[游戏介绍：玩家发现自己的电脑里文件被锁定，即将自动关机，为了修复电脑解开文件，只能寻找线索来破解谜题，最后玩家 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>游戏介绍：玩家发现自己的电脑里文件被锁定，即将自动关机，为了修复电脑解开文件，只能寻找线索来破解谜题，最后玩家发现整个谜题其实是一个网络安全社团的考验。</strong></p>



<p>游戏SYSTEMERROR是一个控制台风格的解谜游戏</p>



<figure class="wp-block-gallery columns-2 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><a href="https://cdn.brightgames.top/wp-content/uploads/2020/03/console-2020_2_2-17_31_02-1024x576.png"><img loading="lazy" width="1024" height="576" src="https://cdn.brightgames.top/wp-content/uploads/2020/03/console-2020_2_2-17_31_02-1024x576.png" alt="" data-id="241" class="wp-image-241" srcset="https://brightgames.top/wp-content/uploads/2020/03/console-2020_2_2-17_31_02-1024x576.png 1024w, https://brightgames.top/wp-content/uploads/2020/03/console-2020_2_2-17_31_02-300x169.png 300w, https://brightgames.top/wp-content/uploads/2020/03/console-2020_2_2-17_31_02-768x432.png 768w, https://brightgames.top/wp-content/uploads/2020/03/console-2020_2_2-17_31_02-1536x864.png 1536w, https://brightgames.top/wp-content/uploads/2020/03/console-2020_2_2-17_31_02-1020x574.png 1020w, https://brightgames.top/wp-content/uploads/2020/03/console-2020_2_2-17_31_02.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="blocks-gallery-item__caption">游戏的主要界面</figcaption></figure></li><li class="blocks-gallery-item"><figure><a href="https://cdn.brightgames.top/wp-content/uploads/2020/03/SYSTEMERROR-2020_2_2-17_30_22.png"><img loading="lazy" width="1024" height="576" src="https://cdn.brightgames.top/wp-content/uploads/2020/03/SYSTEMERROR-2020_2_2-17_30_22-1024x576.png" alt="" data-id="242" data-full-url="https://cdn.brightgames.top/wp-content/uploads/2020/03/SYSTEMERROR-2020_2_2-17_30_22.png" data-link="http://101.34.254.142/?attachment_id=242" class="wp-image-242" srcset="https://brightgames.top/wp-content/uploads/2020/03/SYSTEMERROR-2020_2_2-17_30_22-1024x576.png 1024w, https://brightgames.top/wp-content/uploads/2020/03/SYSTEMERROR-2020_2_2-17_30_22-300x169.png 300w, https://brightgames.top/wp-content/uploads/2020/03/SYSTEMERROR-2020_2_2-17_30_22-768x432.png 768w, https://brightgames.top/wp-content/uploads/2020/03/SYSTEMERROR-2020_2_2-17_30_22-1536x864.png 1536w, https://brightgames.top/wp-content/uploads/2020/03/SYSTEMERROR-2020_2_2-17_30_22-1020x574.png 1020w, https://brightgames.top/wp-content/uploads/2020/03/SYSTEMERROR-2020_2_2-17_30_22.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="blocks-gallery-item__caption">开始界面</figcaption></figure></li></ul></figure>



<p>程序:Bright Fan,Atlas Xu</p>



<p>策划: PIQO,Atlas Xu</p>



<p>美术:Bright Fan</p>



<p>Fan：在得知主题是repair后，我们的一开始想法是做一个有漏洞的游戏，让玩家挖掘，虽然我们都很想这么做，但是技术力不是很够，做出来绝对会不好玩。游戏风格是最早定下来的，因为我想尝试控制台风格的画面，尝试一下新东西。题材除了大赛的主题Repair以外，还有CTF（一种网络安全的解密比赛），我们头脑风暴的时候得知许同学最近参加了CTF，他也很慷慨地分享了自己参赛的经历，于是我决定想做一个CTF题材的游戏。开发时一开始用的是Unity，但是用Unity写这种没什么图形界面的游戏并不是好主意，第一天开发进度给严重拖后，只做了游戏开场的交互，后来还是换上了熟悉的.Net。游戏界面除了“电脑控制台”部分还有“手机”部分，“手机”部分是汪同学想出来的，控制台外的“手机”画面从承担了游戏指引的功能，谜题、线索基本都是以邮件、网页的形式在“手机”画面中展示，图形化的界面也使得游戏看起来容易上手一些。（游戏中的手机部分也是可以黑入的，地址是192.168.1.100）。</p>



<p>Xu:   我稍微接触过CTF比赛（虽然真的很菜），于是提出把游戏做成类似CTF比赛的解谜游戏，CTF也是在各种线索中求得答案，加上CTF中一部分的题目比较符合范同学想要的控制台风格，于是就在做过的题目中选择了几题，然后将难的部分略去细节，多环节的题目进行拆分，虽然最后测试还是发现游戏难度有点大了。最后为了贴合这个题目，给了个比较符合场景的设定，但是由于时间限制，在游戏里只体现了一部分。</p>



<p>这次开发和以往的Jam不同，我们队伍所有人都分散在不同的地方（虽然在同一个城市，但是也因为疫情限制出行），讨论全靠QQ电话，我们队伍一边讨论，一边在在线文档里写策划案、打表，这种形式比往常面对面的沟通增加了许多挑战。真是非常特殊的一次Game Jam经历</p>



<iframe loading="lazy" src="//player.bilibili.com/player.html?aid=89193578&#038;cid=152345198&#038;page=1" width="100%" height="800px" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>



<p>因为这回的游戏开发实在仓促，开发工具中途都换了好几个，游戏也不支持webGL，就不做展示了，有想玩的在下面留言留下邮箱我可以发给你。（也可以去GGJ官网下载）</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brightgames.top/admin/240/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Unity制作游戏——2019CIGA Game Jam作品《需要一个★》</title>
		<link>https://brightgames.top/admin/152</link>
					<comments>https://brightgames.top/admin/152#respond</comments>
		
		<dc:creator><![CDATA[NuclearGPU]]></dc:creator>
		<pubDate>Thu, 25 Jul 2019 08:51:02 +0000</pubDate>
				<category><![CDATA[游戏开发]]></category>
		<guid isPermaLink="false">http://101.34.254.142/?p=152</guid>

					<description><![CDATA[七月初Atlas Xu同学邀请我去广州玩，刚好CIGA Game Jam也有广州站，我们就参加了CIGA Ga [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image"><img loading="lazy" width="768" height="1024" src="//cdn.brightgames.top/wp-content/uploads/2019/07/IMG_20190707_091316_1-768x1024.png" alt="" class="wp-image-161" srcset="https://brightgames.top/wp-content/uploads/2019/07/IMG_20190707_091316_1-768x1024.png 768w, https://brightgames.top/wp-content/uploads/2019/07/IMG_20190707_091316_1-225x300.png 225w, https://brightgames.top/wp-content/uploads/2019/07/IMG_20190707_091316_1-1020x1360.png 1020w, https://brightgames.top/wp-content/uploads/2019/07/IMG_20190707_091316_1.png 1944w" sizes="(max-width: 768px) 100vw, 768px" /><figcaption>参加Game Jam 的小伙伴，从左到右分别是BrightFan、PICQ、Atlas Xu</figcaption></figure>



<p>    七月初Atlas Xu同学邀请我去广州玩，刚好CIGA Game Jam也有广州站，我们就参加了CIGA Game Jam广州站。PICQ和我是老搭档了，上回CCG他也有参加，Atlas Xu这回是第一次和我们组队，上回的音效大佬因为感觉路途过于遥远就没有来参加了，结果这回我们小队三个人都是程序（都没什么Unity开发经验）。。。</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="926" src="//cdn.brightgames.top/wp-content/uploads/2019/07/IMG_20190705_175031-2-1024x926.jpg" alt="" class="wp-image-158" srcset="https://brightgames.top/wp-content/uploads/2019/07/IMG_20190705_175031-2-1024x926.jpg 1024w, https://brightgames.top/wp-content/uploads/2019/07/IMG_20190705_175031-2-300x271.jpg 300w, https://brightgames.top/wp-content/uploads/2019/07/IMG_20190705_175031-2-768x695.jpg 768w, https://brightgames.top/wp-content/uploads/2019/07/IMG_20190705_175031-2-1020x922.jpg 1020w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>这回Game Jam的主题</figcaption></figure>



<p>    这回Game Jam的主题是一张图片，上面是一个人缺失了一个倒<img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f53a.png" alt="🔺" class="wp-smiley" style="height: 1em; max-height: 1em;" />形状的心，旁边的几只手递出了拿着<img src="https://s.w.org/images/core/emoji/13.1.0/72x72/2764.png" alt="❤" class="wp-smiley" style="height: 1em; max-height: 1em;" />形状的心。我们的解读是“提供的和输出的不符”，正好最近看了Zachlike这本书，就有点想做工厂类游戏，给出一个简单形状，通过以一系列机关以后变为一个复杂形状。所以第一天晚上我们做的尝试就是在做一个类似无尽工厂的游戏，所以一开始做的都是回合式的交互。尽管这个想法可能很有趣，但是编程难度过高了，全速做出来的几个机关也不算很丰富有趣，所以就把游戏改成了即时操作，但是基本的思路还是不变，简单图形经过复杂变换变成复杂图形。尽管时间很紧张（直到最后一天上午才完成系统开始设计关卡），但是游戏还是得以在时间内完成。</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="271" src="//cdn.brightgames.top/wp-content/uploads/2019/10/d4c65bb7-274b-400f-be8c-4682af28bc11-1024x271.png" alt="" class="wp-image-171" srcset="https://brightgames.top/wp-content/uploads/2019/10/d4c65bb7-274b-400f-be8c-4682af28bc11-1024x271.png 1024w, https://brightgames.top/wp-content/uploads/2019/10/d4c65bb7-274b-400f-be8c-4682af28bc11-300x80.png 300w, https://brightgames.top/wp-content/uploads/2019/10/d4c65bb7-274b-400f-be8c-4682af28bc11-768x204.png 768w, https://brightgames.top/wp-content/uploads/2019/10/d4c65bb7-274b-400f-be8c-4682af28bc11-1020x270.png 1020w, https://brightgames.top/wp-content/uploads/2019/10/d4c65bb7-274b-400f-be8c-4682af28bc11.png 1196w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>


<a href="https://101.34.254.142/wp-content/uploads/2019/07/help0.pdf" class="pdfemb-viewer" style="" data-width="max" data-height="max"  data-toolbar="bottom" data-toolbar-fixed="off">help0<br/></a>
<p class="wp-block-pdfemb-pdf-embedder-viewer"></p>



<p><a rel="noreferrer noopener" aria-label="（在新窗口打开）" href="http://cdn.brightgames.top/webgl/2019CIGA/" target="_blank">游戏地址</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://brightgames.top/admin/152/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Unity制作游戏——GGJ2019游戏《分歧》</title>
		<link>https://brightgames.top/admin/97</link>
					<comments>https://brightgames.top/admin/97#respond</comments>
		
		<dc:creator><![CDATA[NuclearGPU]]></dc:creator>
		<pubDate>Mon, 28 Jan 2019 04:16:35 +0000</pubDate>
				<category><![CDATA[游戏开发]]></category>
		<guid isPermaLink="false">http://101.34.254.142/?p=97</guid>

					<description><![CDATA[说到Global Game Jam 2019的主题What Home Means To You，很多人都想到了 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image"><img loading="lazy" width="1024" height="512" src="//cdn.brightgames.top/wp-content/uploads/2019/01/TIM图片20190126155537-1024x512.png" alt="" class="wp-image-98" srcset="https://brightgames.top/wp-content/uploads/2019/01/TIM图片20190126155537.png 1024w, https://brightgames.top/wp-content/uploads/2019/01/TIM图片20190126155537-300x150.png 300w, https://brightgames.top/wp-content/uploads/2019/01/TIM图片20190126155537-768x384.png 768w, https://brightgames.top/wp-content/uploads/2019/01/TIM图片20190126155537-1020x510.png 1020w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>游戏背景素材</figcaption></figure>



<p>说到Global Game Jam 2019的主题What Home Means To You，很多人都想到了亲人、父母，我们也不例外。然后玩法上因为我和另外一个程序基本上是零经验，所以主要玩法上使用了比较简单的跑酷游戏。主角是蓝色小人和粉红色小人，你需要操作他们跳过障碍，游戏中还有白色小人，象征着孩子，蓝色和红色任意一方带着孩子时压力值会上升，不带孩子时压力值会下降，你需要操作他们跨越障碍，克服压力，达到人生幸福的彼端。因为没有专门的美术，游戏中所有的美术都是我自己完成的，音效和音乐则是大学同学LanThe完成的。程序部分PICQ同学和我各负责了一半，因为都是新手，整个项目充斥着“能用就行”的代码。。。</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="576" src="//cdn.brightgames.top/wp-content/uploads/2019/01/2019-01-27-1-1-1024x576.png" alt="" class="wp-image-100" srcset="https://brightgames.top/wp-content/uploads/2019/01/2019-01-27-1-1-1024x576.png 1024w, https://brightgames.top/wp-content/uploads/2019/01/2019-01-27-1-1-300x169.png 300w, https://brightgames.top/wp-content/uploads/2019/01/2019-01-27-1-1-768x432.png 768w, https://brightgames.top/wp-content/uploads/2019/01/2019-01-27-1-1-1020x574.png 1020w, https://brightgames.top/wp-content/uploads/2019/01/2019-01-27-1-1.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>游戏截图</figcaption></figure>



<figure class="wp-block-video"><video controls src="//cdn.brightgames.top/wp-content/uploads/2019/01/格式工厂home-2019_1_27-15_22_09_Trim.mp4"></video><figcaption>会带来DeBuff的孩子</figcaption></figure>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="625" src="//cdn.brightgames.top/wp-content/uploads/2019/01/2019-01-28-2-1-1024x625.png" alt="" class="wp-image-103" srcset="https://brightgames.top/wp-content/uploads/2019/01/2019-01-28-2-1-1024x625.png 1024w, https://brightgames.top/wp-content/uploads/2019/01/2019-01-28-2-1-300x183.png 300w, https://brightgames.top/wp-content/uploads/2019/01/2019-01-28-2-1-768x469.png 768w, https://brightgames.top/wp-content/uploads/2019/01/2019-01-28-2-1-1020x623.png 1020w, https://brightgames.top/wp-content/uploads/2019/01/2019-01-28-2-1.png 1289w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>游戏操作，建议使用手柄，键盘上按钮要长按才有反应</figcaption></figure>



<iframe loading="lazy" src="//player.bilibili.com/player.html?aid=41895749&amp;cid=73556378&amp;page=1" width="100%" height="800px" 
max-height="65%" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>



<p><a href="https://globalgamejam.org/2019/games/%E5%88%86%E6%AD%A7">游戏的GGJ页面</a></p>



<p><a href="https://ggj.s3.amazonaws.com/games/2019/01/248252/exec/G8uvA/win.zip">游戏windows版下载</a></p>



<p><a href="http://cdn.brightgames.top/webgl/webGL/index.html">游戏网页版试玩（部分文字缺失,不影响游戏）</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://brightgames.top/admin/97/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Unity制作小游戏——海战游戏开发实战【一】</title>
		<link>https://brightgames.top/admin/33</link>
					<comments>https://brightgames.top/admin/33#respond</comments>
		
		<dc:creator><![CDATA[NuclearGPU]]></dc:creator>
		<pubDate>Tue, 06 Nov 2018 02:57:22 +0000</pubDate>
				<category><![CDATA[游戏开发]]></category>
		<guid isPermaLink="false">http://106.14.191.25/?p=33</guid>

					<description><![CDATA[先看demo：webgl-demos 完成了移动和瞄准、镜头切换。   一.移动 移动部分使用了对Rigidb [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>先看demo：<a href="http://101.34.254.142/webgl-demos">webgl-demos</a></p>



<p>完成了移动和瞄准、镜头切换。</p>


<p> </p>
<p><a href="http://img.brightgames.top/%E6%97%A0%E6%A0%87%E9%A2%98.jpg"><img src="http://img.brightgames.top/%E6%97%A0%E6%A0%87%E9%A2%98.jpg" alt="无标题.jpg" /></a></p>
<h4>一.移动</h4>
<p>移动部分使用了对Rigidbody（刚体）的操作，船的运动状态是线性的，所以要模拟出物理的船的移动最好的方法就是操作Rigidbody。</p>
<p>对于Rigidbody，Unity已经给出了物理模拟系统，只要设定阻力和质量就可以了。在这里，我锁定了船体的rigidbody的Y坐标和X轴和Z轴的旋转。</p>
<p>添加了Box Colider来处理和山体的碰撞。</p>
<p><a href="http://img.brightgames.top/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20181115195235.png"><img src="http://img.brightgames.top/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20181115195235.png" alt="微信图片_20181115195235.png" /></a></p>
<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="eclipse">  private Rigidbody shipBody;
  void Start ()
  {
      shipBody = this.GetComponent&lt;Rigidbody&gt;();//获取Rigidbody组件
}

  void FixedUpdate ()
  {
      float h = Input.GetAxis("Horizontal");//获取按键左右（支持摇杆）

      float v = Input.GetAxis("Vertical");//获取按键前后（支持摇杆）
      shipBody.AddRelativeForce(new Vector3(0, 0, v * 4), ForceMode.Acceleration);//施加前进后退的力
      shipBody.AddRelativeTorque(new Vector3(0,h*(float)0.3,0), ForceMode.Acceleration);//施加扭转力

  }</pre>
<h4>二.瞄准</h4>
<p>瞄准部分用了getAxis的方法，在按键控制台里绑定了右摇杆到Mouse X,Mouse Y,这样右摇杆就可以和鼠标一样控制视角了。</p>
<p>主要方法就是把鼠标的移动变为瞄准圈的坐标移动，这个部分直接上代码</p>
<pre class="EnlighterJSRAW" data-enlighter-language="csharp">float MouseX = Input.GetAxis("Mouse X");
        float MouseY = Input.GetAxis("Mouse Y");
        if (distance(ship, transform) &lt;= 10000)
        {
            oldpos = transform.localPosition;
            transform.Rotate(0,ship.rotation.y-transform.rotation.y,0);
            transform.localPosition = (new Vector3(MouseX, 0, MouseY) + transform.localPosition);
        }
        else
        {
            transform.localPosition = oldpos;
        }</pre>
<h4>三.镜头切换</h4>
<p>使用Cinemachine做到的平滑切换，创建了vcam1作为近距离的单体跟踪和vcam2作为远距离的光标和船体的跟踪（targetgroup）。在光标近的时候使用船体视角，在光标远的时候切换俯视角。</p>
<pre class="EnlighterJSRAW" data-enlighter-language="csharp">  if (distance(ship, transform) &gt;= 1500&amp;flag==false)
        {
            flag = true;
            cam0.SetActive(false);
            cam1.SetActive(true);
        }
        else if(distance(ship,transform)&lt;=1000&amp;flag==true)
        {
            flag = false;
            cam0.SetActive(true);
            cam1.SetActive(false);
        }
            text.text = MouseX.ToString() + "," + MouseY.ToString()+"("+ship.rotation.y+")" + "(" + ship.rotation.y + ")";
    }
    float distance(Transform a,Transform b)
    {
        float distance = 0;
        distance = Mathf.Pow((a.position.x - b.position.x), 2) + Mathf.Pow((a.position.z - b.position.z), 2);
        return distance;
    }
}</pre>
<p> </p>]]></content:encoded>
					
					<wfw:commentRss>https://brightgames.top/admin/33/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
