<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anthony Clifton &#187; netbeans game development</title>
	<atom:link href="http://www.anthonyclifton.com/tag/netbeans-game-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anthonyclifton.com</link>
	<description>Creating worlds in words, pictures and code.</description>
	<lastBuildDate>Sat, 03 Dec 2011 23:13:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Changed Earth Worlds &#8211; Starting the Database</title>
		<link>http://www.anthonyclifton.com/2010/08/02/changed-earth-worlds-starting-the-database/</link>
		<comments>http://www.anthonyclifton.com/2010/08/02/changed-earth-worlds-starting-the-database/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 04:11:04 +0000</pubDate>
		<dc:creator>Anthony Clifton</dc:creator>
				<category><![CDATA[Changed Earth Worlds]]></category>
		<category><![CDATA[Game Development in Java, Slick2D and NetBeans]]></category>
		<category><![CDATA[game development tutorial]]></category>
		<category><![CDATA[java game development]]></category>
		<category><![CDATA[netbeans game development]]></category>
		<category><![CDATA[online game development]]></category>
		<category><![CDATA[slick2d]]></category>

		<guid isPermaLink="false">http://www.anthonyclifton.com/?p=98</guid>
		<description><![CDATA[To build pretty much any kind of online game, we&#8217;re going to need some kind of database for storing data on characters, maps and so on while the servers are offline and for backing up data when they are online.  Usually, for convenience, performance, reliability and security, the database is not only going to live [...]]]></description>
			<content:encoded><![CDATA[<p>To build pretty much any kind of online game, we&#8217;re going to need some kind of database for storing data on characters, maps and so on while the servers are offline and for backing up data when they are online.  Usually, for convenience, performance, reliability and security, the database is not only going to live on it&#8217;s own server but probably on some kind of small cluster of servers.  Trying to use less than two database servers past development is just asking for downtime and enraged players.  Probably the simplest database server implementation an online game can tolerate would be something like MySQL running replication to a single slave server.  That way, if the primary server dies, you can fail over to the slave.</p>
<p>Another option these days would be to use one of the NoSQL databases but they don&#8217;t seem to deal with clustering very intuitively and the user base for them seems to be overly rabid about them, making me want to back away slowly and speak in a calm, soothing voice.</p>
<p>For my purposes, I&#8217;ll probably go with Clustered MySQL partly because lots and lots of people use it for all kinds of enterprise scale things and partly because I&#8217;m very comfortable with it, having used it to build tons of web applications over the years.  However, because I have a sense of slight uncertainty about it&#8217;s future after it&#8217;s purchase by Oracle, I&#8217;m giving myself an out in case I end up having to use something else.</p>
<p>That said I should mention that&#8230;</p>
<p>I, FOR ONE, WELCOME OUR NEW ORACLE OVERLORDS OF EXTREME REDNESS!  &lt;.&lt;  &gt;.&gt;</p>
<p>Although for my purposes using something like Hibernate to do database persistence seems like overkill (and yet another technology to sit around learning instead of writing code), I&#8217;ll be writing my database classes so they&#8217;re as self-contained and flexible as possible in case I have to connect to something other than MySQL.</p>
<p>The nice thing about MySQL is that I can run it on about anything and access it using tons of free management tools.  Makes it very easy to prototype the databases I&#8217;ll need and play with them without having to spend a bunch of time on configuration.  In my case, I have it installed on a VirtualBox vm running CentOS Linux 5.5.  That&#8217;s probably the environment it&#8217;ll end up running in throughout development and even into alpha testing, beta testing and live launch.</p>
<p>I like CentOS Linux.  It&#8217;s conservative.  It&#8217;s safe.  It&#8217;s stable.  It&#8217;s familiar.  I don&#8217;t need it to do anything magical.  I just need it to sit there and run forever without freaking out and making me babysit it.</p>
<p>For building databases, I&#8217;ve tried a number of tools, including the new MySQL Workbench, and I&#8217;ve just never found anything I like as much as plain old MySQL Administrator and Query Browser.  Again they&#8217;re simple tools and they just work.</p>
<p>Unlike a lot of people in IT, I don&#8217;t really feel any need to prove my geekful manliness by dancing forever on the raw bleeding edge of whatever magical new thing someone has decided is super cool this week.  I prefer simple, reliable tools that behave in a predictable way and just let me create things.</p>
<p>So, having said all that, I&#8217;ve got MySQL installed on my vm, I can access it using my tools and I&#8217;m ready to start building something.</p>
<p>So where do I start?</p>
<p>Last time I talked about the character classes available in Changed Earth Worlds.  I think that&#8217;s a good place to start because the one thing a game has to have to really be a game is a player.  Without a player, a game isn&#8217;t a game.  It&#8217;s a simulation.</p>
<p>Having said that, it might seem like I would want to start with some kind of character table to store all the characters created by players.  However, there&#8217;s a more fundamental layer that has to be built first, a character_classes table.  This table will store the available character classes and some base values associated with them, allowing us to add or modify classes later to expand or fine tune the game.</p>
<p>Some starting values we might want to associate with the various classes are their starting stat values.  If you&#8217;re not familiar with RPGs, then stats (or statistics) are values that represent the most basic qualities (or weaknesses) of a player&#8217;s character.  In classic RPGs, these statistics can represent qualities such as intelligence, strength, dexterity or charisma, for example.  A magic user will need high intelligence values to successfully master and cast magical spells.  A fighter will need strength to wield her weapon. And so on.</p>
<p>Many games will have as many as seven or eight statistics.</p>
<p>For Changed Earth Worlds, however, I&#8217;ve chosen to work with a highly simplified stats system, partly because I don&#8217;t want the game to be confusing to casual players and partly because it&#8217;ll make balancing the game easier.  The latter is important since I&#8217;ve chosen to build the entire game myself and will not have the benefit of a development team to assist with balancing.</p>
<p>Changed Earth Worlds will be built using KISF principle: Keep It Simple &amp; Fun.</p>
<p>Characters in CEW will have just four base statistics to represent their qualities.  These qualities have been selected to have maximum relevance to the activities in which players will be engaged.  They are:</p>
<p>Intelligence<br />
Imagination<br />
Strength<br />
Agility</p>
<p>If you look back at the character classes available in CEW, it&#8217;s pretty easy to see how these statistics can represent the strengths and weaknesses of each.  Each class has two primary stats and two secondary stats.</p>
<p>Maker &#8211; Needs high intelligence and high imagination so that they can visualize objects and environments and assemble them logically in their minds before Actualizing them.  In general, a Maker will have higher Intelligence than Imagination.</p>
<p>Healer &#8211; Similar to a Maker but needs higher Imagination than Intelligence because of the intuitive nature of channeling energy to effectively heal injuries and cure diseases, not to mention creating or transforming living things.  Living things are simply too complex to visualize logically and require the vast reserves of the right brain.</p>
<p>Keeper &#8211; Of course, this character class will require Strength and Agility to function well.</p>
<p>Traveler &#8211; Unlike the Healer&#8217;s relationship to the Maker, the Traveler does not have a relationship to the Keeper, occupying a somewhat unique space between Maker and Keeper.  Travelers require high Agility as they use their bodies to physically travel between subrealities, slipping bodily from one to the next.  However, they also require either relatively high Intelligence or Imagination to fully use their abilities since, due to their furtive and scavenging nature, they must exercise a good deal of cleverness.</p>
<p>Since we can&#8217;t simply have the starting values for these statistics be zero and have the players survive for more than a few seconds, we have to assume that all characters, to be assigned these roles, must have some starting values that represent their suitability to their class.</p>
<p>In classic RPGs, this is accomplished by rolling the starting scores randomly, usually using some dice or a pseudo random number generator.  However, for the purposes of game balance, this creates an undesirably large set of possible character development paths and, for the purposes of making the game fun and easily understandable by casual players, it creates unnecessary complexity when creating a character for the first time.  New players especially can become easily confused, assigning points to the wrong statistic for their chosen class, resulting in hours or even months of frustration.</p>
<p>Instead, CEW character classes will always start with the same base statistics, creating playable and fun characters for the chosen class automatically.  Players then have the option, as they advance, to assign ability points to these statistics as they wish, making their characters individual, unique but still likely playable as they develop and grow.</p>
<p>This is where I&#8217;ll start with the database, the creation of a character_classes table so that I can define the starting values of each statistic relative to class.  The table looks like this:</p>
<pre>+----------------------------+------------------+------+-----+---------+----------------+
| Field                      | Type             | Null | Key | Default | Extra          |
+----------------------------+------------------+------+-----+---------+----------------+
| character_class_id         | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| character_class_name       | varchar(45)      | NO   |     | NULL    |                |
| starting_stat_intelligence | int(10) unsigned | NO   |     | NULL    |                |
| starting_stat_imagination  | int(10) unsigned | NO   |     | NULL    |                |
| starting_stat_strength     | int(10) unsigned | NO   |     | NULL    |                |
| starting_stat_agility      | int(10) unsigned | NO   |     | NULL    |                |
+----------------------------+------------------+------+-----+---------+----------------+</pre>
<p>The structure is very simple and not very optimal but it&#8217;ll work as a starting point.  We can adjust it later and add more fields as needed.</p>
<p>So many online games fail at this point, at the very beginning, by hard coding these values somewhere into their server code, making it difficult to add classes later.  Hopefully, it&#8217;s not so common these days but there&#8217;s a book called <a title="Developing Online Games" href="http://www.amazon.com/Developing-Online-Games-Insiders-Nrg-Programming/dp/1592730000">Developing Online Games</a> that talks about horror stories resulting from well known games that failed to do this simple thing.</p>
<p>Now that we have this table, let&#8217;s populate it with our data:</p>
<pre>+------------+--------+------+-----+------+
| class_name | intell | imag | str | agil |
+------------+--------+------+-----+------+
| Maker      |     40 |   30 |  15 |   15 |
| Healer     |     25 |   45 |  15 |   15 |
| Keeper     |     15 |   20 |  40 |   25 |
| Traveler   |     20 |   15 |  15 |   50 |
+------------+--------+------+-----+------+</pre>
<p>The first question you might ask is how I selected the starting values for each of the statistics.</p>
<p>I guessed.</p>
<p>Basically, I gave each class 100 ability points and then divided them up in a way that seemed appropriate for each class&#8217; needs.  Again, these values can and will probably change as I continue development and especially during play testing.  But they make reasonable values for now and it&#8217;s easy to understand how and why they&#8217;re assigned as they are.</p>
<p>I could probably create some spreadsheets and spend a few months deriving ideal ranges and values but I&#8217;d like to actually complete a game sometime this decade.  So I&#8217;ll shoot from the hip a bit and adjust empirically as I develop.</p>
<p>When I get far enough along, even before I have code written for any kind of a playable game, I&#8217;ll be able to take all these guessed values and create a simple table top RPG so I can play test them with some friends.  That&#8217;ll give me a better idea how things will work before I build too much of the game mechanics.  And, who knows.  It might even turn into a fun Changed Earth Worlds table-top RPG or collectible card game later.</p>
<p>Next, I&#8217;ll work on a Players table so it can be tied to a Characters table which will use the Character_Classes table I just created.  One of the goals for CEW is for Players to be able to have multiple Characters so I&#8217;ll decide how to address that as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyclifton.com/2010/08/02/changed-earth-worlds-starting-the-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changed Earth Worlds Character Classes</title>
		<link>http://www.anthonyclifton.com/2010/07/18/changed-earth-world-character-classes/</link>
		<comments>http://www.anthonyclifton.com/2010/07/18/changed-earth-world-character-classes/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 04:58:55 +0000</pubDate>
		<dc:creator>Anthony Clifton</dc:creator>
				<category><![CDATA[Changed Earth Worlds]]></category>
		<category><![CDATA[Game Development in Java, Slick2D and NetBeans]]></category>
		<category><![CDATA[java game development]]></category>
		<category><![CDATA[netbeans game development]]></category>
		<category><![CDATA[online game development]]></category>
		<category><![CDATA[SciFantasy]]></category>

		<guid isPermaLink="false">http://www.anthonyclifton.com/?p=91</guid>
		<description><![CDATA[Changed Earth Worlds is a role playing game.  Consequently, the role or “character class” a player chooses to play will have a fundamental impact on virtually every facet of her experience:  how attributes such as strength and intelligence are calculated, what skills are available to learn, to what extent they can be mastered, which items [...]]]></description>
			<content:encoded><![CDATA[<p>Changed Earth Worlds is a role playing game.  Consequently, the role or “character class” a player chooses to play will have a fundamental impact on virtually every facet of her experience:  how attributes such as strength and intelligence are calculated, what skills are available to learn, to what extent they can be mastered, which items a character is allowed to possess and use, what strategies can be employed to defeat enemies, make friends and achieve goals and even which opportunities for missions will be presented.</p>
<p>NPCs might even talk to a character differently depending on the character’s “class.”</p>
<p>To keep things simple, Changed Earth Worlds will offer four (4) character classes but, to keep things exciting, each class will be balanced so there will be plenty of skills, items and adventure opportunities regardless of the class selected.  Even Healers which, in most games, tend to be supporting characters will have lots of unique and exciting skills to employ.  To some extent, players can also use skills and items from other classes with limits to their ability to master them.</p>
<p><strong>Maker</strong> – After The Change it was discovered by Sophie Core that certain individuals possessed an ability to consciously create and alter reality as they wished, usually by imagining the desired results and performing an activating ritual.  The technical term for this is ‘Actualization’ but PCs and NPCs will often refer to it as simply ‘Magick’ for the sake of convenience, recognizing that the ability comes from a natural source rather than a supernatural one.  For the most part, the citizens of Changed Earth don’t believe in Magick as a mystical or supernatural skill.  They view it instead as having a scientific basis even though they may not understand it fully.  Makers, using Magick or Actualization, can create, transform (modify) or destroy, with the appropriate skill level, an object or environment of any size.</p>
<p><strong>Healer</strong> – Like a Maker, a Healer can alter reality through the use of imagination and ritual.  However, there are two key differences between a Healer and Maker.  First, while Makers Actualize inanimate objects and environments, Healers are able to create, transform or destroy (kill) living things, living environments (ecosystems) or animate objects.  Second, while it is relatively easy for them to transform, heal and destroy living things, it is relatively difficult (due to the complexity of living things) to create them.  Only at high levels of experience and skill can they reliably create living things.  Due to the consequences to their karma, it is inadvisable unless absolutely necessary to kill them.  However, there is a counter-balancing factor.  Healers, unlike Makers, in their ability to transform living things can transform a dangerous monster into one that is less dangerous, a Tentacle Beast into a Fluffy Bunny for example.  They can also do the reverse, creating dangerous barriers of enemies for other players or enemies to encounter.</p>
<p><strong>Keeper</strong> – A (Peace)Keeper is an individual who is able to alter reality only as it pertains to their own physical existence.  Using imagination and visualization, a Keeper is able to perform physical feats of speed, strength, endurance and agility impossible for non-Keepers.  A Keeper might flit effortlessly from building to building, avoid projectiles by contorting their bodies, mount a blindingly fast counter-offense, fire a weapon with inconceivable accuracy or wield a weapon such as a sword with unthinkable speed and precision.</p>
<p><strong>Traveler</strong> – A Traveler uses their intuitive understanding of quantum physics not only to travel easily between worlds using portals of their own making, slipping effortlessly from subreality to subreality, but also to achieve effects such as invisibility and teleportation of themselves, other people and objects of any size, depending on their skill level.  Travelers are explorers and opportunists, scavenging what they need as their move through worlds.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyclifton.com/2010/07/18/changed-earth-world-character-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing a Platformer in Java with Slick2D</title>
		<link>http://www.anthonyclifton.com/2009/05/30/developing-a-platformer-in-java-with-slick2d/</link>
		<comments>http://www.anthonyclifton.com/2009/05/30/developing-a-platformer-in-java-with-slick2d/#comments</comments>
		<pubDate>Sat, 30 May 2009 20:33:43 +0000</pubDate>
		<dc:creator>Anthony Clifton</dc:creator>
				<category><![CDATA[Game Development in Java, Slick2D and NetBeans]]></category>
		<category><![CDATA[game development tutorial]]></category>
		<category><![CDATA[java game development]]></category>
		<category><![CDATA[netbeans game development]]></category>
		<category><![CDATA[slick2d]]></category>

		<guid isPermaLink="false">http://www.anthonyclifton.com/?p=4</guid>
		<description><![CDATA[About a month ago, I posted some youtube videos showing a technology demo that I did to learn how to do game development in Java. This first one shows the technologies that I used: Java, NetBeans IDE and Slick2D.  It is probably the more coherent of the two although the game was in an earlier [...]]]></description>
			<content:encoded><![CDATA[<p>About a month ago, I posted some youtube videos showing a technology demo that I did to learn how to do game development in Java.</p>
<p>This first one shows the technologies that I used: Java, NetBeans IDE and Slick2D.  It is probably the more coherent of the two although the game was in an earlier state.</p>
<p><object width="425" height="344" data="http://www.youtube.com/v/jt_4bksmJ94&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/jt_4bksmJ94&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p>The second video shows the game at a point where there were enemies, some kind of accounting for hit and mana points and the beginnings of some strategy.  It is, however, the less coherent of the two.</p>
<p><object width="425" height="344" data="http://www.youtube.com/v/Sa3U3wmPbqQ&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Sa3U3wmPbqQ&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyclifton.com/2009/05/30/developing-a-platformer-in-java-with-slick2d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

