{"id":11194,"date":"2020-10-28T16:30:32","date_gmt":"2020-10-28T15:30:32","guid":{"rendered":"http:\/\/www.keris-studio.fr\/blog\/?p=11194"},"modified":"2020-11-08T11:30:35","modified_gmt":"2020-11-08T10:30:35","slug":"zombie-game-in-upbge","status":"publish","type":"post","link":"https:\/\/www.keris-studio.fr\/blog\/?p=11194","title":{"rendered":"VIRUS GAME IN UPBGE"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" width=\"3420\" height=\"1403\" class=\"wp-image-11195\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-756.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-756.png 3420w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-756-300x123.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-756-1024x420.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-756-768x315.png 768w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-756-1536x630.png 1536w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-756-2048x840.png 2048w\" sizes=\"auto, (max-width: 3420px) 100vw, 3420px\" \/><\/p>\n<p>UPBGE is the spin-off of the Blender Game Engine that no longer exists in the 2.8 version and over. That\u2019s sad, it was a nice tool. Hopefully it is still possible to have fun with it with the UPBGE project. Based on the 2.79 version of Blender, it offers the tools we\u2019re missing.<!--more--><\/p>\n<p>UpBGE can be found here: <a href=\"https:\/\/upbge.org\/\">https:\/\/upbge.org\/<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1597\" height=\"443\" class=\"wp-image-11196\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-757.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-757.png 1597w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-757-300x83.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-757-1024x284.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-757-768x213.png 768w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-757-1536x426.png 1536w\" sizes=\"auto, (max-width: 1597px) 100vw, 1597px\" \/><\/p>\n<p>This project is inspired by<\/p>\n<p><a href=\"https:\/\/youtu.be\/I-FqYnqQYlw\">https:\/\/youtu.be\/I-FqYnqQYlw<\/a><\/p>\n<p>The idea is to put a villager chased by zombies in a labyrinth. At that step, it is just running away, no scores or what so ever\u2026it\u2019ll be for the next time.<\/p>\n<p>In this project, the villager will try to avoid zombies in a maze.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1366\" height=\"783\" class=\"wp-image-11197\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-758.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-758.png 1366w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-758-300x172.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-758-1024x587.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-758-768x440.png 768w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/p>\n<p>Select the ground and create the NavMesh<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1208\" height=\"722\" class=\"wp-image-11198\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-759.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-759.png 1208w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-759-300x179.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-759-1024x612.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-759-768x459.png 768w\" sizes=\"auto, (max-width: 1208px) 100vw, 1208px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"309\" height=\"53\" class=\"wp-image-11199\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-760.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-760.png 309w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-760-300x51.png 300w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><\/p>\n<p>Deploy the NavMesh panel<\/p>\n<p>Build the Navigation Mesh<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"852\" height=\"369\" class=\"wp-image-11200\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-761.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-761.png 852w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-761-300x130.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-761-768x333.png 768w\" sizes=\"auto, (max-width: 852px) 100vw, 852px\" \/><\/p>\n<p>In solid mode it is possible to visualize the navigation sectors created.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1388\" height=\"758\" class=\"wp-image-11201\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-762.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-762.png 1388w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-762-300x164.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-762-1024x559.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-762-768x419.png 768w\" sizes=\"auto, (max-width: 1388px) 100vw, 1388px\" \/><\/p>\n<p>Import a Villager<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"355\" class=\"wp-image-11202\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-763.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-763.png 682w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-763-300x156.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/p>\n<p>Import a Zombie (update at the end of the post, replace the Zombie by a Corona Virus !!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"417\" class=\"wp-image-11203\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-764.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-764.png 865w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-764-300x145.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-764-768x370.png 768w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>In the Physics tab, choose Dynamics and check collision bound<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"851\" height=\"819\" class=\"wp-image-11204\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-765.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-765.png 851w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-765-300x289.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-765-768x739.png 768w\" sizes=\"auto, (max-width: 851px) 100vw, 851px\" \/><\/p>\n<p>Do the same for the villager<\/p>\n<p>Note that the radius has to fit the geometry\u2019s size. Our villager is 1.5m high, the pivot is set at the barycentre, the Radius is set to 0.75<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"858\" height=\"778\" class=\"wp-image-11205\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-766.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-766.png 858w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-766-300x272.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-766-768x696.png 768w\" sizes=\"auto, (max-width: 858px) 100vw, 858px\" \/><\/p>\n<p>Select the Zombie and go to the Logic Editor<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1335\" height=\"97\" class=\"wp-image-11206\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-767.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-767.png 1335w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-767-300x22.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-767-1024x74.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-767-768x56.png 768w\" sizes=\"auto, (max-width: 1335px) 100vw, 1335px\" \/> Choose Always<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"413\" height=\"187\" class=\"wp-image-11207\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-768.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-768.png 413w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-768-300x136.png 300w\" sizes=\"auto, (max-width: 413px) 100vw, 413px\" \/><\/p>\n<p>For actuator choose Steering<\/p>\n<p>Target Object -&gt; Villager<\/p>\n<p>Navigation Mesh -&gt; Navmesh<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"469\" height=\"447\" class=\"wp-image-11208\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-769.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-769.png 469w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-769-300x286.png 300w\" sizes=\"auto, (max-width: 469px) 100vw, 469px\" \/><\/p>\n<p>Connect<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1406\" height=\"451\" class=\"wp-image-11209\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-770.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-770.png 1406w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-770-300x96.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-770-1024x328.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-770-768x246.png 768w\" sizes=\"auto, (max-width: 1406px) 100vw, 1406px\" \/><\/p>\n<p>Choose the villager<\/p>\n<p>Go to Logic Editor<\/p>\n<p>Add 4 keyboard entries. Affect a key for each direction, if you are a gamer it can be Z, Q, D, S ! But it also work with arrow keys.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"410\" height=\"261\" class=\"wp-image-11210\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-771.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-771.png 410w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-771-300x191.png 300w\" sizes=\"auto, (max-width: 410px) 100vw, 410px\" \/><\/p>\n<p>Add 4 motion actuators<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"514\" height=\"250\" class=\"wp-image-11211\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-772.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-772.png 514w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-772-300x146.png 300w\" sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/p>\n<p>Set the speed<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"485\" height=\"464\" class=\"wp-image-11212\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-773.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-773.png 485w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-773-300x287.png 300w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/p>\n<p>Connect all Actuators<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"949\" height=\"1003\" class=\"wp-image-11213\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-774.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-774.png 949w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-774-284x300.png 284w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-774-768x812.png 768w\" sizes=\"auto, (max-width: 949px) 100vw, 949px\" \/><\/p>\n<p>Test by pressing P<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"2113\" height=\"977\" class=\"wp-image-11214\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-775.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-775.png 2113w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-775-300x139.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-775-1024x473.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-775-768x355.png 768w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-775-1536x710.png 1536w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-775-2048x947.png 2048w\" sizes=\"auto, (max-width: 2113px) 100vw, 2113px\" \/><\/p>\n<p>(there I\u2019ve got two Villagers, but it\u2019s just for the test.<\/p>\n<p>It\u2019s possible to have a more fluid animation by setting rotations for Left and Right directions.<\/p>\n<p>Left would be +5\u00b0 and right -5\u00b0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"450\" height=\"376\" class=\"wp-image-11215\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-776.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-776.png 450w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-776-300x251.png 300w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"2091\" height=\"961\" class=\"wp-image-11216\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-777.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-777.png 2091w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-777-300x138.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-777-1024x471.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-777-768x353.png 768w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-777-1536x706.png 1536w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-777-2048x941.png 2048w\" sizes=\"auto, (max-width: 2091px) 100vw, 2091px\" \/><\/p>\n<p>For a more stressful experience, duplicate Zombies, try to escape<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1461\" height=\"701\" class=\"wp-image-11217\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-778.png\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-778.png 1461w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-778-300x144.png 300w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-778-1024x491.png 1024w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/word-image-778-768x368.png 768w\" sizes=\"auto, (max-width: 1461px) 100vw, 1461px\" \/><\/p>\n<p>How scary!!<\/p>\n\n\n<p>Update, lets replace Zombies by Virus, same principle, more fun !<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"345\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/image-31.png\" alt=\"\" class=\"wp-image-11219\" srcset=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/image-31.png 665w, https:\/\/www.keris-studio.fr\/blog\/wp-content\/image-31-300x156.png 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>UPBGE is the spin-off of the Blender Game Engine that no longer exists in the 2.8 version and over. That\u2019s sad, it was a nice tool. Hopefully it is still possible to have fun with it with the UPBGE project. Based on the 2.79 version of Blender, it offers the tools we\u2019re missing.<\/p>\n","protected":false},"author":2,"featured_media":11196,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,25,8,26,174,205],"tags":[420,421,423,47,422],"class_list":["post-11194","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3d","category-etats-de-lart","category-methodologie","category-production","category-simulations","category-unity-2","tag-blender","tag-blender-game","tag-game","tag-simulation","tag-upbge"],"_links":{"self":[{"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11194"}],"version-history":[{"count":3,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11194\/revisions"}],"predecessor-version":[{"id":11222,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11194\/revisions\/11222"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/media\/11196"}],"wp:attachment":[{"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}