{"id":29,"date":"2018-05-01T23:52:51","date_gmt":"2018-05-01T23:52:51","guid":{"rendered":"http:\/\/www.pangoweb.com\/b\/?p=29"},"modified":"2018-05-01T23:52:51","modified_gmt":"2018-05-01T23:52:51","slug":"cameras","status":"publish","type":"post","link":"https:\/\/www.pangoweb.com\/b\/2018\/05\/01\/cameras\/","title":{"rendered":"Cameras?"},"content":{"rendered":"<h3>Cameras?<\/h3>\n<p>The great thing about 3D is that you can more or less control the camera like it&rsquo;s a real camera. I mean, in 2D, from my very short experience, there is not much of a concept of camera, except now in things like Unity, but you just draw the tiles so that it&rsquo;s on screen or not.<\/p>\n<p>In 3D, the camera is a point with position, rotation, and the camera moves in a world coordonate system. The setting then remains at the same place. Not saying I particularly love 3D over 2D though. But this feels more natural, and allows to start to think, from time to time, as a film director, choosing the right camera angle&#8230;<\/p>\n<p>So, what if, say, I was making a 3D third-person RPG like\u00a0<a title=\"Dreams of Ylina\" href=\"http:\/\/www.pangoweb.com\/dreamsOfYlina.html\" target=\"_blank\" rel=\"noopener\">Dreams of Ylina<\/a>\u00a0and I had to choose a \u00ab\u00a0camera\u00a0\u00bb? Let&rsquo;s list some possible options:<\/p>\n<ul>\n<li>Close behind: a camera behind the controllable character, close to him, allowing the player to see in front of the character<\/li>\n<li>Not-so-close behind: same, but a bit further<\/li>\n<li>Top-down: see the character from top, reminiscent of my beloved old-school RPGs,<\/li>\n<li>Anywhere between the first three<\/li>\n<li>Freelook: allow to control the rotation of the camera around the character with the mouse.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Dreams of Ylina\" src=\"http:\/\/media.indiedb.com\/images\/members\/5\/4054\/4053006\/profile\/DOY-20180428.jpg\" alt=\"Dreams of Ylina\" width=\"640\" height=\"360\" \/>Now, how could I choose between all these possibilities? Well, let&rsquo;s ask myself: what do I want the player to feel, to see?<\/p>\n<p>Well, I should add that I don&rsquo;t really like Freelook 3rd person cameras. I don&rsquo;t know, this kind of control is not for me, it seems.<\/p>\n<p>I want the player to be able to see the horizon, and the landscapes. So, top-down is off the list.<\/p>\n<p>I also want the player to see the feet of his character and what&rsquo;s on the floor, even close to the character. So, not too close behind.<\/p>\n<p>But wait, there&rsquo;s more! What if the player runs down a hill, or climbs a slope? If the camera is too far behind, it will enter the ground when running down a slope, and if it&rsquo;s too close, you will not be able to see where you&rsquo;re going when climbing a slope.<\/p>\n<p>That leaves me two options then:<\/p>\n<ul>\n<li>Carefull adjust the distance and height of the camera to fit all the needs of my terrain and game<\/li>\n<li>Have a dynamic camera that doesn&rsquo;t go into the ground, maybe lifts up a little when doing down, and why not rotating a bit upwards to see where the player is going when going up<\/li>\n<\/ul>\n<p>I haven&rsquo;t really chosen yet, although what I&rsquo;ve used for now is more of the first idea than the second, but, well I just wanted to share these thoughts.<\/p>\n<p>As always, my blog articles are rare, not very well thought in advance, and written in the middle of the night, as I&rsquo;m very tired.<\/p>\n<p>See you space cowboys.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cameras? The great thing about 3D is that you can more or less control the camera like it&rsquo;s a real camera. I mean, in 2D, from my very short experience, there is not much of a concept of camera, except now in things like Unity, but you just draw the tiles so that it&rsquo;s on<\/p>\n<div class=\"read-more\"><a class=\"site-btn\" href=\"https:\/\/www.pangoweb.com\/b\/2018\/05\/01\/cameras\/\" >READ MORE<\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-game-dev-thoughts"],"_links":{"self":[{"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":1,"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":30,"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/posts\/29\/revisions\/30"}],"wp:attachment":[{"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pangoweb.com\/b\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}