{"id":361,"date":"2024-04-01T19:52:16","date_gmt":"2024-04-01T19:52:16","guid":{"rendered":"https:\/\/abdoubouam.com\/?p=361"},"modified":"2024-04-01T19:52:16","modified_gmt":"2024-04-01T19:52:16","slug":"devlog-week-15","status":"publish","type":"post","link":"https:\/\/abdoubouam.com\/index.php\/2024\/04\/01\/devlog-week-15\/","title":{"rendered":"Devlog Week 15"},"content":{"rendered":"\n<p>Another week, another devlog!<\/p>\n\n\n\n<p>Here&#8217;s what I did this week:<\/p>\n\n\n\n<ol>\n<li>I discovered a new technology called aye, it&#8217;s super cool, you just have to talk to this person in a chat and they respond with everything you want, they can also draw images for you super fast, you just have to describe it! I&#8217;m pretty sure there&#8217;s no art theft involved in it whatsoever. I asked if this aye can help me make games and it responded it will not just help, it will make them for me instead! How cool is that ? My favorite part of making art and games is the idea and not the process itself, who even likes making art ?<\/li>\n\n\n\n<li>I think my studio is too big, those lazy worthless workers do nothing all day but waste my money. I think it&#8217;s time for another layoff, to appease the investors, I need my bonus to get the newest Porsche model, I literally can&#8217;t be seen around with the old model, it came out two years ago!<\/li>\n\n\n\n<li>I&#8217;ve decided to pivot the game to a dating sim instead, you meet people, talk with them, go on dates&#8230;etc. I&#8217;ll just find one or two obscure games no one has played and copy from them, it&#8217;s super easy and nobody will catch me doing it. I&#8217;ll even use this aye thing and buy a tutorial that comes with a project I can just modify and ship it. Gamers don&#8217;t care about quality<\/li>\n<\/ol>\n\n\n\n<p>For legal (and also non-legal) reasons, all the above was a (sad) joke. Here&#8217;s the real devlog instead:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1- Oasis Dream Level<\/h2>\n\n\n\n<p>I started experimenting with dream sequences, since dreams are going to be a significant enough part of the story. I made blockouts and basic gameplay prototype of two scenes.<br><\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"http:\/\/abdoubouam.com\/wp-content\/uploads\/oasisdream.mp4\"><\/video><\/figure>\n\n\n\n<p>The first scene is a desert scene, with an oasis and a huge hourglass. The sand and rocky mountain are almost done, I just need to adjust the shader to blend between the objects and terrain. Everything else is just a blockout at this point.<br>I adjusted the dream &#8220;ascii&#8221; and distortion effect to my liking, and also made teleporters with fading effect, nothing fancy or worth detailing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2- Train Dream Level<\/h2>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"http:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/train-dream-2.mp4\"><\/video><\/figure>\n\n\n\n<p>The other scene is a long twisted train. At first I was going to change the gravity direction, but Unreal doesn&#8217;t expose it as a vector (only a scalar strength), so instead I programmed it to reset the player&#8217;s position back to 0 on the Y axis (forward\/backward relative to the train), and then I just moved the train itself instead.<br>As for rotation, I calculated the length of one &#8220;unit&#8221; of a train and how long it twists by, in my case 180\u00b0 every 34 meters, and just applied rotation based on the offset.<br>Collisions and physics can be a bit buggy, so I completely disabled the train collision, and instead I just placed 3 invisible cubes : one for the player to stand on, one on the left, and another on the right, positioned right where the train benches would be.<br>In the end, it works as intended, you&#8217;re always walking on the &#8220;floor&#8221;.<br>The environment is still a blockout, but I&#8217;m very excited and cannot wait to detail it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3- NPC Chatter system<\/h2>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"http:\/\/abdoubouam.com\/wp-content\/uploads\/chatter.mp4\"><\/video><\/figure>\n\n\n\n<p>Since gossip, small talk and communication is a big part of the daily life in a village, I decided to spend more time and thought on NPC chatter system. The idea is to &#8220;hear&#8221; (see text) conversations when you&#8217;re walking, they won&#8217;t be important to the story most of the time. When you get closer to two or more chattering NPCs, the text becomes more opaque (because you can hear better).<br>I added another alternative dialogue, for when you&#8217;re <em>too<\/em> close. Distance and dialogue lines are adjustable, so it can be something like &#8220;shush, someone&#8217;s coming, let&#8217;s change the subject&#8221;, or &#8220;oh hello there! nice weather we&#8217;re having today?&#8221;, or even just start an important conversation I want the player to hear : you are walking closer and closer, and they are talking about some random unrelated things, but when you&#8217;re close they switch to &#8220;oh btw did you hear about this person doing this important event ?&#8221; and they continue talking between each other, and you can eavesdrop.<br>This is just the ideas I can think of right now, I&#8217;m sure I&#8217;ll find more uses for this system.<\/p>\n\n\n\n<p>For anyone interested in the technical details : the basic logic is this : I made a chattering NPC class. Each actor of that class has a text array with the dialog lines, and on each tick it checks if the player is within range, and if that actor has the variable &#8220;is trigger&#8221; set to true (ie. that NPC&#8217;s turn to talk). If true, the line is displayed on screen, and when it&#8217;s done displaying it will increment the &#8220;current line&#8221; variable. If the NPC has a chatter partner selected, then trigger will be set to false for the current actor, and set to true for the partner.<br>Alternatively, if the player is too close, instead of loading the normal text and incrementing the normal &#8220;current line&#8221; variable, it loads from a separate text array and increments a different variable.<br> <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"787\" height=\"1024\" src=\"https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram-787x1024.png\" alt=\"\" class=\"wp-image-367\" srcset=\"https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram-787x1024.png 787w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram-231x300.png 231w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram-768x999.png 768w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram-1181x1536.png 1181w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram-1000x1301.png 1000w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram-230x299.png 230w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram-350x455.png 350w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram-480x624.png 480w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_diagram.png 1464w\" sizes=\"(max-width: 787px) 100vw, 787px\" \/><\/figure>\n\n\n\n<p>This setup is not limited to two characters, it can be 3 or even more, working one after the other (only one can have trigger=true at a time, and it&#8217;s passed from one to another).<br>The last NPC has to pass trigger back to the first NPC for the conversation to continue. This means speech will always be like : A then B then A then B then A&#8230;etc, but if the dialog line happens to be empty then it&#8217;s skipped, and it will look as if one NPC talked for two or more lines at once before letting the other one speak.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"887\" src=\"https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes-1024x887.png\" alt=\"\" class=\"wp-image-368\" srcset=\"https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes-1024x887.png 1024w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes-300x260.png 300w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes-768x666.png 768w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes-1536x1331.png 1536w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes-1000x867.png 1000w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes-230x199.png 230w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes-350x303.png 350w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes-480x416.png 480w, https:\/\/abdoubouam.com\/wp-content\/uploads\/2024\/04\/chatter_notes.png 1650w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In the diagram above, in the case of chain chatter, even though the trigger goes sequentially through A B C, the chatter appears to the player as follows :<br>A: Hi B and C!<br>B: Hi A!<br>C: Hi A!<br>B: My turn to talk<br>B: My turn again<br>C: Now it&#8217;s my turn<br>B: Me again!<br>A: Hey, My turn now!<br><br>More complex setups can be built, the only limit is my ability to build and manage such systems. I shouldn&#8217;t for example make the entire cafe a single chatter group, because the complexity grows exponentially, but for small groups of about 6 people or so it won&#8217;t be an issue. In most cases it&#8217;s just between two or three people anyway.<\/p>\n\n\n\n<p>That&#8217;s mostly it for this week. Thanks for reading, and I&#8217;ll see you next time!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another week, another devlog! Here&#8217;s what I did this week: For legal (and also non-legal) reasons, all the above was a (sad) joke. Here&#8217;s the real devlog instead: 1- Oasis Dream Level I started experimenting with dream sequences, since dreams are going to be a significant enough part of the story. I made blockouts and basic gameplay prototype of two scenes. The first scene [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/posts\/361"}],"collection":[{"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/comments?post=361"}],"version-history":[{"count":4,"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/posts\/361\/revisions"}],"predecessor-version":[{"id":369,"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/posts\/361\/revisions\/369"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/media\/362"}],"wp:attachment":[{"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/media?parent=361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/categories?post=361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abdoubouam.com\/index.php\/wp-json\/wp\/v2\/tags?post=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}