<?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/'><id>tag:blogger.com,1999:blog-5052387</id><updated>2008-05-12T20:28:29.275-07:00</updated><title type='text'>Blobs in Games</title><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/'/><link rel='next' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default?start-index=26&amp;max-results=25'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>66</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5052387.post-9181774539596972488</id><published>2008-02-18T15:10:00.000-08:00</published><updated>2008-02-18T15:34:15.177-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='grids'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Interactive A* Illustration</title><content type='html'>&lt;p&gt;
A few months ago, I wrote that &lt;a href="http://simblob.blogspot.com/2007/07/interactive-illustrations.html"&gt;I was working on interactive illustrations for my A* pages&lt;/a&gt;. Has it taken that long? Well, I've actually had things working for a while now. I just haven't published it. Why? It turns out that my A* pages, which I wrote a long time ago, are really out of date. As I was trying to illustrate various concepts, I was trying to illustrate the concepts from my pages, but not all of them worked well in my Flash program. I eventually realized that some of those concepts are just unimportant in practice. I also discovered that the style I used in my diagrams only works for very simple maps. Once you add terrain into the maps, the visual style fails to convey the concepts I wanted to illustrate.
&lt;/p&gt;
&lt;p&gt;
I haven't yet resolved these issues, which are taking a lot more time than writing the code itself.  The algorithm and data structure code is complete, so I've uploaded them to my web site.  You can see &lt;a href="http://www-cs-students.stanford.edu/~amitp/game-programming/a-star-flash/"&gt;source code&lt;/a&gt; and &lt;a href="http://www-cs-students.stanford.edu/~amitp/game-programming/a-star-flash/test.html"&gt;the applet running on a square grid&lt;/a&gt;. The code is released under the MIT license; feel free to use it. I made the A* portion work on any graph, and included square, hexagonal, and triangular grids. This isn't the most efficient approach, but I wanted something flexible so that I could later use it in my &lt;a href="http://www-cs-students.stanford.edu/~amitp/game-programming/grids/"&gt;article on grids&lt;/a&gt;. I haven't finished the hexagonal grid code yet; the only thing missing is the pixel coordinate to hex coordinate transformation.  Enjoy!
&lt;/p&gt;
&lt;p&gt;
Once I figure out the best way to display the important concepts for A*, I'll update my A* pages to use the interactive diagrams.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2008/02/interactive-illustration.html' title='Interactive A* Illustration'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=9181774539596972488' title='4 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/9181774539596972488/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/9181774539596972488'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/9181774539596972488'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-7056693646660719157</id><published>2008-02-12T12:15:00.000-08:00</published><updated>2008-02-12T12:38:10.361-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>Game Design: Decreasing costs over time</title><content type='html'>&lt;p&gt;
In World of Warcraft, the game evolves with patches released every few months. After the most recent major patch, &lt;a href="http://www.wowwiki.com/Patch_2.3"&gt;2.3&lt;/a&gt;, many areas became significantly easier, the UI became more helpful, the item rewards got better, and it took less time to “level up”. When the expansion was released, the “regular” items in the expansion areas were often better than the “elite” items in the regular areas. People who played the game in the early days sometimes comment on how easy things are now. (“When I was a kid, I had to walk uphill in the snow…”)  The question is, is this a good thing?
&lt;/p&gt;
&lt;p&gt;
I think in the context of a game like WoW, it is a good strategy.
&lt;/p&gt;
&lt;p&gt;
Players who are more skilled or have more time to play get lots of rewards, and later players who are less skilled or play less get those same rewards. It seems unfair. This happens in the tech industry too. Last year Apple released the iPhone for $600, and later lowered the price to $400. Many people were upset by this. But price drops are common in the tech industry. The iPhone will be available for $30 in five years. Does that mean nobody should buy it now? No! What you're paying for it not just the product itself, but &lt;em&gt;getting it earlier&lt;/em&gt;. 
&lt;/p&gt;
&lt;p&gt;
It's the same in World of Warcraft and other long-lived games. What was expensive before is cheaper now, except instead of the “cost” being in terms of money, it's in time and skill and effort. It doesn't even the playing field though. Just as the top items become available to more people, new top items are added that beat the old ones. There's a new iPhone out now. And Patch 2.4 will add new cool items for the top players to get. Those who had the top items before will find it easier to get the new items. Without these changes, I think the game would stagnate. Everyone will reach their peak potential, and there will be nothing more to get. You need change to keep the game exciting to existing players and new players, and Blizzard seems to be good at doing that.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2008/02/game-design-decreasing-costs-over-time.html' title='Game Design: Decreasing costs over time'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=7056693646660719157' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/7056693646660719157/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/7056693646660719157'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/7056693646660719157'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-40920925391809740</id><published>2007-11-13T11:08:00.000-08:00</published><updated>2007-11-13T12:22:52.920-08:00</updated><title type='text'>Transport Tycoon</title><content type='html'>&lt;p&gt;
I've been playing &lt;a href="http://en.wikipedia.org/wiki/Transport_Tycoon"&gt;Transport Tycoon&lt;/a&gt; for a very long time. It's a simulation game involving transporting goods and passengers — the kind of game I love, and &lt;a href="http://www-cs-students.stanford.edu/~amitp/simblob/alternatives.html"&gt;once wanted to write&lt;/a&gt;. I started playing again early this year, with &lt;a href="http://www.openttd.org/about.php"&gt;OpenTTD&lt;/a&gt; (an open source “clone” of the game), and then got interested again once I tried their &lt;a href="http://www.openttd.org/nightly.php"&gt;nightly builds&lt;/a&gt; with lots of new features.
&lt;/p&gt;
&lt;p&gt;
The weird thing about Transport Tycoon is that the original game didn't keep my interest. The AI was horrible, and the game balance didn't work for me. It was too hard at the beginning of the game and then once you had enough money, the game was too easy.  Instead, what I and others have done is come up with our own game goals, treating it more as a “software toy” than a game. In some games I avoid making any changes to the terrain; I work within its constraints to create “natural” looking routes. Other times I challenge myself to connect every city, or handle all resources of a certain type. 
&lt;/p&gt;
&lt;p&gt;
One of my favorites is designing high capacity routes and stations. I once built a custom scenario with around 100 coal mines and a single power station, and then designed routes that could handle all the coal. OpenTTD opens up new design possibilities, with changes to track building, station size and shape, and routing algorithms (see &lt;a href="http://wiki.openttd.org/index.php/Building_signals#Pre-signals"&gt;pre-signals&lt;/a&gt; and &lt;a href="http://wiki.openttd.org/index.php/Advanced_signalling_examples"&gt;advanced signals&lt;/a&gt;). 
&lt;/p&gt;
&lt;p&gt;
One of the things I've been exploring recently is having multiple industries near one another. Instead of one station per coal mine, I can have lots of coal mines surrounding a high capacity station. Here's one of the stations I'm working on:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://bp1.blogger.com/_kV9ZnGnZL7M/RzoB2H-lnJI/AAAAAAAAAII/FPPjYcufONo/s1600-h/Tunnel+stations.png"&gt;&lt;img  style="width:90%" src="http://bp1.blogger.com/_kV9ZnGnZL7M/RzoB2H-lnJI/AAAAAAAAAII/FPPjYcufONo/s400/Tunnel+stations.png"  alt="Tunnel stations" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
To increase the space I have available for coal mines, I built tunnels underneath some open space, where I'll place mines.  The concrete tiles to the northeast of the station are considered station platforms, and extend the “reach” of the station. Using those as tendrils I can make the station area larger, and place more coal mines within its reach.  On the other end of the line is a large station next to a power plant; all the trains go from here (and similar coal stations) to that power plant.  You can see to the lower left that there are many tracks to handle the trains, plus extra space where I'll add more tracks after I add coal mines.  The challenges here are keeping the trains running, dealing with breakdowns, handling the capacity, and making a nice layout.
&lt;/p&gt;
&lt;p&gt;
Once I started playing with tunnels, I designed this station for passenger traffic:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://bp1.blogger.com/_kV9ZnGnZL7M/RzoDDH-lnKI/AAAAAAAAAIQ/l3ZOzL3pBPQ/s1600-h/Superstation+40.png"&gt;&lt;img  style="width:90%" src="http://bp1.blogger.com/_kV9ZnGnZL7M/RzoDDH-lnKI/AAAAAAAAAIQ/l3ZOzL3pBPQ/s400/Superstation+40.png" alt="40 track station" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
It looks like two stations but it's actually one. I built a longer one, then removed the tracks in the middle. The station fits into a 20x20 space, but can handle 40 trains. As shown all the trains come in from the southeast, but it's also possible to use this station with 20 tracks handling northern traffic and 20 for southern traffic, either as a through station or as a terminal.  The gap between the two blocks has to be 6 tiles, so there are 14 tiles left, meaning the trains can be at most 7 tiles (14 cars) long. I haven't actually used this station anywhere, but with the tunnels at the ends, it could be quite useful for tunneling underneath a major city.
&lt;/p&gt;
&lt;p&gt;
There are lots more interesting layouts for stations and tracks. Take a look at &lt;a href="http://openttdcoop.ppcis.org/wiki/index.php/Basic_Junctions"&gt;this guide&lt;/a&gt; and &lt;a href="http://www.tt-forums.net/viewtopic.php?f=47&amp;amp;t=33550"&gt;this forum post&lt;/a&gt; for some examples. You can do a lot with the three signal types (each having their own algorithms); the routing is the most fascinating part of this game. &lt;a href="http://openttdcoop.ppcis.org/wiki/index.php/Presignal_Bypass_Station"&gt;This experimental station&lt;/a&gt; is an example of the weird things you can express with &lt;a href="http://openttdcoop.ppcis.org/wiki/index.php/Guides:Presignals"&gt;advanced use of pre-signals&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
As OpenTTD adds more features, it opens up new possibilities for layout and routing. &lt;a href="http://wiki.openttd.org/index.php/New_Features_Since_0.5.0"&gt;Coming soon&lt;/a&gt; are building tracks on slopes (allows more compact layouts), new road stations, trams, one-way roads, new airports, new types of cargo, new scheduling options, and &lt;a href="http://wiki.openttd.org/index.php/Path_Based_Signaling"&gt;new signal algorithms&lt;/a&gt;. It's not a game for everyone, but it's definitely a game for me.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2007/11/transport-tycoon.html' title='Transport Tycoon'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=40920925391809740' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/40920925391809740/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/40920925391809740'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/40920925391809740'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-3986402004245095707</id><published>2007-07-30T14:13:00.000-07:00</published><updated>2007-07-30T17:40:12.708-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Interactive illustrations</title><content type='html'>&lt;p&gt;
When I'm taking a class, or reading a textbook, or reading an article, there's &lt;em&gt;text&lt;/em&gt; that explains a topic, and sometimes &lt;em&gt;illustrations&lt;/em&gt; that help visualize the material covered in the text. Sometimes there are &lt;em&gt;diagrams&lt;/em&gt; that show things that are not in the text, and &lt;em&gt;charts&lt;/em&gt; that summarize data sets that are not included in the text. When these materials are put on the web, those illustrations, diagrams, and charts remain as they were in print: they're &lt;strong&gt;static&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
In class I often would wonder what would happen if something was changed. For example, in the programming languages course we saw a program and what would happen on the stack and heap to store data. What happens to the stack if you change the order in which you declare variables? I now know the answer to the question, but it would have been nice if I could somehow walk up to the board, change the program text, and watch the diagram of the stack update itself to reflect the change. Although in small classrooms you might be able to convince the instructor to do this, it's completely impractical in a large class to answer every student's question this way. I can't change things in textbooks or articles either.
&lt;/p&gt;
&lt;p&gt;
But now we have the web. There's the possibility of interacting with the course material. Why don't we see much of this?
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When teaching a subject, you have a set of points you want to illustrate. With an exploratory tool the student may or may not actually reach all the points you want to teach. When those points come up in an exam, the student might not be able to answer all the important questions.
&lt;li&gt;It costs much more to develop interactive material than to develop static material. It's not only the cost of development but also in design.&lt;/li&gt;
&lt;li&gt;Web technology for interactive sites (Javascript, Flash, Java) is still somewhat unpleasant and non-portable. The dominant technologies did not win for being elegant or fast or easy to use; they won for other reasons.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Web pages are still (mostly) written in the style of books and articles. This is understandable. Films were originally in the style of stage plays. It took experimentation to discover the things you can do by changing scenes, camera angles, etc. A century later, filmmakers are still experimenting, and developing new techniques (examples: showing simultaneous scenes, time lapse, bullet time, showing the same scene from different angles at different times). Web authors have experimented with frames, multiple windows, Java applets for computer algorithms, and writing entire web sites in Flash. I think there will be many more decades of experimentation.
&lt;/p&gt;
&lt;p&gt;
For many years now I've been wanting to put interactive illustrations on my site. There are concepts like &lt;a href="http://simblob.blogspot.com/2007/06/distances-on-triangular-grid.html"&gt;distance&lt;/a&gt;, movement, pathfinding (A*), scripting, grids, AI, and simulation that I'd like to illustrate. For example I used a Java applet to demonstrate &lt;a href="http://simblob.blogspot.com/2004/10/road-building-applet.html"&gt;a UI for building roads in simultation games&lt;/a&gt;. However I wasn't happy with it. It was a separate page, not integrated into an article that explained the concepts. Java was heavyweight and tricky to get working across browsers. Several authors have produced standalone A* exploration applets or applications,  but they too weren't integrated into an article. It wasn't until I saw Raigan and Mare's &lt;a href="http://www.harveycartel.org/metanet/tutorials/tutorialA.html"&gt;article about collision detection&lt;/a&gt; that I saw what I wanted. Their article uses static illustrations to demonstrate concepts &lt;em&gt;without using interactivity&lt;/em&gt;, but makes those illustrations interactive to allow the reader to explore on their own. This addresses my concerns about interactive tools not showing the student the important points. They use Flash to implement their illustrations. Flash is so lightweight that at first I didn't realize their illustrations were interactive. There's no “loading” screen and your browser doesn't slow to a crawl. I don't know how the cost of developing them though.
&lt;/p&gt;
&lt;p&gt;
I had mentioned a few months ago that &lt;a href="http://simblob.blogspot.com/2007/04/transportation-mini-game-where-is-it.html"&gt;I haven't been working on my transportation game&lt;/a&gt;. It's true, I haven't. I've continued &lt;a href="http://simblob.blogspot.com/2007/06/learning-flash-9.html"&gt;learning Flash&lt;/a&gt; but I'm working on diagrams for my site instead of a game. So far my experience has been rather positive. Flash has been easier to learn and use than I expected. The raw graphics libraries are nicer than what I had used before (&lt;a href="http://www.pygame.org/"&gt;PyGame&lt;/a&gt;, OpenGL, SVG, and &lt;a href="http://java.sun.com/j2se/1.5.0/docs/guide/2d/index.html"&gt;Java2D&lt;/a&gt;); however, the user interface libraries (buttons, scrollbars, etc.) are worse than those in Java Swing. I especially like that the graphics libraries include things that are useful for illustrations: overlays, translucency, and bevel/glow/shadow effects. For example, you can draw an arrow overlay on top of the illustration without redrawing the illustration itself, or add a glow effect to the object you want the reader to pay attention to. Flash's &lt;a href="http://oddhammer.com/actionscriptperformance/set4/"&gt;performance is reasonable&lt;/a&gt;. The library reference is nice. There's a free command line compiler for people who don't want to use Adobe's fancy IDE. I'm enjoying it.
&lt;/p&gt;
&lt;p&gt;
My first project has been developing a grid library, using the algorithms from my &lt;a href="http://www-cs-students.stanford.edu/~amitp/game-programming/grids/"&gt;grid article&lt;/a&gt; to generate the illustrations on &lt;a href="http://theory.stanford.edu/~amitp/GameProgramming/AStarComparison.html"&gt;this page&lt;/a&gt; and &lt;a href="http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html"&gt;this page&lt;/a&gt;. The most surprising thing for me has been that the 300k of images on those pages could likely be replaced by a 10k Flash file.  So far my Flash program compiles to 6.5k, but it doesn't have a UI that lets you select various algorithms and heuristics, and it also doesn't allow you to draw your own obstacles on the grid.
&lt;/p&gt;
&lt;p&gt;
I'm going to follow the style in Raigan and Mare's collision detection tutorial: using Flash to replace static illustrations, &lt;em&gt;not&lt;/em&gt; to use Flash for the entire site. I'm also keeping the images as fallbacks for people who don't want or use Flash. Since most of the illustrations need to stand alone without user interaction, the fallback technique works well in this context. While working on the A* illustrations, I realized that my A* pages are &lt;a href="http://web.archive.org/web/*/http://theory.stanford.edu/~amitp/GameProgramming/"&gt;nearly ten years old&lt;/a&gt;, and my thoughts on the subject have changed somewhat. I'd like to go back and update them to reflect my new thinking. But first, I'm going to add interactive illustrations.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2007/07/interactive-illustrations.html' title='Interactive illustrations'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=3986402004245095707' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/3986402004245095707/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/3986402004245095707'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/3986402004245095707'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-7396088872194198170</id><published>2007-06-29T07:46:00.000-07:00</published><updated>2007-07-28T10:47:03.089-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='project'/><title type='text'>Learning Flash 9</title><content type='html'>&lt;p&gt;
This week I switched from Flash 8 to Flash 9.
&lt;/p&gt;
&lt;p&gt;
  Since last year I've
  been &lt;a href="http://simblob.blogspot.com/2006/12/learning-flash.html"&gt;playing
  with Flash 8&lt;/a&gt;, using the Motion-Twin command-line
  compiler &lt;code&gt;mtasc&lt;/code&gt;. I was using it to write a &lt;a href="http://simblob.blogspot.com/2007/01/transportation-mini-game-rough-design.html"&gt;transportation game&lt;/a&gt;, and I had something running and was making progress, until Supreme Commander came out. Then I went back to playing games instead of writing them.  Although I'd still like to work on that game, I've found that I also want to use Flash to build interactive demonstrations of concepts I describe on my site. For example, in my &lt;a href="http://www-cs-students.stanford.edu/~amitp/game-programming/grids/"&gt;article about grids&lt;/a&gt; I'd like to make those diagrams interactive so that you can better see how the coordinate systems work. Diagrams are now what I'm using to learn Flash; I may go back to the game later (or maybe not).
&lt;/p&gt;
&lt;p&gt;
  I like &lt;code&gt;mtasc&lt;/code&gt;. However, it only supports Flash 8
  (Actionscript 2), and is not going to be updated for Flash 9
  (Actionscript 3).  It's a dead end.  Flash 9 is not only
  significantly &lt;a href="http://oddhammer.com/actionscriptperformance/set4/"&gt;faster&lt;/a&gt;
  (almost as fast as Java), but it also has major changes to the
  libraries. Instead of &lt;code&gt;mtasc&lt;/code&gt;, you can
  use &lt;a href="http://haxe.org/"&gt;HaXe&lt;/a&gt;, which is a new language
  similar to Actionscript/Javascript/ECMAscript.  HaXe looks neat
  (better types, type inference), but it's a different language, not
  Actionscript. Part of my goal is to publish my source code so that
  others can use it, and it's less useful to publish code that isn't
  usable in Actionscript. It's also less useful to publish code that
  requires an expensive development environment (for example, Flex, at
  $500). And it's easier to learn a language when there are lots of other users, posting tips. So I've been staying with &lt;code&gt;mtasc&lt;/code&gt;; the same code
  works with both &lt;code&gt;mtasc&lt;/code&gt; and the Flash 8 development
  environment.
&lt;/p&gt;
&lt;p&gt;
  Last week &lt;a href="http://blog.richcollins.net/"&gt;Rich Collins&lt;/a&gt;
  pointed me to the free command-line Flash 9
  compiler, &lt;code&gt;mxmlc&lt;/code&gt;. Wonderful! It's free, it's Flash 9,
  it's command line—just what I was looking for. I spent a few days
  learning about Flash 9, and
  found &lt;a href="http://www.senocular.com/flash/tutorials/as3withmxmlc/"&gt;this
  tutorial&lt;/a&gt; and &lt;a href="http://www.kirupa.com/forum/showthread.php?s=54c7bfc3f287e5c768243146fff7f729&amp;amp;t=223798"&gt;these tips&lt;/a&gt; to be most helpful. My initial thoughts:
&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;(&lt;strong&gt;yay&lt;/strong&gt;) Flash 9 has much better libraries than Flash 8. The
  sprites (movieclips), the event handling, and the graphics commands
  are all nicer.&lt;/li&gt;
  &lt;li&gt;(&lt;strong&gt;boo&lt;/strong&gt;) Actionscript 3 is more verbose than Actionscript 2, with
  types, packages, &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;override&lt;/code&gt;, and
  other annotations. It's less of a scripting language and more like
  Java. This is bad.&lt;/li&gt;
  &lt;li&gt;(yay) Flash 9 is much faster than Flash 8, in part thanks to all
  those type annotations.&lt;/li&gt;
  &lt;li&gt;(boo) The &lt;code&gt;mxmlc&lt;/code&gt; compiler is significantly slower
  than &lt;code&gt;mtasc&lt;/code&gt;, in part because it's written in Java, which
  has a high startup time.&lt;/li&gt;
  &lt;li&gt;(boo) The &lt;code&gt;mxmlc&lt;/code&gt; compiler is not open source.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
  I've been converting some of my code from Flash 8 to Flash 9, and
  despite the increased verbosity, I've been happy with it. If you want to use
  Flash 9 with free command-line compiler, start with &lt;a href="http://www.senocular.com/flash/tutorials/as3withmxmlc/"&gt;this
  tutorial&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Update:&lt;/strong&gt; [2007-07-28] You can download the Flash command-line compiler for free, without registration, &lt;a href="http://www.adobe.com/products/flex/downloads/"&gt;from Adobe&lt;/a&gt;. Once I learned the language, the &lt;a href="http://livedocs.adobe.com/flex/201/langref/index.html"&gt;Flash 9 library reference&lt;/a&gt; became my #1 source of information.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2007/06/learning-flash-9.html' title='Learning Flash 9'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=7396088872194198170' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/7396088872194198170/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/7396088872194198170'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/7396088872194198170'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-1173799772830394966</id><published>2007-06-19T14:07:00.001-07:00</published><updated>2007-06-19T17:53:31.349-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='grids'/><category scheme='http://www.blogger.com/atom/ns#' term='triangles'/><category scheme='http://www.blogger.com/atom/ns#' term='math'/><title type='text'>Distances on a triangular grid</title><content type='html'>&lt;p&gt;
As part of
my &lt;a 
href="http://www-cs-students.stanford.edu/~amitp/game-programming/grids/"&gt;article
on grids&lt;/a&gt;, I'd like to provide basic algorithms for grids. I
already know how to compute distances on square and hexagon grids, but
I didn't know how to compute them on a triangle grid. I initially tried changing coordinate systems, inspired by &lt;a href="http://www-cs-students.stanford.edu/~amitp/Articles/Hexagon2.html"&gt;Charles Fu's coordinate system&lt;/a&gt;.  I normally use the coordinate system from my article on grids:
&lt;/p&gt;

&lt;p align="center"&gt;
  &lt;img src="http://www-cs-students.stanford.edu/~amitp/game-programming/grids/triangle-grid-face-coordinates.png" /&gt;
&lt;/p&gt;

&lt;p&gt;
  The first coordinate (which I will call &lt;code&gt;u&lt;/code&gt;) is the
  position along the horizontal axis; the second (which I
  call &lt;code&gt;v&lt;/code&gt;) is the position along the southwest/northeast
  diagonal. The Left/Right parity introduces some compliation; I
  let &lt;code&gt;R&lt;/code&gt; be 1 and &lt;code&gt;L&lt;/code&gt; be 0.  This coordinate
  system is nice for storing maps in an array, but it's not as clean,
  because triangle grids have three axes but only two of them are
  expressed in the coordinates.  For the horizontal axis I
  used &lt;code&gt;2u+R&lt;/code&gt; as the position; for the second axis I
  used &lt;code&gt;2v+R&lt;/code&gt;. I guessed that the position along the third
  axis would &lt;code&gt;u-v&lt;/code&gt;. I drew some grids on paper, wrote down
  the &lt;code&gt;u,v&lt;/code&gt; values, and then computed the three positional
  values. They behave properly for computing distances along the
  third axis, but the system falls apart when computing distances not
  on the three axes.
&lt;/p&gt;

&lt;p&gt;
  Frustrated, I decided to step back and approach this problem in a
  more principled manner. In Charles Fu's three-axis coordinate system, taking
  one step in the grid changes two of the coordinates and leaves the
  third alone. For a triangle grid, the dominating feature is the
  straight lines in three directions. I looked on the web for any articles
  describing distances on triangular grids, but didn't find any that satisfied me. &lt;a href="http://cit.zesoi.fer.hr/downloadPaper.php?paper=435"&gt;This paper&lt;/a&gt; was promising but unfortunately gives an iterative algorithm and not a clean formula. However, it uses an interesting coordinate system, which is useful for computing distances. If you take one step in the
  grid, you will cross exactly one line.  &lt;strong&gt;The distance between
  two locations will be the number of lines you have to
  cross.&lt;/strong&gt; I wanted to use a coordinate system in which
  crossing a line changes a coordinate:
&lt;/p&gt;

&lt;p align="center"&gt;
&lt;a href="http://bp3.blogger.com/_kV9ZnGnZL7M/RnhFtmB3NLI/AAAAAAAAABo/etGBSKpe634/s1600-h/triangle-grid-coordinates.png"&gt;&lt;img  src="http://bp3.blogger.com/_kV9ZnGnZL7M/RnhFtmB3NLI/AAAAAAAAABo/etGBSKpe634/s400/triangle-grid-coordinates.png" border="0" alt="Coordinate system for triangles" /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
  I want to map
  the &lt;code&gt;u,v,R&lt;/code&gt; coordinates I normally use into the alternate coordinate system &lt;code&gt;a,b,c&lt;/code&gt;, where
  exactly one of &lt;code&gt;a,b,c&lt;/code&gt; changes when you cross a
  line. Here's where I decided to use algebra. In &lt;code&gt;u,v,R&lt;/code&gt; space, the black triangle has
  coordinates &lt;code&gt;0,0,0&lt;/code&gt;; the triangle to the east of it has
  coordinates &lt;code&gt;0,0,1&lt;/code&gt;; to the west, &lt;code&gt;-1,0,1&lt;/code&gt;; to
  the south, &lt;code&gt;0,-1,1&lt;/code&gt;. In &lt;code&gt;a,b,c&lt;/code&gt; space, the
  black triangle is &lt;code&gt;0,0,0&lt;/code&gt;; the east triangle
  is &lt;code&gt;0,0,1&lt;/code&gt;; the west triangle is &lt;code&gt;0,-1,0&lt;/code&gt;; and
  the south triangle is &lt;code&gt;-1,0,0&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
  I want a formula that computes &lt;code&gt;a&lt;/code&gt;, and I expect it to be
  linear, so I write &lt;code&gt;a = a&lt;sub&gt;u&lt;/sub&gt;*u + a&lt;sub&gt;v&lt;/sub&gt;*v +
  a&lt;sub&gt;R&lt;/sub&gt;*R + constant&lt;/code&gt;. That's four unknowns, but we know the
  constant will be 0, so it's really three unknowns. To get three
  equations, I plug in the values for the east, west, and south
  triangles, then solve for the coefficients. Let's see what happens:
&lt;/p&gt;

&lt;pre&gt;
  &lt;em&gt;For each s in (a, b, c), and each triangle i:&lt;/em&gt;
  s&lt;sub&gt;i&lt;/sub&gt; = s&lt;sub&gt;u&lt;/sub&gt;*u + s&lt;sub&gt;v&lt;/sub&gt;*v + s&lt;sub&gt;R&lt;/sub&gt;*R

  &lt;em&gt;East triangle:&lt;/em&gt; u,v,R = 0,0,1
  s&lt;sub&gt;1&lt;/sub&gt; = s&lt;sub&gt;u&lt;/sub&gt;*0 + s&lt;sub&gt;v&lt;/sub&gt;*0 + s&lt;sub&gt;R&lt;/sub&gt;*1
  &lt;em&gt;therefore:&lt;/em&gt; s&lt;sub&gt;R&lt;/sub&gt; = s&lt;sub&gt;1&lt;/sub&gt;
  
  &lt;em&gt;West triangle:&lt;/em&gt; u,v,R = -1,0,1
  s&lt;sub&gt;2&lt;/sub&gt; = s&lt;sub&gt;u&lt;/sub&gt;*-1 + s&lt;sub&gt;v&lt;/sub&gt;*0 + s&lt;sub&gt;R&lt;/sub&gt;*1
  &lt;em&gt;therefore:&lt;/em&gt; s&lt;sub&gt;u&lt;/sub&gt; = s&lt;sub&gt;R&lt;/sub&gt; - s&lt;sub&gt;2&lt;/sub&gt;
  
  &lt;em&gt;South triangle:&lt;/em&gt; u,v,R = 0,-1,1
  s&lt;sub&gt;3&lt;/sub&gt; = s&lt;sub&gt;u&lt;/sub&gt;*0 + s&lt;sub&gt;v&lt;/sub&gt;*-1 + s&lt;sub&gt;R&lt;/sub&gt;*1
  &lt;em&gt;therefore:&lt;/em&gt; s&lt;sub&gt;v&lt;/sub&gt; = s&lt;sub&gt;R&lt;/sub&gt; - s&lt;sub&gt;3&lt;/sub&gt;
&lt;/pre&gt;

&lt;p&gt;
  When &lt;code&gt;s&lt;/code&gt; is axis &lt;code&gt;a&lt;/code&gt;, we look
  at &lt;code&gt;a&lt;/code&gt; for triangles 1 (east), 2 (west), and 3 (south),
  so &lt;code&gt;a&lt;sub&gt;1&lt;/sub&gt;&lt;/code&gt; is 0, &lt;code&gt;a&lt;sub&gt;2&lt;/sub&gt;&lt;/code&gt; is 0,
  and &lt;code&gt;a&lt;sub&gt;3&lt;/sub&gt;&lt;/code&gt; is -1.  The algebra tells us
  that &lt;code&gt;a&lt;sub&gt;R&lt;/sub&gt;&lt;/code&gt; = 0, &lt;code&gt;a&lt;sub&gt;u&lt;/sub&gt;&lt;/code&gt; = 0,
  and &lt;code&gt;a&lt;sub&gt;v&lt;/sub&gt;&lt;/code&gt; = 1.  That means the formula
  is &lt;code&gt;a = v&lt;/code&gt;. Pretty simple. Doing the same
  for &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;c&lt;/code&gt;, I get &lt;code&gt;b = u&lt;/code&gt;
  and &lt;code&gt;c = u + v + R&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
  These results are simple enough that if I played with the grid
  enough, I would have come up with them.  However the algebraic
  approach works for other constraints, not only the simple ones. I
  also used it to create a coordinate system with &lt;code&gt;2u+v+R,
  u+2v+R, v-u&lt;/code&gt; (this is 30 degrees rotated from the one above),
  which may be useful for other algorithms. Algebra and calculus also
  come in handy for defining movements (e.g., splines), growth rates,
  equilibria in interacting systems, and other types of interesting
  behaviors in games.
&lt;/p&gt;

&lt;p&gt;
  What is the distance between two locations in a triangular grid?
  Each step involves a line crossing, and we want to count steps, so
  we add up the line crossings along each axis (&lt;code&gt;a, b,
  c&lt;/code&gt;): &lt;code&gt;distance = abs(&amp;Delta;u) + abs(&amp;Delta;v) +
  abs(&amp;Delta;(u+v+R))&lt;/code&gt;. This looks just like the Manhattan distance formula, but for triangles instead of squares.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2007/06/distances-on-triangular-grid.html' title='Distances on a triangular grid'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=1173799772830394966' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/1173799772830394966/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/1173799772830394966'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/1173799772830394966'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-5865351795111716235</id><published>2007-04-14T13:57:00.000-07:00</published><updated>2007-04-14T14:31:01.554-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project'/><title type='text'>Transportation mini-game, where is it?</title><content type='html'>&lt;p&gt;
A few months ago I posted about a &lt;a href="http://simblob.blogspot.com/2007/01/transportation-mini-game-rough-design.html"&gt;transportation mini-game I had started&lt;/a&gt;. What happened to it?
&lt;/p&gt;
&lt;p&gt;
I've been a bit distracted and haven't worked on it much. I did learn some Flash, and posted about &lt;a href="http://simblob.blogspot.com/2006/12/learning-flash.html"&gt;command line tools for Flash&lt;/a&gt;, and then I went to the Game Developer's Conference, which made me think about what kind of game I was working on.
&lt;/p&gt;
&lt;p&gt;
The first comparison that came to mind was &lt;a href="http://en.wikipedia.org/wiki/Lemmings_%28video_game%29"&gt;Lemmings&lt;/a&gt;.  In Lemmings, a stream of lemmings is coming into the world, and your goal is to give a few lemmings a job. Jobs include digging through the ground, floating through the air, building steps, turning other lemmings around, etc. The lemmings with jobs affect how the rest of the lemmings move through the world. In the transportation mini-game, there is a stream of packages coming into the warehouse and your goal is to direct them to their goal. You place objects like conveyor belts to change the flow of packages. As with lemming jobs, there are a variety of objects you can use. However you don't use the packages themselves to do this, and there's no terrain to modify.
&lt;/p&gt;
&lt;p&gt;
More recently I ran across a series of “tower defense” games, in which a stream of monsters is walking by and your goal is to shoot them. Just as there are many types of lemming jobs, there are a variety of guns that you can place on towers. The most interesting of these games is &lt;a href="http://www.handdrawngames.com/DesktopTD/"&gt;Desktop TD&lt;/a&gt;, in which the monsters have to walk around the towers you build. This adds a layer of strategy: &lt;em&gt;where&lt;/em&gt; you place your towers matters a great deal because if affects how the monsters walk around them, and where the monsters walk affects where your towers should be. In &lt;a href="http://www.youtube.com/watch?v=7QdAU4o7NZ4"&gt;this YouTube video&lt;/a&gt;, you can see an example of how you can arrange towers into a maze to force the monsters to take a convoluted path to their goal:
&lt;/p&gt;
&lt;p&gt;
&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/7QdAU4o7NZ4"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/7QdAU4o7NZ4" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/p&gt;
&lt;p&gt;
Desktop TD is a lot of fun. It combines a building game with a shooting game. The monsters have a pathfinding algorithm controlling them, and you have to think about how your buildings will affect the results of that algorithm. You also have to think about different kinds of monsters, different kinds of towers, and whether to upgrade existing towers or build new ones.
&lt;/p&gt;
&lt;/p&gt;
Unfortunately after playing it for &lt;em&gt;many, many hours&lt;/em&gt; it made me less interested in my transportation mini-game. It satisfied my desire to play a game with flowing objects. I'd still like to work on this game but I've been busy with other projects and don't know when I'll get back to it. Maybe someone working on a tower defense clone will incorporate aspects of the transportation mini-game instead, and then I can spend many hours playing their game. &lt;tt&gt;;)&lt;/tt&gt;
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2007/04/transportation-mini-game-where-is-it.html' title='Transportation mini-game, where is it?'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=5865351795111716235' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/5865351795111716235/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/5865351795111716235'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/5865351795111716235'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-6747498608229952630</id><published>2007-03-05T22:42:00.000-08:00</published><updated>2007-03-05T22:57:33.111-08:00</updated><title type='text'>Game Developer's Conference</title><content type='html'>&lt;p&gt;
Despite the talk of GDC 2007 becoming more and more like E3, I'm going to go to GDC this year. I'm interested in the Wii, DS, mobile games, online games, and web games, as well as graphics, music, sound effects, design, algorithms, and storytelling. I'm interested in just about everything but business/legal aspects; I expect that working on games will remain just a hobby for me.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2007/03/game-developers-conference.html' title='Game Developer&apos;s Conference'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=6747498608229952630' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/6747498608229952630/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/6747498608229952630'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/6747498608229952630'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-6227485586194561182</id><published>2007-02-07T21:28:00.000-08:00</published><updated>2007-02-07T23:05:51.966-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>Silverfall Demo</title><content type='html'>&lt;p&gt;
I've been playing the demo of &lt;a href="http://www.silverfall-game.com/en/"&gt;Silverfall&lt;/a&gt; (see the &lt;a href="http://pc.ign.com/objects/791/791205.html"&gt;preview on IGN&lt;/a&gt;). Like Dungeon Siege and Titan Quest, Silverfall reminds me of Diablo 2, which I loved.  It's a role-playing game in which your character goes on quests, fights monsters, collects treasures, upgrade items, learn new skills, etc.  The graphics are great, or would be, if my computer was fast enough. Some of the more interesting things about it:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Graphics&lt;/strong&gt;. The characters are surrounded by a black outline. See &lt;a href="http://media.pc.ign.com/media/791/791205/img_3986018.html"&gt;this screenshot (and others) on IGN&lt;/a&gt;. It reminds me of cartoons, where the outlines help separate the important characters from the backgrounds. It's more than this though. Silverfall's graphics look &lt;em&gt;hand drawn&lt;/em&gt;, at every angle and zoom. I can't figure out how they did this.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Physics&lt;/strong&gt;. It can take advantage of a physics accelerator card. I didn't see much that would benefit from physics though, and it's sort of annoying to have to install a physics library.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;UI&lt;/strong&gt;. The UI is really smooth compared to Dungeon Siege, although not quite as nice as Diablo 2 for reasons I'll list below. The use of the mouse and hotkeys is nice.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Factions&lt;/strong&gt;. The nice twist on this type of game is Nature vs. Technology. When you complete or reject certain quests, you gain favor with either nature or technology (these are diametrically opposed). When your favor with either faction increases, you gain access to better items and skills. Also, in the story your faction becomes stronger, which changes the storyline and the appearance and buildings in the city. A third path is to favor neither side, accepting quests on behalf of both. This gives you more experience from quests, but you no longer have access to the special items from each faction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quests&lt;/strong&gt;. A consequence of the nature vs. technology factions is that some quests will make you worse off. In most RPGs, the more quests you do, the better. But here, the quests can hurt your standing with one of the factions, and you can lose access to items, skills, and further quests. So you need to think about which quests you accept.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Skill Tree&lt;/strong&gt;. Like Guild Wars and unlike Diablo, you can change your skills, at a cost. I think this increases the enjoyment of the game the first time through, because you can try out several approaches without starting over, but it may decrease enjoyment the next time through the game. It's a good tradeoff though, because it helps a large number of casual players at the expense of a small number of dedicated players.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Classes&lt;/strong&gt;. There are races but no character classes. Instead, you can choose your skills to build your own style of character. There are skills for melee, ranged weapons, light magic, dark magic, faction (nature or technology), and your race (human, goblins, trolls, elves). This yields a large set of styles of play. I tried one which combined melee and dark magic, and a different style that combined light magic and nature skills.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
It seems silly, but I think the black outlines and the hand-drawn look of the characters and other objects are a sign of something important. Before 3d accelerator cards, graphics were drawn by programmers and artists, and games had lots of different visual styles. With 3d cards, a certain style supported by the card is cheap, fast, and easy.  All other styles are more expensive, slower, and harder to program.  This has led to a far less diverse set of visual styles. &lt;a href="http://www.gamespot.com/ps2/action/okami/review.html"&gt;Okami&lt;/a&gt; is a rare exception. (Side note: I'm not sure how the Silverfall developers implemented their outlines. At first I thought it'd be a single pass over the buffer to look for differences in Z values, but when you zoom in you can see the outlines are at the vector level, not the pixel level, so it's possibly a shader that looks for normals perpendicular to the screen. And I have no clue how they made everything look hand-drawn.)  In old-style art, &lt;em&gt;it was easy to identify objects&lt;/em&gt;. You could tell what was clickable, what was a button, where a person was, etc. Artists weren't looking for realism. They wanted to express concepts and emotions and ideas in game art. Newer games tend to be cluttered. Just look at how much harder it is to see all the objects in &lt;a href="http://en.wikipedia.org/wiki/Image:Sims2_photo.png"&gt;The Sims 2&lt;/a&gt; vs. &lt;a href="http://en.wikipedia.org/wiki/Image:TheSims.jpg"&gt;The Sims 1&lt;/a&gt;.  Newer games are &lt;a href="http://www.scottmccloud.com/inventions/triangle/triangle.html"&gt;more realistic, but less artistic&lt;/a&gt;.  The harder it is to see what's on the screen, the more effort the player makes in &lt;em&gt;seeing&lt;/em&gt; things, and the less effort the player can make in &lt;em&gt;deciding&lt;/em&gt; things. Although there are games like Quake and Halo where much of the challenge really is in seeing things, I don't think RPG and strategy games fall into that category. I like games where the challenge isn't in seeing the objects on the screen, but in deciding what to do. I hope the shaders in graphics cards enable game developers to explore more visual styles.
&lt;/p&gt;
&lt;p&gt;
Since I'm on the subject of displaying information for players, there are several things that Silverfall seemed to get wrong:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Camera rotation&lt;/strong&gt;. I spent &lt;em&gt;way&lt;/em&gt; too much time rotating the camera in Silverfall (and Dungeon Siege). I spent no time doing this in Diablo. Does rotating the camera add to the game? &lt;strong&gt;No&lt;/strong&gt;, I don't think it does. Yes, it's “cool” and people seem to expect it, but it didn't make the game better. In fact, it made it worse.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Zoom&lt;/strong&gt;. You can zoom in to see your character close up. The character looks really nice when zoomed in. But this mode is useless when actually playing the game. For playing, you want to be zoomed out as much as possible. (In fact I'd like to zoom out even farther than Silverfall allows.) This means that all the effort to make the zoomed-in camera work (for example, distant objects, level-of-detail terrain, and expensive high-resolution texture art) is a waste. Unfortunately you need some of this to put on the box so people will buy your game. But it's a big waste.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Loading zones&lt;/strong&gt;. When you travel from one zone to another, the game stops and loads the next zone. That's a minor annoyance. The big problem is that &lt;em&gt;all your spells are cancelled&lt;/em&gt;.  Techniques for &lt;a href="http://www.drizzle.com/~scottb/gdc/continuous-world.htm"&gt;avoiding loading screens are well-known&lt;/a&gt;. I don't mind if there's loading when you enter a tunnel or cave or dungeon. It's when you see arbitrary boundaries unrelated to the game that it becomes annoying.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Terrain&lt;/strong&gt;. The demo takes place in a swampy region. The terrain is very bumpy. It looks like it was randomly generated (maybe Perlin noise?). The small problem is that the random-looking terrain adds nothing to the gameplay. It just gets in the way. The &lt;em&gt;big&lt;/em&gt; problem is that the slopes that are walkable and the slopes that are not at &lt;em&gt;not distinguished in any way&lt;/em&gt;, except by clicking and finding that your character doesn't move. At the very least the cursor should change color or shape to indicate that some area isn't accessible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Map&lt;/strong&gt;. This is actually a complaint about lots of games. If I were Indiana Jones and I had to go to 3 places to collect artifacts, &lt;strong&gt;I'm going to mark those 3 places on my map&lt;/strong&gt;.  Far too many games have a notion of an “active” quest, and only show that &lt;em&gt;one&lt;/em&gt; place on the map.  &lt;strong&gt;No!&lt;/strong&gt;  Make the map work like I would actually use it.  Show me &lt;em&gt;all&lt;/em&gt; the important places I need to keep track of.  Let me add markers. Let me add notes. Let me draw lines. Don't make me keep a second map on paper because your map is so lame.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quest Listing&lt;/strong&gt;. There are some bugs in the Silverfall quest list, which I'm sure they'll fix before release. For example, it doesn't remember where you were the last time you brought up the list. A bigger problem though is that the quests do not keep track of who assigned the quest (and where). I found myself often re-reading quest descriptions, trying to guess who would have assigned such a quest. Some of them are on the map and some are not. Some of them trigger the rewards automatically and some do not. It's a mess. Just as with maps, the quest listing should match what I would do on paper. I would keep track of who gave the quest, where I need to go, and what the potential rewards are (especially related to faction). I would allow adding notes, assigning priorities, and sorting the list. For example, there was one quest I received that I was not ready to do. I'd like to move it to the end or otherwise mark it as “later” so that it doesn't clutter up the list of active quests I want to work on. And if the map shows all quests, it should also use different markers for active and postponed quests.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Trees&lt;/strong&gt;. I've saved my biggest complaint for last. The graphics in Silverfall are great. I admit that. The problem is that the swampy area has lots of trees. In the default zoomed-out view, the canopy of trees blocks your view. So the game very helpfully hides the leaves. In addition, tree trunks block your view. So the game very helpfully hides the trees near your character. But tree trunks still &lt;em&gt;block your attacks&lt;/em&gt;. So you now have a completely mysterious and maddening situation in which &lt;em&gt;invisible objects block your attacks&lt;/em&gt;. Your attacks are blocked and you can't see why. This is truly bad. Just get rid of all the trees. They don't add anything to the game. Alternatively, since it's unlikely the developers will do that at this point, just let me walk and attack through the trees.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I really liked the demo of Silverfall.  It's really promising and it could be lots of fun, except there are some little (easily fixed) things that really detract from the experience.  Even with the flaws, the demo was more fun than most other games I've tried. I hope the developers read this post and fix these problems before release. (Oh, and if you're reading this: lose the cheesy box cover art.)
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2007/02/silverfall-demo.html' title='Silverfall Demo'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=6227485586194561182' title='6 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/6227485586194561182/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/6227485586194561182'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/6227485586194561182'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-5818937576685185715</id><published>2007-01-02T14:31:00.000-08:00</published><updated>2007-01-02T15:42:17.306-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project'/><title type='text'>Transportation mini-game, rough design</title><content type='html'>&lt;p&gt;
About a year ago I decided to &lt;a href="http://simblob.blogspot.com/2006/02/change-of-direction.html"&gt;stop working on Simblob&lt;/a&gt;, and started working on a &lt;a href="http://simblob.blogspot.com/2006/02/rough-sketch-for-transportation-game.html"&gt;transportation game&lt;/a&gt; (more about the design &lt;a href="http://simblob.blogspot.com/2006/02/transportation-game-basic-objects.html"&gt;here&lt;/a&gt; and &lt;a href="http://simblob.blogspot.com/2006/03/transportation-game-models.html"&gt;here&lt;/a&gt;).  My progress has been rather slow, in part because I keep playing other games instead of writing one.
&lt;/p&gt;
&lt;p&gt;
One of the components of the transportation game is the &lt;strong&gt;Warehouse&lt;/strong&gt;.  If you view your transportation network as a graph, the Warehouse is an internal node, the Supplies and Sinks are the endpoints, and the transport types (trucks, ships, trains) are the links.  The Warehouse is a key component of your transportation system.  Goods come in and goods go out.  Sometimes goods are stored, repackaged, relabeled, inspected, and assembled.  In the network, Warehouses can be used as:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Buffers&lt;/strong&gt;.  Goods come in, a stored for a time, and then go out.  The time the goods are supplied is earlier than the time they are needed.  For example, it may take several months to produce the toys that will be bought in the Christmas shopping season; those toys need to be stored somewhere until shoppers are ready to buy them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Switches&lt;/strong&gt;.  Goods come in from several sources and go out to several sources.  For example, a grocery store chain may have supplies coming in from farms, ranches, orchards, etc., and may have those same goods go out to several neighborhood stores.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Caches&lt;/strong&gt;.  Goods aren't needed all the time, and their demand is unpredictable, but when the demand is there, the customers want the goods right away.  The solution is to keep some near the customers, so that when they need some, they can get it quickly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transformer&lt;/strong&gt;.  Goods arrive in one condition but leave in a better condition.  For example, a Warehouse may add tracking, labeling, and pricing information to the goods before sending them on to stores.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiplexing&lt;/strong&gt;.  Goods arrive in large shipments from suppliers, but each store needs a small amount of each good.  The Warehouse can repackage the goods into smaller units.  For example, an electronics retailer may receive a truck full of VCRs, a truck full of TVs, and a truck full of speakers, and the Warehouse can reshuffle these into three trucks, each with VCRs, TVs, and speakers.  That way only one truck has to be sent to each retail store.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Warehouses are an interesting enough part of this game that I decided to try making a mini-game out of them.
&lt;/p&gt;
&lt;p&gt;
In the mini-game, the goals (switching, multiplexing, etc.) are given to you, and your job is to design the warehouse to meet those goals.  Goods come in from the left and exit on the right.  There are multiple types of goods, each represented by a color (or shape).  Your job is to get the goods from the left to the right, while achieving your goals.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://bp1.blogger.com/_kV9ZnGnZL7M/RZrhG85201I/AAAAAAAAAAM/j-FznWxD_1c/s1600-h/crossboxx-sketch-1.jpg"&gt;&lt;img  src="http://bp1.blogger.com/_kV9ZnGnZL7M/RZrhG85201I/AAAAAAAAAAM/j-FznWxD_1c/s800/crossboxx-sketch-1.jpg" alt="&amp;quot;napkin&amp;quot; sketch of warehouse mini-game" style="border:1px dashed gray" id="BLOGGER_PHOTO_ID_5015568644574729042" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The warehouse is laid out on a grid.  The basic component is a conveyor belt, which takes up 1 grid space.  The conveyor belt pieces are linked into a chain that defines the flow of goods through the warehouse.  What makes the game interesting (I hope) is the special pieces you can add to the conveyor belt.  A &lt;em&gt;color filter&lt;/em&gt; only allows a certain color to pass.  With it you can separate a mixed flow into separate products.  Similarly, a &lt;em&gt;shape filter&lt;/em&gt; only allows a certain shape to pass (I may end up combining shape and color filters into one).  A &lt;em&gt;counter filter&lt;/em&gt; has a counter, and only allows an object to pass when the counter reaches a particular value.  For example, a 3-counter filter will allow every third object to pass.  These filters are used to separate a stream of objects into smaller streams.  Note that a 1-counter is the same as a regular conveyor belt; it filters nothing.  A &lt;em&gt;mixer&lt;/em&gt; mixes objects from multiple streams, in some proportion.  For example, a mixer can be set to take 1 green circle and 2 purple triangles, and the resulting stream will have twice as many purple triangles as green circles.  A &lt;em&gt;packer&lt;/em&gt; takes multiple objects and packs them into a single object of a different type; an &lt;em&gt;unpacker&lt;/em&gt; takes a single object and unpacks it into multiple objects.  A &lt;em&gt;carousel&lt;/em&gt; stores objects, up to its capacity, until the output stream(s) have space for unloading objects.  It can be used to even out a highly variable flow.  There are more objects I can imagine: shelves, aisles, employees, forklifts, labelers, inventory trackers, etc.
&lt;/p&gt;
&lt;p&gt;
The game involves a series of levels of increasing difficulty.  Each level has a grid, some supplies, some demands, some parts to use to construct the conveyor belt network, and some goals to meet.  The grid may have objects on it already, which cannot be moved.
&lt;/p&gt;
&lt;p&gt;
At each time step, all goods (objects) move one space, according to the rules of flow:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The conveyor belt defines the directions the object can move.&lt;/li&gt;
&lt;li&gt;An object cannot move in the direction of an incompatible filter.&lt;/li&gt;
&lt;li&gt;An object cannot move to a spot that has an object, unless that object is about to move.&lt;/li&gt;
&lt;li&gt;Of all directions available to move, the object chooses one at random.&lt;/li&gt;
&lt;li&gt;If a box cannot move, it sits still. If it sits still too long, it breaks.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
If you think about these rules hard enough, you'll see that they may be difficult to implement.  In particular, rule #3 says that an object can move if another object can move.  And that object too may be subject to this rule, leading to an entire chain of dependencies that have to be solved.  I have an algorithm partially designed but I'm not yet convinced my algorithm will work; if it does not, I'll revise the rules.
&lt;/p&gt;
&lt;p&gt;
The puzzles I'm less sure about, but here's what I've been thinking about:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Slow packers&lt;/strong&gt;. Split the incoming supplies into several streams so that you can have several packers handling them, then coming the streams into one.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Irregular supplies&lt;/strong&gt;. Demand is steady. Build a large buffer so that you can handle supplies being late.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiplexing&lt;/strong&gt;. As described in the electronics retailer example, suppliers send large shipments of a single product type. Build buffers so that you'll have enough of each product type. Unpack the large supplies into small ones, mix the goods together, pack them into shipments that get sent to retailers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bad supply&lt;/strong&gt;. Some of the incoming goods are faulty. The supplier will lower quality as much as he can get away with. It's too expensive to check everything, but if you check nothing, the quality will keep going down. Check some of the goods to keep quality high enough to satisfy customers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Time, quantity, quality, costs, and profit can all be part of the goals.  For example, incoming goods might cost $4/box, and outgoing goods might bring in $5/box.  Each box you send through the system gives you $1 in profit.  If a box breaks (due to sitting on the conveyor belt for too long), you lose the $4.  You might be willing to have a less reliable system to keep costs down, or you may want to make it more reliable to minimize losses.
&lt;/p&gt;
&lt;p&gt;
At this point the design is only on paper.  I plan to create a prototype soon to try to judge how fun or interesting the game might be.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2007/01/transportation-mini-game-rough-design.html' title='Transportation mini-game, rough design'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=5818937576685185715' title='8 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/5818937576685185715/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/5818937576685185715'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/5818937576685185715'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-4386333476435439925</id><published>2006-12-31T16:17:00.000-08:00</published><updated>2006-12-31T16:29:02.312-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Choosing algorithms</title><content type='html'>&lt;p&gt;
Game developers can't always find their algorithms in an algorithms textbook.  Academic algorithms tend to be general purpose and often aren't the best choice for games.  For example, compare &lt;a href="http://www.cambridgeincolour.com/tutorials/image-interpolation.htm"&gt;textbook image scaling algorithms&lt;/a&gt; to &lt;a href="http://www.hiend3d.com/hq4x.html"&gt;hq4x&lt;/a&gt;.  Hq4x is very impressive!  How could the textbooks have missed it?  It's because it's not &lt;em&gt;general purpose&lt;/em&gt;.  It is designed to work on hand-drawn low-color sprite graphics in games, whereas the textbook algorithms work on all sorts of images.  Another example is path-finding algorithms.  Dijkstra's algorithm is a general-purpose algorithm; A* came out of AI research (which is slightly closer to game programming) and is a little more specialized. But there are plenty of techniques used in games that aren't found in the textbooks. They take advantage of game-specific knowledge: the structure of maps, the characteristics of moving units, etc.
&lt;/p&gt;
&lt;p&gt;
The general purpose algorithms are a good place to start but don't limit yourself to them. There might be a specialized algorithm that works better for your problem, or it may be worth the effort to design your own algorithm.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/12/choosing-algorithms.html' title='Choosing algorithms'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=4386333476435439925' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/4386333476435439925/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/4386333476435439925'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/4386333476435439925'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-6242262591549338671</id><published>2006-12-25T23:15:00.000-08:00</published><updated>2006-12-26T13:58:43.375-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>Water in strategy games</title><content type='html'>&lt;p&gt;
In just about every city-building strategy game out there, water is static. It doesn't flow; it doesn't affect much; it doesn't change with seasons; and you can't change it.  In 1994, I started the &lt;a href="http://www-cs-students.stanford.edu/~amitp/games.html"&gt;Simblob project&lt;/a&gt; to experiment with water flow in games, among other things.  You could build canals and dams and dikes, divert waterways, and flood the opponent's cities.  Well, you would've been able to if I had ever gotten around to implementing the opponent. The problem was that playing with water was &lt;em&gt;way too much fun!&lt;/em&gt;  I implemented heavy rains, droughts, floods, sedimentation, and erosion.  Playing the game was lots of fun too, even though there was very little “game” actually implemented.  In the end all I had done was work on graphics and water simulation, and I decided to stop working on it and start something else.
&lt;/p&gt;
&lt;div style="float:right;width:370px;height:370px;margin:1em"&gt;
&lt;img width="350" height="350" src="http://www-cs-students.stanford.edu/~amitp/simblob/blob-game-rivers.png" /&gt;
&lt;/div&gt;
&lt;p&gt;
I still think water simulation has enormous potential for a strategy game. Imagine diverting your opponent's main source of water, so his crops fail and his people revolt. Or an enemy operative damaging your main dam, and you scrambling to repair it before it breaks, destroying your cities. Water is incredibly important in real cities, and it should be important in building-based strategy games.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.playten.com/eng/development.php?page=49&amp;amp;view=18"&gt;Battle for Atlantis&lt;/a&gt; is a strategy game coming out in 2007 that has water simulation. Here's a quote from their web site:
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
For the first time in the history of RTS, a full physical model of water space will be created. The water has stopped being a “dead area” – a non-interactive flat mirror good only ship sailing. Real waves and tsunamis, flood and destruction of the landscape by water, river flows and waterfalls, splendid underwater effects – all this gives an enormous scope of creation and makes the game world of Atlantis as real as never before.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
It sounds promising!  &lt;a href="http://www.3dgamers.com/screenshots/games/dayatlantis/"&gt;3dgamers&lt;/a&gt; has some screenshots.  I just hope the water simulation is used more for gameplay than for graphical effects.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/12/water-in-strategy-games.html' title='Water in strategy games'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=6242262591549338671' title='4 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/6242262591549338671/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/6242262591549338671'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/6242262591549338671'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-895202213115177700</id><published>2006-12-24T11:01:00.000-08:00</published><updated>2007-06-29T08:35:34.672-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='project'/><title type='text'>Learning Flash 8</title><content type='html'>&lt;p&gt;
Back in 2004, &lt;a href="http://simblob.blogspot.com/2004/10/web-languages-flash.html"&gt;I attempted to learn Flash programming, but failed to find free tools&lt;/a&gt;, and ended up &lt;a href="http://simblob.blogspot.com/2004/10/road-building-applet.html"&gt;writing Java applets instead&lt;/a&gt;.  I was &lt;a href="http://simblob.blogspot.com/2004/10/web-languages-java.html"&gt;unhappy with Java&lt;/a&gt; for a number of reasons, but the main one was that Java applets are clunky on web pages compared to Flash objects, and as a result more people have Flash than Java.  A few months ago &lt;a href="http://troygilbert.com/"&gt;Troy Gilbert&lt;/a&gt; pointed me at &lt;a href="http://osflash.org/"&gt;OSFlash.org&lt;/a&gt;, which has a list of open source Flash development tools (thanks Troy!).  I eventually found the free and fast &lt;a href="http://www.mtasc.org/"&gt;Motion-Twin ActionScript compiler&lt;/a&gt; (&lt;code&gt;mtasc&lt;/code&gt;), but had a lot of trouble using it.  The tutorials I found on the web for Flash development assume you're using the Macromedia development environment, which I'm not, so they weren't much help. I finally figured out what I was doing wrong.
&lt;/p&gt;
&lt;p&gt;
I'm used to a certain development model: you write a program, (optionally) compile it, then run it. This might be considered “old school” by people writing Windows and Mac apps.  When writing Windows and Mac apps, you put the source code with various resources (icons, graphics, music, dialog boxes, etc.) into a “project”, which gets compiled into an executable.  In the “old” style of development (used for C++, Java, Python, Perl, Basic, Ruby, etc.), your program reads in resources after you run it. That's how I've been writing my games.  Flash seems to follow the “new” style of development, in which lots of resources, not only source code, get combined into one package.
&lt;/p&gt;
&lt;p&gt;
The open source &lt;code&gt;mtasc&lt;/code&gt; compiler only compiles Flash (ActionScript) source code. It does not handle the resources that have to be assembled into a compiled Flash file (SWF). The &lt;code&gt;mtasc&lt;/code&gt; tool will compile your source code and update a SWF file with the compiled code, but you can't use &lt;code&gt;mtasc&lt;/code&gt; to create SWF files; they have to exist already.  For that, you normally use the (commercial) Flash development environment from Macromedia. If you want to fully work in an open source world, you need another way to assemble resources. The &lt;a href="http://swfmill.org/"&gt;&lt;code&gt;swfmill&lt;/code&gt;&lt;/a&gt; tool can do this: it converts an XML file listing resources into a SWF file. With &lt;code&gt;swfmill&lt;/code&gt; my toolset is complete.
&lt;/p&gt;
&lt;p&gt;
The other thing that's confusing (for me) about Flash development is that it seems to be designed around movies, and every Flash program has a “frame rate”, even if it's not a movie. For now I'm ignoring this and just setting a low frame rate.
&lt;/p&gt;
&lt;p&gt;
The summary of what I've learned so far about open source Flash development:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create an XML file that describes the resources you need. I'm using the example XML file in &lt;a href="http://swfmill.org/doc/using-swfmill.html"&gt;Mark Winterhalder's well-written tutorial&lt;/a&gt; on the &lt;code&gt;swfmill&lt;/code&gt; site:
&lt;pre class=snippet&gt;
&amp;lt;?xml version="1.0" encoding="iso-8859-1" ?&amp;gt;

&amp;lt;movie width="320" height="240" framerate="12"&amp;gt;
  &amp;lt;background color="#ffffff"/&amp;gt;
  &amp;lt;frame/&amp;gt;
&amp;lt;/movie&amp;gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Compile the XML file into an SWF file:
&lt;pre class=snippet&gt;
swfmill simple example.xml example.swf
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Create an ActionScript file with your script. I'm using an example I found on the &lt;code&gt;mtasc&lt;/code&gt; site:
&lt;pre class=snippet&gt;
class prototypes {
    static var app : prototypes;

    function prototypes() {
        // creates a 'tf' TextField size 320,200 at pos 0,0
        _root.createTextField("tf",0,0,0,320,200);
        // write some text into it
        _root.tf.text = "Hello world !";
    }

    static function main(mc) {
        app = new prototypes();
    }
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Compile the ActionScript into your existing SWF file, using the &lt;kbd&gt;-main&lt;/kbd&gt; flag to have it automatically call the &lt;code&gt;main()&lt;/code&gt; function:
&lt;pre class=snippet&gt;
mtasc example.as -swf example.swf -main
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Embed the SWF into a web page using the &lt;kbd&gt;&amp;lt;embed&amp;gt;&lt;/kbd&gt; tag, as described on the &lt;a href="http://haxe.org/tutos/start/flash"&gt;haXe&lt;/a&gt; site:
&lt;pre class=snippet&gt;
&amp;lt;html&amp;gt;
&amp;lt;body bgcolor="#cccccc"&amp;gt;
&amp;lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
  width="320" height="200" id="test"&amp;gt;
&amp;lt;param name="movie" value="example.swf" /&amp;gt;
&amp;lt;embed src="example.swf" width="320" height="200" 
  name="test" type="application/x-shockwave-flash"
  pluginspage="http://www.macromedia.com/go/getflashplayer"
/&amp;gt;
&amp;lt;/object&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;See the results in a browser. Hooray!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
For me, getting started is the hardest step. Once I have something running, development becomes easier. Now that I have a Flash program running, my next steps are to set up my development environment, then learn about the Flash libraries. I've been wanting to learn Flash programming for a long time, but I kept getting stuck. I'm quite glad I finally put the pieces together, and I hope the above description helps others get started.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/12/learning-flash.html' title='Learning Flash 8'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=895202213115177700' title='10 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/895202213115177700/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/895202213115177700'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/895202213115177700'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-6842169742105839101</id><published>2006-12-17T22:35:00.001-08:00</published><updated>2006-12-17T22:35:29.287-08:00</updated><title type='text'>Software pricing</title><content type='html'>&lt;p&gt;
(Warning: this post doesn't have a point; it's just me thinking aloud.)
&lt;/p&gt;
&lt;p&gt;
Most products have some fixed costs and some marginal costs of production. The fixed cost would be the factory; the marginal cost would be the labor, materials, transportation, packaging, marketing, etc.  The price of the product usually starts out high, and competition brings it down over time to be close to the marginal cost (at least according to economic theory). 
&lt;/p&gt;
&lt;p&gt;
Creative products like music, novels, and movies typically have high fixed costs and low marginal costs.  As technology has improved, the marginal cost of music, novels, and movies has gone down close to zero, and we now have a great deal of piracy.  Software is similar to music, novels, and music, except that the marginal cost has been close to zero for a very long time, and the software industry has had to deal with the problem of piracy for longer.  Economic theory suggests with good competition, the price of these products should eventually go down close to the marginal cost.  For all of these products, the sellers have tied the product you really want (for example, a song) to something physical (a CD), and the physical object has a non-zero marginal cost.  However, with electronic distribution, people want the music without paying for the CD, the movie without a DVD, a novel without a book, and software without the installation CDs and manuals.  The marginal cost of distribution is close to zero, so in theory, the price should eventually get to zero.
&lt;/p&gt;
&lt;p&gt;
The open source community sometimes argues that the price of software should be zero (to match the marginal cost), and that developers can earn money selling services and support.  There's a major problem with this: the incentives are completely messed up. If a developer makes more money when more support is needed, there's an incentive to make the product require more support. Products will end up harder to use and contain less documentation.  There's also no strong incentive to offer new features for free, because you're not getting paid for new versions of the software.
&lt;/p&gt;
&lt;p&gt;
With MMORPGs we're seeing a lot of experimentation with software pricing. This is possible because the software is virtually useless without connecting to the service. World of Warcraft charges for the software plus for the service. They crack down on people who want to offer their own service (alternate free servers) because they make most of their money from the service they offer, and don't want competition. World of Warcraft also charges for expansions (which are rare). With Guild Wars the software is free (you can download it from their site for free), but &lt;em&gt;access&lt;/em&gt; to different services (areas of the world) costs a fixed fee. Those services do not carry a monthly fee. With ArchLord the software costs money but there's no monthly fee. Second Life (which isn't technically a game) makes money both by renting areas of the virtual world and by selling virtual currency, which you can use to buy in-game goods and services. Games can also make money by selling in-game items, upgrades, status, etc. MMORPGs can tie the game to the service, and then charge for the service. However they are not making their software open source, because they do not want competitors to create compatible services.
&lt;/p&gt;
&lt;p&gt;
Most games however do not have the option of charging for services, and it is difficult to charge for support in a consumer-level product (consumers get angry and feel that they deserve free support). So game developers are stuck with piracy, just like makers of music and movies. We want to recover the high fixed cost of developing the product, so we charge for the software, even though the marginal cost is close to zero. Consumers are more willing to buy software that comes in a physical package, so we include a box, installation CD, a manual, etc., all of which reduces sales and profits. Alas.
&lt;/p&gt;
&lt;p&gt;
There is one more thing we might want to explore. Music, games, movies, etc., are all emotional experiences, and they're &lt;em&gt;worth more to people&lt;/em&gt; when the emotions are greater. One way this works with music is to use concerts, association with movies or TV shows, branded products associated with the band, and other sorts of tie-ins. With movies, the same movie is worth more when people go watch it together at the theatre than when they watch it alone years later on network TV. A novel is more valuable when your reading club is reading it right now and you want to participate in their discussions. These products are more valuable &lt;em&gt;at certain times&lt;/em&gt; than at others. Watching a TV show the night it airs is more valuable because I can talk to my friends about it; watching it later (with TiVo) is less valuable. What can we do with games? I think the fan sites are a big help. Frequent updates and developer involvement in forums can help too. The Movies let users upload their creations (not their games) to the site. The Sims lets you download objects created by others. Even in a single player game, you can offer something that lets people connect to each other. When they're sharing an experience, it will have more emotional value. And that is something that could reduce piracy—you're not just buying a game; you're buying access to a community.
&lt;/p&gt;
&lt;p&gt;
I think piracy will always be with us, but I think the open source model is unlikely to work for games. Charging for support gives a perverse incentives to developers to make things work badly or confusingly. Charging for service might work for some types of games, and the MMORPG developers seem to be exploring the options. I think the way to approach the problem is what many game developers already do partially without realizing it: offer multiple experiences at different prices. Offer a free demo that has a substantial part of the game and no support; this matches the marginal cost of the software alone. Offer the full version without annoying copy protection (why do so many developers make their paying customers get a worse game than the pirates get??). Make a ”special edition” that appeals to the least price sensitive and most rabid fans. Offer special products (t-shirts, trinkets, etc.) that tie in to the game. Make a community site that people actually like (so that they don't go to other sites for the information they want), and make all or some of it open only to people who bought the game. Make sure the developers are involved with the community site. Change the model from selling software to selling enjoyment. Look at other businesses that do this (amusement parks, movie theatres); they sell the basic product at a lower cost and then sell extras (such as food and drinks) for a much higher price than the marginal cost of those extras.  Price-sensitive customers get annoyed by this, but it works for the business because they're not just paying for a drink; they're paying extra for the enjoyment of the drink in that location.
&lt;/p&gt;
&lt;p&gt;
We need to consider the entire experience of playing a game, not only the software, as a potential source of revenue, and then figure out how to best recover the high fixed costs of making the game, and also allow for a low marginal price so that we can get a large audience. We need to consider that games don't need to be played in isolation; people talking about a game with their friends or even with strangers can add to the experience. We need to consider that different people are willing to pay different amounts for the experience. It's the entire experience we're selling, not just a box with software.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/12/software-pricing.html' title='Software pricing'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=6842169742105839101' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/6842169742105839101/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/6842169742105839101'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/6842169742105839101'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-696179770773403605</id><published>2006-12-16T18:40:00.000-08:00</published><updated>2006-12-16T20:15:14.053-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Rules of Algebra fail with floats</title><content type='html'>&lt;p&gt;
One thing to be careful about when programming games is relying on the rules of algebra.  Simple laws like the Associative Law and Distributive Law don't always work when using floating point numbers.  I'll give some Python code to demonstrate, but these problems are with floats, not with Python.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Distributive Law&lt;/strong&gt;. We've been taught that &lt;kbd&gt;a * (b + c) == (a * b) + (a * c)&lt;/kbd&gt;.
&lt;pre class=snippet&gt;
a, b, c = 0.111, 0.201, 0.305
s1 = a * (b + c)
s2 = (a * b) + (a * c)
print '%.08f - %.08f = %.08f' % (s1, s2, s1 - s2)
print '  equal? %s' % (s1 == s2)
&lt;/pre&gt;
&lt;p&gt;
These are the results:
&lt;/p&gt;
&lt;pre&gt;
0.05616600 - 0.05616600 = -0.00000000
  equal? False
&lt;/pre&gt;
&lt;p&gt;
The difference looks like 0, but it's not. The two sums are not equal. To see the problem, change the format specifier &lt;code&gt;%.08f&lt;/code&gt; to &lt;code&gt;%g&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Associative Law&lt;/strong&gt;. We've been taught that &lt;kbd&gt;a + (b + c) == (a + b) + c&lt;/kbd&gt;.  When some of those are negative and some are positive (and occasionally even when they're all positive), the results won't be the same.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Additive Inverse&lt;/strong&gt;. We've been taught that &lt;kbd&gt;a + b - b == a&lt;/kbd&gt;.
&lt;pre class=snippet&gt;
a = 1e-30
b = 1e+30
print a, a + b - b, (a + b - b) == a
&lt;/pre&gt;
&lt;p&gt;
The result is that &lt;kbd&gt;(a + b - b) != a&lt;/kbd&gt;. You can look at this example as a special case of the Associative Law.
&lt;/p&gt;
&lt;/ul&gt;
&lt;p&gt;
To some of you these problems will seem obvious and not a big deal for most applications. Why do I bring it up in this blog? Loss of precision can open up exploits in multiplayer games. Let's consider a game in which you can trade with someone else, and the total amount of money is represented as a float. If player A has a large amount of money &lt;kbd&gt;a&lt;/kbd&gt;, he may be able to send a very small amount &lt;kbd&gt;x&lt;/kbd&gt; to B (who has &lt;kbd&gt;b&lt;/kbd&gt;) without it affecting his own amount. We can have &lt;kbd&gt;a + b &amp;lt; (a - x) + (b + x)&lt;/kbd&gt;, which means this exploit creates new money out of nowhere.
&lt;/p&gt;
&lt;p&gt;
If you're using floating point numbers, be sure to use double precision.  Alternatively, use integers or fixed point arithmetic to avoid some of these issues. If you do a lot of math in your game, be sure to learn about numerical programming. There are a &lt;em&gt;lot&lt;/em&gt; more issues than the simple ones I describe here.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/12/rules-of-algebra-fail-with-floats.html' title='Rules of Algebra fail with floats'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=696179770773403605' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/696179770773403605/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/696179770773403605'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/696179770773403605'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-116397526196133788</id><published>2006-11-19T14:26:00.000-08:00</published><updated>2006-11-19T14:27:41.976-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Using oscillation to speed learning</title><content type='html'>&lt;p&gt;
I've been reading &lt;a href="http://faculty.ed.uiuc.edu/g-cziko/wm/"&gt;Without Miracles&lt;/a&gt;. I had just read about children learning labels. The example was a child looking at a bird and then being told it was called a "bird", then looking at a different bird and being told it was a "bird". The child then has to generalize and consider that other small flying creatures are likely to be "birds" as well. However, upon seeing a butterfly and being told it was not a bird, the child then has to refine his understanding of what a "bird" is.
&lt;/p&gt;
&lt;p&gt;
This form of learning, with overgeneralization followed by correction, may well be faster than undergeneralizing. For example, what would happen if the child only believed the two creatures he saw were birds, and did not label other small flying creatures as birds until explicitly told they were birds?  He'd learn slower.
&lt;/p&gt;
&lt;p&gt;
I was at the beach, looking at tide pools, when I realized there's a similarity to the child's learning. Rivers flow in one direction (usually) and have a certain amount of life in them. Beaches have water flowing in both directions, due to waves (short time scale), tides (medium time scale), and seasons (long time scale). The diversity of life in tide pools is far greater than what I've seen in rivers. 
&lt;/p&gt;
&lt;p&gt;
In the case of the child's learning, generalization (classifying everything as a bird) is one direction and correction (being told that some creatures previously thought to be birds are not) is the other direction.  Could it be that &lt;strong&gt;oscillation&lt;/strong&gt; leads to faster "learning" than a steady stream?
&lt;/p&gt;
&lt;p&gt;
The advantage of learning and then correcting mistakes is that you can learn faster than if you were learning cautiously enough to avoid making mistakes.  Many AI algorithms are of the cautious sort.  It may be that it'd be better to have our games learn patterns very quickly and then keep a set of exceptions.  For example, in Simulated Annealing, we slowly lower the temperature until the system stabilizes. It may be better to quickly lower the temperature, then raise it again, and continue oscillating for some time. In Neural Networks we change the neuron parameters very slowly. It may be better to change them quickly, then change them back if needed.
&lt;/p&gt;
&lt;p&gt;
I'm enjoying the book a great deal but I haven't yet figured out how I might use this for my own games. My intuition tells me that there's something very useful here, but I haven't pinpointed anything specific.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/11/using-oscillation-to-speed-learning.html' title='Using oscillation to speed learning'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=116397526196133788' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/116397526196133788/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/116397526196133788'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/116397526196133788'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-116266478999968070</id><published>2006-11-04T10:25:00.000-08:00</published><updated>2006-11-04T10:26:30.023-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>The Guild 2</title><content type='html'>&lt;p&gt;
Yesterday I took a look at the &lt;a href="http://www.gamespot.com/pc/strategy/theguild2/"&gt;demo for The Guild 2&lt;/a&gt;.  It's a strange game.  It's somewhat like The Sims in that you have a character that has relationships with other people in the game, and you can start a family.  It's somewhat like a role playing game in that you have classes, skills, abilities, attributes, experience points, combat, etc.  It's somewhat like a city-building strategy game in that you can build mines, businesses, houses, and so on.  The graphics and music are nice.  The world feels alive—there are people wandering around, with jobs and relationships and government positions and alliances and feuds. While standing around, a random person came up to me and gave me a cake.  I'm very impressed with the game world.
&lt;/p&gt;
&lt;p&gt;
The problem is that someone forgot to design a &lt;em&gt;fun game&lt;/em&gt;.  In trying to do lots of different styles of games, it does none of them well.
&lt;/p&gt;
&lt;p&gt;
The game is rather tedious.  You have to keep track of your relationships with everyone else. These seem to be influenced by your position in society, your family, your religion, who you work for, and who works for you.   It has more detail than The Sims (for example, you can buy objects and give them as gifts to someone) and more relationships to keep track of than in Tropico.  The problem is that there's too much information, and you can't &lt;em&gt;act&lt;/em&gt; on most of it.  You only indirectly influence it.  This is something that is impressive and thus appealing to game designers, but it's not actually any fun.
&lt;/p&gt;
&lt;p&gt;
To run a business, you have to click on your cart, send it to the market, buy raw materials (prices are set by supply and demand) by dragging them into your cart, then send the cart back to your shop, drag the materials from the cart to the shop's inventory, click on an employee, and tell him to make an item.  Then you wait for a while, and once the item is ready, you drag the item to the cart, send the cart to the market, and drag the item to the market stall to sell it (prices are set by supply and demand).  It's impressive, but it's boring.  Imagine if Warcraft had done this—you'd have to tell each orc to walk to the mine, pick up a tool, mine for metal, pick up the metal, carry it back to the storehouse, and then walk back to the mine.  You have to do this for each business you run in The Guild 2.  Although there is a way to set this on auto-pilot, there never should've been this much detail.  The programmers wasted too much time with this.
&lt;/p&gt;
&lt;p&gt;
There's also combat, positions in government, bribery, assassinations, thievery, a legal system (including court cases), and lots more complexity to this game.  That's the real problem: there's too much to keep track of and do, and too little reward for doing it.  You get to play out the drudgery of living as a serf in the Middle Ages.  I can't even describe how bad the UI is.
&lt;/p&gt;
&lt;p&gt;
There are also some amusing things in the game.  Every building has a name: Better Homes, Lumpy &amp;amp; Liquid, The Hot Spot, Raw Iron Raw Power, A Waste of Paint, Roof Included, The Funny Farm.  The help text is often strange:
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
... Scholars are also not adverse to compliments and gifts and will even let themselves be persuaded to dance.
&lt;/p&gt;
&lt;p&gt;
Once the initial awkwardness has faded one can oft soften a reluctant scholar with soft embraces and gentle kisses, bewitch him in private conversation or even climb into a tub with him. But beware of using too much imagination in your courting, for scholars seldom appreciate variety.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
There are odd player skills: Master of manure, Pack mule, Kama Sutra master, Exploiter, Great preacher, Deep sleep, Local club president, Face of innocence, Dorian Grayish.  The description for the "Strong hair growth" skill starts out like this:
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
You have been blessed by nature with a curious biological phenomenon: whenever you must rot in the dungeon because of some misdeed, your hair begins to grow at a breathtaking speed.  After a few hours, you look as though you have been mouldering for 30 years.  ...
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
Even though the game doesn't look like it'll be any fun for most people, I do recommend that game developers try out the demo.  Look for things that you might think would be cool in a game: multiple genres (from role playing to real time strategy to business simulation to action/combat), deep and complex simulation (relationships, businesses, employment, politics, law), open-endedness, etc.  Try to figure out whether they are actually fun for a player or merely impressive to a developer. I would have loved to design and write a game like this. It's so impressive that it's sad to see that it's not at all fun.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/11/guild-2.html' title='The Guild 2'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=116266478999968070' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/116266478999968070/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/116266478999968070'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/116266478999968070'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-115790355369308370</id><published>2006-09-10T08:43:00.000-07:00</published><updated>2006-09-10T09:25:36.036-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>World of Warcraft Analyses</title><content type='html'>&lt;p&gt;
The &lt;a href="http://blogs.parc.com/playon/playon.html"&gt;PlayOn&lt;/a&gt; project at Xeroc PARC has been &lt;a href="http://blogs.parc.com/playon/archives/2005/05/collecting_data.html"&gt;analyzing WoW data&lt;/a&gt; and then posting it on their &lt;a href="http://blogs.parc.com/playon/"&gt;blog&lt;/a&gt;.  (These people get to play games at work!)  Thanks to &lt;a href="http://del.icio.us/richardt"&gt;&lt;tt&gt;richardt&lt;/tt&gt;&lt;/a&gt; for the link.  Some findings I found interesting:
&lt;/p&gt;
&lt;p&gt;
They computed the fraction of time each class joins a group. As you might expect, Priest was in &lt;a href="http://blogs.parc.com/playon/archives/2005/06/grouping_ratio.html"&gt;a group much more often than any other class&lt;/a&gt;.  Priests also &lt;a href="http://blogs.parc.com/playon/archives/2005/07/leveling_time_b.html"&gt;level up faster than other classes&lt;/a&gt;.  But that seems to be an anomaly.  In general, &lt;a href="http://blogs.parc.com/playon/archives/2005/06/grouping_and_le.html"&gt;people in groups level more slowly&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
People are &lt;a href="http://blogs.parc.com/playon/archives/2005/06/level_distribut.html"&gt;more likely to be at a level that's a multiple of 10&lt;/a&gt;, probably because there are certain rewards at levels that are multiples of 10, or there are penalties (such not being able to play on lower-level Battlegrounds).  So people at a level just before those levels will &lt;a href="http://blogs.parc.com/playon/archives/2005/06/playing_time_1.html"&gt;play extra hard&lt;/a&gt; and people at those levels will try to avoid leveling.  Leveling time in general is &lt;a href="http://blogs.parc.com/playon/archives/2005/07/leveling_time.html"&gt;roughly proportional to the level&lt;/a&gt;, so you get a quadratic effect. There's a spike at level 40, most likely because that's when you can buy a mount.
&lt;/p&gt;
&lt;p&gt;
Warriors are &lt;a href="http://blogs.parc.com/playon/archives/2005/06/class_abandonme.html"&gt;the most popular class at low levels&lt;/a&gt;.  Hunters are the most popular class at high levels.  Shamans are the least popular class.  Humans are &lt;a href="http://blogs.parc.com/playon/archives/2005/06/server_sample_r.html"&gt;the most popular race&lt;/a&gt;.  Orcs are the least popular race, despite them having the best dance moves.
&lt;/p&gt;
&lt;p&gt;
It's a fun blog to read.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/09/world-of-warcraft-analyses.html' title='World of Warcraft Analyses'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=115790355369308370' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/115790355369308370/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/115790355369308370'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/115790355369308370'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-115344475912110175</id><published>2006-07-20T18:17:00.000-07:00</published><updated>2006-07-20T18:29:02.226-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Ruby scares me</title><content type='html'>&lt;p&gt;
Every time I take a look at Ruby, I am simultaneously intrigued and disgusted.  Today I was looking at it once again, pondering the &lt;a href="http://code.whytheluckystiff.net/markaby/"&gt;Camping&lt;/a&gt; framework for writing web apps, and ran across this explanation of how it works:
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
Behind the scenes, Camping actually reads its own source file (with the __FILE__ handle) and does a search and replace on all instances of Camping. It then evals the result and runs your app with the modified code!
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
&amp;mdash; from &lt;a href="http://www.oreillynet.com/ruby/blog/2006/06/wild_and_crazy_metaprogramming.html"&gt;O'Reilly's Ruby column&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Argh!!&lt;/strong&gt;  On one hand, I feel like I shouldn't need to care how something is implemented. But I see this sort of thing (building and &lt;code&gt;eval&lt;/code&gt;ing code) so often in Ruby that it makes me worry that the language is incapable of expressing the abstractions that people actually want to build, and it might also be incapable of expressing the things &lt;em&gt;I&lt;/em&gt; want to build.  I guess I grew up treating &lt;code&gt;eval&lt;/code&gt; as something to use only as a last resort.  The only place I felt okay using &lt;code&gt;eval&lt;/code&gt; was Scheme, where it took program trees instead of strings.  Ruby still intrigues me though, so I'll probably try a project in Ruby at some point.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/07/ruby-scares-me.html' title='Ruby scares me'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=115344475912110175' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/115344475912110175/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/115344475912110175'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/115344475912110175'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-115271818236815271</id><published>2006-07-12T08:25:00.000-07:00</published><updated>2006-07-21T20:24:12.763-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>An old classic: Settlers II</title><content type='html'>&lt;p&gt;
Settlers II has been remade for its 10th anniversary.  I've tried out the demo and it reminded me of all the things I liked about Settlers.  The game is somewhat unusual.  It's a building+war game, like Age of Empires, Tropico, Command &amp;amp; Conquer, etc., but its emphasis is on building and not on war.
&lt;/p&gt;
&lt;p&gt;
One of the unusual features is the transportation model. In most games of this sort, people walk around wherever they need to go, and you can build roads to speed up their movement. In Settlers, you &lt;em&gt;must&lt;/em&gt; build roads, and every &lt;em&gt;road segment&lt;/em&gt; has a settler assigned to it. That settler will move goods back and forth along the road. You have to carefully plan your roads to handle the traffic; roads can become bottlenecks. Making road segments long means you use up fewer settlers and allows faster travel; making them short means you get a higher capacity. Roads also become paved and can have donkeys to increase capacity.
&lt;/p&gt;
&lt;p&gt;
The transportation model changes the implementation strategy for the game. Usually you run a pathfinder (like A*) for each of the peasants, and combine that with a movement algorithm to avoid local obstacles. This can get expensive when you have lots of peasants. Each peasant handles a single type of good, usually assigned by you. For example, you might assign a peasant to be a miner; the pathfinder will find a path between the mine and the warehouse. There is no further distribution of goods; it goes into a global store that can be accessed instantaneously from anywhere.  In Settlers, the peasants are &lt;strong&gt;not using the pathfinder&lt;/strong&gt;.  Instead, the pathfinder is used for materials and goods.  They are physical objects that have locations and can move around. They can be put in a warehouse, but they have to be moved to the location where they get used. The peasants and road segments serve as capacity restrictions. If a good needs to move from one place to another and the road it needs to travel on is &amp;ldquo;full&amp;rdquo;, it waits for the road segment (and associated peasant) to free up.  This works somewhat like a packet-switched computer network.
&lt;/p&gt;
&lt;p&gt;
How do the goods &amp;ldquo;decide&amp;rdquo; where to go?   A local approach would be to make each good perform pathfinding to its destination.  Pathfinding on the road graph will be &lt;em&gt;much&lt;/em&gt; faster than pathfinding on a grid, because there are &lt;em&gt;far&lt;/em&gt; fewer segments and connection points.  But how do they find their destinations?  We could either keep a list of points that require certain goods, or we could build an influence map.  It's possible with an influence map to not even need pathfinding. I'm not sure what Settlers actually does.
&lt;/p&gt;
&lt;p&gt;
Another difference between Settlers and other building games is that the Settlers economy has much longer chains of production. Forests can be cut to produce wood. Wood are milled into wooden boards. Boards are used to build farms and other buildings. Farmland is used to raise crops, yielding grain. Grain is milled into flour. Wells produce water. Flour plus water is baked into bread. Grain plus water is turned into beer. Fishermen use fishing poles to catch fish. Hunters use spears to catch animals. Animals taken to the slaughterhouse become meat. Meat, fish, and bread are fed to miners. Miners can mine for coal, iron, granite, and gold. Coal and iron can be smelted into steel. Steel is taken to the metalworks to make tools such as spears, and to the armory to make swords and shields. Granite is turned into stone. Stone is used to make new types of buildings. Gold is turned into gold coins. Gold coins, swords, and shields are given to soldiers. Soldiers are needed at watchtowers, which expand your territory. The economy is complex.
&lt;/p&gt;
&lt;p&gt;
Also unlike other building games, you don't control any of your people directly. You can indirectly control them by building things. To go to war, you need soldiers, but you never explicitly recruit or place soldiers; they are produced whenever you have enough of the needed goods (gold, beer, sword, shield). You can influence what gets transported by choosing a transportation priority for each type of good (this is like QoS for TCP/IP), and you can set the priority of having soldiers vs. builders.
&lt;/p&gt;
&lt;p&gt;
At the start of the game, you don't need to worry about the full economy. For example, you can't build tools without steel, which requires coal and iron, which requires miners, which requires bread and meat, which requires grain and water and animals, which requires flour, which requires farms, which requires wooden boards, which requires wood. Instead, your initial warehouse includes many types of goods, from which you can jumpstart your economy. You don't need to make rarely used items like tools until later in the game, when your settlement is large. It's a nice way to gradually introduce complexity to the player.
&lt;/p&gt;
&lt;p&gt;
It would be nice to be able to see general trends, like whether I'm building up more bread than I need, or whether people are perpetually low on water.  It's hard to manage everything in your head by checking manually.  If I were in charge of a town like that, I'd hire some people to gather information and alert me when something's wrong. Overall though it's a very interesting game, and not like other games I've played, so I think it's worth exploring.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update&lt;/strong&gt;: [2006-07-21] Sören M points me to a design document about &lt;a href="http://www.s.kth.se/sigra/widelands-economy-documents/transport-system.html"&gt;transportation in Widelands&lt;/a&gt; (a game much like Settlers II).
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/07/old-classic-settlers-ii.html' title='An old classic: Settlers II'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=115271818236815271' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/115271818236815271/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/115271818236815271'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/115271818236815271'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-115248650299398755</id><published>2006-07-09T15:35:00.000-07:00</published><updated>2006-07-10T09:10:29.573-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>A Tale in the Desert 3: First Impressions</title><content type='html'>&lt;p&gt;
A Tale in the Desert is a rather odd game. It's a MMORPG based in ancient Egypt. There aren't any monsters to fight. Instead, you perform tasks like gathering, mining, farming, weaving, fishing, and so on. You use the materials you gather to make equipment, which you can use to make more complex materials and objects. Eventually you can build sculptures, buildings, and monuments. The game has a story to it, with a beginning, middle, and end. You and everyone else in the game is part of that story. The ending depends on the actions of all the players.
&lt;/p&gt;
&lt;p&gt;
It's quite different from anything else I've seen. Although games like World of Warcraft have gathering and crafting tasks, the focus there is combat, whereas in this game, it's all about gathering, crafting, building, trading, and socializing. The tasks you need to perform can depend on what others have done. For example, you may need to build something larger than what anyone else nearby has built. Once you build it, your object remains in the world, visible to everyone. As I wandered around the game world, almost every object I saw was something created by a player. As a new player, I needed to find areas that weren't already occupied, so that I could set up the equipment I needed. Some of the basic resources (wood, sand, mud, grass, stone, etc.) are shared, so it helps if you set up a workspace away from others. As far as I can tell though, workspaces have a short lifespan, so you work in an area for a while and then move on.
&lt;/p&gt;
&lt;p&gt;
The tasks you need to perform can also depend on other players. For example, you may need to build an sculpture and leave it out in the open so that passers-by can vote on whether it's attractive or an eyesore. Or you may need to talk to people and convince them of some cause. Or you may need to get people to join your guild. The social aspect is important; other people aren't there only to help you fight monsters. There's also the ability to propose new laws and get signatures/votes; if the new law gets passed, the game developers will implement it (remember LambdaMOO?). I didn't explore that aspect of the game. 
&lt;/p&gt;
&lt;p&gt;
The graphics aren't great, although they didn't bother me much. There's very little sound or music, and that hurts the game a great deal. Sound effects are incredibly important. The UI is awful. It looks like it was designed by programmers: there's lots of abstraction and generality, like scrollbars, arbitrarily sized dialogs, deep menu hierarchies, and an attempt to make everything vague so that it's reusable in other contexts. For example, to dry out grass and turn it into straw, you need to Drop the grass. This is &amp;ldquo;cool&amp;rdquo; in that it reuses an existing function, but I think the UI would be better with the task explicitly listed. The UI also offers very little feedback about objects and actions. There are lots of objects around. Some are usable and some are not. You won't know until you click and get a menu. There are lots of places where you can't do something, but it won't tell you that you can't until &lt;em&gt;after&lt;/em&gt; you've attempted to do it. For example, when planting flax seeds, it allowed me to plant a second seed too close to the first, &lt;em&gt;then&lt;/em&gt; it told me it was too close. Mark the area in red or something to give people early feedback about whether their actions are going to succeed. Don't let me do something that's not allowed.
&lt;/p&gt;
&lt;p&gt;
Another problem with the UI, at least for a beginner like me, is that it doesn't really give you any hints about what to do. There's a huge list of tasks, but no way to learn how to perform them. For example, I was supposed to learn Carpentry. How should I do that? I have no idea. There's no tutorial as far as I can tell. I ended up going to the web and searching for the information. How was I to know that I should find the "SArch" building (whatever that stands for) and click on it?
&lt;/p&gt;
&lt;p&gt;
I played for several hours and got through the ~30 starter tasks, with a lot of help from the web. That opened up new possibilities of projects I could do. However the game felt rather tedious and uninspiring. Let's see... I need 100 bricks. I'll collect mud, straw, and sand, then stand around for 10 minutes making bricks. Boring. There's no challenge in that. It's not interesting. It's likely that the social aspect makes up for it (the crowd I talked to was much friendlier and more mature than in any other game I've been in), but I didn't stick around long enough to find out.
&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://simblob.blogspot.com/2006/07/tale-in-desert-3-first-impressions.html' title='A Tale in the Desert 3: First Impressions'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5052387&amp;postID=115248650299398755' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/115248650299398755/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://simblob.blogspot.com/feeds/posts/default/115248650299398755'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5052387/posts/default/115248650299398755'/><author><name>Amit</name><uri>http://www.blogger.com/profile/12159325271882018300</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-5052387.post-115198482918897571</id><published>2006-07-03T20:38:00.000-07:00</published><updated>2006-07-04T09:02:30.010-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='review'/><title type='text'>World of Warcraft: First Impressions</title><content type='html'>&lt;p&gt;
I've been playing World of Warcraft (WoW).  It's &lt;em&gt;the&lt;/em&gt; MMORPG to try.  Last year I played around 250 hours of Guild Wars, but it's not really an MMORPG; it's somewhat like Diablo 2, which is multiplayer, but not massively so.
&lt;/p&gt;
&lt;p&gt;
To get a good feel for WoW, I played over 50 hours over the past 10 days.  I tried out 6 of 8 &lt;a href="http://www.worldofwarcraft.com/info/races/"&gt;races&lt;/a&gt; (Alliance: Human, Night Elf, Gnome, Dwarf; Horde: Troll, Tauren), 6 of 8 &lt;a href="http://www.worldofwarcraft.com/info/classes/"&gt;character classes&lt;/a&gt; (Druid, Hunter, Paladin, Rogue, Warlock, Warrior), 4 of 12 &lt;a href="http://www.worldofwarcraft.com/info/professions/"&gt;professions&lt;/a&gt; (Mining, Skinning, Cooking, Fishing), and 1 talent (Marksmanship).  I visited all 6 major cities (Stormwind, IronForge, Darnassus, Ogrimmar, Thunder Bluff, Undercity) and 3 of 4 Goblin cities (Ratchet, Gadgetzan, Booty Bay).  I played mostly PvE, but also tried out PvP, both out in the open and in 1 of the 3 PvP instances (&lt;a href="http://www.worldofwarcraft.com/pvp/battlegrounds/info-warsong.html"&gt;Warsong Gulch&lt;/a&gt;).  I visited 1 of 36 PvE &amp;ldquo;instances&amp;rdquo; (Ragefire Chasm) and 12 of 40 major regions on the &lt;a href="http://www.worldofwar.net/cartography/"&gt;map&lt;/a&gt; (The Barrens, Durotar, Mulgore, Thousand Needles, Dun Morogh, Elwynn Forest, Westfall, Redridge Mountains, Teldrassil, Stranglethorn Vale, Tirisfal Glades, Darkshore).  I tried out 1 minor quest from 2 special events (Midsummer Festival and Scourge Invasion).
&lt;/p&gt;
&lt;p&gt;
Overall, I thought the game was well done. It's &lt;em&gt;much&lt;/em&gt; more complex than Guild Wars and there are lots of different styles of play.  &lt;a href="http://en.wikipedia.org/wiki/Guild_Wars"&gt;Guild Wars&lt;/a&gt; offers character classes plus secondary classes, giving essentially 15 different combinations, although the choice of which class is primary and which is secondary gives each of those combinations two styles.  WoW offers 40 combinations of races and classes.  The races affect your appearance and give you bonuses and skills; the classes affect your clothing and give you bonuses and skills.  Within each character, Guild Wars offers 4 attributes and plenty of skills influenced by those attributes; WoW offers attributes but also 3 talent trees and plenty of skills influenced by them.  In Guild Wars, the attributes can be changed to suit each mission or area; thus, you don't have to choose which to specialize in.  In WoW, attributes are influenced by race and class, but can be modified by items and spells.  The talents are permanent choices, and thus you treat them like races and classes, and have 120 combinations of races, classes, and talents.  So already WoW has a much richer set of choices (&amp;ldquo;builds&amp;rdquo;) in characters.  But wait, there's more!  In WoW, you also have professions, which are non-combat activities, such as Skinning (get leather or other materials from animals), Leatherworking (to turn leather into items), and Enchanting (to add magic to items).  As you use the skill, you become more proficient in it, and that allows you to do more things with it (for example, when you are better at Skinning, you can skin from higher level animals).  You can choose 2 of 9 main professions, plus up to 3 side professions.  This raises the combinations of character builds to 4320, although in practice, only around 14 of the 36 combinations of professions make sense, so there are a &amp;ldquo;mere&amp;rdquo; 1680 character builds you might want to play.  In Guild Wars, your weapon choices are largely determined by your character class.  In WoW, they're influenced by class but you can learn to use new types of weapons.  There are 16 types of weapons (such as Swords, Wands, Bows, etc.), and each character class starts out knowing some of them, and can learn up to 4 to 15 of them (varies by class).  Once you choose a weapon, it increases the number of character builds to nearly 12,000.  Compare that to 15 in Guild Wars and you'll get a sense of how rich this game is.  I barely scratched the surface with what I tried out.
&lt;/p&gt;
&lt;p&gt;
Each race has a starting location in the world.  There are 8 races and 6 starting locations.  This greatly increases replay value.  In Guild Wars, there's one place everyone starts and explores, so the second time through you're not seeing anything new.  In WoW, you can play 6 times and see brand new scenery each time.  The WoW world is huge, varied, and non-linear; Guild Wars in contrast is fairly linear, much smaller, and has 5 types of areas (pre-Searing, post-Searing, jungle, desert, volcano).  Different areas have monsters of different levels, so you can't venture in to the higher level areas without being killed.  With several of my characters I did however manage to sneak by some monsters and get to high level areas, where one hit from a monster would kill me.  There are special areas called instances.  These are areas that are separate for each group of people playing.  In Guild Wars, all areas other than the cities are instances; in WoW, most areas are not, so you can see lots of other people doing things unrelated to your party's actions (seeing other people is fun!).
&lt;/p&gt;
&lt;p&gt;
There's just so much to do in World of Warcraft, and so many styles of play, that it's no wonder people spend huge amounts of time playing.  There are also lots of repetitive actions that lead to variable results; this activates the gambling portions of the brain.  For example, when performing quests to retrieve items, you will sometimes get the item and sometimes not; when killing monsters, you will sometimes get treasure and sometimes not; when fishing, you will sometimes get l fish (which can be eaten to gain health) and sometimes you will get treasure; when improving skills sometimes you will gain a skill point and sometimes not.  Everything you do works this way; it's no wonder it's addictive.
&lt;/p&gt;
&lt;p&gt;
The game was pretty smooth when it ran.  Several times though the realm I was on would be down, and I couldn't log on.  When I was on though everything was smooth and (as far as I could tell) bug-free.  Blizzard seems to be pretty good at this.
&lt;/p&gt;
&lt;p&gt;
I enjoyed the game but in the end I wasn't addicted to it (despite playing 50+ hours in 10 days).  The main problem I saw was that the reward was far too low for the amount of time I spent.  &lt;em&gt;Running from place to place&lt;/em&gt; is really time consuming.  At higher levels you can buy creatures to ride on, and this lowers travel time, but the reward is &lt;em&gt;less pain&lt;/em&gt; rather than something rewarding in its own right.
&lt;/p&gt;
&lt;p&gt;
The quests were often repetitive and boring.  For example, I had a quest to go kill some ostrich-like monsters.  It took a while to run out to that location and kill them.  When I got back to town, I got a small reward and then was told to go out and kill some lions.  I had to go back to the same area I was just in, kill lions, and go back.  I was then told to kill some dinosaurs.  I had to go back to the same area I was just in, kill dinosaurs, and go back.  After that the series of hunting quests continued in a slightly different location with slightly different animals (zebras, more lions, more birds, and more dinosaurs).  There were probably at least 15 quests like this.  Another line of quests involved killing some variant of kobold, going back to town, then being told to kill a different variant of kobold in that same area, then going back to town, then being told to kill yet another variant of kobold in the same area.  These kinds of quests really stretch out gameplay, because you have to run back and forth every time; you can't get get the next quest until you've finished the previous one.  Occasionally the quest would be more interesting (for example, collecting dinosaur eggs while killing the dinosaurs), but it only seemed slightly interesting because the quests were boring.
&lt;/p&gt;
&lt;p&gt;
I do like the whimsy in the game.  There are lots of &lt;a href="http://en.wikipedia.org/wiki/Pop_culture_references_in_World_of_Warcraft"&gt;cultural references&lt;/a&gt;, silly items, etc.  The &lt;a href="http://www.worldofwarcraft.com/info/races/dancing.html"&gt;dances&lt;/a&gt; are fun (for example, the orcs dance like MC Hammer).  The graphics look cartoony, making the game feel more fun and less serious.
&lt;/p&gt;
&lt;p&gt;
With the trial account I played, I couldn't participate in some of the interesting aspects of the game, like the auction system.  In Guild Wars, you have to wander around, asking people for things to buy or sell.  It's chaotic and it was so much of a pain, I rarely traded with anyone.  With the WoW auction system, I think I would trade much more.  Comparing trading in the two games really demonstrates how important efficient markets are.  I also couldn't really get involved in guilds, which are apparently a lot of fun (but have high time requirements).
&lt;/p&gt;
&lt;p&gt;
On my last day, I sold all my items and found that I had earned around 2.6 gold (26,000 copper pieces).  This amount of wealth was unimaginable to me a few days earlier.  The scale of wealth seems to go up exponentially.  For example, a bag that can hold 8 items costs 4 times as much as a bag that can hold 6 items.  Small increases in power come at a large increase in price.  I think this is a good game design, but it felt strange to me.  Despite getting so much, the last few days were just not much fun.  Since I had only 