encompass-cs-docs/public/why/architecture/mess/index.html

549 lines
11 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en" class="js csstransforms3d">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Hugo 0.55.6" />
<meta name="description" content="">
<link rel="icon" href="/images/favicon.png" type="image/png">
<title>The Messy Basement :: Encompass Docs</title>
<link href="/css/nucleus.css?1558486144" rel="stylesheet">
<link href="/css/fontawesome-all.min.css?1558486144" rel="stylesheet">
<link href="/css/hybrid.css?1558486144" rel="stylesheet">
<link href="/css/featherlight.min.css?1558486144" rel="stylesheet">
<link href="/css/perfect-scrollbar.min.css?1558486144" rel="stylesheet">
<link href="/css/auto-complete.css?1558486144" rel="stylesheet">
<link href="/css/atom-one-dark-reasonable.css?1558486144" rel="stylesheet">
<link href="/css/theme.css?1558486144" rel="stylesheet">
<link href="/css/hugo-theme.css?1558486144" rel="stylesheet">
<link href="/css/theme-encompass.css?1558486144" rel="stylesheet">
<script src="/js/jquery-3.3.1.min.js?1558486144"></script>
<style type="text/css">
:root #header + #content > #left > #rlblock_left{
display:none !important;
}
</style>
</head>
<body class="" data-url="/why/architecture/mess/">
<nav id="sidebar" class="">
<div id="header-wrapper">
<div id="header">
<img src="/images/logo.png" width="100" height="100">
</div>
<div class="searchbox">
<label for="search-by"><i class="fas fa-search"></i></label>
<input data-search-input id="search-by" type="search" placeholder="Search...">
<span data-search-clear=""><i class="fas fa-times"></i></span>
</div>
<script type="text/javascript" src="/js/lunr.min.js?1558486144"></script>
<script type="text/javascript" src="/js/auto-complete.js?1558486144"></script>
<script type="text/javascript">
var baseurl = "http:\/\/example.org\/";
</script>
<script type="text/javascript" src="/js/search.js?1558486144"></script>
</div>
<div class="highlightable">
<ul class="topics">
<li data-nav-id="/why/" title="Why?" class="dd-item
parent
">
<a href="/why/">
<b>1. </b>Why?
</a>
<ul>
<li data-nav-id="/why/the_hard_way/" title="The Hard Way" class="dd-item
">
<a href="/why/the_hard_way/">
The Hard Way
</a>
</li>
<li data-nav-id="/why/architecture/" title="Architecture" class="dd-item
parent
">
<a href="/why/architecture/">
Architecture
</a>
<ul>
<li data-nav-id="/why/architecture/mess/" title="The Messy Basement" class="dd-item active">
<a href="/why/architecture/mess/">
The Messy Basement
</a>
</li>
<li data-nav-id="/why/architecture/oop/" title="OOP" class="dd-item ">
<a href="/why/architecture/oop/">
OOP
</a>
</li>
<li data-nav-id="/why/architecture/ecs/" title="ECS" class="dd-item ">
<a href="/why/architecture/ecs/">
ECS
</a>
</li>
<li data-nav-id="/why/architecture/hyper_ecs/" title="Hyper ECS" class="dd-item ">
<a href="/why/architecture/hyper_ecs/">
Hyper ECS
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<section id="footer">
<p>Built with <a href="https://github.com/matcornic/hugo-theme-learn"><i class="fas fa-heart"></i></a> from <a href="http://getgrav.org">Grav</a> and <a href="http://gohugo.io/">Hugo</a></p>
</section>
</div>
</nav>
<section id="body">
<div id="overlay"></div>
<div class="padding highlightable">
<div>
<div id="top-bar">
<div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
<span id="sidebar-toggle-span">
<a href="#" id="sidebar-toggle" data-sidebar-toggle="">
<i class="fas fa-bars"></i>
</a>
</span>
<span id="toc-menu"><i class="fas fa-list-alt"></i></span>
<span class="links">
<a href='/'>Encompass</a> > <a href='/why/'>Why?</a> > <a href='/why/architecture/'>Architecture</a> > The Messy Basement
</span>
</div>
<div class="progress">
<div class="wrapper">
</div>
</div>
</div>
</div>
<div id="head-tags">
</div>
<div id="body-inner">
<h1>
The Messy Basement
</h1>
<p>Unexpected behavior jumps out at you constantly. You feel like you&rsquo;re playing whack-a-mole with bugs. You can&rsquo;t remember where you put anything and keeping everything sorted is a constant nightmare.</p>
<p>Uh oh. You&rsquo;re in a messy basement.</p>
<p>Some characteristics of the messy basement:</p>
<ul>
<li>Magic values, aka putting numbers directly in the source code.</li>
<li>Game objects directly manipulating each other&rsquo;s values willy-nilly.</li>
<li>Multiple objects that keep track of and depend on each other&rsquo;s state.</li>
</ul>
<p>The key characteristic of this structure is that there almost doesn&rsquo;t seem to be any structure at all.</p>
<p>Shockingly, some game engines and frameworks not only fail to prevent this kind of architecture, they actually <em>encourage</em> it!</p>
<p>I don&rsquo;t need to say much more about this kind of architecture. It&rsquo;s obviously bad. Let&rsquo;s move on.</p>
<footer class=" footline" >
</footer>
</div>
</div>
<div id="navigation">
<a class="nav nav-prev" href="/why/architecture/" title="Architecture"> <i class="fa fa-chevron-left"></i></a>
<a class="nav nav-next" href="/why/architecture/oop/" title="OOP" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
</div>
</section>
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
</div>
<script src="/js/clipboard.min.js?1558486144"></script>
<script src="/js/perfect-scrollbar.min.js?1558486144"></script>
<script src="/js/perfect-scrollbar.jquery.min.js?1558486144"></script>
<script src="/js/jquery.sticky.js?1558486144"></script>
<script src="/js/featherlight.min.js?1558486144"></script>
<script src="/js/html5shiv-printshiv.min.js?1558486144"></script>
<script src="/js/highlight.pack.js?1558486144"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="/js/modernizr.custom-3.6.0.js?1558486144"></script>
<script src="/js/learn.js?1558486144"></script>
<script src="/js/hugo-learn.js?1558486144"></script>
<link href="/mermaid/mermaid.css?1558486144" type="text/css" rel="stylesheet" />
<script src="/mermaid/mermaid.js?1558486144"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
</body>
</html>