tag:blogger.com,1999:blog-5699978472736471382024-02-06T19:49:19.795-08:00Digital MindsGame coding for funPaulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.comBlogger184125tag:blogger.com,1999:blog-569997847273647138.post-67972413349725522172021-12-29T01:27:00.005-08:002021-12-29T01:27:53.569-08:00Legend<p> <a href="https://blogger.googleusercontent.com/img/a/AVvXsEhc-HzExcpyMCo1jj-o5b90C1k7Se-uxflgOdJsB3Sk3cqC1KNfRnBn4JtycJW35PQLbmnOsY7kWkS7MGEr7ovQVAiy8zSEHA-GigydSB_i4eBPbbSFTqV54Fa2nJoDElSaNQlsqImjWdHOVb2k42YGooiHBR-1KqeBq_dF4HSX1T7MaRZF7KrObwhM=s800" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="560" data-original-width="800" height="448" src="https://blogger.googleusercontent.com/img/a/AVvXsEhc-HzExcpyMCo1jj-o5b90C1k7Se-uxflgOdJsB3Sk3cqC1KNfRnBn4JtycJW35PQLbmnOsY7kWkS7MGEr7ovQVAiy8zSEHA-GigydSB_i4eBPbbSFTqV54Fa2nJoDElSaNQlsqImjWdHOVb2k42YGooiHBR-1KqeBq_dF4HSX1T7MaRZF7KrObwhM=w640-h448" width="640" /></a></p><br /><p></p>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-69925744353883579202019-11-16T08:02:00.002-08:002019-11-18T01:15:48.144-08:00Resizable MiniMap<iframe width="756" height="500" src="https://www.youtube.com/embed/oOO4V7euYwM?rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-11285989040189472942019-11-16T03:53:00.001-08:002019-11-18T01:16:32.478-08:00MiniMapProbably wont be used in the game, just handy for debugging player positioning.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/xBI3gIuJMRw/0.jpg" frameborder="0" height="500" src="https://www.youtube.com/embed/nR4iDbsQZ2A?rel=0" width="756"></iframe></div>
<br />Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-77087463019945796582018-10-24T14:38:00.001-07:002019-11-18T01:17:03.659-08:00DiagnosticsAdded some diagnostics to help with dev. Using "Dear ImGui" which is an awesome immediate mode gui toolkit. Go support it:<br />
<a href="https://github.com/ocornut/imgui">https://github.com/ocornut/imgui</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/xBI3gIuJMRw/0.jpg" frameborder="0" height="500" src="https://www.youtube.com/embed/xBI3gIuJMRw?rel=0" width="756"></iframe></div>
<br />Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-44868925814615223932017-08-27T07:09:00.000-07:002017-08-27T09:56:11.165-07:00Slide TacklesFirst try at a slide tackle
<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/sFk_4rczdww?rel=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-89266261723606208262016-11-03T13:28:00.002-07:002016-11-05T00:27:30.452-07:00Short PassingTweaked user controlled short passing now feels nice and crisp. Compare with <a href="http://digital-minds-blog.blogspot.co.at/2016/08/short-passing-demo.html">short-passing-demo</a> to see the improvements in passes connecting with the receiver. A receive state helps the AI connect with the pass, and the input switching is tweaked so the receiver doesn't grab input too soon and run away in the opposite direction.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/vE9_PJwoXeA?rel=0" width="756"></iframe><br />
<br />
Some A.I. controlled dribbling and short passing.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/l78mUlOu2Ew?rel=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-43124703494484299112016-11-02T03:34:00.000-07:002017-05-09T07:02:10.824-07:00Player SearchAdded functionality to search for players based on name, nationality, playing skills etc.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube.com/embed/6y6aX-lS6OE?rel=0&showinfo=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-78655169525926175902016-09-24T05:35:00.002-07:002016-09-26T23:43:49.862-07:00Dribbling SpeedPlayer's running speed slows down when they are dribbling with the ball. Tap to knock the ball forward and gain a little speed to get away from pursuing defenders, but lose a little ball control!<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube.com/embed/bKYKRX7yrOY?rel=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-75970641936970127362016-08-30T04:02:00.001-07:002016-08-30T04:25:32.295-07:00Short Passing DemoAssisted pass by tapping fire. Indicator turns green when there is a possible pass recipient.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/MzmFW2fFWMQ?rel=0" width="756"></iframe><br />
<br />
and without the debug indicator:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/3yyGTegqhJ8?rel=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-136154340417133902016-08-09T07:08:00.003-07:002016-08-09T07:08:42.822-07:00Sharing Datasets<iframe width="756" height="500" src="https://www.youtube.com/embed/BqIK8mHCUw4?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-24196556766984311632016-08-09T07:02:00.000-07:002016-08-09T07:02:46.411-07:00Import From CSV and Color Themes<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube.com/embed/OwyWTo8NHwo?rel=0&showinfo=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-28794664951567063312016-05-13T15:22:00.002-07:002016-05-13T15:22:29.353-07:00Editing: Custom Datasets!<iframe width="756" height="500" src="https://www.youtube-nocookie.com/embed/zPqaPScGUxY?rel=0" frameborder="0" allowfullscreen></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-7728618671503283102016-05-13T00:01:00.000-07:002016-05-13T00:01:06.755-07:00Editing Demo<iframe width="756" height="500" src="https://www.youtube.com/embed/o2-ntx5hKK0?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-52607985232425390062016-05-08T22:36:00.002-07:002016-05-09T05:36:27.009-07:00Data Editor<div class="separator" style="clear: both; text-align: left;">
Now with a genuine database back-end (mySQL), the site should run lightening fast!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.higgis.at/senseless">http://www.higgis.at/senseless</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh60JjCQEcimLniSJALO-aaAZKhknP84h768RU1K8KFX4IBpR5aHeK3xH__pTBa8FQ_LePBuUhpbZjYAtn5PY2s0g-e3Eoe7stxkq4rfkJqvH4G3a1RQ1JGdn2Xnu-qLZWBerSiLvjjfJQ/s1600/Screen+Shot+2016-05-09+at+07.35.14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh60JjCQEcimLniSJALO-aaAZKhknP84h768RU1K8KFX4IBpR5aHeK3xH__pTBa8FQ_LePBuUhpbZjYAtn5PY2s0g-e3Eoe7stxkq4rfkJqvH4G3a1RQ1JGdn2Xnu-qLZWBerSiLvjjfJQ/s640/Screen+Shot+2016-05-09+at+07.35.14.png" width="640" /></a></div>
<br />Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-52216182460012581552016-05-01T01:13:00.001-07:002016-05-01T01:49:23.611-07:00Detecting DangerWith hit detection, triangle turns red when dribbling player detects an obstacle to avoid.<br />
<br />
<iframe width="756" height="500" src="https://www.youtube-nocookie.com/embed/LSxtyQJtFM8?rel=0" frameborder="0" allowfullscreen></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-10246359895114928152016-04-30T16:31:00.000-07:002016-07-04T21:33:59.517-07:00Some Vector MathThe problem is to allow the player to work out if if there is a dangerous obstacle (an opposing player) in his path whilst dribbling. This is similar to a "field of view" but just re-sized to what the player considers "too close for comfort." So when an opposing player enters the danger area, the dribbler will try to change direction or get rid of the ball.<br />
<br />
Here's the vid:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/qntkKn3od4E?rel=0" width="756"></iframe>
Teaching myself vector math from the beginning again, there is probably a more elegant way to do this. Anyway, here's what my brain came up with.<br />
<br />
Given the position of the player p, his normalized velocity v, an angle specifying how wide the field of view should be and a length specifying the size, we can calculate a triangular field of vision (three points, p1, p2, p3) like this:<br />
<br />
p1 = p<br />
p2 = v.rotate(angle/2) x length<br />
p3 = v.rotate(-angle/2) x length<br />
<br />
With different parameters, this can also be used to select possible pass receivers etc.<br />
<br />
Example in code:<br />
<br />
// calculate the angled vectors<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Vector3 side1 = position + velocity.rotated(-25, 0, 0).normalised() * 200;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Vector3 side2 = position + velocity.rotated( 25, 0, 0).normalised() * 200;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
// p1 is just the position of the player<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">p1.x = position.x;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">p1.y = position.y;</span><br />
<span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; font-size: x-small; white-space: pre;"> </span><br />
// p2 is end point of the first side<span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; font-size: x-small; white-space: pre;"> </span><span class="Apple-tab-span" style="font-family: "courier new" , "courier" , monospace; font-size: x-small; white-space: pre;"> </span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">p2.x = </span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">side1</span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">.x;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">p2.y = </span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">side1</span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">.y;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
// p3 is the end point of the second side<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">p3.x = </span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">side2</span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">.x;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">p3.y = </span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">side2</span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">.y;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<br />
For the uber curious, here's the rotated() function:<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">// ----------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">// rotated</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">// ----------------------------------------------------</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Vector3 Vector3::rotated(double a, double x_origin, double y_origin) {</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>a = RADIANS(a);</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Vector3 rotated = *this;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>rotated.x -= x_origin;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>rotated.y -= y_origin;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>double nx = cos(a) * rotated.x - sin(a) * rotated.y;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>double ny = sin(a) * rotated.x + cos(a) * rotated.y;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>rotated.x = nx;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>rotated.y = ny;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>rotated.x += x_origin;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>rotated.y += y_origin;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return rotated;</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">}</span><br />
<br />Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-87776650885255228082016-04-27T01:31:00.002-07:002016-04-27T01:31:48.572-07:00An IdeaNot very realistic, but fun. Player transfers to be done with an in-game browser on an Ebay type site.Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-56593887567595052222016-04-25T10:39:00.003-07:002016-05-04T21:31:51.596-07:00DemoCheck out the goal at 1:26 (change youtube speed setting to 2x for actual speed)<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/xFDEWXA8KXc?rel=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-51562184502445697672016-04-19T12:48:00.002-07:002016-04-19T12:48:38.794-07:00Short Pass FeatureTap the fire button for a short pass
<br />
<iframe width="756" height="500" src="https://www.youtube-nocookie.com/embed/2ZADi-G3WuM?rel=0" frameborder="0" allowfullscreen></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-13147015497580168972016-04-12T11:26:00.002-07:002016-04-12T11:27:16.353-07:00Handy New FeatureHolding Player 1 Start + Left on the stick brings up the IP address for a few seconds.<br />
<br />
<iframe width="756" height="500" src="https://www.youtube-nocookie.com/embed/y3XLpVf1sow?rel=0" frameborder="0" allowfullscreen></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-25202509733264451532016-04-02T03:14:00.000-07:002016-04-10T10:50:54.977-07:00Another Pressing ExampleOf course, if the dribbler manages to change direction, then pressing players would recalculate their interception paths, so it might appear in the static screenshot that a simple turn by the dribbler would easily evade the pressers, but as soon as he does so, the pressing targets would also change to intercept his new run.<br />
<br />
We can also tweak the values for how far ahead of the dribbler the pressers will project. Again, the static screenshot may make it seem like they are planning a path way too advanced of the ball, but in reality the dribbler is moving quite fast and will converge with the nearest interception circle in only a second or so.<br />
<br />
[click to enlarge]<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKnskifXcXK0bHpkjaA_L4l5VV8C7PG5HR4sP_pxr792W9qnIWX0c93jIoW-U0H-g_355gj5jvu2EDcvwAENQT29UGuGg3BNk2ECbT9DE2HnwZIKGN6KwpP6CA1a6IqV1Dp0Ps583T4zE/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKnskifXcXK0bHpkjaA_L4l5VV8C7PG5HR4sP_pxr792W9qnIWX0c93jIoW-U0H-g_355gj5jvu2EDcvwAENQT29UGuGg3BNk2ECbT9DE2HnwZIKGN6KwpP6CA1a6IqV1Dp0Ps583T4zE/s640/Untitled.png" width="640" /></a></div>
<br />
What we might want to do for less aggressive pressing players, is to extend a path from the initial calculated intercept point to the middle of the goal, and set the new target a percentage along this new line. this would result in a kind of pressing that favors pushing the dribbler into the flanks whilst protecting the goal area.Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-68659568122772420712016-04-02T03:04:00.001-07:002016-04-02T03:04:15.864-07:00Pressing DiagramJust an explanation of what's going on.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqDl1QFe291lq6_cp1RTD5pDNXRIvnZHlDobgOnN8wPN4zq6szq4EyPCvtTvYup2-Gu2CsnpAcPy-kBXdJHlLEZwswxVecTsela7lqh1y7G7wLEZEpkhI4T7LdlD6jzyA86XX02Agkmc4/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="462" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqDl1QFe291lq6_cp1RTD5pDNXRIvnZHlDobgOnN8wPN4zq6szq4EyPCvtTvYup2-Gu2CsnpAcPy-kBXdJHlLEZwswxVecTsela7lqh1y7G7wLEZEpkhI4T7LdlD6jzyA86XX02Agkmc4/s640/Untitled.png" width="640" /></a></div>
<br />Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-57967196570563650932016-04-02T02:31:00.001-07:002016-04-02T03:19:47.987-07:00More PressingHere is an example (with slow moving players for clarity) to show how a team with high pressing might work. This case shows a team that tries to press with three players at all times (the pressing is not initiated until a blue team player starts dribbling).<br />
<br />
Pressing players are highlighted with a blue spot, their "intelligent" interception target is shown by a red circle.<br />
<br />
The intercept algorithm has the nice side effect that different pressing players seem to work together and don't all just head for the ball - they head for where they think the ball will be when they get there - therefore you can see the red target circles kind of "covering" for each other.<br />
<br />
For testing, the attacking player has been given perfect dribbling, and the pressing players don't tackle.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/LGb052tiXco?rel=0" width="756"></iframe>
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/974n9IxyW1s?rel=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-7954138697209037082016-03-28T03:39:00.004-07:002016-03-28T03:41:28.686-07:00Intercept with DiagnosticsJust easier to see - the white circle indicates the calculated interception destination for the pressing player.<br />
<br />
The interception point depends on the distance from the presser to the ball, and the direction and speed of the ball.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="520" src="https://www.youtube-nocookie.com/embed/4W2AhLPidOk?rel=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0tag:blogger.com,1999:blog-569997847273647138.post-36758906561957469582016-03-27T07:45:00.000-07:002016-03-27T07:49:54.184-07:00InterceptWhen defending, if a player transitioned to the "press" state, he would initialize his "seek" behavior which directed him to run to the ball.<br />
<br />
The problem with this was, since the ball is continuously moving, the pressing player invariable ended up arriving a fraction too late to have any impact, and ended up chasing the ball from behind until he was relieved of his pressing duties.<br />
<br />
The solution is to introduce a new A.I. behavior - "intercept" - which makes a guess at where the ball is going to be, and heads the player there instead.<br />
<br />
Here you can see the defenders "connecting" with their intercept target nearly every time.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="500" src="https://www.youtube-nocookie.com/embed/aAV6HvRC5G8?rel=0" width="756"></iframe>Paulhttp://www.blogger.com/profile/06248971396189381110noreply@blogger.com0