PageSourceSearch

https://akademie.netlify.app/assets/js/f0bb006d.0286d297.js

js akademie.netlify.app collected 2026-10-03 10:29:28 UTC 14,141 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdigitalniakademie=self.webpackChunkdigitalniakademie||[]).push([[8907],{3905:function(e,t,r){r.d(t,{Zo:function(){return c},kt:function(){return m}});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=s(r),m=a,v=p["".concat(u,".").concat(m)]||p[m]||d[m]||o;return r?n.createElement(v,l(l({ref:t},c),{},{components:r})):n.createElement(v,l({ref:t},c))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=p;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var s=2;s<o;s++)l[s]=r[s];return n.createElement.apply(null,l)}return n.createElement.apply(null,r)}p.displayName="MDXCreateElement"},85162:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(67294),a=r(34334),o="tabItem_Ymn6";function l(e){let{children:t,hidden:r,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(o,l),hidden:r},t)}},74866:function(e,t,r){r.d(t,{Z:function(){return j}});var n=r(83117),a=r(67294),o=r(34334),l=r(12466),i=r(76775),u=r(91980),s=r(67392),c=r(50012);function d(e){return function(e){var t,r;return null!=(t=null==(r=a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error("Docusaurus error: Bad <Tabs> child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.')})))?void 0:r.filter(Boolean))?t:[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function p(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=null!=t?t:d(r);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((e=>e.value)).join(", ")+'" found in <Tabs>. Every value needs to be unique.')}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function v(e){let{queryString:t=!1,groupId:r}=e;const n=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=r?r:null}({queryString:t,groupId:r});return[(0,u._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(n.location.search);t.set(o,e),n.replace({...n.location,search:t.toString()})}),[o,n])]}function y(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,o=p(e),[l,i]=(0,a.useState)((()=>function(e){var t;let{defaultValue:r,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(r){if(!m({value:r,tabValues:n}))throw new Error('Docusaurus error: The <Tabs> has a defaultValue "'+r+'" but none of its children has the corresponding value. Available values are: '+n.map((e=>e.value)).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return r}const a=null!=(t=n.find((e=>e.default)))?t:n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[u,s]=v({queryString:r,groupId:n}),[d,y]=function(e){let{groupId:t}=e;const r=function(e){return e?"docusaurus.tab."+e:null}(t),[n,o]=(0,c.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&o.set(e)}),[r,o])]}({groupId:n}),h=(()=>{const e=null!=u?u:d;return m({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{h&&i(h)}),[h]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error("Can't select invalid tab value="+e);i(e),s(e),y(e)}),[s,y,o]),tabValues:o}}var h=r(72389),k="tabList__CuJ",f="tabItem_LNqP";function g(e){let{className:t,block:r,selectedValue:i,selectValue:u,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),p=e=>{const t=e.currentTarget,r=c.indexOf(t),n=s[r].value;n!==i&&(d(t),u(n))},m=e=>{var t;let r=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{var n;const t=c.indexOf(e.currentTarget)+1;r=null!=(n=c[t])?n:c[0];break}case"ArrowLeft":{var a;const t=c.indexOf(e.currentTarget)-1;r=null!=(a=c[t])?a:c[c.length-1];break}}
1null==(t=r)||t.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},s.map((e=>{let{value:t,label:r,attributes:l}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},l,{className:(0,o.Z)("tabs__item",f,null==l?void 0:l.className,{"tabs__item--active":i===t})}),null!=r?r:t)})))}function b(e){let{lazy:t,children:r,selectedValue:n}=e;const o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function D(e){const t=y(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",k)},a.createElement(g,(0,n.Z)({},e,t)),a.createElement(b,(0,n.Z)({},e,t)))}function j(e){const t=(0,h.Z)();return a.createElement(D,(0,n.Z)({key:String(t)},e))}},99812:function(e,t,r){r.r(t),r.d(t,{assets:function(){return c},contentTitle:function(){return u},default:function(){return m},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return d}});var n=r(83117),a=(r(67294),r(3905)),o=r(74866),l=r(85162);const i={id:"hry-godot-2Dhra",title:"Programov\xe1n\xed",sidebar_label:"Projekt 3: 2D hra",sidebar_position:12,description:"Import 3D modelu a textur, optim\xe1ln\xed nastaven\xed programu Godot pro programov\xe1n\xed her",keywords:["godot","gaming","tutorial","import","export","vizualizace","3D","blender","blender3d","instalace","nastaven\xed","digit\xe1ln\xed modelov\xe1n\xed"]},u="Projekt 3: 2D hra",s={unversionedId:"10hry/hry-godot-2Dhra",id:"10hry/hry-godot-2Dhra",title:"Programov\xe1n\xed",description:"Import 3D modelu a textur, optim\xe1ln\xed nastaven\xed programu Godot pro programov\xe1n\xed her",source:"@site/docs/10hry/projekt-3-2D-hra.md",sourceDirName:"10hry",slug:"/10hry/hry-godot-2Dhra",permalink:"/docs/10hry/hry-godot-2Dhra",draft:!1,editUrl:"https://github.com/digitalniakademie/akademie/docs/10hry/projekt-3-2D-hra.md",tags:[],version:"current",sidebarPosition:12,frontMatter:{id:"hry-godot-2Dhra",title:"Programov\xe1n\xed",sidebar_label:"Projekt 3: 2D hra",sidebar_position:12,description:"Import 3D modelu a textur, optim\xe1ln\xed nastaven\xed programu Godot pro programov\xe1n\xed her",keywords:["godot","gaming","tutorial","import","export","vizualizace","3D","blender","blender3d","instalace","nastaven\xed","digit\xe1ln\xed modelov\xe1n\xed"]},sidebar:"tutorialSidebar",previous:{title:"Projekt 2: 3D vizualizace",permalink:"/docs/10hry/hry-godot-3Dvisualisation"},next:{title:"Projekt 4: 3D hra",permalink:"/docs/10hry/hry-godot-3Dgames"}},c={},d=[{value:"Jednoduch\xfd 2D prototyp",id:"jednoduch\xfd-2d-prototyp",level:2},{value:"Jednoduch\xfd 2D kontrol\xe9r hr\xe1\u010de",id:"jednoduch\xfd-2d-kontrol\xe9r-hr\xe1\u010de",level:3},{value:"2D Prototyping",id:"2d-prototyping",level:3},{value:"TileMap: Tilesety a design level\u016f",id:"tilemap-tilesety-a-design-level\u016f",level:3},{value:"Pl\xe1nov\xe1n\xed a hern\xed design",id:"pl\xe1nov\xe1n\xed-a-hern\xed-design",level:2},{value:"V\xfdvoj",id:"v\xfdvoj",level:2},{value:"Assety a textury",id:"assety-a-textury",level:3},{value:"2D kontrola hr\xe1\u010de",id:"2d-kontrola-hr\xe1\u010de",level:3},{value:"Programujeme protivn\xedky",id:"programujeme-protivn\xedky",level:3},{value:"Mapy",id:"mapy",level:3},{value:"Efekty",id:"efekty",level:3},{value:"Menu syst\xe9m",id:"menu-syst\xe9m",level:3}],p={toc:d};
1function m(e){let{components:t,...i}=e;return(0,a.kt)("wrapper",(0,n.Z)({},p,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"projekt-3-2d-hra"},"Projekt 3: 2D hra"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"image",src:r(65141).Z,width:"2562",height:"1441"})),(0,a.kt)("p",null,"Vytvo\u0159en\xed sc\xe9n, hern\xed mechaniky a voln\xfd pohyb pomoc\xed kontrol\xe9ru (my\u0161, kl\xe1vesnice)."),(0,a.kt)("h2",{id:"jednoduch\xfd-2d-prototyp"},"Jednoduch\xfd 2D prototyp"),(0,a.kt)("h3",{id:"jednoduch\xfd-2d-kontrol\xe9r-hr\xe1\u010de"},"Jednoduch\xfd 2D kontrol\xe9r hr\xe1\u010de"),(0,a.kt)("p",null,"Princip je obdobn\xfd jako u 2D verze."),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Vytvo\u0159 2D sc\xe9nu"),(0,a.kt)("li",{parentName:"ol"},"Vlo\u017e CharacterBody2D "),(0,a.kt)("li",{parentName:"ol"},"Vlo\u017e CollisionShape2D pod CharacterBody2D"),(0,a.kt)("li",{parentName:"ol"},"Nastav CollisionShape2D (libovoln\xfd tvar, Circle nebo Capsule)"),(0,a.kt)("li",{parentName:"ol"},"Vlo\u017e 2D sprite, kter\xfd bude p\u0159edstavovat hr\xe1\u010de pod CharacterBody2D"),(0,a.kt)("li",{parentName:"ol"},"P\u0159ipoj nov\xfd skript k CharacterBody2D a vyber z\xe1kladn\xed template pro 2D kontrol\xe9r"),(0,a.kt)("li",{parentName:"ol"},"Vytvo\u0159 sc\xe9nu/level ze Sprite2D objekt\u016f, s vno\u0159en\xfdmi uzly StaticBody2D a CollisionShape2D, a ",(0,a.kt)("strong",{parentName:"li"},"nastav u t\u011bchto objekt\u016f kolizn\xed tvary"),". "),(0,a.kt)("li",{parentName:"ol"},"P\u0159idej a nastav kameru a p\u0159ipoj j\xed k CharacterBody2D")),(0,a.kt)("p",null,"Prohl\xe9dni si skript kontrol\xe9ru a vyzkou\u0161ej sc\xe9nu."),(0,a.kt)("h3",{id:"2d-prototyping"},"2D Prototyping"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"image",src:r(5980).Z,width:"961",height:"269"})),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Polygon2D, Collision Polygon2D (stejn\xfd polygon do kolizn\xedho uzlu zkop\xedruje\u0161 v Inspektoru, vyber Data/Polygon CTRL+C, vlo\u017e\xed\u0161 do Collision Polygon2D, stejn\u011b tak transformaci). Polygony se tak\xe9 daj\xed sjednotit skriptem jako na obr\xe1zku.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-gdscript"},"\nextends StaticBody2D\n\n@onready var poly2D = $Polygon2D\n@onready var poly2DCol = $CollisionPolygon2D\n\n# collision same as polygon\nfunc _ready():\n    poly2DCol.polygon = poly2D.polygon\n\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Line2D, Path2D")),(0,a.kt)("h3",{id:"tilemap-tilesety-a-design-level\u016f"},"TileMap: Tilesety a design level\u016f"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"nastaven\xed koliz\xed"),(0,a.kt)("li",{parentName:"ul"},"vytvo\u0159en\xed dla\u017edic pro tileset")),(0,a.kt)("h2",{id:"pl\xe1nov\xe1n\xed-a-hern\xed-design"},"Pl\xe1nov\xe1n\xed a hern\xed design"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Staveni\u0161t\u011b ")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"C\xedl: opravit stavebn\xed je\u0159\xe1b pomoc\xed n\xe1hradn\xedch d\xedl\u016f"),(0,a.kt)("li",{parentName:"ul"},"Hern\xed mechanika: Hr\xe1\u010d sb\xedr\xe1 d\xedly rozm\xedst\u011bn\xe9 v rozestav\u011bn\xe9 budov\u011b. Nep\u0159\xe1tel\xe9: Padaj\xedc\xed cihly, vr\xe1ny, vztekl\xfd hl\xedda\u010d, ufo.")),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Godot importuje 2D animace. 2D animace je mo\u017en\xe9 vytv\xe1\u0159ed v programu Krita.")),(0,a.kt)("h2",{id:"v\xfdvoj"},"V\xfdvoj"),(0,a.kt)("h3",{id:"assety-a-textury"},"Assety a textury"),(0,a.kt)("h3",{id:"2d-kontrola-hr\xe1\u010de"},"2D kontrola hr\xe1\u010de"),(0,a.kt)("h3",{id:"programujeme-protivn\xedky"},"Programujeme protivn\xedky"),(0,a.kt)("h3",{id:"mapy"},"Mapy"),(0,a.kt)("h3",{id:"efekty"},"Efekty"),(0,a.kt)("h3",{id:"menu-syst\xe9m"},"Menu syst\xe9m"),(0,a.kt)(o.Z,{groupId:"jazykova-verze",defaultValue:"czv",values:[{label:"V \u010desk\xe9 verzi",value:"czv"},{label:"V anglick\xe9 verzi",value:"env"}],mdxType:"Tabs"},(0,a.kt)(l.Z,{value:"czv",mdxType:"TabItem"},"Editor \u2023 Nastaven\xed editoru \u2023 FileSystem \u2023 Import \u2023 Blender \u2023 Blender Path"),(0,a.kt)(l.Z,{value:"env",mdxType:"TabItem"},"Editor \u2023 Editor Settings \u2023 FileSystem \u2023 Import \u2023 Blender \u2023 Blender Path")))}m.isMDXComponent=!0},65141:function(e,t,r){t.Z=r.p+"assets/images/godot3-78e82806595e5989b3278d545d34b73f.png"},5980:function(e,t,r){t.Z=r.p+"assets/images/polygon-prototype-24892936a1917755f0ad689a87cfacc6.jpg"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.