best_practices.html 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>Best Practices For jME3 Developers :: jMonkeyEngine Docs</title>
  7. <link rel="canonical" href="https://wiki.jmonkeyengine.org/docs/3.8/tutorials/concepts/best_practices.html">
  8. <link rel="prev" href="../beginner/hello_physics.html">
  9. <link rel="next" href="optimization.html">
  10. <meta name="generator" content="Antora 3.0.1">
  11. <link rel="stylesheet" href="../../../../_/css/site.css">
  12. <meta property="og:image" content="https://wiki.jmonkeyengine.org/_/img/iconx128.png">
  13. <meta property="og:description" content="Best Practices For jME3 Developers">
  14. <meta property="og:title" content="jMonkeyEngine Docs">
  15. <link rel="stylesheet" href="../../../../_/css/site-extra.css">
  16. <link rel="stylesheet" href="../../../../_/css/vendor/docsearch.min.css">
  17. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css -->
  18. <link rel="icon" href="../../../../_/img/favicon.ico" type="image/x-icon">
  19. </head>
  20. <body class="article">
  21. <header class="header">
  22. <nav class="navbar">
  23. <div class="navbar-brand">
  24. <a class="navbar-item" href="https://wiki.jmonkeyengine.org">
  25. <img alt="" src="../../../../_/img/jme-logo.png" height="32" type="image/x-icon">
  26. </a>
  27. <div class="navbar-item hide-for-print">
  28. <input id="search-input" type="text" placeholder="Search docs">
  29. </div>
  30. <button class="navbar-burger" data-target="topbar-nav">
  31. <span></span>
  32. <span></span>
  33. <span></span>
  34. </button>
  35. </div>
  36. <div id="topbar-nav" class="navbar-menu">
  37. <div class="navbar-end">
  38. <div class="navbar-item theme-switch-wrapper">
  39. <label class="theme-switch" for="checkbox">
  40. <input type="checkbox" id="checkbox" />
  41. <div class="slider round"></div>
  42. </label>
  43. </div>
  44. <a class="navbar-item" href="https://github.com/jmonkeyengine/wiki">Github</a>
  45. </div>
  46. </div>
  47. </nav>
  48. </header>
  49. <div class="body">
  50. <div class="nav-container" data-component="docs" data-version="3.8">
  51. <aside class="nav">
  52. <div class="panels">
  53. <div class="nav-panel-menu is-active" data-panel="menu">
  54. <nav class="nav-menu">
  55. <h3 class="title"><a href="../../documentation.html">JME</a></h3>
  56. <ul class="nav-list">
  57. <li class="nav-item" data-depth="0">
  58. <ul class="nav-list">
  59. <li class="nav-item" data-depth="1">
  60. <a class="nav-link" href="../../documentation.html">Getting Started</a>
  61. </li>
  62. <li class="nav-item" data-depth="1">
  63. <a class="nav-link" href="https://javadoc.jmonkeyengine.org/v3.4.1-stable">JavaDoc</a>
  64. </li>
  65. <li class="nav-item" data-depth="1">
  66. <a class="nav-link" href="../../release.html">Release Guide</a>
  67. </li>
  68. </ul>
  69. </li>
  70. <li class="nav-item" data-depth="0">
  71. <ul class="nav-list">
  72. <li class="nav-item" data-depth="1">
  73. <button class="nav-item-toggle"></button>
  74. <a class="nav-link" href="../beginner/beginner.html">Beginner Tutorials</a>
  75. <ul class="nav-list">
  76. <li class="nav-item" data-depth="2">
  77. <a class="nav-link" href="../beginner/hello_simpleapplication.html">Hello SimpleApplication</a>
  78. </li>
  79. <li class="nav-item" data-depth="2">
  80. <a class="nav-link" href="../beginner/hello_node.html">Hello Node</a>
  81. </li>
  82. <li class="nav-item" data-depth="2">
  83. <a class="nav-link" href="../beginner/hello_asset.html">Hello Asset</a>
  84. </li>
  85. <li class="nav-item" data-depth="2">
  86. <a class="nav-link" href="../beginner/hello_main_event_loop.html">Hello Update Loop</a>
  87. </li>
  88. <li class="nav-item" data-depth="2">
  89. <a class="nav-link" href="../beginner/hello_input_system.html">Hello Input System</a>
  90. </li>
  91. <li class="nav-item" data-depth="2">
  92. <a class="nav-link" href="../beginner/hello_material.html">Hello Material</a>
  93. </li>
  94. <li class="nav-item" data-depth="2">
  95. <a class="nav-link" href="../beginner/hello_animation.html">Hello Animation</a>
  96. </li>
  97. <li class="nav-item" data-depth="2">
  98. <a class="nav-link" href="../beginner/hello_picking.html">Hello Picking</a>
  99. </li>
  100. <li class="nav-item" data-depth="2">
  101. <a class="nav-link" href="../beginner/hello_collision.html">Hello Collision</a>
  102. </li>
  103. <li class="nav-item" data-depth="2">
  104. <a class="nav-link" href="../beginner/hello_terrain.html">Hello Terrain</a>
  105. </li>
  106. <li class="nav-item" data-depth="2">
  107. <a class="nav-link" href="../beginner/hello_audio.html">Hello Audio</a>
  108. </li>
  109. <li class="nav-item" data-depth="2">
  110. <a class="nav-link" href="../beginner/hello_effects.html">Hello Effects</a>
  111. </li>
  112. <li class="nav-item" data-depth="2">
  113. <a class="nav-link" href="../beginner/hello_physics.html">Hello Physics</a>
  114. </li>
  115. </ul>
  116. </li>
  117. <li class="nav-item" data-depth="1">
  118. <button class="nav-item-toggle"></button>
  119. <span class="nav-text">Key Concepts</span>
  120. <ul class="nav-list">
  121. <li class="nav-item is-current-page" data-depth="2">
  122. <a class="nav-link" href="best_practices.html">Best Practices</a>
  123. </li>
  124. <li class="nav-item" data-depth="2">
  125. <a class="nav-link" href="optimization.html">Optimization</a>
  126. </li>
  127. <li class="nav-item" data-depth="2">
  128. <a class="nav-link" href="faq.html">Frequently Asked Questions</a>
  129. </li>
  130. <li class="nav-item" data-depth="2">
  131. <a class="nav-link" href="math_for_dummies.html">Math for Dummies</a>
  132. </li>
  133. <li class="nav-item" data-depth="2">
  134. <a class="nav-link" href="math.html">Math overview</a>
  135. </li>
  136. <li class="nav-item" data-depth="2">
  137. <a class="nav-link" href="math_cheet_sheet.html">3D math "cheat sheet"</a>
  138. </li>
  139. <li class="nav-item" data-depth="2">
  140. <a class="nav-link" href="rotate.html">3-D Rotation</a>
  141. </li>
  142. <li class="nav-item" data-depth="2">
  143. <a class="nav-link" href="math_video_tutorials.html">Math video tutorial series</a>
  144. </li>
  145. <li class="nav-item" data-depth="2">
  146. <a class="nav-link" href="multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a>
  147. </li>
  148. <li class="nav-item" data-depth="2">
  149. <a class="nav-link" href="the_scene_graph.html">The Scene Graph</a>
  150. </li>
  151. <li class="nav-item" data-depth="2">
  152. <a class="nav-link" href="scenegraph_for_dummies.html">Scene Graph for Dummies</a>
  153. </li>
  154. <li class="nav-item" data-depth="2">
  155. <a class="nav-link" href="terminology.html">3D Graphics Terminology</a>
  156. </li>
  157. <li class="nav-item" data-depth="2">
  158. <a class="nav-link" href="transparency_sorting.html">Transparency Sorting</a>
  159. </li>
  160. </ul>
  161. </li>
  162. <li class="nav-item" data-depth="1">
  163. <button class="nav-item-toggle"></button>
  164. <span class="nav-text">Articles and How-to&#8217;s</span>
  165. <ul class="nav-list">
  166. <li class="nav-item" data-depth="2">
  167. <button class="nav-item-toggle"></button>
  168. <span class="nav-text">How to Model</span>
  169. <ul class="nav-list">
  170. <li class="nav-item" data-depth="3">
  171. <a class="nav-link" href="../how-to/modeling/3dsmax/3dsmax.html">3dsmax</a>
  172. </li>
  173. <li class="nav-item" data-depth="3">
  174. <button class="nav-item-toggle"></button>
  175. <a class="nav-link" href="../how-to/modeling/blender/blender.html">Blender</a>
  176. <ul class="nav-list">
  177. <li class="nav-item" data-depth="4">
  178. <a class="nav-link" href="../how-to/modeling/blender/blender_buffer_clearing.html">Buffer Clearing</a>
  179. </li>
  180. <li class="nav-item" data-depth="4">
  181. <a class="nav-link" href="../how-to/modeling/blender/blender_gltf.html">Export as GlTF</a>
  182. </li>
  183. <li class="nav-item" data-depth="4">
  184. <a class="nav-link" href="../how-to/modeling/blender/blender_ogre_export.html">Export as Ogre XML</a>
  185. </li>
  186. <li class="nav-item" data-depth="4">
  187. <a class="nav-link" href="../how-to/modeling/blender/blender_ogre_compatibility.html">Ogre Compatibility</a>
  188. </li>
  189. <li class="nav-item" data-depth="4">
  190. <a class="nav-link" href="../how-to/modeling/blender/makehuman.html">MakeHuman</a>
  191. </li>
  192. <li class="nav-item" data-depth="4">
  193. <a class="nav-link" href="../how-to/modeling/blender/makehuman_blender_ogrexml_toolchain.html">MakeHuman toolchain</a>
  194. </li>
  195. </ul>
  196. </li>
  197. </ul>
  198. </li>
  199. <li class="nav-item" data-depth="2">
  200. <button class="nav-item-toggle"></button>
  201. <span class="nav-text">How to Animate</span>
  202. <ul class="nav-list">
  203. <li class="nav-item" data-depth="3">
  204. <button class="nav-item-toggle"></button>
  205. <span class="nav-text">Mixamo</span>
  206. <ul class="nav-list">
  207. <li class="nav-item" data-depth="4">
  208. <a class="nav-link" href="../how-to/modeling/blender/mixamo.html">Blender Models</a>
  209. </li>
  210. </ul>
  211. </li>
  212. </ul>
  213. </li>
  214. <li class="nav-item" data-depth="2">
  215. <a class="nav-link" href="../how-to/debugging.html">Debugging with Wireframes</a>
  216. </li>
  217. <li class="nav-item" data-depth="2">
  218. <a class="nav-link" href="../how-to/util/free_skymaps.html">How to create free skymaps</a>
  219. </li>
  220. <li class="nav-item" data-depth="2">
  221. <button class="nav-item-toggle"></button>
  222. <span class="nav-text">Java Tips</span>
  223. <ul class="nav-list">
  224. <li class="nav-item" data-depth="3">
  225. <a class="nav-link" href="../how-to/java/localization.html">Localization</a>
  226. </li>
  227. <li class="nav-item" data-depth="3">
  228. <a class="nav-link" href="../how-to/java/swing_canvas.html">Swing Canvas</a>
  229. </li>
  230. <li class="nav-item" data-depth="3">
  231. <a class="nav-link" href="../how-to/java/logging.html">Logging</a>
  232. </li>
  233. <li class="nav-item" data-depth="3">
  234. <a class="nav-link" href="../how-to/java/read_graphic_card_capabilites.html">Read Graphics Capabilities</a>
  235. </li>
  236. </ul>
  237. </li>
  238. <li class="nav-item" data-depth="2">
  239. <button class="nav-item-toggle"></button>
  240. <span class="nav-text">Articles</span>
  241. <ul class="nav-list">
  242. <li class="nav-item" data-depth="3">
  243. <button class="nav-item-toggle"></button>
  244. <span class="nav-text">Physically Based Rendering</span>
  245. <ul class="nav-list">
  246. <li class="nav-item" data-depth="4">
  247. <a class="nav-link" href="../how-to/articles/pbr/pbr_part1.html">PBR – Part one</a>
  248. </li>
  249. <li class="nav-item" data-depth="4">
  250. <a class="nav-link" href="../how-to/articles/pbr/pbr_part2.html">PBR – Part two</a>
  251. </li>
  252. <li class="nav-item" data-depth="4">
  253. <a class="nav-link" href="../how-to/articles/pbr/pbr_part3.html">PBR – Part three</a>
  254. </li>
  255. </ul>
  256. </li>
  257. </ul>
  258. </li>
  259. </ul>
  260. </li>
  261. </ul>
  262. </li>
  263. <li class="nav-item" data-depth="0">
  264. <ul class="nav-list">
  265. <li class="nav-item" data-depth="1">
  266. <button class="nav-item-toggle"></button>
  267. <span class="nav-text">Core Engine</span>
  268. <ul class="nav-list">
  269. <li class="nav-item" data-depth="2">
  270. <a class="nav-link" href="../../core/app/simpleapplication.html">SimpleApplication</a>
  271. </li>
  272. <li class="nav-item" data-depth="2">
  273. <a class="nav-link" href="../../core/system/appsettings.html">AppSettings</a>
  274. </li>
  275. </ul>
  276. </li>
  277. <li class="nav-item" data-depth="1">
  278. <button class="nav-item-toggle"></button>
  279. <span class="nav-text">Controlling Game Logic</span>
  280. <ul class="nav-list">
  281. <li class="nav-item" data-depth="2">
  282. <a class="nav-link" href="../../core/app/update_loop.html">Update Loop</a>
  283. </li>
  284. <li class="nav-item" data-depth="2">
  285. <a class="nav-link" href="../../core/app/state/application_states.html">Application States</a>
  286. </li>
  287. <li class="nav-item" data-depth="2">
  288. <button class="nav-item-toggle"></button>
  289. <a class="nav-link" href="../../core/scene/control/custom_controls.html">Custom Controls</a>
  290. <ul class="nav-list">
  291. <li class="nav-item" data-depth="3">
  292. <button class="nav-item-toggle"></button>
  293. <span class="nav-text">Video</span>
  294. <ul class="nav-list">
  295. <li class="nav-item" data-depth="4">
  296. <a class="nav-link" href="https://www.youtube.com/watch?v=MNDiZ9YHIpM">Control any scene node</a>
  297. </li>
  298. <li class="nav-item" data-depth="4">
  299. <a class="nav-link" href="https://www.youtube.com/watch?v=-OzRZscLlHY">Control a character</a>
  300. </li>
  301. <li class="nav-item" data-depth="4">
  302. <a class="nav-link" href="https://wiki.jmonkeyengine.org/Scenes/SDK-UsecaseDemo_1.zip">Video Source Code</a>
  303. </li>
  304. </ul>
  305. </li>
  306. </ul>
  307. </li>
  308. <li class="nav-item" data-depth="2">
  309. <a class="nav-link" href="../../core/app/multithreading.html">Multithreading</a>
  310. </li>
  311. </ul>
  312. </li>
  313. <li class="nav-item" data-depth="1">
  314. <button class="nav-item-toggle"></button>
  315. <span class="nav-text">Scene Graph</span>
  316. <ul class="nav-list">
  317. <li class="nav-item" data-depth="2">
  318. <a class="nav-link" href="../../core/scene/traverse_scenegraph.html">Traverse SceneGraph</a>
  319. </li>
  320. <li class="nav-item" data-depth="2">
  321. <a class="nav-link" href="../../core/scene/spatial.html">Spatial: Node vs Geometry</a>
  322. </li>
  323. <li class="nav-item" data-depth="2">
  324. <button class="nav-item-toggle"></button>
  325. <a class="nav-link" href="../../core/scene/mesh.html">Mesh</a>
  326. <ul class="nav-list">
  327. <li class="nav-item" data-depth="3">
  328. <a class="nav-link" href="../../core/scene/custom_meshes.html">Custom Meshes</a>
  329. </li>
  330. <li class="nav-item" data-depth="3">
  331. <a class="nav-link" href="../../core/scene/shape/shape.html">Shape</a>
  332. </li>
  333. <li class="nav-item" data-depth="3">
  334. <a class="nav-link" href="../../core/scene/3d_models.html">3D Models</a>
  335. </li>
  336. </ul>
  337. </li>
  338. <li class="nav-item" data-depth="2">
  339. <a class="nav-link" href="../../core/asset/asset_manager.html">Asset Manager</a>
  340. </li>
  341. <li class="nav-item" data-depth="2">
  342. <a class="nav-link" href="../../core/export/save_and_load.html">Saving and Loading Nodes</a>
  343. </li>
  344. <li class="nav-item" data-depth="2">
  345. <a class="nav-link" href="../../core/collision/collision_and_intersection.html">Collision and Intersection</a>
  346. </li>
  347. <li class="nav-item" data-depth="2">
  348. <a class="nav-link" href="../../core/scene/control/level_of_detail.html">Level of Detail</a>
  349. </li>
  350. </ul>
  351. </li>
  352. <li class="nav-item" data-depth="1">
  353. <button class="nav-item-toggle"></button>
  354. <span class="nav-text">Animation, Scene</span>
  355. <ul class="nav-list">
  356. <li class="nav-item" data-depth="2">
  357. <a class="nav-link" href="../../core/animation/animation_new.html">Animation with AnimComposer</a>
  358. </li>
  359. <li class="nav-item" data-depth="2">
  360. <a class="nav-link" href="../../core/animation/animation.html">Animation-Old (AnimControl)</a>
  361. </li>
  362. <li class="nav-item" data-depth="2">
  363. <a class="nav-link" href="../../core/cinematic/cinematics.html">Cinematics (cutscenes, fake destruction physics)</a>
  364. </li>
  365. <li class="nav-item" data-depth="2">
  366. <a class="nav-link" href="../../core/cinematic/motionpath.html">MotionPaths and Waypoints</a>
  367. </li>
  368. </ul>
  369. </li>
  370. <li class="nav-item" data-depth="1">
  371. <button class="nav-item-toggle"></button>
  372. <span class="nav-text">Material, Light, Shadow</span>
  373. <ul class="nav-list">
  374. <li class="nav-item" data-depth="2">
  375. <a class="nav-link" href="../../core/material/how_to_use_materials.html">How to use Materials</a>
  376. </li>
  377. <li class="nav-item" data-depth="2">
  378. <a class="nav-link" href="../../core/material/j3m_material_files.html">.j3m Material Files</a>
  379. </li>
  380. <li class="nav-item" data-depth="2">
  381. <a class="nav-link" href="../../core/material/material_definitions.html">.j3md Material Definitions</a>
  382. </li>
  383. <li class="nav-item" data-depth="2">
  384. <a class="nav-link" href="../../core/material/materials_overview.html">.j3md Properties</a>
  385. </li>
  386. <li class="nav-item" data-depth="2">
  387. <a class="nav-link" href="../../core/shader/jme3_shaders.html">Shaders and JME3</a>
  388. </li>
  389. <li class="nav-item" data-depth="2">
  390. <a class="nav-link" href="../../core/shader/jme3_shadernodes.html">Shader Node System</a>
  391. </li>
  392. <li class="nav-item" data-depth="2">
  393. <a class="nav-link" href="../../core/shader/shader_video_tutorials.html">Shader Video Tutorials</a>
  394. </li>
  395. <li class="nav-item" data-depth="2">
  396. <a class="nav-link" href="../../core/light/light_and_shadow.html">Light and Shadow</a>
  397. </li>
  398. <li class="nav-item" data-depth="2">
  399. <a class="nav-link" href="../../core/texture/anisotropic_filtering.html">Anisotropic Filtering</a>
  400. </li>
  401. <li class="nav-item" data-depth="2">
  402. <a class="nav-link" href="../../core/system/jme3_srgbpipeline.html">Gamma Correction</a>
  403. </li>
  404. <li class="nav-item" data-depth="2">
  405. <a class="nav-link" href="../../core/material/normal_types.html">Normal Map Conventions</a>
  406. </li>
  407. </ul>
  408. </li>
  409. <li class="nav-item" data-depth="1">
  410. <button class="nav-item-toggle"></button>
  411. <span class="nav-text">Audio, Video</span>
  412. <ul class="nav-list">
  413. <li class="nav-item" data-depth="2">
  414. <a class="nav-link" href="../../core/audio/audio.html">Playing Sounds</a>
  415. </li>
  416. <li class="nav-item" data-depth="2">
  417. <a class="nav-link" href="../../core/audio/audio_environment_presets.html">Audio Environment Presets</a>
  418. </li>
  419. <li class="nav-item" data-depth="2">
  420. <a class="nav-link" href="../../core/app/state/screenshots.html">Capture Screenshots</a>
  421. </li>
  422. <li class="nav-item" data-depth="2">
  423. <a class="nav-link" href="../../core/app/state/capture_audio_video_to_a_file.html">Capture Audio/Video</a>
  424. </li>
  425. </ul>
  426. </li>
  427. <li class="nav-item" data-depth="1">
  428. <button class="nav-item-toggle"></button>
  429. <span class="nav-text">Filter, Effect</span>
  430. <ul class="nav-list">
  431. <li class="nav-item" data-depth="2">
  432. <a class="nav-link" href="../../core/effect/effects_overview.html">Overview</a>
  433. </li>
  434. <li class="nav-item" data-depth="2">
  435. <a class="nav-link" href="../../core/effect/bloom_and_glow.html">Bloom and Glow</a>
  436. </li>
  437. <li class="nav-item" data-depth="2">
  438. <a class="nav-link" href="../../core/effect/particle_emitters.html">Particle Emitters</a>
  439. </li>
  440. </ul>
  441. </li>
  442. <li class="nav-item" data-depth="1">
  443. <button class="nav-item-toggle"></button>
  444. <span class="nav-text">Landscapes</span>
  445. <ul class="nav-list">
  446. <li class="nav-item" data-depth="2">
  447. <a class="nav-link" href="../../core/util/sky.html">Sky</a>
  448. </li>
  449. <li class="nav-item" data-depth="2">
  450. <a class="nav-link" href="../../core/terrain/terrain.html">Terrain (TerraMonkey)</a>
  451. </li>
  452. <li class="nav-item" data-depth="2">
  453. <a class="nav-link" href="../../core/collision/terrain_collision.html">Terrain Collision</a>
  454. </li>
  455. <li class="nav-item" data-depth="2">
  456. <a class="nav-link" href="../../core/effect/water.html">Simple Water</a>
  457. </li>
  458. <li class="nav-item" data-depth="2">
  459. <a class="nav-link" href="../../core/effect/post-processor_water.html">Post-Processor Water</a>
  460. </li>
  461. </ul>
  462. </li>
  463. <li class="nav-item" data-depth="1">
  464. <button class="nav-item-toggle"></button>
  465. <span class="nav-text">Camera</span>
  466. <ul class="nav-list">
  467. <li class="nav-item" data-depth="2">
  468. <a class="nav-link" href="../../core/renderer/camera.html">Camera</a>
  469. </li>
  470. <li class="nav-item" data-depth="2">
  471. <a class="nav-link" href="../../core/renderer/making_the_camera_follow_a_character.html">Follow a Character</a>
  472. </li>
  473. <li class="nav-item" data-depth="2">
  474. <a class="nav-link" href="../../core/renderer/remote-controlling_the_camera.html">Remote-Controlling</a>
  475. </li>
  476. <li class="nav-item" data-depth="2">
  477. <a class="nav-link" href="../../core/renderer/multiple_camera_views.html">Multiple Camera Views</a>
  478. </li>
  479. <li class="nav-item" data-depth="2">
  480. <a class="nav-link" href="../../core/renderer/jme3_renderbuckets.html">Render Buckets</a>
  481. </li>
  482. </ul>
  483. </li>
  484. <li class="nav-item" data-depth="1">
  485. <button class="nav-item-toggle"></button>
  486. <span class="nav-text">Rendering</span>
  487. <ul class="nav-list">
  488. <li class="nav-item" data-depth="2">
  489. <a class="nav-link" href="../../core/renderer/render_pipeline.html">Render Pipelines</a>
  490. </li>
  491. </ul>
  492. </li>
  493. <li class="nav-item" data-depth="1">
  494. <button class="nav-item-toggle"></button>
  495. <span class="nav-text">User Interaction</span>
  496. <ul class="nav-list">
  497. <li class="nav-item" data-depth="2">
  498. <a class="nav-link" href="../../core/input/input_handling.html">Input Handling</a>
  499. </li>
  500. <li class="nav-item" data-depth="2">
  501. <a class="nav-link" href="../../core/input/combo_moves.html">Combo Moves</a>
  502. </li>
  503. <li class="nav-item" data-depth="2">
  504. <a class="nav-link" href="../../core/input/mouse_picking.html">Mouse Picking</a>
  505. </li>
  506. </ul>
  507. </li>
  508. <li class="nav-item" data-depth="1">
  509. <button class="nav-item-toggle"></button>
  510. <a class="nav-link" href="../../core/gui/topic_gui.html">Graphical User Interface</a>
  511. <ul class="nav-list">
  512. <li class="nav-item" data-depth="2">
  513. <button class="nav-item-toggle"></button>
  514. <span class="nav-text">Nifty GUI</span>
  515. <ul class="nav-list">
  516. <li class="nav-item" data-depth="3">
  517. <a class="nav-link" href="../../core/gui/nifty_gui.html">Integration Tutorial</a>
  518. </li>
  519. <li class="nav-item" data-depth="3">
  520. <a class="nav-link" href="../../core/gui/nifty_gui_best_practices.html">Best Practices</a>
  521. </li>
  522. <li class="nav-item" data-depth="3">
  523. <a class="nav-link" href="../../core/gui/nifty_gui_scenarios.html">Scenarios</a>
  524. </li>
  525. </ul>
  526. </li>
  527. <li class="nav-item" data-depth="2">
  528. <a class="nav-link" href="../../core/ui/hud.html">Head-Up Display (HUD)</a>
  529. </li>
  530. </ul>
  531. </li>
  532. <li class="nav-item" data-depth="1">
  533. <button class="nav-item-toggle"></button>
  534. <span class="nav-text">Virtual Reality</span>
  535. <ul class="nav-list">
  536. <li class="nav-item" data-depth="2">
  537. <a class="nav-link" href="../../core/vr/virtualreality.html">Virtual Reality</a>
  538. </li>
  539. <li class="nav-item" data-depth="2">
  540. <a class="nav-link" href="../../core/vr/legacyOpenVr.html">Virtual Reality Legacy Support</a>
  541. </li>
  542. <li class="nav-item" data-depth="2">
  543. <a class="nav-link" href="../../core/vr/virtualrealitycontrollers.html">Virtual Reality Legacy Controller Support</a>
  544. </li>
  545. </ul>
  546. </li>
  547. </ul>
  548. </li>
  549. <li class="nav-item" data-depth="0">
  550. <ul class="nav-list">
  551. <li class="nav-item" data-depth="1">
  552. <button class="nav-item-toggle"></button>
  553. <a class="nav-link" href="../../physics/physics.html">Physics</a>
  554. <ul class="nav-list">
  555. <li class="nav-item" data-depth="2">
  556. <a class="nav-link" href="../../physics/bullet_multithreading.html">Multi-Threaded Physics</a>
  557. </li>
  558. <li class="nav-item" data-depth="2">
  559. <a class="nav-link" href="../../physics/collision/physics_listeners.html">Collision Detection</a>
  560. </li>
  561. <li class="nav-item" data-depth="2">
  562. <a class="nav-link" href="../../physics/joint/hinges_and_joints.html">Hinges and Joints</a>
  563. </li>
  564. <li class="nav-item" data-depth="2">
  565. <a class="nav-link" href="../../physics/control/walking_character.html">Walking Character</a>
  566. </li>
  567. <li class="nav-item" data-depth="2">
  568. <a class="nav-link" href="../../physics/control/ragdoll.html">Ragdoll</a>
  569. </li>
  570. <li class="nav-item" data-depth="2">
  571. <a class="nav-link" href="../../physics/control/vehicles.html">Vehicles</a>
  572. </li>
  573. <li class="nav-item" data-depth="2">
  574. <a class="nav-link" href="../../physics/control/softbody.html">Softbody</a>
  575. </li>
  576. <li class="nav-item" data-depth="2">
  577. <a class="nav-link" href="../../physics/bullet_pitfalls.html">Bullet Physics Pitfalls</a>
  578. </li>
  579. </ul>
  580. </li>
  581. </ul>
  582. </li>
  583. <li class="nav-item" data-depth="0">
  584. <ul class="nav-list">
  585. <li class="nav-item" data-depth="1">
  586. <button class="nav-item-toggle"></button>
  587. <span class="nav-text">Networking</span>
  588. <ul class="nav-list">
  589. <li class="nav-item" data-depth="2">
  590. <a class="nav-link" href="../../networking/networking.html">Networking (SpiderMonkey)</a>
  591. </li>
  592. <li class="nav-item" data-depth="2">
  593. <a class="nav-link" href="../../networking/headless_server.html">Headless Server</a>
  594. </li>
  595. <li class="nav-item" data-depth="2">
  596. <a class="nav-link" href="../../networking/monkey_zone.html">Multi-Player Demo Code</a>
  597. </li>
  598. <li class="nav-item" data-depth="2">
  599. <a class="nav-link" href="../../networking/networking_video_tutorials.html">Networking Video Tutorials</a>
  600. </li>
  601. </ul>
  602. </li>
  603. </ul>
  604. </li>
  605. <li class="nav-item" data-depth="0">
  606. <ul class="nav-list">
  607. <li class="nav-item" data-depth="1">
  608. <button class="nav-item-toggle"></button>
  609. <span class="nav-text">User Contributions</span>
  610. <ul class="nav-list">
  611. <li class="nav-item" data-depth="2">
  612. <a class="nav-link" href="../../contributions/contributions.html">User Made Utilities</a>
  613. </li>
  614. <li class="nav-item" data-depth="2">
  615. <button class="nav-item-toggle"></button>
  616. <span class="nav-text">Shader</span>
  617. <ul class="nav-list">
  618. <li class="nav-item" data-depth="3">
  619. <a class="nav-link" href="../../contributions/shader/shaderblow_project.html">ShaderBlow Project</a>
  620. </li>
  621. </ul>
  622. </li>
  623. <li class="nav-item" data-depth="2">
  624. <button class="nav-item-toggle"></button>
  625. <span class="nav-text">Landscapes</span>
  626. <ul class="nav-list">
  627. <li class="nav-item" data-depth="3">
  628. <a class="nav-link" href="../../contributions/lanscapes/vegetationsystem/vegetationsystem.html">Vegetation System</a>
  629. </li>
  630. </ul>
  631. </li>
  632. <li class="nav-item" data-depth="2">
  633. <button class="nav-item-toggle"></button>
  634. <span class="nav-text">Networking</span>
  635. <ul class="nav-list">
  636. <li class="nav-item" data-depth="3">
  637. <a class="nav-link" href="../../contributions/networking/open_game_finder.html">Open Game Finder</a>
  638. </li>
  639. </ul>
  640. </li>
  641. <li class="nav-item" data-depth="2">
  642. <button class="nav-item-toggle"></button>
  643. <span class="nav-text">Entity System</span>
  644. <ul class="nav-list">
  645. <li class="nav-item" data-depth="3">
  646. <a class="nav-link" href="#es/entitysystem.adoc">The Zay-ES Entity System</a>
  647. </li>
  648. </ul>
  649. </li>
  650. <li class="nav-item" data-depth="2">
  651. <button class="nav-item-toggle"></button>
  652. <span class="nav-text">Artificial Intelligence</span>
  653. <ul class="nav-list">
  654. <li class="nav-item" data-depth="3">
  655. <a class="nav-link" href="../../contributions/ai/recast.html">Recast Navigation</a>
  656. </li>
  657. <li class="nav-item" data-depth="3">
  658. <a class="nav-link" href="../../contributions/ai/building_recast.html">Updating and building Recast Native Bindings</a>
  659. </li>
  660. <li class="nav-item" data-depth="3">
  661. <a class="nav-link" href="../../contributions/ai/monkey_brains.html">Monkey Brains</a>
  662. </li>
  663. <li class="nav-item" data-depth="3">
  664. <a class="nav-link" href="../../contributions/ai/steer_behaviours.html">Steer Behaviours</a>
  665. </li>
  666. <li class="nav-item" data-depth="3">
  667. <a class="nav-link" href="../../contributions/ai/jme3_ai.html">jME3 Artificial Intelligence</a>
  668. </li>
  669. </ul>
  670. </li>
  671. <li class="nav-item" data-depth="2">
  672. <button class="nav-item-toggle"></button>
  673. <a class="nav-link" href="../../contributions/gui/topic_contributions_gui.html">GUI</a>
  674. <ul class="nav-list">
  675. <li class="nav-item" data-depth="3">
  676. <a class="nav-link" href="../../contributions/contributions.html#lemur-gui-library">Lemur - a native jME3 GUI library with scene graph tools</a>
  677. </li>
  678. <li class="nav-item" data-depth="3">
  679. <a class="nav-link" href="../../contributions/contributions.html#tonegodgui">tonegodGUI - a native jME3 GUI library</a>
  680. </li>
  681. <li class="nav-item" data-depth="3">
  682. <a class="nav-link" href="../../contributions/contributions.html#immediate-graphical-user-interface">Immediate graphical user interface</a>
  683. </li>
  684. </ul>
  685. </li>
  686. <li class="nav-item" data-depth="2">
  687. <button class="nav-item-toggle"></button>
  688. <span class="nav-text">Tools</span>
  689. <ul class="nav-list">
  690. <li class="nav-item" data-depth="3">
  691. <a class="nav-link" href="../../contributions/tools/navigation.html">Mercator Projection Tool (Marine Navigation)</a>
  692. </li>
  693. <li class="nav-item" data-depth="3">
  694. <a class="nav-link" href="../../contributions/tools/charts.html">Visualizing Maps in JME3 (Marine Charts)</a>
  695. </li>
  696. </ul>
  697. </li>
  698. <li class="nav-item" data-depth="2">
  699. <button class="nav-item-toggle"></button>
  700. <a class="nav-link" href="../../contributions/vr/topic_contributions_vr.html">Virtual Reality (And augmented reality)</a>
  701. <ul class="nav-list">
  702. <li class="nav-item" data-depth="3">
  703. <a class="nav-link" href="../../contributions/contributions.html#tamarin-openxr">Tamarin OpenXR</a>
  704. </li>
  705. </ul>
  706. </li>
  707. <li class="nav-item" data-depth="2">
  708. <button class="nav-item-toggle"></button>
  709. <span class="nav-text">Projects</span>
  710. <ul class="nav-list">
  711. <li class="nav-item" data-depth="3">
  712. <a class="nav-link" href="../../contributions/projects/rise_of_mutants_project.html">Rise of Mutants Project</a>
  713. </li>
  714. </ul>
  715. </li>
  716. </ul>
  717. </li>
  718. </ul>
  719. </li>
  720. <li class="nav-item" data-depth="0">
  721. <ul class="nav-list">
  722. <li class="nav-item" data-depth="1">
  723. <button class="nav-item-toggle"></button>
  724. <a class="nav-link" href="../../sdk/sdk.html">SDK</a>
  725. <ul class="nav-list">
  726. <li class="nav-item" data-depth="2">
  727. <button class="nav-item-toggle"></button>
  728. <span class="nav-text">Video Tutorials</span>
  729. <ul class="nav-list">
  730. <li class="nav-item" data-depth="3">
  731. <button class="nav-item-toggle"></button>
  732. <span class="nav-text">SDK Use Case Tutorials</span>
  733. <ul class="nav-list">
  734. <li class="nav-item" data-depth="4">
  735. <a class="nav-link" href="http://www.youtube.com/watch?v=-OzRZscLlHY">Demo 1 (Quixote demo)</a>
  736. </li>
  737. <li class="nav-item" data-depth="4">
  738. <a class="nav-link" href="http://www.youtube.com/watch?v=6-YWxD3JByE">Demo 2 (Models and Materials)</a>
  739. </li>
  740. </ul>
  741. </li>
  742. <li class="nav-item" data-depth="3">
  743. <button class="nav-item-toggle"></button>
  744. <span class="nav-text">SDK Tutorials</span>
  745. <ul class="nav-list">
  746. <li class="nav-item" data-depth="4">
  747. <a class="nav-link" href="http://www.youtube.com/watch?v=M1_0pbeyJzI">Basics</a>
  748. </li>
  749. <li class="nav-item" data-depth="4">
  750. <a class="nav-link" href="http://www.youtube.com/watch?v=nL7woH40i5c">Importing Models</a>
  751. </li>
  752. <li class="nav-item" data-depth="4">
  753. <a class="nav-link" href="http://www.youtube.com/watch?v=DUmgAjiNzhY">Dragging&amp;Dropping Nodes</a>
  754. </li>
  755. <li class="nav-item" data-depth="4">
  756. <a class="nav-link" href="http://www.youtube.com/watch?v=ntPAmtsQ6eM">Scene Composing</a>
  757. </li>
  758. <li class="nav-item" data-depth="4">
  759. <a class="nav-link" href="http://www.youtube.com/watch?v=zgPV3W6dD4s">Terrain with Collision Shape</a>
  760. </li>
  761. <li class="nav-item" data-depth="4">
  762. <a class="nav-link" href="http://www.youtube.com/watch?v=Feu3-mrpolc">Working with Materials</a>
  763. </li>
  764. <li class="nav-item" data-depth="4">
  765. <a class="nav-link" href="http://www.youtube.com/watch?v=MNDiZ9YHIpM">Custom Controls</a>
  766. </li>
  767. <li class="nav-item" data-depth="4">
  768. <a class="nav-link" href="http://www.youtube.com/watch?v=oZnssg8TBWQ">WebStart Deployment</a>
  769. </li>
  770. <li class="nav-item" data-depth="4">
  771. <a class="nav-link" href="http://www.youtube.com/watch?v=D7JM4VMKqPc">Animation and Effect TrackEditing</a>
  772. </li>
  773. </ul>
  774. </li>
  775. </ul>
  776. </li>
  777. <li class="nav-item" data-depth="2">
  778. <button class="nav-item-toggle"></button>
  779. <span class="nav-text">Getting Started</span>
  780. <ul class="nav-list">
  781. <li class="nav-item" data-depth="3">
  782. <a class="nav-link" href="../../sdk/update_center.html">Updating jMonkeyEngine SDK</a>
  783. </li>
  784. <li class="nav-item" data-depth="3">
  785. <a class="nav-link" href="../../sdk/troubleshooting.html">Troubleshooting</a>
  786. </li>
  787. </ul>
  788. </li>
  789. <li class="nav-item" data-depth="2">
  790. <button class="nav-item-toggle"></button>
  791. <span class="nav-text">Java Development Features</span>
  792. <ul class="nav-list">
  793. <li class="nav-item" data-depth="3">
  794. <a class="nav-link" href="../../sdk/project_creation.html">Project Creation</a>
  795. </li>
  796. <li class="nav-item" data-depth="3">
  797. <a class="nav-link" href="../../sdk/code_editor.html">Code Editor and Palette</a>
  798. </li>
  799. <li class="nav-item" data-depth="3">
  800. <a class="nav-link" href="../../sdk/version_control.html">File Version Control</a>
  801. </li>
  802. <li class="nav-item" data-depth="3">
  803. <a class="nav-link" href="../../sdk/debugging_profiling_testing.html">Debug, Profile, Test</a>
  804. </li>
  805. <li class="nav-item" data-depth="3">
  806. <button class="nav-item-toggle"></button>
  807. <a class="nav-link" href="../../sdk/application_deployment.html">Application Deployment</a>
  808. <ul class="nav-list">
  809. <li class="nav-item" data-depth="4">
  810. <a class="nav-link" href="../../sdk/default_build_script.html">Default Build Script</a>
  811. </li>
  812. <li class="nav-item" data-depth="4">
  813. <a class="nav-link" href="../../sdk/android.html">Android</a>
  814. </li>
  815. <li class="nav-item" data-depth="4">
  816. <a class="nav-link" href="../../sdk/android_cheat_sheet.html">Android Cheat Sheet</a>
  817. </li>
  818. <li class="nav-item" data-depth="4">
  819. <a class="nav-link" href="../../sdk/ios.html">iOS</a>
  820. </li>
  821. </ul>
  822. </li>
  823. </ul>
  824. </li>
  825. <li class="nav-item" data-depth="2">
  826. <button class="nav-item-toggle"></button>
  827. <span class="nav-text">Unique Features</span>
  828. <ul class="nav-list">
  829. <li class="nav-item" data-depth="3">
  830. <button class="nav-item-toggle"></button>
  831. <a class="nav-link" href="../../sdk/model_loader_and_viewer.html">Import, View, Convert Models</a>
  832. <ul class="nav-list">
  833. <li class="nav-item" data-depth="4">
  834. <a class="nav-link" href="../../sdk/asset_packs.html">Asset Packs</a>
  835. </li>
  836. </ul>
  837. </li>
  838. <li class="nav-item" data-depth="3">
  839. <a class="nav-link" href="../../sdk/scene_explorer.html">The SceneExplorer</a>
  840. </li>
  841. <li class="nav-item" data-depth="3">
  842. <a class="nav-link" href="../../sdk/scene_composer.html">Composing a Scene</a>
  843. </li>
  844. <li class="nav-item" data-depth="3">
  845. <a class="nav-link" href="../../sdk/terrain_editor.html">Terrain Editor</a>
  846. </li>
  847. <li class="nav-item" data-depth="3">
  848. <a class="nav-link" href="../../sdk/sample_code.html">Sample Code</a>
  849. </li>
  850. <li class="nav-item" data-depth="3">
  851. <a class="nav-link" href="../../sdk/material_editing.html">Material Editing</a>
  852. </li>
  853. <li class="nav-item" data-depth="3">
  854. <a class="nav-link" href="../../sdk/font_creation.html">Creating Bitmap Fonts</a>
  855. </li>
  856. <li class="nav-item" data-depth="3">
  857. <button class="nav-item-toggle"></button>
  858. <a class="nav-link" href="https://hub.jmonkeyengine.org/t/effecttrack-and-audiotrack-editing-in-the-sdk/23378">Audio and Effect Track Editing</a>
  859. <ul class="nav-list">
  860. <li class="nav-item" data-depth="4">
  861. <a class="nav-link" href="https://www.youtube.com/watch?v=D7JM4VMKqPc">Video: Effect and AudioTrack editing in jMonkeyEngine 3 sdk</a>
  862. </li>
  863. </ul>
  864. </li>
  865. <li class="nav-item" data-depth="3">
  866. <a class="nav-link" href="../../sdk/filters.html">Post-Processor Filter Editor and Viewer</a>
  867. </li>
  868. <li class="nav-item" data-depth="3">
  869. <a class="nav-link" href="../../core/app/state/application_states.html">Application States</a>
  870. </li>
  871. <li class="nav-item" data-depth="3">
  872. <a class="nav-link" href="../../core/scene/control/custom_controls.html">Custom Controls</a>
  873. </li>
  874. <li class="nav-item" data-depth="3">
  875. <a class="nav-link" href="../../sdk/vehicle_creator.html">Vehicle Creator</a>
  876. </li>
  877. <li class="nav-item" data-depth="3">
  878. <a class="nav-link" href="../../sdk/assetbrowser.html">Asset Browser</a>
  879. </li>
  880. <li class="nav-item" data-depth="3">
  881. <a class="nav-link" href="../../sdk/animations.html">Animations</a>
  882. </li>
  883. </ul>
  884. </li>
  885. <li class="nav-item" data-depth="2">
  886. <button class="nav-item-toggle"></button>
  887. <span class="nav-text">Advanced Usage</span>
  888. <ul class="nav-list">
  889. <li class="nav-item" data-depth="3">
  890. <a class="nav-link" href="../../sdk/build_platform.html">Building jMonkeyEngine SDK</a>
  891. </li>
  892. <li class="nav-item" data-depth="3">
  893. <a class="nav-link" href="../../sdk/use_own_jme.html#.adoc">Using your own (modified) version of jME3 in jMonkeyEngine SDK</a>
  894. </li>
  895. <li class="nav-item" data-depth="3">
  896. <a class="nav-link" href="../../sdk/increasing_heap_memory.html">Increasing Heap Memory</a>
  897. </li>
  898. <li class="nav-item" data-depth="3">
  899. <a class="nav-link" href="../../sdk/log_files.html">Log Files</a>
  900. </li>
  901. </ul>
  902. </li>
  903. <li class="nav-item" data-depth="2">
  904. <button class="nav-item-toggle"></button>
  905. <span class="nav-text">Available external plugins</span>
  906. <ul class="nav-list">
  907. <li class="nav-item" data-depth="3">
  908. <a class="nav-link" href="../../contributions/contributions.html">Contributions</a>
  909. </li>
  910. <li class="nav-item" data-depth="3">
  911. <a class="nav-link" href="../../sdk/neotexture.html">Neo Texture Editor for procedural textures</a>
  912. </li>
  913. <li class="nav-item" data-depth="3">
  914. <a class="nav-link" href="http://www.youtube.com/watch?v=yS9a9o4WzL8">Video: Mesh Tool &amp; Physics Editor</a>
  915. </li>
  916. </ul>
  917. </li>
  918. <li class="nav-item" data-depth="2">
  919. <button class="nav-item-toggle"></button>
  920. <a class="nav-link" href="../../sdk/development.html">Developing plugins for jMonkeyEngine SDK</a>
  921. <ul class="nav-list">
  922. <li class="nav-item" data-depth="3">
  923. <a class="nav-link" href="../../sdk/development/setup.html">Creating a plugin</a>
  924. </li>
  925. <li class="nav-item" data-depth="3">
  926. <a class="nav-link" href="../../sdk/development/general.html">Creating components</a>
  927. </li>
  928. <li class="nav-item" data-depth="3">
  929. <a class="nav-link" href="../../sdk/development/scene.html">The Main Scene</a>
  930. </li>
  931. <li class="nav-item" data-depth="3">
  932. <a class="nav-link" href="../../sdk/development/sceneexplorer.html">The Scene Explorer</a>
  933. </li>
  934. <li class="nav-item" data-depth="3">
  935. <a class="nav-link" href="../../sdk/development/projects_assets.html">Projects and Assets</a>
  936. </li>
  937. <li class="nav-item" data-depth="3">
  938. <a class="nav-link" href="../../sdk/development/extension_library.html">Create a library plugin from a jar file</a>
  939. </li>
  940. <li class="nav-item" data-depth="3">
  941. <a class="nav-link" href="../../sdk/development/model_loader.html">Create a new or custom model filetype and loader</a>
  942. </li>
  943. </ul>
  944. </li>
  945. </ul>
  946. </li>
  947. </ul>
  948. </li>
  949. </ul>
  950. </nav>
  951. </div>
  952. <div class="nav-panel-explore" data-panel="explore">
  953. <div class="context">
  954. <span class="title">JME</span>
  955. <span class="version">3.8</span>
  956. </div>
  957. <ul class="components">
  958. <li class="component is-current">
  959. <span class="title">JME</span>
  960. <ul class="versions">
  961. <li class="version is-current">
  962. <a href="../../documentation.html">3.8</a>
  963. </li>
  964. <li class="version">
  965. <a href="../../../3.4/documentation.html">3.4</a>
  966. </li>
  967. <li class="version">
  968. <a href="../../../3.3/documentation.html">3.3</a>
  969. </li>
  970. <li class="version">
  971. <a href="../../../3.2/documentation.html">3.2</a>
  972. </li>
  973. </ul>
  974. </li>
  975. <li class="component">
  976. <span class="title">Wiki Contribution</span>
  977. <ul class="versions">
  978. <li class="version">
  979. <a href="../../../../docs-wiki/3.8/wiki_contributor.html">3.8</a>
  980. </li>
  981. </ul>
  982. </li>
  983. <li class="component">
  984. <span class="title">Wiki UI</span>
  985. <ul class="versions">
  986. <li class="version">
  987. <a href="../../../../wiki-ui/index.html">master</a>
  988. </li>
  989. </ul>
  990. </li>
  991. </ul>
  992. </div>
  993. </div>
  994. </aside>
  995. </div>
  996. <main class="article">
  997. <div class="toolbar" role="navigation">
  998. <button class="nav-toggle"></button>
  999. <nav class="breadcrumbs" aria-label="breadcrumbs">
  1000. <ul>
  1001. <li><a href="../../documentation.html">JME</a></li>
  1002. <li>Key Concepts</li>
  1003. <li><a href="best_practices.html">Best Practices</a></li>
  1004. </ul>
  1005. </nav>
  1006. <div class="page-versions">
  1007. <button class="version-menu-toggle" title="Show other versions of page">3.8</button>
  1008. <div class="version-menu">
  1009. <a class="version is-current" href="best_practices.html">3.8</a>
  1010. <a class="version" href="../../../3.4/tutorials/concepts/best_practices.html">3.4</a>
  1011. <a class="version" href="../../../3.3/tutorials/concepts/best_practices.html">3.3</a>
  1012. <a class="version" href="../../../3.2/tutorials/concepts/best_practices.html">3.2</a>
  1013. </div>
  1014. </div>
  1015. <div class="edit-this-page"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/docs/modules/tutorials/pages/concepts/best_practices.adoc">Edit this Page</a></div>
  1016. </div>
  1017. <div class="content">
  1018. <article class="doc">
  1019. <h1 class="page">Best Practices For jME3 Developers</h1>
  1020. <div id="preamble">
  1021. <div class="sectionbody">
  1022. <div class="paragraph">
  1023. <p>Every milestone of a game development project is made up of phases: Planning, development, testing, and release. Every milestone involves updates to multi-media assets and to code.</p>
  1024. </div>
  1025. <div class="paragraph">
  1026. <p>This "best practices" page is a collection of recommendations and expert tips. Feel free to add your own!</p>
  1027. </div>
  1028. </div>
  1029. </div>
  1030. <div class="sect1">
  1031. <h2 id="requirements-and-planning"><a class="anchor" href="#requirements-and-planning"></a>Requirements and Planning</h2>
  1032. <div class="sectionbody">
  1033. <div class="paragraph">
  1034. <p>If you are a beginner, you should first <a href="http://www.hobbygamedev.com/digests/?page=free">read some</a> <a href="http://gamasutra.com/">articles about</a> <a href="http://www.google.com/search?q=3d+game+development">game development</a>. We cannot cover all general tips here.</p>
  1035. </div>
  1036. <div class="sect2">
  1037. <h3 id="requirements-gathering"><a class="anchor" href="#requirements-gathering"></a>Requirements Gathering</h3>
  1038. <div class="paragraph">
  1039. <p>As a quick overview, answer yourself the following questions:</p>
  1040. </div>
  1041. <div class="ulist">
  1042. <ul>
  1043. <li>
  1044. <p>Motivation</p>
  1045. <div class="ulist">
  1046. <ul>
  1047. <li>
  1048. <p>Sum up your game idea in one catchy sentence. If you can&#8217;t, it&#8217;s too complicated.<br>
  1049. Example: "Craft by day, fight by night!"</p>
  1050. </li>
  1051. <li>
  1052. <p>Who&#8217;s the target group? Are you making it for your friends or are you trying to attract the masses?</p>
  1053. </li>
  1054. </ul>
  1055. </div>
  1056. </li>
  1057. <li>
  1058. <p>Game type</p>
  1059. <div class="ulist">
  1060. <ul>
  1061. <li>
  1062. <p>Point of view (first- or third-person camera)? What characters does the player control? (if applicable)</p>
  1063. </li>
  1064. <li>
  1065. <p>Time- or turn-based?</p>
  1066. </li>
  1067. <li>
  1068. <p>Genre (drama, horror, adventure, mystery, comedy, educational, documentary)?</p>
  1069. </li>
  1070. <li>
  1071. <p>Setting and background story? (historic, fantasy, anime, futuristic, utopia/dystopia, pirate, zombie, vampire…)?</p>
  1072. </li>
  1073. </ul>
  1074. </div>
  1075. </li>
  1076. <li>
  1077. <p>Gameplay</p>
  1078. <div class="ulist">
  1079. <ul>
  1080. <li>
  1081. <p>What is the start state, what is the end state? (if applicable)</p>
  1082. </li>
  1083. <li>
  1084. <p>What resources does the player manage? How are resources gained, transformed, spent?<br>
  1085. Example: points, health, speed, gold, xp, mana.</p>
  1086. </li>
  1087. <li>
  1088. <p>How does the player interact? Define rules, challenges, game mechanics.</p>
  1089. </li>
  1090. <li>
  1091. <p>What state is considered winning, and what losing, or is it an open world?</p>
  1092. </li>
  1093. </ul>
  1094. </div>
  1095. </li>
  1096. <li>
  1097. <p>Multi-media assets</p>
  1098. <div class="ulist">
  1099. <ul>
  1100. <li>
  1101. <p>Which media will you need? How will you get this content?<br>
  1102. Example: models, terrains; materials, textures; noises, music, voices; video, cutscenes; spoken/written dialog; level maps, quests, story; AI scripts.</p>
  1103. </li>
  1104. </ul>
  1105. </div>
  1106. </li>
  1107. <li>
  1108. <p>Interface</p>
  1109. <div class="ulist">
  1110. <ul>
  1111. <li>
  1112. <p>Can you achieve a high degree of input control? (Even minor navigation and interaction glitches make the game unsolvable.)</p>
  1113. </li>
  1114. <li>
  1115. <p>Decide how to reflect current status, and changes in game states. E.g. health/damage in HUD.</p>
  1116. </li>
  1117. <li>
  1118. <p>Decide how to reward good moves and discourage bad ones.</p>
  1119. </li>
  1120. </ul>
  1121. </div>
  1122. </li>
  1123. </ul>
  1124. </div>
  1125. </div>
  1126. <div class="sect2">
  1127. <h3 id="planning-development-milestones"><a class="anchor" href="#planning-development-milestones"></a>Planning Development Milestones</h3>
  1128. <div class="paragraph">
  1129. <p>Use an <a href="http://en.wikipedia.org/wiki/Issue_tracking_system">issue and bug tracker</a> to outline what features you want and what components are needed.</p>
  1130. </div>
  1131. <div class="olist arabic">
  1132. <ol class="arabic">
  1133. <li>
  1134. <p>Pre-Alpha Development</p>
  1135. <div class="ulist">
  1136. <ul>
  1137. <li>
  1138. <p>Artwork: Test asset loading and saving with mock-ups and stock art.</p>
  1139. </li>
  1140. <li>
  1141. <p>Lay out the overall application flow, i.e. switching between intro / options / game screen, etc.</p>
  1142. </li>
  1143. <li>
  1144. <p>Get one typical level working before you can announce the Alpha Release.<br>
  1145. Example: if the game is a "Jump&#8217;n&#8217;Run", jumping and running must work.</p>
  1146. </li>
  1147. </ul>
  1148. </div>
  1149. </li>
  1150. <li>
  1151. <p>Alpha Release</p>
  1152. </li>
  1153. <li>
  1154. <p>Pre-Beta Development</p>
  1155. <div class="ulist">
  1156. <ul>
  1157. <li>
  1158. <p>Artwork: Replace all mock-ups with first drafts of real media and level maps.</p>
  1159. </li>
  1160. <li>
  1161. <p>Have your team members review and alpha test it on various systems, track bugs, debug, optimize.</p>
  1162. </li>
  1163. <li>
  1164. <p>Declare <a href="http://en.wikipedia.org/wiki/Feature_freeze">Feature Freeze</a> before you announce the Beta Release to prevent a bottomless pit of new bugs.</p>
  1165. </li>
  1166. </ul>
  1167. </div>
  1168. </li>
  1169. <li>
  1170. <p>Beta Release</p>
  1171. </li>
  1172. <li>
  1173. <p>Post-Beta Development</p>
  1174. <div class="ulist">
  1175. <ul>
  1176. <li>
  1177. <p>Artwork: Fill in the final media and level maps.</p>
  1178. </li>
  1179. <li>
  1180. <p>Have external people review and beta test it, make it easy to report bugs.</p>
  1181. </li>
  1182. <li>
  1183. <p>Fix high-priority bugs, even out the kinks in code and gameplay, don&#8217;t add new features for now!</p>
  1184. </li>
  1185. </ul>
  1186. </div>
  1187. </li>
  1188. <li>
  1189. <p>Gamma Release, Delta Release… = Release Candidates</p>
  1190. <div class="ulist">
  1191. <ul>
  1192. <li>
  1193. <p>Think you&#8217;re done? Make test runs incl. packaging and distribution. (Order form? download?)</p>
  1194. </li>
  1195. <li>
  1196. <p>Test the heck out of it. Last chance to find and fix a horrible bug.</p>
  1197. </li>
  1198. </ul>
  1199. </div>
  1200. </li>
  1201. <li>
  1202. <p>Omega = Final Release</p>
  1203. </li>
  1204. </ol>
  1205. </div>
  1206. <div class="paragraph">
  1207. <p>How you name or number these stages is fully up to your team. Development teams use numbered milestones (m1, m2, m3), Greek letters (ex. alpha, beta, gamma, delta), <a href="http://en.wikipedia.org/wiki/Software_versioning">&quot;major.minor.patch-build&quot; version</a> numbering (ex. "2.7.23-1328"), or combinations thereof.</p>
  1208. </div>
  1209. </div>
  1210. <div class="sect2">
  1211. <h3 id="use-file-version-control"><a class="anchor" href="#use-file-version-control"></a>Use File Version Control</h3>
  1212. <div class="paragraph">
  1213. <p>Whether you work in a team or alone, keeping a version controlled repository of your code will help you roll-back buggy changes, or recover old code that someone deleted and that is now needed again.</p>
  1214. </div>
  1215. <div class="ulist">
  1216. <ul>
  1217. <li>
  1218. <p>Treat commit messages as messages to your future self. "Made some changes" is <em>not</em> a commit message.</p>
  1219. </li>
  1220. <li>
  1221. <p>The jMonkeyEngine SDK supports Subversion, Mercurial, and Git.<br>
  1222. If you don&#8217;t know which to choose, Subversion is a good choice for starters.</p>
  1223. </li>
  1224. <li>
  1225. <p>Set up your own local server, or get free remote hosting space from various open-source dev portals like <a href="http://sourceforge.net/">SourceForge</a>, <a href="https://github.com/">GitHub</a>, <a href="https://bitbucket.org/">BitBucket</a> (supports private projects), <a href="https://about.gitlab.com/">GitLab</a> (free private projects)…</p>
  1226. </li>
  1227. </ul>
  1228. </div>
  1229. </div>
  1230. </div>
  1231. </div>
  1232. <div class="sect1">
  1233. <h2 id="multi-media-asset-pipeline"><a class="anchor" href="#multi-media-asset-pipeline"></a>Multi-Media Asset Pipeline</h2>
  1234. <div class="sectionbody">
  1235. <table class="tableblock frame-all grid-all stretch">
  1236. <colgroup>
  1237. <col style="width: 50%;">
  1238. <col style="width: 50%;">
  1239. </colgroup>
  1240. <thead>
  1241. <tr>
  1242. <th class="tableblock halign-left valign-top">DO</th>
  1243. <th class="tableblock halign-left valign-top">DON&#8217;T</th>
  1244. </tr>
  1245. </thead>
  1246. <tbody>
  1247. <tr>
  1248. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1249. <p>Save original models+textures into <code>assets/Textures</code>.</p>
  1250. </div></div></td>
  1251. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1252. <p>Don&#8217;t reference textures or models outside your JME project.</p>
  1253. </div></div></td>
  1254. </tr>
  1255. <tr>
  1256. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1257. <p>Save sounds into <code>assets/Sounds.</code></p>
  1258. </div></div></td>
  1259. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1260. <p>Don&#8217;t reference audio files outside your JME project.</p>
  1261. </div></div></td>
  1262. </tr>
  1263. <tr>
  1264. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1265. <p>Create simple, low-polygon models.</p>
  1266. </div></div></td>
  1267. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1268. <p>Don&#8217;t create high-polygon models, they render too slow to be useful in games.</p>
  1269. </div></div></td>
  1270. </tr>
  1271. <tr>
  1272. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1273. <p>Only use Diffuse Map, Normal Map, Glow Map, Specular Map.</p>
  1274. </div></div></td>
  1275. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1276. <p>Don&#8217;t use unsupported material properties that are not listed in the <a href="../../core/material/materials_overview.html" class="xref page">Materials Overview</a>.</p>
  1277. </div></div></td>
  1278. </tr>
  1279. <tr>
  1280. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1281. <p>Use UV texture / texture atlases / baking for each texture map.</p>
  1282. </div></div></td>
  1283. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1284. <p>Don&#8217;t create models based on multiple separate textures, it will break the model into separate meshes.</p>
  1285. </div></div></td>
  1286. </tr>
  1287. <tr>
  1288. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1289. <p>Convert Models to j3o format. Move j3o files into <code>assets/Models</code>.</p>
  1290. </div></div></td>
  1291. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1292. <p>Don&#8217;t reference GLTF/Ogre/OBJ files in your load() code, because these unoptimized files are not packaged into the JAR.</p>
  1293. </div></div></td>
  1294. </tr>
  1295. </tbody>
  1296. </table>
  1297. <div class="paragraph">
  1298. <p>Learn details about the <a href="multi-media_asset_pipeline.html" class="xref page">Multi-Media Asset Pipeline</a> here.</p>
  1299. </div>
  1300. </div>
  1301. </div>
  1302. <div class="sect1">
  1303. <h2 id="development-phase"><a class="anchor" href="#development-phase"></a>Development Phase</h2>
  1304. <div class="sectionbody">
  1305. <div class="admonitionblock note">
  1306. <table>
  1307. <tr>
  1308. <td class="icon">
  1309. <i class="fa icon-note" title="Note"></i>
  1310. </td>
  1311. <td class="content">
  1312. <div class="paragraph">
  1313. <p>Many game developers dream of creating their very own MMORPG with full-physics, AI, post-rendering effects, multi-player networking, procedurally generated maps, and customizable characters. So why aren&#8217;t there tons of MMORPGs out there?<br>
  1314. Even for large experienced game producers, the creation of such a complex game is time-intensive and failure-prone. How familiar are you with multi-threading, persistence, optimization, client-server synchronization, …? Unless your answer is "very!", then start with a single-player desktop game, and work your way up – just as the pros did when they started.</p>
  1315. </div>
  1316. </td>
  1317. </tr>
  1318. </table>
  1319. </div>
  1320. <div class="sect2">
  1321. <h3 id="extend-simpleapplication"><a class="anchor" href="#extend-simpleapplication"></a>Extend SimpleApplication</h3>
  1322. <div class="paragraph">
  1323. <p>Every jME3 game is centered around one main class that (directly or indirectly) extends com.jme3.app.<a href="../../core/app/simpleapplication.html" class="xref page">SimpleApplication</a>.</p>
  1324. </div>
  1325. <div class="admonitionblock important">
  1326. <table>
  1327. <tr>
  1328. <td class="icon">
  1329. <i class="fa icon-important" title="Important"></i>
  1330. </td>
  1331. <td class="content">
  1332. <div class="paragraph">
  1333. <p>Note that although the "SimpleApplication" name might be misleading, all jME3 applications, including very large projects, are based on this class. The name only implies that this class itself is a simple application already. You make it "non-simple" by extending it!</p>
  1334. </div>
  1335. </td>
  1336. </tr>
  1337. </table>
  1338. </div>
  1339. <div class="paragraph">
  1340. <p>For your future game releases, you will want to rely on your own framework (based on jME): Your custom framework extends jME&#8217;s SimpleApplication, and includes your custom methods for loading, saving, and arranging your scenes, your custom navigation methods, your inputs for pausing and switching your custom screens, your custom user interface (options screen, HUD, etc), your custom NPC factory, your custom physics properties, your custom networking synchronization, etc.</p>
  1341. </div>
  1342. <div class="admonitionblock tip">
  1343. <table>
  1344. <tr>
  1345. <td class="icon">
  1346. <i class="fa icon-tip" title="Tip"></i>
  1347. </td>
  1348. <td class="content">
  1349. <div class="paragraph">
  1350. <p>Writing and reusing (extending) your own base framework saves you time. When you update your generic base classes, all your games that extend them benefit from improvements to the base (just as all jME-based games benefit of improvements to the jME framework).<br>
  1351. Also, your own framework gives all your games a common look and feel.</p>
  1352. </div>
  1353. </td>
  1354. </tr>
  1355. </table>
  1356. </div>
  1357. </div>
  1358. <div class="sect2">
  1359. <h3 id="where-to-start"><a class="anchor" href="#where-to-start"></a>Where to Start?</h3>
  1360. <div class="paragraph">
  1361. <p>You have a list of features that you want in game, but which one do you implement first? You will keep adding features to a project that grows more and more complex, how can you minimize the amount of rewriting required?</p>
  1362. </div>
  1363. <div class="olist arabic">
  1364. <ol class="arabic">
  1365. <li>
  1366. <p>Make sure the game&#8217;s high-level frame (screen switching, network sync, loading/saving) is sound and solid.</p>
  1367. </li>
  1368. <li>
  1369. <p>Start with implementing the most complex game feature first – the one that imposes most constraints on the structure of your project (for example: multi-player networking, or physics.)</p>
  1370. </li>
  1371. <li>
  1372. <p>Add only one larger feature at a time. If there are complex interactions (such as networking + physics), start with a small test case (one shared cube) and work your way up. Starting with a whole scene introduces too many extra sources of error.</p>
  1373. </li>
  1374. <li>
  1375. <p>Implement low-complexity decorations (audio and visual effects) last.</p>
  1376. </li>
  1377. <li>
  1378. <p>Test for side-effects on existing code after you add a new feature (regression test).</p>
  1379. </li>
  1380. </ol>
  1381. </div>
  1382. <div class="admonitionblock tip">
  1383. <table>
  1384. <tr>
  1385. <td class="icon">
  1386. <i class="fa icon-tip" title="Tip"></i>
  1387. </td>
  1388. <td class="content">
  1389. <div class="paragraph">
  1390. <p>Acknowledge whether you want a feature because it is necessary for gameplay, or simply because "everyone else has it". Your goal should be to bring out the essence of your game idea. Don&#8217;t water down gameplay by attempting to make it "do everything, but better". Successful high-performance games are the ones where someone made smart decisions what to keep and what to <em>drop</em>.</p>
  1391. </div>
  1392. </td>
  1393. </tr>
  1394. </table>
  1395. </div>
  1396. </div>
  1397. <div class="sect2">
  1398. <h3 id="the-smart-way-to-add-custom-methods-and-fields"><a class="anchor" href="#the-smart-way-to-add-custom-methods-and-fields"></a>The Smart Way to Add Custom Methods and Fields</h3>
  1399. <div class="admonitionblock warning">
  1400. <table>
  1401. <tr>
  1402. <td class="icon">
  1403. <i class="fa icon-warning" title="Warning"></i>
  1404. </td>
  1405. <td class="content">
  1406. <div class="paragraph">
  1407. <p><strong>Avoid the Anti-Pattern:</strong> Don&#8217;t design complex role-based classes using Java inheritance, it will result in an unmaintainable mess.<br>
  1408. Example: You start extending <code>Node</code> –&gt; <code>MyMobileNode</code> –&gt; <code>MyNPC</code>. Then you extend <code>MyFighterNPC</code> (defends, attacks) and <code>MyShopKeeperNPC</code> (trades) from <code>MyNPC</code>. What if you need an NPC that trades and defends itself, but doesn&#8217;t attack? Do you extend MyShopKeeperNPC and copy and paste the defensive methods from MyFighterNPC? Or do you extend MyFighterNPC and override the attacking methods of its parent? Neither is a clean solution.<br>
  1409. Wouldn&#8217;t it be better if behaviours were a separate system, and attributes were separate components that you add to the entity that needs them?</p>
  1410. </div>
  1411. </td>
  1412. </tr>
  1413. </table>
  1414. </div>
  1415. <div class="paragraph">
  1416. <p>You write Java classes named <code>Controls</code> to implement your Game Entities, and define an Entity&#8217;s visuals, attributes, and behaviours. In jME, <code>Spatial`s (`Nodes</code> or `Geometry`s) are the visual representation of the game entity in the scene graph.</p>
  1417. </div>
  1418. <div class="ulist">
  1419. <ul>
  1420. <li>
  1421. <p>Game entities have <strong>attributes</strong> – All Entities are neutral <em>things</em>, only their attributes define what an entity actually <em>is</em> (a person or a brick). In jME, we call these class fields of Spatials "user data".<br>
  1422. Example: Players have <strong>class fields</strong> for <code>id, health, coins, inventory, equipment, profession</code>.</p>
  1423. </li>
  1424. <li>
  1425. <p>Game entities have <strong>behaviours</strong> – Behaviour systems communicate about the game state and modify attributes. In jME, these game mechanics are implemented in modular <code>update()</code> methods that all hook into the main update loop.<br>
  1426. Example: Players have <strong>methods</strong> such as <code>walk(), addGold(), getHealth(), pickUpItem(), dropItem(), useItem(), attack()</code>.</p>
  1427. </li>
  1428. </ul>
  1429. </div>
  1430. <div class="admonitionblock tip">
  1431. <table>
  1432. <tr>
  1433. <td class="icon">
  1434. <i class="fa icon-tip" title="Tip"></i>
  1435. </td>
  1436. <td class="content">
  1437. <div class="paragraph">
  1438. <p><strong>Follow the Best Practice:</strong> In general, use composition over inheritance and keep what an entity does (behaviour system) separate from what this entity is (attributes).</p>
  1439. </div>
  1440. <div class="ulist">
  1441. <ul>
  1442. <li>
  1443. <p>Use <code><a href="../../core/scene/spatial.html" class="xref page">setUserData()</a></code> to add custom attributes to Spatials.</p>
  1444. </li>
  1445. <li>
  1446. <p>Use <a href="../../core/scene/control/custom_controls.html" class="xref page">Controls</a> and <a href="../../core/app/state/application_states.html" class="xref page">Application States</a> to define custom behaviour systems.</p>
  1447. </li>
  1448. </ul>
  1449. </div>
  1450. </td>
  1451. </tr>
  1452. </table>
  1453. </div>
  1454. <div class="paragraph">
  1455. <p>If your game is even more complex, you may want to learn about "real" Entity Systems, which form a quite different programming paradigm from object oriented coding but are scalable to very large proportions. Note however that this topic is very unintuitive to handle for an OOP programmer and you should really decide on a case basis if you really need this or not and gather some experiences before diving head first into a MMO project <img class="emoji" draggable="false" height="24px" width="24px" src="https://twemoji.maxcdn.com/2/svg/1f603.svg" /></p>
  1456. </div>
  1457. <div class="ulist">
  1458. <ul>
  1459. <li>
  1460. <p><a href="http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/">http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/</a></p>
  1461. </li>
  1462. <li>
  1463. <p><a href="http://www.gamasutra.com/blogs/MeganFox/20101208/88590/Game_Engines_101_The_EntityComponent_Model.php">http://www.gamasutra.com/blogs/MeganFox/20101208/88590/Game_Engines_101_The_EntityComponent_Model.php</a></p>
  1464. </li>
  1465. <li>
  1466. <p><a href="http://gamedev.stackexchange.com/questions/28695/variants-of-entity-component-systems">http://gamedev.stackexchange.com/questions/28695/variants-of-entity-component-systems</a></p>
  1467. </li>
  1468. <li>
  1469. <p><a href="http://t-machine.org/index.php/2012/03/16/entity-systems-what-makes-good-components-good-entities/">http://t-machine.org/index.php/2012/03/16/entity-systems-what-makes-good-components-good-entities/</a></p>
  1470. </li>
  1471. <li>
  1472. <p><a href="http://entity-systems.wikidot.com/">http://entity-systems.wikidot.com/</a></p>
  1473. </li>
  1474. </ul>
  1475. </div>
  1476. </div>
  1477. <div class="sect2">
  1478. <h3 id="the-smart-way-to-access-game-features"><a class="anchor" href="#the-smart-way-to-access-game-features"></a>The Smart Way to Access Game Features</h3>
  1479. <div class="paragraph">
  1480. <p><a href="../../core/app/simpleapplication.html" class="xref page">SimpleApplication</a> gives you access to game features such as a the rootNode, assetManager, guiNode, inputManager, audioManager, physicsSpace, viewPort, and the camera. But what if you need this access also from another class? Don&#8217;t extend SimpleApplication a second time, and don&#8217;t pass around tons of object references in constructors! Needing access to application level objects is a sign that this class should be designed as an <a href="../../core/app/state/application_states.html" class="xref page">AppState</a> (read details there).</p>
  1481. </div>
  1482. <div class="paragraph">
  1483. <p>An AppState has access to all game features in the SimpleApplication via the <code>this.app</code> and <code>this.stateManager</code> objects. Examples:</p>
  1484. </div>
  1485. <div class="listingblock">
  1486. <div class="content">
  1487. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Spatial sky = SkyFactory.createSky(this.app.getAssetManager(), "sky.dds", false);
  1488. ...
  1489. this.app.getRootNode().attachChild( sky );</code></pre>
  1490. </div>
  1491. </div>
  1492. </div>
  1493. <div class="sect2">
  1494. <h3 id="the-smart-way-to-implement-game-logic"><a class="anchor" href="#the-smart-way-to-implement-game-logic"></a>The Smart Way to Implement Game Logic</h3>
  1495. <div class="paragraph">
  1496. <p>As your SimpleApplication-based game grows more advanced, you find yourself putting more and more interactions in the <code>simpleUpdate()</code> loop, and your <code>simpleInitApp()</code> methods grows longer and longer. It&#8217;s a best practice to move blocks of game mechanics into reusable component classes of their own. In jME3, these reusable classes are called <code>Controls</code> and <code>AppStates</code>.</p>
  1497. </div>
  1498. <div class="ulist">
  1499. <ul>
  1500. <li>
  1501. <p>Use <a href="../../core/app/state/application_states.html" class="xref page">AppStates</a> to implement <em>global game mechanics</em>.</p>
  1502. <div class="ulist">
  1503. <ul>
  1504. <li>
  1505. <p>Each AppState calls its own <code>initialize()</code> and <code>cleanup()</code> methods when it is attached to or detached from the game.</p>
  1506. </li>
  1507. <li>
  1508. <p>Each AppState runs its own <em>thread-safe</em> <code>update()</code> loop that hooks into the main <code>simpleUpdate()</code> loop.</p>
  1509. </li>
  1510. <li>
  1511. <p>You specify what happens if an AppState is paused/unpaused.</p>
  1512. </li>
  1513. <li>
  1514. <p>You can use an AppState to switch between sets of AppStates.</p>
  1515. </li>
  1516. <li>
  1517. <p>An AppState has access to everything in the SimpleApplication (rootNode, AssetManager, StateManager, InputListener, ViewPort, etc).</p>
  1518. </li>
  1519. </ul>
  1520. </div>
  1521. </li>
  1522. <li>
  1523. <p>Use <a href="../../core/scene/control/custom_controls.html" class="xref page">Controls</a> to implement the <em>behaviour of game entities</em>.</p>
  1524. <div class="ulist">
  1525. <ul>
  1526. <li>
  1527. <p>Controls add a type of behaviour (methods and fields) to an individual Spatial (a player, an NPC).</p>
  1528. </li>
  1529. <li>
  1530. <p>Each Control runs its own <em>thread-safe</em> <code>controlUpdate()</code> loop that hooks into the main <code>simpleUpdate()</code> loop.</p>
  1531. </li>
  1532. <li>
  1533. <p>One Spatial can be influenced by several Controls. (!)</p>
  1534. </li>
  1535. <li>
  1536. <p>Each Spatial needs its own instance of the Control.</p>
  1537. </li>
  1538. <li>
  1539. <p>A Control only has control over and access to the spatial that it is attached to (and its sub-spatials).</p>
  1540. </li>
  1541. </ul>
  1542. </div>
  1543. </li>
  1544. </ul>
  1545. </div>
  1546. <div class="admonitionblock note">
  1547. <table>
  1548. <tr>
  1549. <td class="icon">
  1550. <i class="fa icon-note" title="Note"></i>
  1551. </td>
  1552. <td class="content">
  1553. <div class="paragraph">
  1554. <p>A game contains algorithms that do not directly affect spatials (for example, AI pathfinding code that calculates and chooses paths, but does not actually move spatials). You do not need to put such non-spatial code in controls, you can run these things in a new thread. Only the transformation code that actually modifies the spatial must be called from a control, or must be enqueue()ed.</p>
  1555. </div>
  1556. </td>
  1557. </tr>
  1558. </table>
  1559. </div>
  1560. <div class="paragraph">
  1561. <p>Controls and AppStates often work together: An AppState can reach up to the application and <code>get</code> all Spatials from the rootNode that carry a specific Control, and perform a global action on them. Example: In BulletPhysics, all physical Spatials that carry RigidBodyControls are steered by the overall BulletAppState.</p>
  1562. </div>
  1563. <div class="admonitionblock tip">
  1564. <table>
  1565. <tr>
  1566. <td class="icon">
  1567. <i class="fa icon-tip" title="Tip"></i>
  1568. </td>
  1569. <td class="content">
  1570. <div class="paragraph">
  1571. <p>AppStates and Controls are extensions to a SimpleApplication. They are your modular building blocks to build a more complex game. In the ideal case, you move all init/update code into Controls and AppStates, and your simpleInitApp() and simpleUpdate() could end up virtually empty. This powerful and modular approach cleans up your code considerably.</p>
  1572. </div>
  1573. </td>
  1574. </tr>
  1575. </table>
  1576. </div>
  1577. <div class="paragraph">
  1578. <p>Read all about <a href="../../core/scene/control/custom_controls.html" class="xref page">Custom Controls</a> and <a href="../../core/app/state/application_states.html" class="xref page">Application States</a> here.</p>
  1579. </div>
  1580. </div>
  1581. <div class="sect2">
  1582. <h3 id="optimize-application-performance"><a class="anchor" href="#optimize-application-performance"></a>Optimize Application Performance</h3>
  1583. <div class="ulist">
  1584. <ul>
  1585. <li>
  1586. <p><a href="optimization.html" class="xref page">Optimization</a> – How to avoid wasting cycles</p>
  1587. </li>
  1588. <li>
  1589. <p><a href="../../core/app/multithreading.html" class="xref page">Multithreading</a> – Use concurrency for long-running background tasks, but don&#8217;t manipulate the scene graph from outside the main thread (update loop)!</p>
  1590. </li>
  1591. <li>
  1592. <p>You can add a <a href="../../sdk/debugging_profiling_testing.html" class="xref page">Java Profiler</a> to the jMonkeyEngine SDK via Tools → Plugins → Available. The profiler presents statistics on the lifecycle of methods and objects. Performance problems may be caused by just a few methods that take long, or are called too often (try to cache values to avoid this). If object creation and garbage collection counts keep increasing, you are looking at a memory leak.</p>
  1593. </li>
  1594. </ul>
  1595. </div>
  1596. </div>
  1597. <div class="sect2">
  1598. <h3 id="dont-mess-with-geometric-state"><a class="anchor" href="#dont-mess-with-geometric-state"></a>Don&#8217;t Mess With Geometric State</h3>
  1599. <div class="paragraph">
  1600. <p><strong>These tips are especially important for users who already know jME2.</strong> Automatic handling of the Geometric State has improved in jME3, and it is now a best practice to <em>not</em> mess with it.</p>
  1601. </div>
  1602. <div class="ulist">
  1603. <ul>
  1604. <li>
  1605. <p>Do not call <code>updateGeometricState()</code> on anything but the root node!</p>
  1606. </li>
  1607. <li>
  1608. <p>Do not override or mess with <code>updateGeometricState()</code> at all.</p>
  1609. </li>
  1610. <li>
  1611. <p>Do not use <code>getLocalTranslation().set()</code> to move a spatial in jME3, always use <code>setLocalTranslation()</code>.</p>
  1612. </li>
  1613. </ul>
  1614. </div>
  1615. </div>
  1616. <div class="sect2">
  1617. <h3 id="maintain-internal-documentation"><a class="anchor" href="#maintain-internal-documentation"></a>Maintain Internal Documentation</h3>
  1618. <div class="paragraph">
  1619. <p>It&#8217;s unlikely you will fully document <em>every</em> class you write, we hear you. However, you should at least write meaningful javadoc to provide context for your most crucial methods/parameters.</p>
  1620. </div>
  1621. <div class="ulist">
  1622. <ul>
  1623. <li>
  1624. <p>What is this? How does it solve its task (input, algorithm used, output, side-effects)?</p>
  1625. </li>
  1626. <li>
  1627. <p>Write down implicit limits (e.g. min/max values) and defaults while you still remember.</p>
  1628. </li>
  1629. <li>
  1630. <p>In which situation do I want to use this, is this part of a larger process? Is this step required, or what are the alternatives?</p>
  1631. </li>
  1632. </ul>
  1633. </div>
  1634. <div class="paragraph">
  1635. <p>Treat javadoc as messages to your future self. <code>genNextVal() generates the next value</code> and <code>@param float factor A factor influencing the result</code> do <em>not</em> count as documentation.</p>
  1636. </div>
  1637. </div>
  1638. </div>
  1639. </div>
  1640. <div class="sect1">
  1641. <h2 id="debugging-and-test-phase"><a class="anchor" href="#debugging-and-test-phase"></a>Debugging and Test Phase</h2>
  1642. <div class="sectionbody">
  1643. <div class="paragraph">
  1644. <p><strong>A <a href="../../sdk/debugging_profiling_testing.html" class="xref page">Java Debugger</a></strong> is included in the jMonkeyEngine SDK. It allows you to set a break point in your code near the line of code where an exception happens. Then you step through the execution line by line and watch object and variable states live, to detect where the bug starts.</p>
  1645. </div>
  1646. <div class="paragraph">
  1647. <p><strong>Use the <a href="../how-to/java/logging.html" class="xref page">Logger</a></strong> to print status messages during the development and debugging phase, instead of System.out.println(). The logger can be switched off with one line of code, whereas commenting out all your `println()`s takes a while.</p>
  1648. </div>
  1649. <div class="paragraph">
  1650. <p><strong>Unit Testing (<a href="https://docs.oracle.com/javase/1.5.0/docs/guide/language/assert.html">Java Assertions</a>)</strong> has a different status in 3D graphics development than in other types of software. You cannot write assertions that automatically test whether the rendered image <em>looks</em> correct, or whether interactions are <em>intuitive</em>. Still you should <a href="../../sdk/debugging_profiling_testing.html" class="xref page">create simple test cases</a> for individual game features such as loaders, content generators, effects. Run the test cases now and then to see whether they still work as intended – or whether they are suffering from regressions or side-effects. Keep the test classes in the <code>test</code> directory of your project, don&#8217;t include them in the distribution.</p>
  1651. </div>
  1652. <div class="paragraph">
  1653. <p><strong>Quality Assurance (QA)</strong> means repeatedly checking a certain set of features that must work, but that might be unexpectedly broken as a side-effect. Every game has some crazy bugs somewhere – but basic tasks <em>must work</em>, no excuse. This includes installing and de-installing; saving and loading; changing options; starting, pausing, quitting; basic actions such as walking, fighting, etc. After every milestone, you go through your QA list again and systematically look for regressions or newly introduced bugs. Check the application <em>on every supported operating system and hardware</em> (!) because not all graphic cards support the same features. If you don&#8217;t find the obvious bugs, your users will, and carelessness will put them off.</p>
  1654. </div>
  1655. <div class="paragraph">
  1656. <p><strong>Alpha and Beta Testing</strong> means that you ask someone to try to install and run your game. It should be a real user situation, where they are left to figure out the installation and gameplay by themselves–you only can include the usual read-me and help docs. Provide the testers with an easy method to report back what problems they encountered, what they liked best, or why they gave up. Evaluate whether reported problems are one-off glitches, or whether they must be fixed for the game to be playable for everyone.</p>
  1657. </div>
  1658. </div>
  1659. </div>
  1660. <div class="sect1">
  1661. <h2 id="release-phase"><a class="anchor" href="#release-phase"></a>Release Phase</h2>
  1662. <div class="sectionbody">
  1663. <div class="sect2">
  1664. <h3 id="pre-release-to-do-list"><a class="anchor" href="#pre-release-to-do-list"></a>Pre-Release To-Do List</h3>
  1665. <div class="ulist">
  1666. <ul>
  1667. <li>
  1668. <p>Prepare a web page, a cool slogan, advertisements, etc</p>
  1669. </li>
  1670. <li>
  1671. <p>Verify that all assets are up-to-date and converted to .j3o.</p>
  1672. </li>
  1673. <li>
  1674. <p>Verify that your code loads the optimized .j3o files, and not the original model formats.</p>
  1675. </li>
  1676. <li>
  1677. <p>Prepare licenses of assets that you use for inclusion. (You <em>did</em> obtain permission to use them, right…?)</p>
  1678. </li>
  1679. <li>
  1680. <p>Switch off fine <a href="../how-to/java/logging.html" class="xref page">logging</a> output.</p>
  1681. </li>
  1682. <li>
  1683. <p>Prepare promotional art: The most awesome screenshots (in thumbnail, square, vertical, horizontal, and fullscreen formats) and video clips. Include name, contact info, slogan, etc., so future customers can find you.</p>
  1684. </li>
  1685. <li>
  1686. <p>Prepare a readme.txt file, or installation guide, or handbook – if applicable.</p>
  1687. </li>
  1688. <li>
  1689. <p>Get a certificate if one is required for your distribution method (see below).</p>
  1690. </li>
  1691. <li>
  1692. <p>Specify a <a href="http://en.wikipedia.org/wiki/Video_game_content_rating_system#Comparison">classification rating</a> (needed for e.g. app stores).</p>
  1693. </li>
  1694. </ul>
  1695. </div>
  1696. </div>
  1697. <div class="sect2">
  1698. <h3 id="distributing-the-executables"><a class="anchor" href="#distributing-the-executables"></a>Distributing the Executables</h3>
  1699. <div class="paragraph">
  1700. <p>The <a href="../../sdk/application_deployment.html" class="xref page">jMonkeyEngine SDK helps you with deployment</a>: You specify your branding and deployment options in the Project Properties dialog, and then choose Clean and Build from the context menu. <strong>If you use another IDE, consult this IDE&#8217;s documentation.</strong></p>
  1701. </div>
  1702. <div class="paragraph">
  1703. <p>Decide whether you want to release your game as WebStart, desktop JAR, mobile APK, or browser Applet – Each has its pros and cons.</p>
  1704. </div>
  1705. <table class="tableblock frame-all grid-all stretch">
  1706. <colgroup>
  1707. <col style="width: 20%;">
  1708. <col style="width: 40%;">
  1709. <col style="width: 40%;">
  1710. </colgroup>
  1711. <thead>
  1712. <tr>
  1713. <th class="tableblock halign-left valign-top">Distribution</th>
  1714. <th class="tableblock halign-left valign-top">Pros</th>
  1715. <th class="tableblock halign-left valign-top">Cons</th>
  1716. </tr>
  1717. </thead>
  1718. <tbody>
  1719. <tr>
  1720. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1721. <p>Desktop Launcher<br>
  1722. (.EXE, .app, .jar+.sh)</p>
  1723. </div></div></td>
  1724. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1725. <p>This is the standard way of distributing desktop applications. The jMonkeyEngine SDK can be configured to automatically create zipped launchers for each operating system.</p>
  1726. </div></div></td>
  1727. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1728. <p>You need to offer three separate, platform-dependent downloads.</p>
  1729. </div></div></td>
  1730. </tr>
  1731. <tr>
  1732. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1733. <p>Desktop Application<br>
  1734. (.JAR)</p>
  1735. </div></div></td>
  1736. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1737. <p>Platform independent desktop application.</p>
  1738. </div></div></td>
  1739. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1740. <p>User must have Java configured to run JARs when they are opened; or user must know how to run JARs from command line; or you must provide a custom JAR wrapper.</p>
  1741. </div></div></td>
  1742. </tr>
  1743. <tr>
  1744. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1745. <p>Web Start<br>
  1746. (.JNLP)</p>
  1747. </div></div></td>
  1748. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1749. <p>The user accesses a <abbr title="Uniform Resource Locator">URL</abbr>, saves the game as one executable file. Easy process, no installer required. You can allow the game to be played offline.</p>
  1750. </div></div></td>
  1751. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1752. <p>Users need network connection to install the game. Downloading bigger games takes a while as opposed to running them from a CD.</p>
  1753. </div></div></td>
  1754. </tr>
  1755. <tr>
  1756. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1757. <p>Browser Applet<br>
  1758. (.<abbr title="HyperText Markup Language">HTML</abbr>+.JAR)</p>
  1759. </div></div></td>
  1760. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1761. <p>Easy to access and play game via most web browsers. Userfriendly solution for quick small games.</p>
  1762. </div></div></td>
  1763. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1764. <p>Game only runs in the browser. Game or settings cannot be saved to disk. Some restrictions in default camera navigation (jME cannot capture mouse.)</p>
  1765. </div></div></td>
  1766. </tr>
  1767. <tr>
  1768. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1769. <p>Android<br>
  1770. (.APK)</p>
  1771. </div></div></td>
  1772. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1773. <p>Game runs on Android devices.</p>
  1774. </div></div></td>
  1775. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1776. <p>Android devices do not support post-processor effects.</p>
  1777. </div></div></td>
  1778. </tr>
  1779. </tbody>
  1780. </table>
  1781. <div class="paragraph">
  1782. <p>Which ever method you choose, a Java-Application works on the main operating systems: Windows, Mac <abbr title="Operating System">OS</abbr>, Linux, Android.</p>
  1783. </div>
  1784. <div class="paragraph">
  1785. <p>The distribution appears in a newly generated <code>dist</code> directory inside your project directory. These are the files that you upload or burn to CD to distribute to your customers.</p>
  1786. </div>
  1787. <hr>
  1788. <div class="paragraph">
  1789. <p>See also:</p>
  1790. </div>
  1791. <div class="ulist">
  1792. <ul>
  1793. <li>
  1794. <p><a href="http://www.gamedev.net/page/resources/_/creative/game-design/developing-your-game-concept-by-making-a-design-document-r3004">gamedev.net: Developing Your Game Concept By Making A Design Document</a></p>
  1795. </li>
  1796. </ul>
  1797. </div>
  1798. </div>
  1799. </div>
  1800. </div>
  1801. <nav class="pagination">
  1802. <span class="prev"><a href="../beginner/hello_physics.html">Hello Physics</a></span>
  1803. <span class="next"><a href="optimization.html">Optimization</a></span>
  1804. </nav>
  1805. </article>
  1806. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  1807. <div class="toc-menu"></div>
  1808. </aside>
  1809. </div>
  1810. </main>
  1811. </div>
  1812. <footer class="footer">
  1813. <p>Copyright 2020 jMonkeyEngine Wiki Contributors. Licensed BSD-3.</p>
  1814. </footer>
  1815. <script src="../../../../_/js/vendor/docsearch.min.js"></script>
  1816. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js -->
  1817. <script>
  1818. var search = docsearch({
  1819. apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
  1820. indexName: 'jmonkeyengine',
  1821. inputSelector: '#search-input',
  1822. autocompleteOptions: { hint: false, keyboardShortcuts: ['s'] },
  1823. algoliaOptions: { hitsPerPage: 10 }
  1824. }).autocomplete
  1825. search.on('autocomplete:closed', function () { search.autocomplete.setVal() })
  1826. function focusSearchInput () { document.querySelector('#search-input').focus() }
  1827. if (document.querySelector('.home-link.is-current')) window.addEventListener('load', focusSearchInput)
  1828. </script>
  1829. <script src="../../../../_/js/site.js"></script>
  1830. <script async src="../../../../_/js/vendor/highlight.js"></script>
  1831. </body>
  1832. </html>