2009scape-website/www.funorb.com/kbase/guid/funorb_central_02.html
2020-11-24 12:27:36 -05:00

373 lines
19 KiB
HTML
Raw Blame History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns:IE>
<!-- Mirrored from www.funorb.com/kbase/guid/funorb_central_02 by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 18 Jul 2010 10:53:33 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"><!-- /Added by HTTrack -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="PRAGMA" content="NO-CACHE">
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
<meta name="keywords" content="Play Free Online Games, puzzle games, platform games, arcade games, shooter games, action games, java games, casual games, racing games, word games, retro games, classic games, browser games, strategy games, multiplayer games, arcanists, Jagex">
<meta name="description" content="FunOrb, free online browser-based games from Jagex Games Studio, the makers of RuneScape. Play puzzle, action, strategy, shooting, word, racing games and more!">
<meta name="title" content="FunOrb - Free Online Games by Jagex Games Studio">
<meta name="Author" content="www.jagex.com">
<meta name="Copyright" content="Copyright under AGPL., www.jagex.com">
<meta name="ROBOTS" content="INDEX, FOLLOW">
<meta name="classification" content="GENERAL">
<meta name="rating" content="General">
<meta name="Distribution" content="global">
<meta name="Identifier-URL" content="../../index.html">
<link rel="icon" type="image/vnd.microsoft.icon" href="../../favicon.ico">
<link rel="SHORTCUT ICON" href="../../favicon.ico">
<title>FunOrb - Free Online Games by Jagex Games Studio</title>
<style type="text/css" media="screen">
/*\*/@import url(../../css/global-40.css);/**/
</style>
<script type="text/javascript" src="../../../www.jagex.com/js/jquery/jquery_1_4_2.js"></script>
<!--[if lt IE 7]>
<style type="text/css" media="screen">@import url(http://www.funorb.com/css/ieFix-2.css);</style>
<![endif]-->
<meta name="language" content="en, de, fr, pt">
<meta name="description" content="FunOrb Central developer diary">
<style type="text/css">
#ddHeader {
position: relative;
margin: 0;
height: 27px;
padding: 0 8px;
font-size: 13px;
font-weight: bold;
text-align: center;
line-height: 26px;
color: white;
background: url(../../img/images/kbase/dev_diary/header.png);
}
.subheader {
margin: 1em 0 0.5em;
height: 20px;
padding: 0 8px;
font-size: 12px;
font-weight: bold;
line-height: 18px;
color: white;
background: url(../../img/images/kbase/dev_diary/subheader.png);
}
.articleBody p {
padding-left: 2px;
padding-right: 2px;
text-align: justify;
}
.ddScreens {
width: 326px;
margin: 1em 0;
text-align: center;
}
.ddScreens img.first {
margin: 0 20px 0 0;
}
.ddScreens img {
display: block;
border: 3px #0a1c30 solid;
}
.ddCaption {
font-size:85%;
font-weight:bold;
}
.ddprev, .ddnext {
position: absolute;
left: 8px;
top: 6px;
width: 23px;
height: 14px;
}
.ddnext {
left: auto;
right: 8px;
}
a.ddprev {
background: url(../../img/images/kbase/dev_diary/prev_hover.png);
}
a.ddnext {
background: url(../../img/images/kbase/dev_diary/next_hover.png);
}
a.ddprev img,
a.ddnext img {
position: absolute;
top: 0;
left: 0;
}
a.ddprev:hover img, a.ddnext:hover img {
visibility: hidden;
}
</style>
</head>
<body id="navForums">
<a name="top"></a>
<table id="wrapper">
<tbody>
<tr>
<td class="center bodyTheme">
<div id="container">
<div id="header">
<div id="navigation">
<div class="lft"></div>
<div class="rght"></div>
<div class="container">
<a id="logo" href="../../index-2.html" ><b>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="203" height="80">
<param name="movie" value="http://www.funorb.com/img/images/layout/logo_funorb_tombracer.swf" />
<param name="FlashVars" value="homePath=http://www.funorb.com/" />
<param name="AllowScriptAccess" value="always" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../../img/images/layout/logo_funorb_tombracer.swf" width="203" height="80">
<param name="FlashVars" value="homePath=http://www.funorb.com/" />
<param name="AllowScriptAccess" value="always" />
<!--<![endif]-->
<!-- Non Flash alternative -->
<img src="../../img/images/layout/logo_funorb_tombracer.jpg" alt="FunOrb" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
<!--<![endif]-->
</object>
</b></a>
<div id="shell">
<div class="lft"></div>
<div class="rght"></div>
<div id="teleText">
<h1 id="welcomeText">Welcome to FunOrb - The Best in Free Online Games</h1>
<span id="teletext_inner">
To gain access to some of our multiplayer games, highscore tables and Achievements, please create an account. It's quick, easy and absolutely FREE!</span>
<script type="text/javascript" src="../../../services.funorb.com/m%3dfomessenger/messengercommon0.js"></script>
<script type="text/javascript" src="../../../services.funorb.com/m%3dfomessenger/messenger.js"></script>
</div>
</div>
</div>
<div class="clear"></div>
<ul class="menu">
<li class="top p1"><a href="../../index-2.html" id="home" class="top_link"><span>Home</span></a></li>
<li class="top p2"><a id="games" class="top_link" href="../../gamelist.html"><span>Games</span><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul class="sub">
<li><a href="../../gamelist.html" class="fly">All Games</a></li>
<li><a href="../../gamelistea68.html?playerBox=1" class="fly">Single-Player Games</a></li>
<li><a href="../../gamelist6ff6.html?playerBox=2" class="fly">Multiplayer Games</a></li>
<li><a href="../../options.html" class="fly last">Java Options</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="top p3"><a id="account" class="top_link" href="https://secure.funorb.com/m=create/"><span>Join</span><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul class="sub">
<li><a href="https://secure.funorb.com/m=create/" class="fly">Create Free Account</a></li>
<li><a href="https://secure.funorb.com/m=billing_core/paymentoptions.ws" class="fly">Subscribe to FunOrb</a></li>
<li><a href="../../members.html" class="fly">Members' Benefits</a></li>
<li><a href="../../account_management.html" class="fly last">Account Management</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="top p4"><a id="forums" class="top_link" href="http://services.funorb.com/m=focommunity/"><span>Community</span><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul class="sub">
<li><a href="http://services.funorb.com/m=focommunity/" class="fly">Community Home</a></li>
<li><a href="http://services.funorb.com/m=forum_fo/forums.ws" class="fly">Forums</a></li>
<li><a href="dev_diary.html" class="fly">Developer Diaries</a></li>
<li><a href="http://services.funorb.com/m=achievements/" class="fly">Achievements</a></li>
<li><a href="http://services.funorb.com/m=hiscore_fo/" class="fly">Highscores &amp; Ratings</a></li>
<li><a href="http://services.funorb.com/m=orbcoins/" class="fly last">Orb Downloads</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="top p5"><a id="help" class="top_link" href="help.html"><span>Help</span><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul class="sub">
<li><a href="customer_support.html" class="fly">Customer Support</a></li>
<li><a href="../../parents.html" class="fly">Parents' Guide</a></li>
<li><a href="rules_of_conduct.html" class="fly">Rules</a></li>
<li><a href="https://secure.funorb.com/m=billing_core/unsubscribe.ws" class="fly">Unsubscribe</a></li>
<li><a href="../../loginapplet/loginappletef7e.html?mod=www&amp;dest=loginapplet/loginapplet.ws?mod=accountappeal&amp;dest=lockchoice.ws" class="fly">Account Recovery</a></li>
<li><a href="https://secure.funorb.com/m=weblogin/loginform.ws?mod=www&amp;ssl=0&amp;expired=0&amp;dest=bugtracker.ws" class="fly last">Submit A Bug Report</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="top p11"><a id="empty" class="top_link"><span>&nbsp;</span></a></li>
<li class="top p7"><a href="https://secure.funorb.com/m=create/" id="register" class="top_link"><span>Create Account</span></a></li>
<li class="top p8"><a href="https://secure.funorb.com/m=weblogin/loginform.ws?mod=www&amp;ssl=0&amp;dest=kbase/guid/funorb_central_02" id="signIn" class="top_link"><span>Log In</span></a></li>
<li class="top p10">
<div class="top_link" id="lang_div">
<a id="countrydrop" href="../../index-2.html">
<span>
<img alt="
English" src="../../img/images/layout/en.gif">
<span id="dropArrow"></span>
</span>
<!--[if gt IE 6]><!--></a></div><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul id="lang" class="sub">
<li><a class="fly" href="../../index-2.html"><img title="
English" alt="
English" src="../../img/images/layout/en.gif"></a></li>
<li><a class="fly" href="../../l%3d1/index.html"><img title="
Deutsch" alt="
Deutsch" src="../../img/images/layout/de.gif"></a></li>
<li><a class="fly" href="../../l%3d2/index.html"><img title="
Fran&ccedil;ais" alt="
Fran&ccedil;ais" src="../../img/images/layout/fr.gif"></a></li>
<li><a class="fly last" href="../../l%3d3/index.html"><img title="
Portugu&ecirc;s (BR)" alt="
Portugu&ecirc;s (BR)" src="../../img/images/layout/br.gif"></a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a></div><![endif]-->
</li>
</ul>
</div>
<br class="clear" />
</div>
<div id="page_content">
<a name="top_of_page"></a>
<a name="article"></a>
<div class="section" id="article" >
<div class="sectionHeader">
<div class="sectionHeaderRight">
<div class="sectionTitle">
<span class="sectionTrail"><a href="dev_diary.html">Developer Diaries</a> &gt; FunOrb Central: Part 2 - Development on a (Memory) Budget</span>
</div>
</div>
</div>
<div class="sectionBorder">
<div class="sectionBackground">
<div class="sectionContent" >
<div class="sectionContentContainer">
<div class="articleBody">
<h2 id="ddHeader">
<a class="ddprev" href="funorb_central_01.html" title="Previous">
<img src="../../img/images/kbase/dev_diary/prev.png" alt="Previous" />
</a>
FunOrb Central: Part 2 - Development on a (Memory) Budget
<a class="ddnext" href="funorb_central_03.html" title="Next">
<img src="../../img/images/kbase/dev_diary/next.png" alt="Next" />
</a>
</h2>
<img src="../../img/images/game/central/dev_diary/banner.jpg" style="display: block; margin: 0 auto 1em" alt="FunOrb Central developer diary banner" />
<h3 class="subheader">28th May 2009 <20> Development on a (Memory) Budget</h3>
<p>This diary covers one of the most significant problems involved with building FunOrb games and FunOrb Central: memory consumption.</p> <div class="ddScreens" style="float: right; margin: 8px; width:300px">
<img src="../../img/images/game/central/dev_diary/sprite_sheet.gif" alt="Ziren sprite sheet" />
<div class="ddCaption" style="margin:auto; width:290px;">A sample of Ziren's sprite sheet from Tor Challenge.<br>Click <a href="../../img/images/game/central/dev_diary/sprite_sheet_full.gif" target="_blank">here</a> to see the full sprite sheet.</div>
</div>
<p>Memory inside a computer forms a pyramid of sorts. At the top, there is a small amount of very fast memory embedded into the processor (cache). At the bottom, there's a slow, but very large capacity memory (the hard disk/drive). In between these two, there's the type of memory that<61>s relevant to this diary, which is commonly called core or main memory. Managing the transfer of data between these three types of memory is an important aspect of development, as it heavily affects performance.</p> <p>When a Java applet (e.g. a FunOrb game) is running, it is stored in this main memory. All of an applet's resources (e.g. graphics, music, sound effects) must be held in memory before they can be used. Unfortunately, the most commonly installed versions of Java limit the amount we can use to around 64MB (referred to as 'the heap'), and it's already very easy for the resources of a FunOrb game to overrun this limit. A background wallpaper the size of the average screen takes about 1MB, and large backgrounds (e.g. an Arcanists map backdrop) or sprite sheets (e.g. Tor Challenge animations) can take more.</p>
<p>FunOrb Central restricts things further, as both the game and FunOrb Central need to run within the 64MB limit. To help alleviate this problem, we're aiming to get FunOrb Central running using no more than 10MB of memory, leaving 54MB for a game. Many FunOrb games require more than this at present, though, so we'll need to go back and amend them, which will require some technical work from the entire FunOrb development team.</p>
<p>Here are a couple of the techniques we'll use:</p> <ol>
<li>Throwing away content that's no longer being used (e.g. an intro sequence, once it has finished)<br>It sounds simple, but there are complications. We can't predict when data will be needed again, so we'd prefer to keep everything in memory for speed. When that's not possible, we'll sometimes keep hold of a compressed copy instead. It's not quite as fast, but saves us some space.</li>
<li>Changing the format of data in memory<br>When we're choosing how content will be stored in memory and for download, it's always a trade-off between performance, quality and size. Generally, to maximise the speed of our games, we'll go for the least compressed version, but memory constraints mean we might have to use other options, such as compressed images*. The trick is to make sure that any loss of quality or performance isn't noticeable to the player.</li>
</ol>
<div class="ddScreens" style="float: left; margin: 8px;">
<img src="../../img/images/game/central/dev_diary/central_concept.jpg" alt="FunOrb Central concept" />
<div class="ddCaption" style="margin:auto; width:310px;">A <i>very</i> early concept of FunOrb Central's look and features (subject to change).<br>Click <a href="../../img/images/game/central/dev_diary/central_concept_large.jpg" target="_blank">here</a> to see a larger version of this image.</div>
</div>
<p>Even using these techniques is not going to be enough for us to get FunOrb Central working within a 10MB limit, so, after discussing this with Andrew, we plan to have FunOrb central do something sneaky... There is a group of technologies that were added to Java a couple of years ago, with the somewhat arcane name of 'NIO' (new input/output or non-blocking input/output). They were primarily intended to let Java applications access files and network devices at high speed, but they have an interesting secondary ability that lets applets allocate a bit of extra memory outside the 64MB limit. Using this technique, we hope to be able to have FunOrb Central store most of its data in this 'ghost space<63>, pulling only the parts we need into main memory and only for the duration they're required.</p>
<p>The other aspect of memory management in FunOrb Central is what to do when more memory is available for us to use. In more recent versions of Java, for those players who've tuned their memory settings to allow it, applets can access more than 64MB. We want to make sure that, where extra memory is available to us, we make good use of it. Some of our existing games already do this using a Java technique called 'soft references'. It<49>s a way of asking the Java implementation to try to keep data in memory, but allowing it to drop it if space is becoming tight. For example, you should get better performance in Dungeon Assault with more memory allocated to it, as it won't have to keep decompressing the animations. Along these lines, we'd like to have FunOrb Central keep entire games loaded in memory, providing enough memory is available, which should give improved load times for games when using more recent versions of Java.</p>
<p>So what does this mean for you? Essentially, FunOrb Central will have similar requirements to all existing FunOrb games - if you can run those, you should be ready to go - and it will be able to make better use of resources on computers with more recent versions of Java. We'll be more specific about the requirements and recommendations closer to launch, so stay tuned!</p>
<p><b><i>Mod Artifice<br>FunOrb Developer</i></b></p>
<div class="ddCaption">*For example, photographic images are often compressed as JPEG (or JPG), which allows for detailed images at a fraction of their uncompressed size, and with minimal loss of quality. Unfortunately, decompressing such images to render them is slow - too slow to use compressed images for every frame in a game.</div>
<br class="clear" />
<p class="articleBacktotop">
<a href="#top"><img src="../../img/images/layout/backtotop.gif" alt="Back to the top" title="Back to the top" /></a>
</p>
</div>
</div>
</div>
<div class="sectionFooter"><div></div></div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div id="copyRight">
<div id="languagefooter">
Select your language:&nbsp;
<a href="../../index-2.html"><img alt="
English" src="../../img/images/layout/en.gif">
English</a>
<a href="../../l%3d1/index.html"><img alt="
Deutsch" src="../../img/images/layout/de.gif">
Deutsch</a>
<a href="../../l%3d2/index.html"><img alt="
Fran&ccedil;ais" src="../../img/images/layout/fr.gif">
Fran&ccedil;ais</a>
<a href="../../l%3d3/index.html"><img alt="
Portugu&ecirc;s (BR)" src="../../img/images/layout/br.gif">
Portugu&ecirc;s (BR)</a>
</div>
<div class="cr">
<p>
Copyright <20> 2008 - 2010 Jagex Ltd. Jagex and FunOrb are registered trademarks of Jagex Ltd in the
United Kingdom and trademarks used in other countries of the world.
</p>
<p>
By using our service you are agreeing to our <a href="../../terms/terms.html" name="terms">Terms &amp; Conditions</a> and <a href="../../privacy/privacy.html" name="privacy">Privacy Policy</a>.
</p>
</div>
<div id="jagex">
<a href="../../../www.jagex.com/index.html" target="_blank"><img src="../../img/images/layout/jagex_footerc4ca.gif?1" alt="Jagex logo" /></a>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol)?"https://ssl.":"http://www.");
document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var _pageTracker=_gat._getTracker("UA-2058817-13");
_pageTracker._setDomainName(".funorb.com");
_pageTracker._trackPageview();
}catch(x){}
</script>
<script type="text/javascript">
try {
var pageTracker=_gat._getTracker("UA-2058817-3");
pageTracker._setDomainName(".funorb.com");
pageTracker._trackPageview();
}catch(x){}
</script>
</body>
<!-- Mirrored from www.funorb.com/kbase/guid/funorb_central_02 by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 18 Jul 2010 10:53:33 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"><!-- /Added by HTTrack -->
</html>