<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3977573042504805175</id><updated>2011-04-22T01:33:03.169-04:00</updated><category term='resize'/><category term='ruby'/><category term='0.5'/><category term='OpenFracas'/><category term='gameboard'/><category term='mime'/><category term='timeline'/><category term='map'/><category term='gtk'/><category term='resolution'/><category term='teams'/><category term='thumbnail'/><category term='widgets'/><category term='networking'/><category term='OS X'/><category term='0.4'/><category term='rewrite'/><category term='preview'/><category term='AI'/><category term='planning'/><category term='0.6'/><category term='gconf'/><category term='mapedit'/><category term='open'/><category term='statistics'/><category term='cairo'/><category term='nautilus'/><title type='text'>OpenFracas Development Journal</title><subtitle type='html'>OpenFracas is a free, open-source game with Risk-eqsue gameplay.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>OpenFracas Team</name><uri>http://www.blogger.com/profile/15097050776541742244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-8626409731127970070</id><published>2009-04-05T10:02:00.007-04:00</published><updated>2009-04-05T12:49:37.470-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Something to Show for the Work on Networking</title><content type='html'>I have been making good progress with the networking branch of OpenFracas. Although proper integration into the GUI is a ways off yet, I now have a game being shared between two frontends - a 'local' client and a network client.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_OilakizULso/Sdi7duOJIdI/AAAAAAAAADA/RAvicGf0iOQ/s1600-h/Networking+%231.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 250px;" src="http://2.bp.blogspot.com/_OilakizULso/Sdi7duOJIdI/AAAAAAAAADA/RAvicGf0iOQ/s400/Networking+%231.png" alt="" id="BLOGGER_PHOTO_ID_5321209079036191186" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-8626409731127970070?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/8626409731127970070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=8626409731127970070' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/8626409731127970070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/8626409731127970070'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2009/04/i-have-been-making-good-progress-with.html' title='Something to Show for the Work on Networking'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_OilakizULso/Sdi7duOJIdI/AAAAAAAAADA/RAvicGf0iOQ/s72-c/Networking+%231.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-2926688719883690557</id><published>2009-03-31T16:17:00.003-04:00</published><updated>2009-03-31T16:54:21.087-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='planning'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Towards Network Play in OpenFracas</title><content type='html'>&lt;span class="postbody"&gt;The ability to play OpenFracas over the network has been a goal of mine for a long time. It's been on the radar since the project began, and has been in development in some form or anther on and off since last summer. Thanks to my most recent shot at it, though, it is actually starting to fall into place now.&lt;br /&gt;&lt;br /&gt;About a year ago, OpenFracas 0.4 was released, and with it was a new client-server model upon which all further development has been based on. This was driven by the realization that networking would &lt;span style="font-style: italic;"&gt;eventually&lt;/span&gt; become an important part of the game, and that it would be best if this were not bolted on as an afterthought when that time came.&lt;br /&gt;&lt;br /&gt;Last summer, I began working in earnest on a method by which OpenFracas could communicate over the network. While I eventually shelved the project after realizing that I was probably approaching the problem the wrong way, I did succeed in producing a very nice wrapper for network connections which allowed for easy transmission of simple messages in a data serialization specification called YAML. This is the same serialization &lt;/span&gt;&lt;span class="postbody"&gt;specification&lt;/span&gt;&lt;span class="postbody"&gt; that OpenFracas 0.6 uses for the new map format that it introduced.&lt;br /&gt;&lt;br /&gt;Recently, I have taken another shot at completing this long-standing goal, and have had more success this time around. After some tinkering to refamiliarize myself with the work I had done previously (the useful parts, anyways), I started working on getting the game's front-end to communicate with the backend over the network. Right now, I have a kind of proof-of-concept implementation where a single instance of the game runs messages back and forth between the backend and the frontend over the network, as opposed to just making function calls, and I've been working recently on cutting down on the number of calls that the front-end has to make to the back-end in order to decrease network lag.&lt;br /&gt;&lt;br /&gt;I still need to make adjustments to the GUI to allow people to open network slots for a new game, or to join network games on other people's computers. This whole project is useless without the ability for the user to actually enable and configure it to at least some limited degree, so its not really in a state where it can be demo'ed, but I'm hopefull that I'll soon have something a little more visual to show for my efforts.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-2926688719883690557?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/2926688719883690557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=2926688719883690557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/2926688719883690557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/2926688719883690557'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2009/03/towards-network-play-in-openfracas.html' title='Towards Network Play in OpenFracas'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-3595749753947744209</id><published>2009-03-16T23:08:00.003-04:00</published><updated>2009-03-16T23:13:58.713-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='0.6'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenFracas'/><title type='text'>OpenFracas 0.6.1 Released - Bug Fixes</title><content type='html'>OpenFracas 0.6.1 has been released. This is a bug-fix release addressing two issues with OpenFracas 0.6&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Crash when selecting a replacement capital.&lt;/li&gt;&lt;li&gt;Crash (Segmentation fault) in Ubuntu 8.10 after generating a custom map.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The second crash involves an issue outside the scope of OpenFracas, and is actually located in one of the libraries that OpenFracas relies on. The fix in this case contains a work-around for the issue.&lt;br /&gt;&lt;br /&gt;Ubuntu 8.10 users may still encounter instability with OpenFracas 0.6.1 due to another bug in the "libcairo-ruby" package. I am addressing this issue via a bug report on Launchpad, and the next version of Ubuntu due out in April has an updated version of this package which corrects this issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-3595749753947744209?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/3595749753947744209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=3595749753947744209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/3595749753947744209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/3595749753947744209'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2009/03/openfracas-061-released-bug-fixes.html' title='OpenFracas 0.6.1 Released - Bug Fixes'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-6701278798854694544</id><published>2008-08-18T23:05:00.001-04:00</published><updated>2008-08-19T01:07:56.310-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='map'/><category scheme='http://www.blogger.com/atom/ns#' term='0.6'/><category scheme='http://www.blogger.com/atom/ns#' term='mapedit'/><title type='text'>OpenFracas 0.6 Released</title><content type='html'>&lt;a href="http://www.openfracas.org/"&gt;OpenFracas&lt;/a&gt; 0.6 "Cedric" has been released. This release marks the 1 year anniversary of OpenFracas. The most notable change in 0.6 is the new map file-format. Much of the work this release has been behind-the-scenes, making the game work with the new format.&lt;br /&gt;&lt;br /&gt;While it may seem a trivial addition, it means that it is now possible to save and restore games in progress, as well as the maps upon which they were played. We originally inherited the map file format from Fracas 2.0, and had extended it well past what it was intended to handle in order to get it to keep up with the progress of OpenFracas. Nevertheless, it was far from an ideal solution. We didn't have support for reading and writing Fracas games-in-progress, and the file format in general wasn't suited to our goals for OpenFracas.&lt;br /&gt;&lt;br /&gt;Additionally, a new Maps section has been added to our website at &lt;a href="http://www.openfracas.org/maps.php"&gt;http://www.openfracas.org/maps.php&lt;/a&gt; where users can download maps and saved games, and can also upload their own creations to share with others.&lt;br /&gt;&lt;br /&gt;The file format used now, &lt;span style="font-weight: bold;font-family:courier new;" &gt;.ofmap&lt;/span&gt; and &lt;span style="font-weight: bold;font-family:courier new;" &gt;.ofgame&lt;/span&gt; are based on the YAML data serialization library/format and are a much more robust file format, while still maintaining human readability.&lt;br /&gt;&lt;br /&gt;The Map Editor has received updated code to allow it to use the new file formats, as well. The features of the Map Editor will grow in time as it matures, and the last of the code-base is brought around to using the new formats.&lt;br /&gt;&lt;br /&gt;OpenFracas 0.6 is available on the &lt;a href="http://www.openfracas.org/download.php"&gt;downloads page&lt;/a&gt;; please feel free to contact us with any questions, concerns, or bugs on our forums.&lt;br /&gt;&lt;br /&gt;Ubuntu users who have added our repository to their package manager will find the new version automatically available as an update.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-6701278798854694544?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/6701278798854694544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=6701278798854694544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/6701278798854694544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/6701278798854694544'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/08/openfracas-06-released.html' title='OpenFracas 0.6 Released'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-1668853143443847413</id><published>2008-06-23T09:41:00.001-04:00</published><updated>2008-06-23T09:45:21.895-04:00</updated><title type='text'></title><content type='html'>We are proud to announce the release of &lt;a href="http://www.openfracas.org/"&gt;OpenFracas&lt;/a&gt; 0.5. The most notable changes in the 0.5 release are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sounds and Music&lt;/li&gt;&lt;li&gt;OpenFracas now supports up to 8 players&lt;/li&gt;&lt;li&gt;New troop count drawing algorithm&lt;ul&gt;&lt;li&gt;Better placement of troop counts&lt;/li&gt;&lt;li&gt;Scales troop counts to fit within smaller country&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Options to restart a game or reuse the current map&lt;/li&gt;&lt;li&gt;Streamlined User Interface&lt;/li&gt;&lt;li&gt;Map Editor improvements&lt;/li&gt;&lt;li&gt;More player colours to choose from&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Help documentation, revised from Fracas help, now available&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Perhaps most significantly of all: Since the last release, OpenFracas has undergone major changes in its internal organization and structure. This means that OpenFracas is in a better position to begin adding more advanced and complex features in future releases.&lt;br /&gt;&lt;br /&gt;A new developer, Eric, has joined the OpenFracas team since the last release, and has produced the new troop count drawing algorithm.&lt;br /&gt;&lt;br /&gt;OpenFracas 0.5 is available on the downloads page; please feel free to contact us with any questions, concerns, or bugs on our forums.&lt;br /&gt;&lt;br /&gt;Ubuntu users who have added our repository to their package manager will find the new version automatically available as an update.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-1668853143443847413?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/1668853143443847413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=1668853143443847413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/1668853143443847413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/1668853143443847413'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/06/we-are-proud-to-announce-release-of.html' title=''/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-7688634427449567792</id><published>2008-04-25T16:53:00.009-04:00</published><updated>2008-04-25T17:22:07.459-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mapedit'/><category scheme='http://www.blogger.com/atom/ns#' term='0.5'/><title type='text'>MapEdit picking up some much needed features.</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_OilakizULso/SBJKQ08FxAI/AAAAAAAAAB8/ptghpXSqJ-g/s1600-h/mapedit-trim.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_OilakizULso/SBJKQ08FxAI/AAAAAAAAAB8/ptghpXSqJ-g/s400/mapedit-trim.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5193294973260645378" /&gt;&lt;/a&gt;So now the map editor has progressed to the point where I am no longer embarrassed to call it my own. Chiefly, the map editor can now open files as well as save them - so that's a big one. The ability to name the countries has long been missing from the programme, as has support for a new feature that should be included in OpenFracas 0.5, that of unplayable land. Unplayable land, with proper support from the map editor, allows for the creation of maps like this work in progress of mine&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;The Provinces of the Roman Empire&lt;/span&gt;.&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_OilakizULso/SBJJE08Fw-I/AAAAAAAAABs/hRYe8vOxxUc/s1600-h/preview.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_OilakizULso/SBJJE08Fw-I/AAAAAAAAABs/hRYe8vOxxUc/s400/preview.png" alt="" id="BLOGGER_PHOTO_ID_5193293667590587362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The darker grey areas represent regions which cannot be conquered, and (unlike water) cannot be traversed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-7688634427449567792?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/7688634427449567792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=7688634427449567792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/7688634427449567792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/7688634427449567792'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/04/mapedit-picking-up-some-much-needed.html' title='MapEdit picking up some much needed features.'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_OilakizULso/SBJKQ08FxAI/AAAAAAAAAB8/ptghpXSqJ-g/s72-c/mapedit-trim.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-8414707782544415048</id><published>2008-03-17T19:13:00.000-04:00</published><updated>2008-03-17T19:14:49.867-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mime'/><category scheme='http://www.blogger.com/atom/ns#' term='gconf'/><category scheme='http://www.blogger.com/atom/ns#' term='thumbnail'/><category scheme='http://www.blogger.com/atom/ns#' term='nautilus'/><title type='text'>Integration with the Nautilus File Browser</title><content type='html'>If .map files (the files used to store map data in the original Fracas) are associated with OpenFracas in the file manager, double-clicking a map file should open OpenFracas with that map file loaded. This has not been the case so far, and was not in our last release, but our next release (whenever that may be) should remedy this via the installation package. (at least on Linux - we're still looking into integration with Windows).&lt;br /&gt;&lt;br /&gt;Additionally, another nice touch that we've been working on is thumbnail integration wtih nautilus. Now, when opening a nautilus file browser windows to view Fracas .map files, you will be able to see thumbnail previews of the maps. Here you can see a nautilus file browser showing thumbnails for a collection of maps from OpenFracas, and from the &lt;a href="http://www.smozzie.com/maphome.html"&gt;Homebrew Maps&lt;/a&gt; page taken off of the original Fracas's site.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_OilakizULso/R970kpqr6PI/AAAAAAAAABc/G2ncVdy-QTU/s1600-h/Screenshot-3.png"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_OilakizULso/R970kpqr6PI/AAAAAAAAABc/G2ncVdy-QTU/s400/Screenshot-3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5178845532020009202" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-8414707782544415048?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/8414707782544415048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=8414707782544415048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/8414707782544415048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/8414707782544415048'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/03/integration-with-nautilus-file-browser.html' title='Integration with the Nautilus File Browser'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_OilakizULso/R970kpqr6PI/AAAAAAAAABc/G2ncVdy-QTU/s72-c/Screenshot-3.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-1547084085779766268</id><published>2008-03-08T02:20:00.000-05:00</published><updated>2008-03-07T21:32:53.564-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='gameboard'/><category scheme='http://www.blogger.com/atom/ns#' term='teams'/><category scheme='http://www.blogger.com/atom/ns#' term='timeline'/><category scheme='http://www.blogger.com/atom/ns#' term='mapedit'/><title type='text'>OpenFracas 0.4 Released</title><content type='html'>We are proud to announce the next version of OpenFracas, v0.4, has been released. This release is our best yet, with exciting new features and a focus on quality.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_OilakizULso/R7nnfzXcGgI/AAAAAAAAABU/urtEB0y2174/s1600-h/8.png"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_OilakizULso/R7nnfzXcGgI/AAAAAAAAABU/urtEB0y2174/s400/8.png" alt="" id="BLOGGER_PHOTO_ID_5168416580934834690" border="0"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Specifically, this new version brings the following improvements&lt;br /&gt;&lt;ul&gt;&lt;li&gt;New drawing code, making the game board&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Customizable.   Change text sizes, and line styles&lt;/li&gt;&lt;li&gt;Faster.   Game feels more responsive. Redrawing rates are improved&lt;/li&gt;&lt;li&gt;Resizable.   Resizing the board is now possible&lt;/li&gt;&lt;li&gt;Animated.   The drawing is now fast enough to have simple animations&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Teams can be created when starting a new game, allowing for more challenging and exciting gameplay&lt;/li&gt;&lt;li&gt;End-of-game dialogue displays statistics and a timeline, showing the game's course&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Map previews are faster when creating a new map&lt;/li&gt;&lt;li&gt;Map previews have been added when opening an existing map&lt;/li&gt;&lt;li&gt;Basic map creator. Create maps, and export them to OpenFracas&lt;/li&gt;&lt;li&gt;Default maps are included&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Eurpoe&lt;/li&gt;&lt;li&gt;Risk&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Complete use of Tango theme on Windows to improve interface aesthetic&lt;br /&gt;&lt;/li&gt;&lt;li&gt;User interface refinements and improvements&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font class="postbody"&gt;&lt;br /&gt;&lt;br /&gt;The new version is available on the &lt;a href="http://www.openfracas.org/download.php"&gt;downloads page&lt;/a&gt;; please feel free to contact us with any questions, concerns, or bugs on our forums.&lt;br /&gt;&lt;br /&gt;Ubuntu users who have added our repository to their package manager will find the new version automatically available as an update.&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-1547084085779766268?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/1547084085779766268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=1547084085779766268' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/1547084085779766268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/1547084085779766268'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/03/openfracas-04-released.html' title='OpenFracas 0.4 Released'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_OilakizULso/R7nnfzXcGgI/AAAAAAAAABU/urtEB0y2174/s72-c/8.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-1761240249546104090</id><published>2008-02-07T20:20:00.000-05:00</published><updated>2008-02-10T02:39:16.860-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='rewrite'/><category scheme='http://www.blogger.com/atom/ns#' term='planning'/><title type='text'>Planning things out in advance.</title><content type='html'>We've been working on OpenFracas for about half a year now, with various degrees of activity dictated by the other parts of our lives, and now we've got the game into a playable state. A lot of the work we've been doing for the past while now (post 0.3 release) has been to experiment with new features and things that would improve the existing experience, rather than to add huge new aspects of play to the game. The option for capitals, for example, which made its way into the game with the 0.3 release, was something quite drastic. The work being done now is more ... subtle, if you will. This means that we've been working more with the existing code base than we have with new code that we're still in the process of creating.&lt;br /&gt;&lt;br /&gt;This has already prompted one big code cleanup at the core of the game, and we're currently experimenting with overhauling the drawing code to try and speed up map rendering a little bit. The code in some sections has been growing slowly for so long, that it has become rather untidy. By untidy, I mean that when additional features were tacked on, they were not done so with any overarching pattern or approach in mind. As an example, a lot of the code designed to figure out which countries neighboured others (the part that has been rewritten already) wasn't designed to take things like harbours into consideration - they didn't exist when the code was written. We wanted to have it working asap so we could go ahead and get other important parts written as well. Recent work on adding new features prompted us to revisit this code and replace it with something cleaner and more flexible. The result is code that is more more readable, and much faster to create.&lt;br /&gt;&lt;br /&gt;Now that the game is (for the most part) working, we need to do more of this kind of rewrite. Before we move on and add things like sound, networking, game saving, etc, we need to stop and clean up the code we have already.&lt;br /&gt;&lt;br /&gt;Our plan, as it stands now, is to focus primarily on usability and polishing the user-related aspects of the game for our version 0.4 release. We want to have the game working very well for the 0.4 release, because we're not entirely sure how long it will be until we make another release after that. After 0.4, we're going to be doing a lot of clean-up on the our code-base. This is not the kind of work that will necessarily add new features, but is that necessary kind of work that will allow us to add new, more complex features faster in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-1761240249546104090?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/1761240249546104090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=1761240249546104090' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/1761240249546104090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/1761240249546104090'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/02/planning-things-out-in-advance.html' title='Planning things out in advance.'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-1027166477518374192</id><published>2008-02-02T13:00:00.000-05:00</published><updated>2008-02-02T13:05:08.183-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='map'/><category scheme='http://www.blogger.com/atom/ns#' term='mapedit'/><category scheme='http://www.blogger.com/atom/ns#' term='0.5'/><title type='text'>Mucking about with a map editor</title><content type='html'>It's something that OpenFracas has been missing. The ability to create custom maps is something that we'd love to give users, and eventually we will. We have no official plans for it yet, but once we have a map editor that is capable of creating these maps, we want to have a custom maps section on our web site.&lt;br /&gt;&lt;br /&gt;All of this is jumping the gun a little bit, since the Map Editor is very new, and very lacking in features. For now, at least. The code for drawing maps in the map editor is actually where the code for the new faster map previews (mentioned earlier) comes from. This has been sitting around for a while, now, growing ever so slowly. It might not make it into the 0.4 release, as there are a number of other things that we want to get done, or need to polish, but eventually we'd really like to make map customization available.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-1027166477518374192?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/1027166477518374192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=1027166477518374192' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/1027166477518374192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/1027166477518374192'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/02/mucking-about-with-map-editor.html' title='Mucking about with a map editor'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-3437175466225259015</id><published>2008-01-26T18:47:00.000-05:00</published><updated>2008-01-26T18:58:10.443-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AI'/><category scheme='http://www.blogger.com/atom/ns#' term='0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='teams'/><title type='text'>And slowly, but surely, they drew their plans against us...</title><content type='html'>OpenFracas includes a few features that the original Fracas doesn't have; resizable gameboard and maps of any size are two that come immediately to mind. These features are relatively trivial, though. Sure, they make the game more usable, but they don't really place OpenFracas above the original in a significant way.&lt;br /&gt;&lt;br /&gt;What we've wanted to have for a while now are features that impact gameplay that Fracas never had; features that feel natural for this style of game and make the game different. Making capitals optional was one such feature; teams is now another. We're excited to have added this feature, since it helps to distinguish us from the original game, and was something that was surprisingly easy to implement...for the most part.&lt;br /&gt;&lt;br /&gt;Initially, teams confused the AI to no end; they would keep attacking other players they were allied with. At least, they tried to. The game wouldn't let them get away with it, and they'd get thrown into a never ending loop trying to attack their friends. A surprising amount of effort had to go in to getting the AI to work in teams. It had to stop 'fearing' nearby troops owned by allies, and start recognizing them as allies.&lt;br /&gt;&lt;br /&gt;Now that the AIs are able to work with allies, it presents an interesting cop-out. Our AI is bad, and we know it. The truth is that its a very complicated thing, getting an AI to play &lt;span style="font-style:italic;"&gt;well&lt;/span&gt;, and we have too many other things that still need doing to give it the attention it deserves. But what would playing against 5 AIs, all on one team be like? I can't say that I've tried that - yet, but I suspect that it might just be a little bit harder than when they're all on their own. Perhaps that is one way for human players to get a little bit more entertainment out of the AIs when playing against other humans isn't an option.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-3437175466225259015?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/3437175466225259015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=3437175466225259015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/3437175466225259015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/3437175466225259015'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/01/and-slowly-but-surely-they-drew-their.html' title='And slowly, but surely, they drew their plans against us...'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-4202773972874474051</id><published>2008-01-22T02:50:00.000-05:00</published><updated>2008-01-22T03:07:36.737-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OS X'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenFracas'/><title type='text'>Creating a Mac OS X Port of OpenFracas</title><content type='html'>During the course of development of OpenFracas, we have returned again and again to the idea of distributing the game for OS X. It was our original goal to support all 3 of the major operating systems: Linux, Windows, and OS X.&lt;br /&gt;&lt;br /&gt;OpenFracas has been developed using fairly open and portable technologies (Ruby and the GTK) and so the idea was good in theory, but in practice it proved more difficult. OpenFracas was developed first for Linux, with a Windows port being quite easy to make. We both have a free legal copy of Windows XP provided to us, so porting the game to Windows wasn't a problem. Mac OS X, on the other hand, is proving to be more difficult.&lt;br /&gt;&lt;br /&gt;Creating the port for OS X requires access to OS X, which in turn requires a Mac, since that is all that OS X will run on. We &lt;span style="font-style: italic;"&gt;think&lt;/span&gt; that we have a complicated series of instructions that, if followed, will allow the game to run on OS X, but without a Mac, we cannot verify these steps. Without trying these steps, we cannot move beyond it to a more seamless installer for our programme.&lt;br /&gt;&lt;br /&gt;Neither of us are really up to spending the kind of money required to buy a new computer just to create the Mac port of OpenFracas. So we're asking anyone reading this who is interested in helping us out, give us a shout - we'd love to hear from you, and hopefully we'll be able to get the game up and running with your help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-4202773972874474051?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/4202773972874474051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=4202773972874474051' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/4202773972874474051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/4202773972874474051'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/01/creating-mac-os-x-port-of-openfracas.html' title='Creating a Mac OS X Port of OpenFracas'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-7236621776075344501</id><published>2008-01-19T13:35:00.000-05:00</published><updated>2008-01-19T14:19:48.458-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='resolution'/><category scheme='http://www.blogger.com/atom/ns#' term='gameboard'/><category scheme='http://www.blogger.com/atom/ns#' term='resize'/><category scheme='http://www.blogger.com/atom/ns#' term='cairo'/><title type='text'>Gameboard Size</title><content type='html'>In all of our releases, from our initial preview release up to and including our 0.3.x series, the gameboard has been a fixed size. We tried to choose a size that was large enough to be easily visible and still be small enough to fit on everyone's monitors. An assumption that we made is that everyone will be using, at a minimum, 1024x768 as their screen resolution. The size of the gameboard was adjusted to match that assumption.&lt;br /&gt;&lt;br /&gt;While this assumption is probably true, we should not be taking it as a given. There could be people who still use 800x600, or even lower. Conversley, there also could be people with very large displays; sizes of 1600x1200 and 1920x1200 are not unheard of these days, and the gameboard would appear rather small on those monitors.&lt;br /&gt;&lt;br /&gt;I'm still rather new at using the GTK to create user interfaces, and I'm still learning the ropes of custom widget creation. Until now, despite extensive google-ing, I have not been able to determine how to detect the actual assigned size of a widget.&lt;br /&gt;&lt;br /&gt;A little bit of an explaination might be in order. In the GTK, you have the option of requesting a fixed size for your widgets, but that is not the most desirable approach. There are certain controls that act as containers. These controls allow you to add other controls to areas inside of them. Once you have added these controls, it will automatically size them for you, based on preference selections you make. As such, there is no fixed size for a widget, and the programmer's code usually never explicitly sets the widget size; there is no work left to be done. Because of this, I had no way of knowing how large the widget would be if I allowed it to scale freely.&lt;br /&gt;&lt;br /&gt;And then I found it. It had looked dillegently, but had - in the end - given up. self.allocation.height and self.allocation.width allow you to determine the real height of your custom widget in pixels. With this information, the map can be made scalable. Can be, and has been. There is no tickbox to tick or slider to slide; just resize the window, and the gameboard should scale with it.&lt;br /&gt;&lt;br /&gt; In addition to being scalable, there are two new preferences that can now be set; outline thickness and troop text size. &lt;br /&gt;&lt;br /&gt;Resizing still takes a little bit of machine power, as a lot of memory space has to be adjusted to fit the new sizes, but we've been able to cut that down some already. Obviously there are still some practical restrictions on how small the map can be, and for now, there are also speed-related problems with gameboards that are exceedingly large. Even if we can't move beyond those problems, though, I think that this is still a nice improvement over the old fixed-size board.&lt;br /&gt;&lt;br /&gt;The scaling gameboard means that in the future (hopefully by our 0.4 release), the gameboard will not have a rigid fixed size like it does now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-7236621776075344501?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/7236621776075344501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=7236621776075344501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/7236621776075344501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/7236621776075344501'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/01/gameboard-size.html' title='Gameboard Size'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-5402546026842820814</id><published>2008-01-16T18:50:00.000-05:00</published><updated>2008-01-23T00:57:25.727-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='widgets'/><category scheme='http://www.blogger.com/atom/ns#' term='cairo'/><title type='text'>Cairo and the GTK in Ruby. Creating Custom Widgets.</title><content type='html'>This post is more about programming than it is about OpenFracas.&lt;br /&gt;&lt;br /&gt;When I was trying to learn how to use cairo to create custom widgets in the GTK with ruby, I ran into a real lack of documentation online. There were lists of functions and all, but lists of functions just don't compare to samples, as far as I'm concerned. So I've decided to put together a little bit of code that can be used as a how-to or as a starting point for someone else's projects&lt;br /&gt;&lt;br /&gt;The following Ruby code is an example of a custom GTK control created using the RCairo SVG library (cairo is built into GTK 2.8+) by extending the Gtk::DrawingArea class.&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;#we need to include these for obvious reasons&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 153, 0);"&gt;require 'gtk2'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 153, 0);"&gt;require 'cairo'&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#This class extends Gtk::DrawingArea&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;&lt;br /&gt;class&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt; CustomWidget &lt;/span&gt; &lt; Gtk::DrawingArea&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;def&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt; initialize&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#call Gtk::DrawingArea's constructor first&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;super()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#connect the expose event&lt;br /&gt;#(means drawing is needed)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#to the fRedraw function&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;&lt;br /&gt;self&lt;/span&gt;.signal_connect(&lt;span style="color: rgb(0, 153, 0);"&gt;"expose_event"&lt;/span&gt;) &lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;do&lt;/span&gt;&lt;blockquote&gt;&lt;br /&gt;fRedraw&lt;/blockquote&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;        end&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(51, 102, 255);"&gt;&lt;br /&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#called when we get an expose event&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;def&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt; fRedraw&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#create our drawing context.&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#whatever we draw on this ends up on the screen&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        #self.window is a Gdk::Window&lt;/span&gt;&lt;br /&gt;context = &lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;self&lt;/span&gt;.window.create_cairo_context&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        #get the actual height/width of this control&lt;/span&gt;&lt;br /&gt;height = &lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;self&lt;/span&gt;.allocation.height.to_f&lt;br /&gt;width = &lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;self&lt;/span&gt;.allocation.width.to_f&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#make drawing occur offscreen (double-buffering)&lt;/span&gt;&lt;br /&gt;rect = Gdk::Rectangle.new(0, 0, self.allocation.width, self.allocation.height)&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;self&lt;/span&gt;.window.begin_paint(rect)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        #set the colour and flood the region&lt;/span&gt;&lt;br /&gt;c.set_source_rgba(0.5, 0.4, 0.6, 0.9)&lt;br /&gt;c.paint&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        #set the colour and draw a line&lt;/span&gt;&lt;br /&gt;c.set_source_rgba(0, 0, 0, 0.9)&lt;br /&gt;c.move_to(height / 2.0, width / 2.0)&lt;br /&gt;c.rel_line_to(height, width)&lt;br /&gt;c.stroke&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;self&lt;/span&gt;.window.end_paint&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;That is a very basic example. From what I understand, it would be a good idea to try and buffer it by using an ImageSurface and creating a graphics context for it, then drawing to the ImageSurface's context. Once you're done, you can set the window context's source to the ImageSurface, and &lt;span style="font-family:courier new;"&gt;.fill&lt;/span&gt; the area.&lt;br /&gt;&lt;br /&gt;for example, to create the image&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;@image = Cairo::ImageSurface.new(Cairo::FORMAT_ARGB32, height, width)&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;@imageContext = Cairo::Context.new(@image)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then in the fRedraw function where &lt;span style="font-family:courier new;"&gt;context&lt;/span&gt; is the window's context&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt;context.set_source(@image, 0, 0)&lt;br /&gt;context.paint&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt;&lt;/span&gt;You'll still need to add this control to a parent control such as a window or a layout container. You'll also need to &lt;span style="font-family:courier new;"&gt;.show &lt;/span&gt;it for it to be visible.&lt;br /&gt;&lt;br /&gt;For drawing things with a fixed scale, you can use the &lt;span style="font-family:courier new;"&gt;.scale&lt;/span&gt; command to scale a context down to a specific size. There's a really good tutorial for using cairo for drawing &lt;a href="http://www.tortall.net/mu/wiki/CairoTutorial"&gt;here&lt;/a&gt;. It's in Python, but it's still very helpful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-5402546026842820814?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/5402546026842820814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=5402546026842820814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/5402546026842820814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/5402546026842820814'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/01/cairo-and-gtk-in-ruby-creating-custom.html' title='Cairo and the GTK in Ruby. Creating Custom Widgets.'/><author><name>Nathaniel</name><uri>http://www.blogger.com/profile/10451482288150317438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp2.blogger.com/_OilakizULso/R4skgxiizDI/AAAAAAAAAAM/vmbViGX06Ko/S220/avatar.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3977573042504805175.post-7357119205976263826</id><published>2008-01-13T19:07:00.000-05:00</published><updated>2008-01-14T16:41:23.554-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='0.4'/><category scheme='http://www.blogger.com/atom/ns#' term='gameboard'/><category scheme='http://www.blogger.com/atom/ns#' term='map'/><category scheme='http://www.blogger.com/atom/ns#' term='open'/><category scheme='http://www.blogger.com/atom/ns#' term='preview'/><title type='text'>New faster map previews</title><content type='html'>With the recent release of OpenFracas v0.3.0, I thought that it might be a good idea to start a development journal to track our progress, and to document and discuss some of the new things that we're working on for the next few versions.&lt;br /&gt;&lt;br /&gt;The first thing that I'll mention is the new open map dialogue. Until now, we've been using the same control that draws the main gameboard to draw the map previews when starting a new game. This is somewhat unnecessary, as we don't need the same level of detail for map previews.&lt;br /&gt;&lt;br /&gt;We've now replaced that control with a much leaner one, taken from a version of the programme from way back when - when drawing was being done in a much simpler manner.&lt;br /&gt;&lt;br /&gt;Since this new control draws map previews much faster, we can be a little more liberal in displaying them. Now, when in the process of opening an existing map, a preview of the highlighted file will be displayed. Should the file not be readable by our import code (eg. not a map), no preview will be displayed.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_MLfDXzEAGpk/R4qy2Y395UI/AAAAAAAAAAU/Gr-MrG2Kd-E/s1600-h/preview.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_MLfDXzEAGpk/R4qy2Y395UI/AAAAAAAAAAU/Gr-MrG2Kd-E/s400/preview.png" alt="" id="BLOGGER_PHOTO_ID_5155129370938828098" border="0" /&gt;&lt;/a&gt;The larger, more detailed map control that we use to draw the main gameboard is faster for general redrawing and making small changes to the map like who owns a country, but it incurs a significant time penalty when first starting up. This one-time cost is not an issue with the simpler gameboard now used for small previews; hopefully, this will not only allow us to have previews of maps while opening them, but also also result in quicker responses from the dialogues used to start a new game.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977573042504805175-7357119205976263826?l=openfracas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openfracas.blogspot.com/feeds/7357119205976263826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3977573042504805175&amp;postID=7357119205976263826' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/7357119205976263826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3977573042504805175/posts/default/7357119205976263826'/><link rel='alternate' type='text/html' href='http://openfracas.blogspot.com/2008/01/new-faster-map-previews.html' title='New faster map previews'/><author><name>OpenFracas Team</name><uri>http://www.blogger.com/profile/15097050776541742244</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_MLfDXzEAGpk/R4qy2Y395UI/AAAAAAAAAAU/Gr-MrG2Kd-E/s72-c/preview.png' height='72' width='72'/><thr:total>2</thr:total></entry></feed>
