<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[GameDevStory - Medium]]></title>
        <description><![CDATA[The records developing game - Medium]]></description>
        <link>https://medium.com/gamedevstory?source=rss----c72e133b290e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>GameDevStory - Medium</title>
            <link>https://medium.com/gamedevstory?source=rss----c72e133b290e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 08:29:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/gamedevstory" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GameDevStory 5. <Blink>]]></title>
            <link>https://medium.com/gamedevstory/gamedevstory-5-blink-710684aba5ab?source=rss----c72e133b290e---4</link>
            <guid isPermaLink="false">https://medium.com/p/710684aba5ab</guid>
            <category><![CDATA[unreal-engine]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Sehyeon  Nam]]></dc:creator>
            <pubDate>Mon, 02 Jan 2017 05:30:05 GMT</pubDate>
            <atom:updated>2017-01-02T05:29:55.823Z</atom:updated>
            <content:encoded><![CDATA[<p>What’s up Medium! Long time no see, isn’t it? :D</p><p>For this a few weeks I was being depressed so I just rested. Actually I applied many company at Canada, but I failed terribly. I wanted to improve myself but I couldn’t get any feedbacks. I was confused myself, it never helped me. That fact made me depressed.</p><p>I thought the main reason why I failed to get job is maybe visa, so I finally get my job(I teach programming to students!) at Korea and still try to get Canada’s working permit.</p><p>Anyway! It is my current state. Let’s go to Blink Skill what I implemented.</p><h3>What is Blink?</h3><p>Blink, blink! blink is the same with teleportation. With blink skill, we can teleport short distance instantly. You can find this skill at LOL, or Tracer of Overwatch.</p><h3>How did I Implement?</h3><p>As you know, I’m developing my game with UE4, especially Blueprint as main. And there’s embeded teleportation function in Blueprint. It supports sweeping to stop movement until it collides other object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*M-FoGW_4t6JgLHqzQc9LXA.gif" /><figcaption>Sweep. Image from <a href="https://www.unrealengine.com/blog/moving-physical-objects">https://www.unrealengine.com/blog/moving-physical-objects</a></figcaption></figure><p>But I don’t want to sweep. I just want to place my character, even if there’re something between origin position and destination. I only consider the objects that near about destination so it could be collided to my character.</p><p>So, let’s arrange what I want to do. The blink skill’s process must be,</p><ol><li>Place my character with teleport function</li><li>If there is other object in destination so it collide with my character,</li><li>SOLVE THIS PROBLEM. DO PLACE YOUR CHARACTER NAHHHHH!!!</li></ol><h3>First attempt: Sweep backward.</h3><p>I check collision at destination. If there’s no collision, it’s good and I just put my character at that location. but, If there’s collision I start sweeping from destination to origin location. It is opposite of UE4’s sweep, they weep from origin to destination.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*n6mRSj4IV2wfDk7HyJdvGw.png" /><figcaption>Trace collision sweeping the sphere form start to end position.</figcaption></figure><p>But there is problem still. this function couldn’t resolve contiguous objects. It just return the edge of collision. I mean, I couldn’t know during tracing when the collision is exactly end. For example, If there’re the walls contiguously, with this function, my character just teleport to second wall’s edge and be stuck between two wall.</p><h3>Second attempt: Spiral collision checking</h3><p>This skill is motivated from LOL’s skill. I fortunately found how they implemented Blink skill at LOL’s patch note. It wasn’t detailed, but they told they do spiral collision checking.</p><p>I also developed spiral collision checking in my previous version. But I thought this way might be not good because it has bad performance.</p><p>But blink skill has long cool-time and it doesn’t need over a second computing time. So that performance could be ignore-able.</p><p>Here is my pseudo-code,</p><pre>degree = 0;<br>radius = 0;<br>while (true) {<br>  radius += radiusIncrement;<br>  for degree = 0 ~ 360 {<br>    point = destination + radius * Vector(cos(degree), sin(degree));<br>    if (CollisionTest(point)) {<br>      Set Character Position to point.<br>      return;      <br>    }<br>  }<br>}</pre><p>And I trans-coded it to Blueprint. <em>I think it is hard to capture blueprint… it’s too big!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*kTaE4xqbL5Xosq2VP8xF8w.png" /><figcaption>Yeah, It has avant-garde shape.</figcaption></figure><h3>Result</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lBNFY3riiCX2g8qBpHLwSQ.gif" /><figcaption>It work well!</figcaption></figure><p>The white dots is what I printed when I compute collision checking. That point was the center of character in collision checking.</p><p>The sense of accomplishment wasn’t big because I’ve the same experience already, and I spend a lot of time to solve this problem in other way. It was so stressful.</p><h3>What’s the next?</h3><p>I try to reduce the list of TODO to minify my project. Everyone want to make their game bigger, but it’s too hard to make big game at once.</p><p>So I’m rearrange my todo list. That mean, There isn’t no next step not yet :D But maybe the next will be making game rule, the condition checking for end of the game.</p><p><em>I’m looking for a job in Canada. Please check my </em><a href="https://kr.linkedin.com/in/sehyun-nam-85838774"><em>Linked profile </em></a><em>and contact me (skatpgusskat@naver.com).</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=710684aba5ab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gamedevstory/gamedevstory-5-blink-710684aba5ab">GameDevStory 5. &lt;Blink&gt;</a> was originally published in <a href="https://medium.com/gamedevstory">GameDevStory</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GameDevStory 4. Various Attack Type]]></title>
            <link>https://medium.com/gamedevstory/gamedevstory-4-various-attack-type-16fc80c9fd2c?source=rss----c72e133b290e---4</link>
            <guid isPermaLink="false">https://medium.com/p/16fc80c9fd2c</guid>
            <category><![CDATA[games]]></category>
            <category><![CDATA[unreal-engine-4]]></category>
            <category><![CDATA[indie-game]]></category>
            <category><![CDATA[gaming]]></category>
            <dc:creator><![CDATA[Sehyeon  Nam]]></dc:creator>
            <pubDate>Tue, 06 Dec 2016 21:41:17 GMT</pubDate>
            <atom:updated>2016-12-06T21:41:04.627Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Medium! :D</p><p>I just finished developing all 4 elements. Each element has different attack and skill method. Today I’ll talk about how I implement many different types efficiently.</p><h3>Default Class (Common class)</h3><p>Even if each element has different attack method, there’re many similar things between that methods. For example, dealing damages, shooting bullets or waiting delay. Each element character could have different maximum HP. But It’s the same that they have HP.</p><p>So I created 3 common class; Character, Skill and Bullet. I implement common functions and properties in both class. In later, I would create derived element class or element’s bullet class from Character, Skill or Bullet class.</p><p>In Character class, it handle movement input and getting damage. so it has some properties to handle that, like HP, MaxHP or TeamID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*to1jOyae8pJqc4cAWPR5fQ.jpeg" /><figcaption>Character Class’ common functions.</figcaption></figure><h3>Overriding Default Class</h3><p>Definitely new element character might be immortal or couldn’t move. In that case, that functions could be overridden. Let’s check out this case with bullets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*Vr0mYmfj6kOt_GFM81OXrA.jpeg" /><figcaption>Bullet is destroyed when they hit something as default.</figcaption></figure><p>I made bullet destroyed when they hit anything. Because I thought many bullets what I would make will be destroyed in that case. So I’d like to set that case as default.</p><p>But wind element’s skill need to keep alive even if it hit anything. So I overrode hit event of wind element’s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*zun3bfWIl3vWkCfKC3zhFQ.png" /><figcaption>bullets of wind element’s skill wouldn’t be destroyed even if they hit anything.</figcaption></figure><h3>Introduction of 4 Elements</h3><p>I finally created 4 elements; Fire, Wind, Water and Earth. Each class is the same role with Magician, Archer, Healer and Tanker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*kOGBtdYVNW6zO5IMoqvpPA.gif" /><figcaption>Fire Element’s Explosion Skill</figcaption></figure><p>Fire element has high damage per one bullet but casting delay is long. It has explosion skill which could make high damage in short time. I want to make Fire element as Nuker who can deal highest damage in short time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*yqNRblSWaMu9qlQPhnBRcA.gif" /><figcaption>Wind Element’s Attack and Skill. … Yes I know effects sucks. But it is prototype yet :D</figcaption></figure><p>Wind element has long range attack with low damage, but fast speed. It also has whirlwind skill. when a whirlwind is summoned, it move slow first but become faster. It make damage all crossed enemy. Yes, it is the same with Janna’s W skill in LOL. I want to make Wind element as damage supporter. Because whirlwind has slow speed first, I thought many users can avoid that. So I felt it’s enough to support dealing damage at back, long distance.</p><p>Water! The Cleric Class! Water element’s default attack is heal for allies, or damage to enemies. It has range between short or medium. The reason is to make killing Water element easy. It’s not fun that only healers remain in battle field at final. Because they have low attack damage. Also, It could be boring If killing healer is very hard because It cause battle time too much longer.</p><p>So, to set healer’s position like below, I set their attack range short.</p><p><strong>Enemies)….. Tanker &lt;— &gt;Water &lt;—&gt; Fire &lt;—&gt; Wind</strong></p><p>The final element is Earth and it is Tanker class. Earth has melee attack and dash skill.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*Dev8_D7yHKYVDD8vBsjdrg.gif" /><figcaption>Earth’s Melee Attack and Dash Skill.</figcaption></figure><p>When I record above Earth’s skill demo, I just found something. In my previous game project(which is base of this project), I couldn’t make dash skill’s movement smooth. It was dull feeling. Against that, In this time I could make dash skill smooth.</p><p>I felt it’s not better then previous. Because there are no tensions with smooth movement. It just like Heroes of the Storm. I don’t like that feeling. I think I should change this more dull adding breaks.</p><h3>Next Step</h3><p>There is common skill for every elements. That is “Blink” skill. The next step is making Blink skill and set map up to play online demo.</p><p><em>I’m looking for a job in Canada. Please check my </em><a href="https://kr.linkedin.com/in/sehyun-nam-85838774"><em>Linked profile </em></a><em>and contact me (skatpgusskat@naver.com).</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16fc80c9fd2c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gamedevstory/gamedevstory-4-various-attack-type-16fc80c9fd2c">GameDevStory 4. Various Attack Type</a> was originally published in <a href="https://medium.com/gamedevstory">GameDevStory</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GameDevStory 3. Don’t Send UObject as Data Container via RPC!]]></title>
            <link>https://medium.com/gamedevstory/gamedevstory-3-dont-send-uobject-as-data-container-via-rpc-15fb674b1597?source=rss----c72e133b290e---4</link>
            <guid isPermaLink="false">https://medium.com/p/15fb674b1597</guid>
            <dc:creator><![CDATA[Sehyeon  Nam]]></dc:creator>
            <pubDate>Fri, 02 Dec 2016 10:10:49 GMT</pubDate>
            <atom:updated>2016-12-02T10:27:41.193Z</atom:updated>
            <content:encoded><![CDATA[<p>In general case of C++, to send data through network we serialize a struct. And that struct could be also the class type. (Actually we can assume the struct is almost the same with class)</p><p>So, I need to send skill parameter to server when a player press the skill button. Each skill could have different type of parameters. For example, general shooting skill has starting position and moving direction. A healing skill has reference of target player.</p><p>Do I have to implement skill handler for each skills? I thought I can use function overloading in Unreal Engine 4&#39;s Blueprint. But blueprint dosen’t support function overloading.</p><p>I’d like to solve this problem with the polymorphism, passing parent class instance and handling that in derived class by downcasting.</p><p>For example, I make classes like below,</p><p>SkillParameter (Parent Class)</p><ul><li>SkillParameter_FireExplosion (Derived)</li><li>SkillParameter_Heal (Derived)</li></ul><p>And I pass SkillParameter_Heal upcasting to SkillParameter. Then skill handler process common functions. When I need to customize some function(for example, skill activating function should be re-implement in derived class) I can downcast SkillParameter to specific class. In this case I should downcast SkillParameter to SkillParameter_Heal. Then In skill activating function, I finally could set up healing process.</p><p>That’s what I want to do. So I made SkillParameter deriving UObject. UObject is the only basic class that I can create with in Blueprint. In client side I create SkillParameter instance when the skill button is pressed and I pass that to server by Unreal Engine’s RPC.</p><p>But, unfortunately I faced the problem. In server side, the value of passed SkillParameter was invalid. Yes, it was just a kind of Null.</p><p>There are not enough information with googling. For several hous after I got some clues.</p><p>My guess is that the only UObject reference are passed in RPC. I mean, it isn’t serialized. It just pass reference or something common key of UObject. In common case clients don’t create UObjects itselves. Clients just occur events or call RPC then the server actually create that UObject and replicate it to clients.</p><p>So, definitely the value of SkillParameter passed by client must be invalide because server has no instance of that, Even if client try to pass that reference!</p><p>Finally I changed that design from UObject to UStruct. UStruct is passed with serializing. But I don’t like this solution. Unlike C++’s struct, UStruct dosen’t support inheritance. That mean I can’t use polymorphism and I should choose between 2 options,</p><ol><li>Put every parameter types of every skills into SkillPrameter</li><li>Implement every difference names initializer in child Skill Handler classes and call parent common initializer in child’s.(because UE4&#39;s Blueprint dosen’t support overloading!)</li></ol><p>I think second option is worst. There are no helper that can reject calling wrong function on compile time in blueprint. That mean when child’s custom initializer must be called, parent common initializer could be called by developer’s mistake. I don’t like to give any chance of mistake to developer.</p><p>Even if the first option could make network packet bigger, I thought It is better than second. At now the bandwidth is not problem. So I chose first option. And later I will make inheritable and serializable struct.</p><p>There are no any pictures on today’s post because I wrote this post on my cell phone.</p><p>Anyway, I finished implementing fire element’s skill, attack and move yesterday. My next step is implementing other elements: wind, water, earth in sequence.</p><p>Thanks for read this post. I hope it could be helpful to somebody who try to send Data wrapping with UObject via RPC.</p><p><em>I’m looking for a job in Canada. Please check </em><a href="https://www.linkedin.com/in/sehyun-nam-85838774"><em>my Linked profile</em></a><em> and contact me (skatpgusskat@naver.com).</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15fb674b1597" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gamedevstory/gamedevstory-3-dont-send-uobject-as-data-container-via-rpc-15fb674b1597">GameDevStory 3. Don’t Send UObject as Data Container via RPC!</a> was originally published in <a href="https://medium.com/gamedevstory">GameDevStory</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GameDevStory 2. Heroes Never Die!]]></title>
            <link>https://medium.com/gamedevstory/gamedevstory-2-heroes-never-die-9eb9349bc988?source=rss----c72e133b290e---4</link>
            <guid isPermaLink="false">https://medium.com/p/9eb9349bc988</guid>
            <category><![CDATA[unreal-engine]]></category>
            <category><![CDATA[videogames]]></category>
            <category><![CDATA[ue4]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[indie-game]]></category>
            <dc:creator><![CDATA[Sehyeon  Nam]]></dc:creator>
            <pubDate>Tue, 29 Nov 2016 00:54:03 GMT</pubDate>
            <atom:updated>2016-11-29T00:53:50.298Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I developed damage and respawn system. the quote, “Heroes Never Die”, just flashed on me while I think ‘respawn’.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl3vRnKVByM7ewpoe4%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2Fl3vRnKVByM7ewpoe4&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl3vRnKVByM7ewpoe4%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/2fff8fff02196fc783d7b1d939ebce5e/href">https://medium.com/media/2fff8fff02196fc783d7b1d939ebce5e/href</a></iframe><h3>Work process</h3><p>Before I started my task, I made work process. Here it is.</p><ul><li>Add HP property in character</li><li>Handle bullet collision reducing HP</li><li>Respawn character when they lost all HP</li></ul><p>Why did I? Because there are many benefits making work process.</p><p>First, I can foresee what should I do. It could sound unnecessary but I think it is very important. Sometimes we waste the time taking a job which is needed to undo. Work is direction. Without any direction on working, we could get lost on forest of tasks.</p><p>Second, I can make a goal and finally I can feel a sense of accomplishment when I finish that. Without a goal, there are only continuous things to do in front of me even if I finished any tasks. Not fun, only stressful situation. So, It could be better making a goal and feel a sense of accomplishment. It’s kind of gamification. Gamification means making something like a game. Sense of accomplishment is one of the important elements of the games. Let’s think that work is game. How wonderful is it? Making a game is the same with making a fun, so it also should be good to feel fun during developing games.</p><p>So, Let’s go to check out how I did.</p><h3>1. Add HP property in character</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*JNuyQZmkDeghIJDB4TpCSg.png" /></figure><p>I simply added HP property in character class. So simple.</p><h3>2. Handle bullet collision reducing HP</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NNnjvCYy3P6sc-ZUv9xy1A.png" /></figure><p>There is ‘Hit’ event handler in bullet already. I checked the object that collide with bullet has ‘character’ tag. In true condition I dispatched ‘OnDamaged’ event on character, and destroyed that bullet.</p><h3>3. Respawn character when they lost all HP</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*fNdi4P1XVLj4oJ2FCrHJQg.png" /><figcaption>Subtract damage from HP</figcaption></figure><p>When character is damaged, I easily discount the HP. When the HP become equal or lower than 0, I destroy character and notify that to player controller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6cGGz0NKCOX4fh8n9lbsfw.png" /><figcaption>Call ‘On Character Destoryed’ to Player Controller before destory character.</figcaption></figure><p>I control the character in the character class, not in the player controller, so there are nothing special things to do when the ‘On Character Destroyed’ event is dispatched in player controller. I again pass that event to Game Mode.</p><p>The reason why I just pass it to Game Mode is to separate responsibility. In UE4, Game Mode has the responsibility of <a href="https://docs.unrealengine.com/latest/INT/Gameplay/Framework/GameMode/index.html">below criteria</a>;</p><ul><li>The number of players and spectators present, as well as the maximum number of players and spectators allowed.</li><li>How players enter the game, which can include rules for selecting spawn locations and other <strong><em>spawn/respawn behavior</em></strong>.</li><li>Whether or not the game can be paused, and how pausing the game is handled.</li><li>Transitions between levels, including whether or not the game should start in cinematic mode.</li></ul><p>I spawn new character in Game Mode, and let player controller possess that character.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sfe2EDptEWj6b0TzqmHM6A.png" /><figcaption>Respawning character on Game Mode</figcaption></figure><p>The important thing is making that logic run on server only, because the server is the only one who we can believe. who knows that some clients hack the system?</p><p>Unfortunately I have no idea what the next step is. I might have to set up the task list with milestones. Yes, I didn’t because this project, at now, is just making previous game project once again in UE4. Hmm… Anyway I need task lists and milestones..!</p><p><em>I’m looking for a job in Canada. Please check my </em><a href="https://kr.linkedin.com/in/sehyun-nam-85838774"><em>Linked profile </em></a><em>and contact me (skatpgusskat@naver.com).</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9eb9349bc988" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gamedevstory/gamedevstory-2-heroes-never-die-9eb9349bc988">GameDevStory 2. Heroes Never Die!</a> was originally published in <a href="https://medium.com/gamedevstory">GameDevStory</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GameDevStory 1. Fire the bullet!]]></title>
            <link>https://medium.com/gamedevstory/gamedevstory-1-fire-the-bullet-a26f3ea7638b?source=rss----c72e133b290e---4</link>
            <guid isPermaLink="false">https://medium.com/p/a26f3ea7638b</guid>
            <category><![CDATA[game-dev-stroy]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[unreal-engine]]></category>
            <dc:creator><![CDATA[Sehyeon  Nam]]></dc:creator>
            <pubDate>Sun, 27 Nov 2016 18:29:11 GMT</pubDate>
            <atom:updated>2016-11-27T23:22:38.390Z</atom:updated>
            <content:encoded><![CDATA[<p>Nowadays I try to develop new game based on my previous project(<a href="https://github.com/mastrayer/CSM">https://github.com/mastrayer/CSM</a>). It is MOBA shooting game with 4 elemental character(Fire, Earth, Wind, Water).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCjgzqgIMD6I%3Fstart%3D6%26feature%3Doembed%26start%3D6&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCjgzqgIMD6I&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCjgzqgIMD6I%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/37537b1f9a8975c4b4438e0e6ae55013/href">https://medium.com/media/37537b1f9a8975c4b4438e0e6ae55013/href</a></iframe><p>So, that game was developed with custom 2D game engine. Against that, I decide to use Unreal Engine 4. The reason why is simple. I want to reduce wasting time to get more time for developing contents.</p><p>Before this post, I already developed below criteria.</p><ol><li>Implement the base of game server with ASIO</li><li>Character Movement Synchronize on Network</li><li>Fire a bullet when I click mouse</li></ol><p>But I gave up making custom game server, because UE4 provide awesome network features. I figured out UE4’s networking features are enough to make simple MOBA games.</p><p>The next step is synchronizing fired bullets and I just did it.</p><p>First, the bullet is projectile, that mean the bullet is very fast. I found if I just make UE4 replicate bullet, the movement might have lags like below video clip.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FzDLRdeyLpFg%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DzDLRdeyLpFg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FzDLRdeyLpFg%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1355c1f766608a558400dee5d022ef48/href">https://medium.com/media/1355c1f766608a558400dee5d022ef48/href</a></iframe><p>The reason is, it try to synchronize location by server’s packet but when the packet received, there should be some latency, so the rollbacks occur.</p><p>My Solution is not using location synchronization during bullet is flying. I just replicate when and where the bullet is spawned with which rotation to fly. Finally each host let bullet fly themselves without any movement synchronization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*BPI64LFx0Q8F3AuvhNzLSA.jpeg" /><figcaption>Devide Broadcasting Action and Spwaning bullet</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl3vQYmddr27dME08M%2Ftwitter%2Fiframe&amp;src_secure=1&amp;url=http%3A%2F%2Fgiphy.com%2Fgifs%2Fl3vQYmddr27dME08M&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl3vQYmddr27dME08M%2Fgiphy.gif&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/d551e73b6eb2f7fd9c5800af2655a84d/href">https://medium.com/media/d551e73b6eb2f7fd9c5800af2655a84d/href</a></iframe><p>This game is server-client game, so the server will judge that bullet really collide or not. That mean the clients could think the bullet collide someone, but on server-side it could be false. So it could be dangerous to animate collision effect on client itself. But I have no idea yet about animation policy.</p><p>There is one more problem with latency; synchronizing location during flying. the bullets move in linear. That mean if we can synchronize the timing, the bullets among the hosts should have the same location anytime. Or we can temporally speed up the bullet on client-side to sync the location like below animation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*hS3e15RmWWOAkyrdRL7pfQ.gif" /><figcaption>Without Lag (Ideal)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*W7p-6ZHJE070QYPDdzBDvA.gif" /><figcaption>start lately, but interpolate by accelerating velocity.</figcaption></figure><p>This method is called ‘Interpolation’. To implement this, I need to get the time how long the packet is taken during transfer. I’m trying to find the latency time in UE4, but I couldn’t yet. <a href="https://playerio.com/documentation/tutorials/building-flash-multiplayer-games-tutorial/interpolation">Here is nice post about interpolation</a>.</p><p>Here is Today’s Github commit. <a href="https://github.com/skatpgusskat/hard-to-naming/commit/b28e769c883eb29e8656b0f195066530692647d1"><strong>Fire linear bullet</strong></a><strong> — </strong><a href="https://github.com/skatpgusskat/hard-to-naming/commit/b28e769c883eb29e8656b0f195066530692647d1"><strong>b28e769</strong></a></p><p>I considered what the next step is. I think I could pass developing interpolation at now because of the priority. the top priority is verifying that the game contents are fun or not. I think without network latency Interpolation, I can test the game contents.</p><p>So, the next step is developing bullet collision for damaging system. I might make HP, re-spawning character when they lost all HP.</p><p>Thanks for reading!</p><p>PS — I found that bullets move work well even with movement replication providing by UE4<a href="https://answers.unrealengine.com/questions/137108/using-fps-template-the-projectile-is-replicated-fr.html">(like this first answer)</a>. I didn’t checked but I guess the reason is physics. I will check this When I’m ready to simulate network latency later.</p><p><em>I’m looking for a job in Canada. Please check my </em><a href="https://kr.linkedin.com/in/sehyun-nam-85838774"><em>Linked profile </em></a><em>and contact me (skatpgusskat@naver.com).</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a26f3ea7638b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gamedevstory/gamedevstory-1-fire-the-bullet-a26f3ea7638b">GameDevStory 1. Fire the bullet!</a> was originally published in <a href="https://medium.com/gamedevstory">GameDevStory</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>