diff --git a/_share/media/img/albert/section04/lesson-01/fig06.png b/_share/media/img/albert/section04/lesson-01/fig06.png new file mode 100644 index 0000000..1ac7fea Binary files /dev/null and b/_share/media/img/albert/section04/lesson-01/fig06.png differ diff --git a/_subsections/sec04/lesson-01.org b/_subsections/sec04/lesson-01.org index 1b2c367..514f4af 100644 --- a/_subsections/sec04/lesson-01.org +++ b/_subsections/sec04/lesson-01.org @@ -53,3 +53,56 @@ there are two ways to do this - move the background image appropriately with the view tool #+attr_html: :width 600px [[./../../_share/media/img/albert/section04/lesson-01/fig05.png]] + +** stretching the viewport +- used if the window needs to be resized or sized differently for a differnt device (ie tablet vs iphone vs iphone11 vs android, etc) +- disabled by default + +- go to Project->Project Settings->Display->Window->Stretch + +*** Stretch -> Mode + +**** there are two types of stretch modes + +1. canvas_items +2. viewport + +**** convas_items +- albert prefers this +- renders game initially at set resolution +- stretches that onto the window +- can cause blurring with pixel art +- higher performance (hence faster) + +**** viewport +- looks at actual resolution +- builds graphics to fit that resolution +- slower but crisp with pixel art + + + +*** Stretch -> Aspect +set aspect to keep + +**** there are a bunch of aspect types +- ignore +- keep +- keep width +- keep height + +**** keep +- keeps the full aspect ration +- extra space will be filled with black + +*** how to deal with black bars +- make artwork that accounts for it +- e.g. put a fence around the boundary + +** window size +- if the ratios set for viewport are too small you can directly set the window size + +*** go to +1. Click on 'Advanced Settings' +2. Project->Project Settings->Display->Window->Size +4. scroll down to "Window Width Override" and "Window Height Override" +5. you can perform calculation sin the textboxes