{"id":152,"date":"2019-06-25T14:13:17","date_gmt":"2019-06-25T14:13:17","guid":{"rendered":"http:\/\/www.shmupcreator.com\/doc\/?docs=shmupcreator\/objects-and-entities\/backgrounds"},"modified":"2023-04-17T15:09:11","modified_gmt":"2023-04-17T15:09:11","slug":"backgrounds","status":"publish","type":"docs","link":"https:\/\/www.shmupcreator.com\/doc\/?docs=shmupcreator\/objects-and-entities\/backgrounds","title":{"rendered":"Backgrounds"},"content":{"rendered":"<h3>WHAT&#8217;S THIS FOR:<\/h3>\n<p>Background entities are what makes the level scenery.<br \/>Background objects can collide or not with the player and bullets. You can also use <a href=\"http:\/\/www.shmupcreator.com\/doc\/?docs=shmupcreator\/editor-advanced\/layer-editor\">layers<\/a> to add several layers of backgrounds and make them scroll at different speeds.<\/p>\n<h3>PROPERTIES<\/h3>\n<h5><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-295\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/tab_heart.jpg\" alt=\"\" width=\"30\" height=\"22\" \/>\u00a0SETTINGS TAB<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-436\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/nameTextFieldPlayer.jpg\" alt=\"\" width=\"45\" height=\"22\" \/>\u00a0N<strong>ame<\/strong> text field: the name of the object.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-427\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/checkbox.jpg\" alt=\"\" width=\"26\" height=\"26\" \/>C<strong>ast shadow<\/strong> checkbox: if checked, the object will cast a shadow on other objects.<br \/><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-435\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/directionArrows.jpg\" alt=\"\" width=\"106\" height=\"22\" \/>Orientation:<\/strong> the orientation of the background. It&#8217;s the orientation of the game object, not the graphic asset.<\/p>\n<p><strong>2D sprites:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-448\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/spinner1float.jpg\" alt=\"\" width=\"60\" height=\"22\" \/>\u00a0<strong>Animation speed<\/strong> spinner: if the texture contains several frames, this setting allows to choose the animation speed.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-449\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/spinner1.jpg\" alt=\"\" width=\"61\" height=\"22\" \/>\u00a0<strong>Columns<\/strong> spinner: set the number of columns of the texture atlas.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-449\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/spinner1.jpg\" alt=\"\" width=\"61\" height=\"22\" \/>\u00a0<strong>Rows<\/strong> spinner: set the number of rows of the texture atlas (see &#8220;animating sprites&#8221; section for more information).<\/p>\n<p><strong>RENDERING ORDER<\/strong><\/p>\n<p>name of the layer<strong>: just to remind you where is your sprite<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-449\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/spinner1.jpg\" alt=\"\" width=\"61\" height=\"22\" \/> order in layer: <\/strong>allows you to choose if your sprite is back or front, if you want a sprite is behind or in front of another one<strong> INSIDE ITS LAYER.<br \/><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2456\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_sumup.jpg\" alt=\"\" width=\"1280\" height=\"341\" srcset=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_sumup.jpg 1280w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_sumup-300x80.jpg 300w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_sumup-1024x273.jpg 1024w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_sumup-768x205.jpg 768w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_sumup-1200x320.jpg 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n\n\n<pre class=\"wp-block-preformatted\"><strong>RULES INSIDE A LAYER<\/strong>\n\n<strong>First:<\/strong> Backgrounds are ALWAYS rendered FIRST &gt;&gt; Enemies are always on top\n\n<strong>Second:<\/strong> the first sprite rendered is \"<strong>1<\/strong>\" (then the sprite that looks the farthest)  \n\n<strong>Third:<\/strong> it's possible to have several times the same number but mind the overlap of sprites that creates flickering.\n<\/pre>\n\n\n<p><strong>Example:<br \/><\/strong>These 2 flowers are in the same layer.<br \/>The big flower should have been in front of the small one to simulate perspective.<\/p>\n<p>At the moment the big one is behind the small one.<br \/>Let&#8217;s see their rendering order:<br \/>The small one, order in layer =5<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2436\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerSmall.jpg\" alt=\"\" width=\"1282\" height=\"752\" srcset=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerSmall.jpg 1282w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerSmall-300x176.jpg 300w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerSmall-1024x601.jpg 1024w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerSmall-768x450.jpg 768w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerSmall-1200x704.jpg 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>The big one: order in layer =1<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2437\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerBig.jpg\" alt=\"\" width=\"1282\" height=\"752\" srcset=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerBig.jpg 1282w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerBig-300x176.jpg 300w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerBig-1024x601.jpg 1024w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerBig-768x450.jpg 768w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_flowerBig-1200x704.jpg 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>And the result is:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2496\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_detail_wrong.jpg\" alt=\"\" width=\"777\" height=\"337\" srcset=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_detail_wrong.jpg 777w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_detail_wrong-300x130.jpg 300w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_detail_wrong-768x333.jpg 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>To put the big flower in front of the small one, the order is needed to be changed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2495\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_detail_ok.jpg\" alt=\"\" width=\"777\" height=\"337\" srcset=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_detail_ok.jpg 777w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_detail_ok-300x130.jpg 300w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/01\/SCHMPcreator_OrderInLayer_detail_ok-768x333.jpg 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-292\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/tab_collisions.jpg\" alt=\"\" width=\"30\" height=\"22\" \/>\u00a0COLLISION TAB<\/h3>\n<p><strong>2D SPRITES:<\/strong><br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/>No collisions: the object will not collide with other objects. If you don&#8217;t need a collision, choose this option as it will speed up the computations.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\" \/>Collision shape: the object will collide, using one or several collision shapes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"22\" height=\"22\" class=\"wp-image-225\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/editor_layers_plus.jpg\" alt=\"\" \/> <strong>Add <\/strong>button: Add a new collision shape<br data-rich-text-line-break=\"true\" \/><img loading=\"lazy\" decoding=\"async\" width=\"22\" height=\"22\" class=\"wp-image-236\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/menu_trash.jpg\" alt=\"\" \/> <strong>Delete <\/strong>button: Delete the current collision shape<br data-rich-text-line-break=\"true\" \/><img loading=\"lazy\" decoding=\"async\" width=\"101\" height=\"26\" class=\"wp-image-390\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/arrows.jpg\" alt=\"\" \/> <strong>navigation<\/strong> arrows: Navigate between the different collision shapes<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"22\" height=\"22\" class=\"wp-image-372\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/coll_reset.jpg\" alt=\"\" \/> <strong>Reset <\/strong>button<strong>:<\/strong> reset the collision shape<br data-rich-text-line-break=\"true\" \/><img loading=\"lazy\" decoding=\"async\" width=\"22\" height=\"22\" class=\"wp-image-371\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/coll_auto.jpg\" alt=\"\" \/> <strong>Auto collision<\/strong> button: the tool tries to create a shape following the picture contours.<br \/><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2622 alignleft\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/04\/coll_player.jpg\" alt=\"\" width=\"201\" height=\"200\" srcset=\"https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/04\/coll_player.jpg 201w, https:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/04\/coll_player-150x150.jpg 150w\" sizes=\"auto, (max-width: 201px) 85vw, 201px\" \/>C<strong>ollision window<\/strong>: move the points to build the shape of your collision<br \/><strong><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2623 alignnone\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2023\/04\/coll_player_point-1.jpg\" alt=\"\" width=\"132\" height=\"22\" \/><\/strong><strong>Point position x \/ y<\/strong> edit boxes: allow to move precisely the\u00a0 the selected point.<\/p>\n\n\n<pre class=\"wp-block-preformatted\"><strong>Notes:<\/strong>\n. The collision shape is always convex, so you can't create any shape. This is why sometimes you need to add several collision shapes to create the right shape.\n. You don't always need a super precise shape. It's a shmup: think gameplay first, and try to not add too many collision shapes to an object!<\/pre>\n\n\n<div>&nbsp;<\/div>\n<p><strong>3D OBJECTS:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-225\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/editor_layers_plus.jpg\" alt=\"\" width=\"22\" height=\"22\">&nbsp;: add a new collision shape<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-236\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/menu_trash.jpg\" alt=\"\" width=\"22\" height=\"22\">&nbsp;: delete the current collision shape<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-390\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/arrows.jpg\" alt=\"\" width=\"101\" height=\"26\">: navigate between the different collision shapes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\"><strong>No collision<\/strong> radio button: the object will not collide with other objects. If you don&#8217;t need a collision, choose this option as it will speed up the computations.<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\"><strong>3D mesh<\/strong> radio button: the collision shape is the same as the 3D mesh. It&#8217;s the most expensive collision shape, but also the more precise.<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\"><strong>Convex<\/strong> <strong>hull<\/strong> radio button: the collision shape is automatically created as a convex hull. It&#8217;s not as precise as the triangle mesh, but is often enough.<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\"><strong>Sphere<\/strong> radio button: the collision shape is a sphere. Very fast collision type.<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\"><strong>Capsule<\/strong> radio button: the collision shape is a capsule. Very fast collision type.<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"http:\/\/www.shmupcreator.com\/doc\/wp-content\/uploads\/2019\/07\/radioButton.jpg\" alt=\"\" width=\"26\" height=\"26\"><strong>Cube<\/strong> radio button: the collision shape is a cube. Very fast collision type.<\/p>\n\n\n<pre class=\"wp-block-preformatted\"><strong>Note:<\/strong> you can add several 3D collision shapes to one object. Note that this collision is a 3D collision, unlike the collisions of the enemies, player and items, which are 2.5D collisions. See \"<a href=\"http:\/\/www.shmupcreator.com\/doc\/?docs=shmupcreator\/making-a-game\/collisions\">How the collisions work<\/a>\" for more on this subject.<\/pre>\n","protected":false},"featured_media":0,"parent":136,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-152","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":43,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/152\/revisions"}],"predecessor-version":[{"id":2634,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/152\/revisions\/2634"}],"up":[{"embeddable":true,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/136"}],"next":[{"title":"Enemies and Waves","link":"https:\/\/www.shmupcreator.com\/doc\/?docs=shmupcreator\/objects-and-entities\/enemies-and-waves","href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/153"}],"prev":[{"title":"Player","link":"https:\/\/www.shmupcreator.com\/doc\/?docs=shmupcreator\/objects-and-entities\/player","href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=\/wp\/v2\/docs\/151"}],"wp:attachment":[{"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.shmupcreator.com\/doc\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}