the-great-game/docs/codox/Tree-library-evaluation.html

52 lines
21 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>Tree library evaluation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">The-great-game</span> <span class="project-version">0.1.3-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1"><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1"><a href="A-generic-planning-algorithm-for-craftworker-npcs.html"><div class="inner"><span>A Generic Planning Algorithm for craftworker NPCs</span></div></a></li><li class="depth-1"><a href="API_Spec.html"><div class="inner"><span>API Spec (unfinished)</span></div></a></li><li class="depth-1"><a href="Appraisal.html"><div class="inner"><span>Appraisal (unfinished)</span></div></a></li><li class="depth-1"><a href="Architecture.html"><div class="inner"><span>Architecture</span></div></a></li><li class="depth-1"><a href="Baking-the-world.html"><div class="inner"><span>Baking the world</span></div></a></li><li class="depth-1"><a href="Biomes_and_ecology.html"><div class="inner"><span>Biomes and ecology (unfinished)</span></div></a></li><li class="depth-1"><a href="Building_on_microworld.html"><div class="inner"><span>Building on Microworld</span></div></a></li><li class="depth-1"><a href="Canonical-dictionary.html"><div class="inner"><span>Canonical dictionary for this documentation</span></div></a></li><li class="depth-1"><a href="Division_of_tasks_between_server_and_client.html"><div class="inner"><span>Division of tasks between server and client</span></div></a></li><li class="depth-1"><a href="Dynamic-consequences.html"><div class="inner"><span>On the consequences of a dynamic game environment for storytelling</span></div></a></li><li class="depth-1"><a href="Economy.html"><div class="inner"><span>Game world economy</span></div></a></li><li class="depth-1"><a href="Further-reading.html"><div class="inner"><span>Further Reading (and watching)</span></div></a></li><li class="depth-1"><a href="Game_Play.html"><div class="inner"><span>Game Play</span></div></a></li><li class="depth-1"><a href="Genetic-buildings.html"><div class="inner"><span>Genetic Buildings</span></div></a></li><li class="depth-1"><a href="Gossip_scripted_plot_and_Johnny_Silverhand.html"><div class="inner"><span>Gossip, scripted plot, and Johnny Silverhand</span></div></a></li><li class="depth-1"><a href="MVP-Roadmap.html"><div class="inner"><span>Minimum Viable Product, and a road map</span></div></a></li><li class="depth-1"><a href="Modelling_democracy_and_morale.html"><div class="inner"><span>The Red Company: modelling democracy and morale (unfinished)</span></div></a></li><li class="depth-1"><a href="Modelling_trading_cost_and_risk.html"><div class="inner"><span>Modelling trading cost and risk (unfinished)</span></div></a></li><li class="depth-1"><a href="Naming-of-characters.html"><div class="inner"><span>Naming of Characters</span></div></a></li><li class="depth-1"><a href="Not_my_problem.html"><div class="inner"><span> Not my problem</span></div></a></li><li class="depth-1"><a href="On-dying.html"><div class="inner"><span>On Dying, and Injury</span></div></a></li><li class="depth-1"><a href="On-sex-and-sexual-violence.html"><div class="inner"><span>On Sex, and Sexual Violence, in Games</span></div></a></li><li class="depth-1"><a href="Organic_Quests.html"><div class="inner"><span>Organic Quests</span></div></a></li><li class="depth-1"><a href="Pathmaking.html"><div class="inner"><span>Pathmaking</span></div></a></li><li class="depth-1"><a href="Populating-a-game-world.html"><div class="inner"><span>Populating a game world</span></div></a></li><li class="depth-1"><a href="Pseudo-object-inheritance.html"><div class="inner"><span>Pseudo object inheritance</span></div></a></li><li class="depth-1"><a href="Roadmap.html"><div class="inner"><span>Roadmap (obsolete)</span></div></a></li><li class="depth-1"><a href="Sandbox.html"><div class="inner"><span>Sandbox</span></div></a></li><li class="depth-1"><a href="Selecting_Character.html"><div class="inner"><span>Selecting the Player Character</span></div></a></li><li class="depth-1"><a href="Settling-a-game-world.html"><div class="inner"><span>Settling a game world</span></div></a></li><li class="depth-1"><a href="Sexual-dimorphism.html"><div class="inner"><span>Sexual dimorphism</span></div></a></li><li class="depth-1"><a href="Simulated-genetics.html"><div class="inner"><span>Simulated Genetics</span></div></a></li><li class="depth-1"><a href="Simulation-layers.html"><div class="inner"><span>Simulation layers</span></div></a></li><li class="depth-1"><a href="The-spread-of-knowledge-in-a-large-game-world.html"><div class="inner"><span>The spread of knowledge in a large game world</span></div></a></li><li class="depth-1"><a href="Things_Voice_Interaction_Enables.html"><div class="inner"><span>Things Voice Interaction Enables</span></div></a></li><li class="depth-1"><a href="Towards-a-procedural-animation-api.html"><div class="inner"><span>Towards a procedural animation API</span></div></a></li><li class="depth-1 current"><a href="Tree-library-evaluation.html"><div class="inner"><span>Tree library evaluation</span></div></a></li><li class="depth-1"><a href="Uncanny_dialogue.html"><div class="inner"><span>The Uncanny Valley, and dynamically generated dialogue</span></div></a></li><li class="depth-1"><a href="Voice-acting-considered-harmful.html"><div class="inner"><span>Voice acting considered harmful</span></div></a></li><li class="depth-1"><a href="Worlds-and-flats.html"><div class="inner"><span>Worlds and flats [obsolete]</span></div></a></li><li class="depth-1"><a href="intro.html"><div class="inner"><span>Introduction to the-great-game</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cc</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>journeyman</span></div></div></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>the-great-game</span></div></div></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>agent</span></div></div></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.agent.agent.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>agent</span></div></a></li><li class="depth-5"><a href="cc.journeyman.the-great-game.agent.schedule.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>schedule</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>buildings</span></div></div></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.buildings.module.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>module</span></div></a></li><li class="depth-5"><a href="cc.journeyman.the-great-game.buildings.rectangular.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>rectangular</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>character</span></div></div></li><li class="depth-5"><a href="cc.journeyman.the-great-game.character.sex.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sex</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>gossip</span></div></div></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.gossip.gossip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gossip</span></div></a></li><li class="depth-5"><a href="cc.journeyman.the-great-game.gossip.news-items.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>news-items</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>holdings</span></div></div></li><li class="depth-5"><a href="cc.journeyman.the-great-game.holdings.holding.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>holding</span></div></a></li><li class="depth-4 branch"><a href="cc.journeyman.the-great-game.launcher.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>launcher</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>location</span></div></div></li><li class="depth-5"><a href="cc.journeyman.the-great-game.location.location.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>location</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>lore</span></div></div></li><li class="depth-5"><a href="cc.journeyman.the-great-game.lore.digester.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>digester</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>merchants</span></div></div></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.merchants.markets.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>markets</span></div></a></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.merchants.merchant-utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>merchant-utils</span></div></a></li><li class="depth-5"><a href="cc.journeyman.the-great-game.merchants.planning.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>planning</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>objects</span></div></div></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.objects.character.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>character</span></div></a></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.objects.container.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>container</span></div></a></li><li class="depth-5"><a href="cc.journeyman.the-great-game.objects.game-object.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>game-object</span></div></a></li><li class="depth-4 branch"><a href="cc.journeyman.the-great-game.playroom.html"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>playroom</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>proving</span></div></div></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.proving.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-5"><a href="cc.journeyman.the-great-game.proving.sketches.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sketches</span></div></a></li><li class="depth-4 branch"><a href="cc.journeyman.the-great-game.time.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4 branch"><a href="cc.journeyman.the-great-game.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>world</span></div></div></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.world.heightmap.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>heightmap</span></div></a></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.world.location.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>location</span></div></a></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.world.mw.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mw</span></div></a></li><li class="depth-5 branch"><a href="cc.journeyman.the-great-game.world.routes.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>routes</span></div></a></li><li class="depth-5"><a href="cc.journeyman.the-great-game.world.world.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>world</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#tree-library-evaluation" id="tree-library-evaluation"></a>Tree library evaluation</h1>
<p>This is a comparative evaluation of open source tree libraries that I have found that I could make use of. Its entirely personal and subjective!</p>
<h2><a href="#simarboreal" id="simarboreal"></a><a href="https://github.com/Simsilica/SimArboreal">SimArboreal</a></h2>
<h3><a href="#overview" id="overview"></a>Overview</h3>
<p>Library by Paul Speed, whos a senior and prolific developer in the jMonkeyEngine community; designed to work with jMonkeyEngine, and consequently integrates well with it.</p>
<h3><a href="#licence" id="licence"></a>Licence</h3>
<p><a href="https://github.com/Simsilica/SimArboreal/blob/master/src/main/resources/license.txt">BSD-style licence</a>.</p>
<h3><a href="#assessment" id="assessment"></a>Assessment</h3>
<p>Produces trees which are quite realistic but only for a limited range of broad-leaved species. The trees do have modelled roots, which is relatively unusual. The trees sway in virtual winds, although to my eye trunks sway too much and thinner twigs too little. A limited number of textures are supplied, but new textures can easily be added so this isnt an issue. Handles Level of Detail automatically within the context of the jME3 libraries, which is a real bonus.</p>
<p>Does not provide the range of species, or of stages of growth, I want. To add convincing coniferous trees, or trees with more than one primary branching point on the main trunk, would require extra coding. The way leaves are handled is crude, but looks surprisingly persuasive. The codebase is reasonably well written and understandable, but there is virtually no documentation. If I have to build on someone elses library, this wouldnt be a bad choice. The one to beat.</p>
<h2><a href="#tree3d" id="tree3d"></a><a href="https://github.com/SnailBones/Tree3D">Tree3D</a></h2>
<h3><a href="#overview" id="overview"></a>Overview</h3>
<p>Looks like a student project, or something done fairly quickly as an exercise.</p>
<h3><a href="#licence" id="licence"></a>Licence</h3>
<p>None specified, not even public domain. So might be a bit sketchy to copy from.</p>
<h3><a href="#assessment" id="assessment"></a>Assessment</h3>
<p>This is definitely not as complete or ready to use as SimArboreal; although it does build, the user interface doesnt work with modern Java. Whether it ever worked I dont know, but I wouldnt be confident. Code is reasonably well written, but almost completely undocumented. There is no rendering of bark or of leaves; although the branching structure is excellent and the variety of morphologies available is good, boughs do not bend.</p>
<p>However, algorithmically, this has a much better understanding of how trees grow, and of tree morphology, than SimArboreal. A hybrid taking growth algorithms from this and texture, wind, level of detail and jME3 integration from SimArboreal might be relatively to do.</p>
<h2><a href="#proctreejs" id="proctreejs"></a><a href="https://gltf-trees.donmccurdy.com/">Proctree.js</a></h2>
<p>Very polished demo project by Paul Brunt, author of a key JavaScript WebGL 3D library; but in JavaScript, so not directly usable.</p>
<h3><a href="#licence" id="licence"></a>Licence</h3>
<p>None specified, not even public domain. So might be a bit sketchy to copy from.</p>
<h3><a href="#assessment" id="assessment"></a>Assessment</h3>
<p>Very beautiful, algorithmically elegant, excellent variety of morphology. But</p>
<ol>
<li>No textures;</li>
<li>No wind sway;</li>
<li>No roots;</li>
<li>No level of detail handler;</li>
<li>No leaves;</li>
<li>No modelling of bough curvature;</li>
<li>Wrong language;</li>
<li>Relatively poorly structured code;</li>
<li>No documentation.</li>
</ol>
<p>This would be great to steal inspiration from for a new library of my own, and could possibly be used to inspire a significant extension to SimArboreal, but in its current state it isnt usable.</p>
<h2><a href="#what-none-of-the-candidates-offer" id="what-none-of-the-candidates-offer"></a>What none of the candidates offer</h2>
<p>None of the candidates have</p>
<ol>
<li>Seasonal change;</li>
<li>Species prototypes;</li>
<li>Broken boughs;</li>
<li>Leaning or nonstraight primary trunks;</li>
</ol>
<p>These are all features I want. The same cherry tree encountered in spring should be bedecked with blossom; in summer, green leaved; in autumn, red leaved and heavy with berries; in winter, bare. As seasons change as the player explores the game world, the trees need to change with them.</p>
<p>Cherries need to have green leaves tapering to a point at both ends, pink flowers in late spring, large red berries (and flocks of birds) in autumn. They need to have moderately tall trunks with upward pointing, quite stiff boughs. Pines need to have the same dark green needles all the way through the year, and, typically, tall straight trunks with a few irregular coronets of living branches near the top and occasional dead and probcably broken boughs lower down. And so on. I need the same procedural code to be able to generate thousands to millions of recognisably distinct individual trees of a biome-appropriate variety of recognisable species across the map.</p>
<p>They need to be individual and distinct at least partly because users are likely to recognise some of them as landmarks. And they need to be reproducably generatable from mininal seeds, because theres no way you can store that many models at anything like the level of detail I need.</p>
<h2><a href="#conclusion" id="conclusion"></a>Conclusion</h2>
<p>At this point its a choice between rolling my own, or using Paul Speeds SimArboreal and enhancing it (hopefully with his approval and co-operation). In the short term, if I finalise the engine decision on jME3 (and I think Im fairly close to doing that), SimArboreal will do as a placeholder. However, I will continue to look for other possibilities, because I have so many other things to build, and although I do want good quality forests I dont have that much time to invest in them just now.</p>
</div></div></div></body></html>