Tuesday, May 12, 2009

Designing Games In A Vacuum, Part 2: Units, Walls, and Caps

Continuing the discussion from Part 1 of this series, we'll discuss some of the unique challenges of a space-based game environment as it relates to unit design for the game AI War: Fleet Command. These difficulties actually helped to bring out some of the more novel features of the game, so in the end I'm quite glad I made the choice to set the game in space (despite all the headaches during the early stages of design and implementation).

Issues
Continuing the list of issues from the first article:

Limited Types Of Well-Known Space Ships
3. Variance between the kinds of spaceships people know about is kind of limited. I mean, even in a franchise as memorable as Star Wars, you basically have a variety of smaller ships, the cruiser/corvette/destroyer classes of ships, and then the really big space stations and weapons like the Death Star. Granted, there are a lot of differences between the various Star Wars ships in terms of handling, control, loadout, etc -- these really shine in an action-oriented game -- but in an RTS game where you simply order ships around with your mouse, all of those differences start to seem pretty minor.

I knew I wanted dozens or hundreds of ship types in the game, on the order of most terrestrial RTS games, and that just wasn't looking possible by conventional methods. I mean, in a terrestrial RTS you have units with various bonuses (like pikemen versus cavalry), ranged units such as archers, various sorts of melee units, units that can fly, naval units, units that are good at moving through certain terrain, and on and on. The dearth of real-world examples of different kind of spacecraft with varying abilities was both a challenge and an opportunity for some unique design.

The opportunity was that I could do anything that I wanted, but the challenge was that ships would not be instantly recognizable in the manner of archers or cavalry. I had serious concerns that meaning might be obscured in the way that many of the units in Rise of Legends were difficult for me to remember (What is the difference between Sand versus Fire versus Glass units? What does the Scorpion guy do, versus the Manta Ray?). Don't get me wrong, I did like RoL, and it's uniqueness was one of its draws, but in the end there were too many units with too many esoteric groupings and names for me to ever feel really proficient at the game. I didn't want players to come away from their first few sessions of AI War with that feeling.

No Walls In Space
4. There are no walls in space, but this was a critical element in most of my favorite RTS games. Rise of Nations and Rise of Legends had both excluded walls (presumably due to challenges with pathfinding?), and that had been pretty annoying because it was hard to protect core resource without committing so many military assets that I became weaker on offense. In my experience, when both players in a game were only lightly defended (no walls or force fields or what have you), that made it a rush to see who could crush the other faster.

I wanted to create a longer game with more emphasis on planning, maneuvering and scouting; to me, it's always been more satisfying to think of a clever way out of a tough situation, as opposed to just having memorized a pre-developed strategy or clicked faster than my opponent. When I want to test my reflexes against others, I play a racer or an FPS (I do love and frequently play those genres, but they are distinct from RTS).

Population Caps
5. In most RTS games, there are arbitrary population caps that prevent players from building an infinite number of units. This means that players tend to gravitate towards the stronger units, which often cost multiple population points because of their strength (1 cavalry or heavy tank takes 2 or 4 population points, etc). I wanted none of this, since my game engine was capable of handling 60,000+ ships in realtime.

However, with no population caps of any sort, this meant that alpha players tended to find the strongest unit and spam it repeatedly. Weaker ships might as well not have even been in the game, for all the use they got. A lot of RTS games seem to have this problem, even the best ones -- in Age of Empires III, when I played as the French, I never built anything but Musketeers and Cuirassiers, for instance. Even though I loved that game, the presence of that deadly combination in my favorite civ made the game a lot less interesting for me. In early builds, the same thing was happening to AI War.

Solutions

Quirky Ship Designs
If all the units are too homogeneous, that will be uninteresting and will make the game feel smaller than it is. But on the flip side, if the units are too esoteric, no one will be able to get a firm grasp on what everything means and how it all fits together (my Fleaship kills your Dogboat, but your Dogboat kills my Trianglecraft -- obviously, these are completely made up, but you get the idea). I therefore decided very early on in to go with a very practical naming scheme, where each ship's name evoked its abilities.

For a few examples: space tanks are slow with a powerful shot, and have heavy armor; raptors are quick, cloaked ships that are able to pop out with a strong, sudden attack; laser gatlings are little ships with a rapid-fire laser attack; vorticular cutlasses are spinning masses of blades that crash into enemy ships. From the reactions of alpha and beta testers, most people have found it very quick to remember unit names and abilities, despite the huge variety of units that have no real-world or popular media counterpart.

Early ship designs were all over the place -- I had no particular goals and so just tried out a variety of ideas to see what was most memorable, different, and fun. After a lot of playtesting and design iterations, I settled into what you see in the final game. There are 28 classes of mobile military ships currently in the game (not counting starships), and these make up the bulk of players' fleets. Each ship type has some sort of unique ability associated with its name, or some other special combination of stats that makes it fill an individual niche.

This worked out really well, except when it came time to try to balance all of these ships so that they were inherently equal despite being so different -- this seemed to be an impossible task, and the ships became more generic the more equal I made them. But when the ships were not equal, my alpha testers were great at finding and exploiting over-strong ships. I'd introduce some cool new ship type, and it would either be completely irrelevant or the powerful new thing that everyone would use and that I would have to quickly nerf.

But I was committed to having variety in this game, as I knew that was one key to longevity and replay value, so I pressed onward with many different designs: electric shuttles, which strike all nearby ships with weak bolts of lightning; vampire claws, which absorb health from ships that they crash into; EtherJet Tractors, crazy-fast cloaked ships that can grab enemy ships and drag them away (the AI is really mean with these on the upper difficulty levels); and 22 other ship types with various abilities, strengths, and weaknesses. I succeeded in creating variety, but unwittingly created a game that was too complex for much of anyone to play -- people could remember what all the ships did, but it was paralyzing to try to decide which ships out of a stable of 28 would be the best in any given situation. This made for people just specializing in a few ships (bad), or building a bit of everything completely at random (much, much, worse). It took a few weeks of playtesting for my alpha group and I to come up with the solution for this.


Limiting The Number Of Ship Types Per Game
Up until a certain point in the design, all of the ship types could be built by any player at any time. This meant that players had a dizzying array of options (28 different main ship types to choose from at any time? Even I couldn't make effective decisions with them, and I designed them). It was actually my dad, who is one of my alpha testers, who suggested that it would make a lot more sense if the number of ship types was more limited in each individual game.

I was initially resistant to the idea, but nevertheless he and I spent several hours hashing out the system for randomizing and unlocking "bonus" ship types that you currently see in the game. Once the design for this was complete, I immediately knew we were on to something. By limiting the number of ship types each player has available at any given time, there is a greater sense of progression to the game (since Advanced Research Stations are captured and new ship types are unlocked), there is greater variety between campaigns (since not every campaign contains every ship type), and the starting options for players are considerably less overwhelming.

If you think about it, this is basically the same sort of segmenting that you get in most other RTS games, where the different civilizations have inherently different units. But in most other RTS games, all of the various civs have to balance out with one another so that there is no dominant civ (and there still tends to be a collection of civs that all the best players use). In AI War you are allowed to select one bonus ship type to start with, but all the rest that you get are not discovered until several hours into the game. Likewise, the ships that the AI uses are dependent on the map you choose, and so are unknown at the start. This different-every-time feature was half of a key feature for AI War's unit balance, but I didn't realize it quite yet.


Unbalancing Units On Purpose
With the different-every-time features for bonus ship types, I suddenly realized that I was free to make the ship types as unbalanced as I wanted to. The idea of "fairness" is required in competitive multiplayer games, but many cooperative multiplayer games are unbalanced on purpose. Take a look at the co-op mode in Resistance 2, for instance: there are three distinct player classes, each with distinct strengths and weaknesses. This lets players fill unique niches, which emphasizes cooperation, and it also provides for more variability in each game.

I decided to do a similar thing with AI War, making it so that all ship types are useful in some way, but some ships are more valuable in one campaign than others (depending on what ships the opposing team may have, the strengths of your bonus ship types might be really helpful or not). At the core of this, I knew I wanted the rock-paper-scissors relationship between the standard Fighter, Bomber, and Cruiser ships. These three ship types are in every campaign, and one of those three units is strong against every other ship type in the game. Thus there is never a situation where one team gets a ship type that the other team is completely unable to counter.


Per-Type, Per-Level Ship Caps
One of my early design goals for the game was to make it so that all ships that you can build at the start of the game are still useful at the end of the game. Many other recent RTS games are also doing this sort of thing, but usually that's with a veterancy system that seems a little bit too opaque for my taste (and which really only seems to work well with small numbers of units). By contrast, in Supreme Commander players would often still need to build Tech 2 units even when building Tech 3 units, just because the Tech 2 units were so much cheaper and faster to make.

Instead of putting so much scaling into cost and time to build, instead I implemented a per-ship-type population cap. Not only was this per type, it was also per technology level of each type. So you can build perhaps 180 Mark I Fighters, 140 Mark II Fighters, 120 Mark III Fighters, and 90 Mark IV Fighters, for instance -- and similar ratios for Bombers, Cruisers, etc. This was the final piece of the balancing puzzle. By limiting the number of each type of ship that could be built, I insured that players would have to utilize ALL of their ship types, and all levels of each ship type, throughout the entire game. So even at the very end of a campaign, players are still building Mark I ships in addition to the Mark IV versions.

Real commanders quite often have to deal with outdated equipment or underperforming units, and I wanted to simulate that in a game. Choosing where to place your best units, and where to put your weaker, more outdated ones, creates a whole new strategic challenge (my favorite novel, Ender's Game, also discusses this as an issue). Rise of Nations had done something similar with their increasing-costs per each unit of a type built, but those were irrespective of technology levels so far as I recall -- it made you have a reasonably balanced army (unless you were really resource-rich), but it didn't make you use older tech in addition to the new.

There were many other advantages to this system, such as making the acquisition of Advanced Research Stations even more important (they effectively increase your pop cap as well as the types of ships you can build). It also let me make certain ship types even more powerful, since I could then give them a lower pop cap to balance it out. And for the really weak, inexpensive, swarm-style ships like laser gatlings or infiltrators, I could give them a cap that was 6x higher than normal. All that contributes to some pretty impressive differentiation between ship types, and kept them from feeling too generic and similar to each other.


Space-Based Substitutes For Walls
In the context of an RTS game, what are walls, really?

#1. A way to prevent enemies from coming at your defensive positions from all directions.
#2. A way to slow down enemies.
#3. A way to choose the most likely locations for battles.

Before I started thinking about walls in these more abstract terms, I had actually implemented a unit called Magneto Lanes (basically space walls), but those never really felt right or made much sense. The better solution, the one that you see in the actual game, is tractor beams. Tractor beams are a familiar technology from literature and film, and they meet the criteria for #2 and #3 above. Tractor beams are not indestructible (neither are walls), but they provide a way to slow down oncoming hordes. Of course, each tractor beam can only block a limited number of ships, unlike a wall, so that changes the dynamics some while keeping the same basic idea -- change like that can be refreshing.

The other part of the walls puzzle, the solution for criteria #1 above, was choke points. Basically, criteria #1 is just referring to player-made choke points, but if there are already choke points available then the players can just exploit those instead of making their own. As it happened, there were already excellent choke points available in the game in the form of wormholes. Without wormholes creating bottlenecks for entry into planets, tractor beams would be vastly less effective, but in combination they are able to provided all the same basic protections as walls in a slightly new way. Thus, tractor beams evolved from a tiny little ship with some side interest, to one of the core mechanics of the game.


In Conclusion / The Harshness Of Space
Being able to take a familiar genre niche (walls), and substitute something less familiar that nevertheless fills the same basic niche (tractor beams) has been really exciting. There have been a few other opportunities for me to do this in AI War, such as the way knowledge is gathered and unlocked (tech points are generally something that you don't have to get from specific locations in an RTS game, but that is the case in AI War), the way build queues are managed (central controls make it easy to make quick, large-scale economic decisions), the way manufactories work (in place of a market), and others.

Not one thing on that list was in the original design documents for the game, but rather came about through playtesting and seeing how the space environment, the wormholes, and the multi-planet galaxy maps interacted. To me, this is pretty much the entire case for iterative development -- I could never have thought of these things up front. Space is a harsh environment for astronauts to work in, and in a metaphorical sense that has held true for me with regard to designing this game. However, some of the best stuff is invented in space, out of necessity moreso than enterprising spirit. I'm glad I took the journey!

Monday, May 11, 2009

Designing Games In A Vacuum, Part 1: Terrain & Positionality

In developing the space-based RTS game AI War: Fleet Command, I encountered an unexpected design challenge: namely, I hadn't anticipated the issues that would be caused by setting the game in space. I've played space-based games like Homeworld (which I didn't care for) and Descent: Freespace (which I loved), among many others -- all sorts of Star Wars games, for instance. Most of the games that I had loved which were set in space all had a strong action element to them, usually involving piloting smaller craft through asteroid fields, near planets and back, or around much larger enemy ships (Star Fox also fits this mold in many of its levels).

I've never been much into the 4X genre, which is also commonly set in space, but from what I have seen the appeal there appears to be detailed management of a lot of different colonies and planets and fleets, all of which have unique attributes. This was sort of along the lines of what I wanted to do in AI War, except I wanted more of a focus on realtime military management. The idea was that it would be similar in feel to my favorite terrestrial RTS games, except bigger (multiple planets, etc), and in space.

Issues
On the surface this might sound simple, and I delved into design and the early prototypes with gusto. Each early prototype introduced new elements, making the experience more fun and more of an actual game, but at the same time a whole slew of unanticipated challenges were appearing. I was accustomed to terrestrial RTS games, for the most part, and so was unprepared for some of the bigger issues that I suddenly found myself facing when I tried to translate what I knew into space. Here are the first two:

Shortest Path
1. In faux-3D space, where there are no obstacles that really block ships from traveling, the shortest valid path between any two points is always the line connecting them. This makes most of the space around planets pretty useless, because when you arrive at a planet you should just go straight at the enemy, and they'll just come straight at you. Not exactly riveting.

Terrain
2. Connected to the first issue, there is no terrain in space. In a terrestrial game you have water, which might contain naval units and block land units (that can't hover or what have you). You also have forests, mountains, hills, rubble, neutral buildings, craters, and a slew of other environmental features to get in the way of your units. These help players create choke points, take elevated ground or cover for tactical advantages, and so on. In space there's just... nothing. So all of that good complexity is out the window, unless you do something like have ships with bonuses in asteroid fields, nebulae, or other space phenomena -- and that seems mildly contrived if overused, as well as not too workable for the general game concept.

Solutions
It took many, many iterations of design for AI War to arrive at the state that it is currently in. My alpha testing team was invaluable in their feedback on what worked and what didn't, what made sense, what was confusing, what was fun or annoying, etc. Here is some of what we learned:

Create A Sense of Position Where There Is None
In space, when any position is tactically as good as another, you need to have your units themselves create positional meaning. Early builds of the game had all AI ships on a planet immediately chase and attack any player ships that came into a planet's system. While this was an effective tactic for the AI, it was not very interesting to play against. This gave rise to the concept of command posts, which AI ships guard and will not stray too far from, and which often have unique building-style units present that the players either want to capture or destroy. This makes pockets of enemies that the players must maneuver around to succeed.

I kept coming back to some of my favorite 12-hour marathon games against the AI in Empire Earth. The reason those were fun was the a constant flow of enemies attacking my team, as well as all sorts of semi-isolated pockets of units that they did not attack us with. This behavior was not actually part of the EE AI, but it came about due to AI transport limitations on "team islands" random maps. As players we used that to get the sort of game that we found most fun.

In AI War, therefore, I went with a similar sort of design, except that instead of the AI having semi-isolated pockets of ships based on not being able to effectively cross water (since that doesn't exist in space!), I made most of the AI ships on AI planets have a guard directive as their primary behavior. They must protect the command post/station, never straying too far from it unless it is destroyed. The addition of "Special Forces" units (which don't guard, but rather just patrol around planets at random) finished off this concept by adding the uncertainty of what and how many units are passing through a planet at any given time (reinforcements and the constant threat of incoming AI waves also help keep the players on their toes).

With a randomized distribution of resource patches on planets, a randomized effect to AI defensive positions, and a wide variety of auxiliary enemy structures that help to create secondary goals (Data Centers, Ion Cannons, etc), this made for the varied and interesting planetary maps that you see in the final game. Since there is no real terrain in space, the terrain had to be based on the position of resources, and how the AI is arranged to defend those resources. In some senses, that therefore means that the terrain is ever-changing in the game, since the relative strength of locations on any planet shifts as the AI reinforces and the player attacks. That's not an effect you tend to get too much in terrestrial RTS games, so that was a differentiating factor that I was happy to stumble into.

Making the enemy planets randomly unbalanced also went a long way to creating the overall galaxy-wide terrain. Because some planets are impossibly hard at the start, they become semi-permanent blockers, like mountains you can only eventually tunnel through. This made it so that, on a galaxy scale as well as on a planetary scale, players could not always take the shortest path between any two points -- usually there's a better way, if the players scout and strategize effectively.

Let The Players Set The Pace Of Game Advancement
You might not think that game advancement has much to do with terrain, but in a game that is all about capturing and holding terrain, the issues are very much intertwined. In AI War, there is a numeric "AI Progress" indicator that increases by 1 every time you destroy a warp gate or take a planet (of which there is one each per planet). You can decrease it by 2 by destroying data centers, but there are comparably few of those. The higher the AI Progress level goes, the stronger the AI becomes, both in its defensive reinforcements and its offensive waves.

The AI Progress came about as part of my desire to have this be a thinking-focused game, rather than a race to tech up. The AI basically holds steady with its level of technology and the size of its individual raids and reinforcements if you don't take any planets. If you do nothing it will still continue to bombard you and reinforce with the level it currently has, of course, which means that if you ignore an AI planet near your forces for a good part of the game, you might later return to find thousands of low-level ships waiting there. The AI Progress system also penalizes players who don't plan ahead, because if they just take every non-valuable planet they come across, the AI will get too powerful and will probably kill them.

This overall pacing is helpful because it allows the players time to scout, plan, and carry out their plans, without letting them just turtle up and hoard resources and units. "Boom" was always my strategy against AIs in other games (yes, I'm one of those, but only because it was so effective), and I wanted to invalidate that strategy in AI War because it's so much more interesting when your activities are constantly changing throughout play (a mix of military offense, economy management, military defense, and exploration). In other games there is often an incentive to just focus on one aspect of the game at a time, at least when fighting the AI, and I wanted to turn that on its head.

Coming back to the issue of terrain, the AI Progress system also helps contribute to the sense of place and differentiation between all the planets in the galaxy, believe it or not. Players have to decide not just whether they have the strength to take a given planet, but whether it is strategically wise to do so. Does this planet get us closer to a goal, open new avenues for expansion, or net us significant resources? Without the pressure of the AI Progress increasing with every acquisition, the strategic implications of taking any planet would be simple, as in most other RTS games: take it if you can. But the presence of the AI Progress meter can make it so that even a comparably low-level planet is "in the way" (in the sense of mountains or water bodies in other games), not because you can't capture it, but because you think it would be unwise to do so.

In no other RTS game that I can think of are there so many subjective decisions that can have such a far reaching effect on the future of your campaign. I'd really love to see what some other developers might do with this sort of idea, really emphasizing opportunity cost at every turn. RTS players are used to having to make hard decisions when it comes to what units to build, but the strategic issues of how, when and where to expand have never been so difficult.

I designed and coded this game, and I have yet to find even a semi-consistent "best path" to victory, or any dominant strategy to use in the early game. That was one of my chief objectives with this game (since I'm basically done with an RTS game as soon as I find that best path). In the next article in this series, I'll talk more about how the unique design challenges of a space environment helped make this happen.

Saturday, May 9, 2009

AI War: Fleet Command is now available!

If you're into smart, fun indie games for the PC, check out the website for Arcen Games, my new indie games development company. Our first title, a space-based RTS game called AI War: Fleet Command, is now available for demo or purchase! AI war has vast numbers of ships in every game -- 30,000 or more in most -- and it also has some of the toughest, most interesting AI in the genre.

The game is played in cooperative campaigns for 1-8 human players against 2 stronger AI opponents. With over 100 hours of content, there's some serious replay value here! With so many features, and at $20 per copy, it's a steal compared to our competitors' games. We also regularly add free downloadable content (DLC) for our players, so there's always something new to find and explore!

Friday, March 6, 2009

Questions about Manuscript Analyzer

This morning I received some excellent questions about my tool Manuscript Analyzer, so I thought I'd take the time to address those here. Here were the questions:

What are the definitions of the items you point out, such as frequent offender, common, etc,? Why are these items important? Are they good or bad styles? Who decided that these particular items should be pointed out?
So, without further ado, the answers:

If you look down under usage tips on this page (http://www.christophermpark.com/manalyzer.php), it shows you the basic definitions. Frequent offenders are simply words that are commonly overused in manuscripts. The source for those are ones that I've noticed, as well as ones noted from such books as Don't Sabotage Your Submission, and various agent blogs (Nathan Bransford is an excellent one).

Common words are just small words like "a," "the," etc. Repetition of these is usually not an issue, which is why the tool lets you ignore them.

Phrases are cliches, mostly, but also redundancies ("and then", etc) which various agents have blogged about bothering them. All of the decisions about what to include were my own, however -- I wanted a tool like this to help me analyze my own manuscripts (making it available to others was a secondary occurrence).

These are all to be used as guidelines only, but if you are using any of the phrases, your wording is probably not as original as it could be. If you have a high repetition of any word that's not in the dictionary, you're probably overusing it. There's an early chapter in Don't Sabotage Your Submission that talks a lot about word repetition, but this tool helps you to automatically do the counting on a manuscript-wide basis.

Remember -- this tool doesn't do the analysis for you, it just flags common things for you and helps you do your own full analysis. Sometimes the words/phrases that a writer overuses are unique to a given manuscript; an editor pointed out that I had vastly overused the phrase "one-tined" in a recent ms of my own, and I doubt that has been a problem phrase for anyone else, ever. So the tool is meant to help you find things like that, too.

Tuesday, February 17, 2009

Announcing Arcen Games

Since January of 2008, I've been working on a computer game called Alden Ridge -- it was originally meant to be something of a promotional item for my novel of the same name, but it's taken on a life of its own. Starting in November 2008, I've also been working on a game called AI War. These two games are now progressing to the point that I'll be ready to release AI War within 3-6 months, and Alden Ridge in another 3-6 months after that.

With these goals in mind, I'm founding a limited liability company called Arcen Games. The paperwork is still pending for the company, but the website is open. Check it out: http://www.arcengames.com/.

On Writing

It's been a while since I've posted here -- the focus of this blog has been changing for quite some time, same as my foci have been changing. This blog started out being exclusively about writing and publishing, but it's gradually become more about art and computer games.

In the last six months, I've made a decision to focus more on creating computer games for the moment -- I'm better at that than I am at writing, at least for the time being, and it provides satisfaction instead of frustration. Don't get me wrong -- I'll never stop being a novelist -- but there are some things that I just haven't figured out yet about writing novels, and I'm giving myself some time out to find those answers. Writing is the hardest thing I do, as well as one of the most rewarding, and I'm reconsidering my desire to have that be my full-time job. I've have several dozen novels in me, I think, and at twenty-six I have plenty of time to get them out. Even though I'm not actively writing at the moment, I'm reading as much as ever and dissecting the styles and techniques that I see.

Friday, October 10, 2008

Converting System.Drawing.Bitmap to XNA Texture2D

For those of you who visit this blog for art or writing topics, this is your fair warning: this post will hold no interest for you.

For those independent XNA game developers who find this post via Google, I hope I can help with a problem I've seen talked about in a few places on the 'net.

In the game I am currently working on, I have a need to load a bunch of bitmaps into memory, and then I need to turn those bitmaps into texture objects. I'm using a blend of GDI+ and XNA in my application, you see. Previously, when I was using MDX in conjunction with GDI+, this was no problem because there was a direct conversion available. Since XNA is dual-targeted at both the 360 and the Windows platforms, there isn't a conversion available.

On various forums I've seen solutions batted about relating to doing a per-pixel copy of the images from one format to the other (often using Bitmap.GetPixel, which is horribly slow -- you're much better off using Bitmap.LockBits, but even that is not nearly ideal).

The solution I have is simply relating to memory streams, since a Bitmap can be saved to a stream, and a Texture2D can be loaded from a stream. This approach might seem like a waste of memory, but it's the most processor-efficient way to do this. My game is able to process several dozen 28x28 images in under two seconds using this approach. The trick is to do the conversions just in little bits, as you need the images, rather than doing them all up front (which would take forever, and really give the garbage collector fits). I leave that part up to you. Here's the C# code for the actual conversion, which is quite simple:
Bitmap b = new Bitmap( nameOfFile );
Texture2D tx = null;
using ( MemoryStream s = new MemoryStream() )
{
b.Save( s, System.Drawing.Imaging.ImageFormat.Png );
s.Seek( 0, SeekOrigin.Begin ); //must do this, or error is thrown in next line
tx = Texture2D.FromFile( GraphicsDevice, s );
}

That's all there is to it!


(Added point of interest: It seems that XNA is unable to load GIF files -- presumably a licensing thing, knowing GIF -- but of course regular .NET is able to load those just fine. Using this sort of code provides a way for you to load GIFs or any other format that .NET supports but that XNA does not into XNA Texture2D objects. This is handy for me, because at present my project has... uh... just over 8,500 GIF files in it.)

Thursday, October 9, 2008

Smooth Scaling Tiled Sprites In XNA

For those of you who visit this blog for art or writing topics, this is your fair warning: this post will hold no interest for you.

For those independent XNA game developers who find this post via Google, I hope I can help with a problem I've seen a lot of frustration on (and experienced frustration with myself). For background with the problem, see these posts (#1 and #2).

To summarize what you will find at those links, basically there is a "problem" when scaling images in XNA or DirectX wherein if you use the Sprite/SpriteBatch objects to draw a series of tiles, you'll get cruddy little lines, grids, or seams between many of your tiles. But the problem ONLY happens when zooming in (i.e., scaling 2D textures to a resolution higher than their native resolution), and it's fairly inconsistent. Sometimes half a pixel or so, sometimes up to a pixel, but never more, and it doesn't always even make a grid between every tile.

The main theories on this were that this was some sort of floating-point rounding error, or that this has to do with odd-sized textures (that perhaps are not powers of 2 -- mine, for instance, are 28x28), or that this was related to lacking the Clamp state of the u and v axes of the SampleState. Personally, my money was on some sort of "off by one" issue relating to zero-indexed widths and heights. None of these are correct.

As one enterprising programmer on the above links figured out, the real culprit is interpolation. By default, when scaling textures, Bilinear Interpolation is used to make it look nicer. If you are familiar with how that algorithm works, basically it's using a 2x2 grid of pixels adjacent to each target pixel, and blending them together. That works great in the middle, but at the edge of each tile there is nothing there -- each sprite tile is rendered independently (for the most part), which is why the black line creeps in. That line isn't a gap at all, it turns out, but rather a factor of the interpolation.

The quickest solution to this is to use point-based interpolation, which is basically no interpolation at all. In XNA, the C# code would be this:
sprite.Begin();
GraphicsDevice.SamplerStates[0].MagFilter = Microsoft.Xna.Framework.Graphics.TextureFilter.Point;

Problem solved, right? Well, yeah, but now we have a new problem -- without interpolation, your zoom is going to look awful. Programmers on the message boards had a bevy of potential solutions to this, some involving custom shaders, some involving replacing the SpriteBatch class, others involving manual edits to every image used in their game.

I have a vastly simpler solution (both in terms of programming effort/time, and in terms of processor time). Here's my rationale: this is an interpolation problem based on the fact that each tile is rendered separately, right? So the problem is not that we're scaling these tiles up, but rather that we're scaling them up one-by-one. If only there was a way to combine them all before rendering the current frame, and then scale them up together!

But wait, I hear you say -- something like that doesn't sound processor-friendly, right? That would basically double the amount of rendering we need to do, wouldn't it? If that's not what you were thinking, ten points for you for remembering that we're already doing that -- it's called the back buffer!

Since we're already rendering these sprites to the back buffer, then flipping them to the screen all at once, we've already got this pretty much handled. All we need to do is tweak the size of the back buffer before rendering, and it will automatically scale up to the view area -- perfect interpolation, great quality, no lines. The C# code looks like this:
float zoom = 0.8;
this.GraphicsDeviceService.ResetDevice( (int)Math.Round( this.ClientWidth * zoom ),
(int)Math.Round( this.ClientHeight * zoom ) );
I'm assuming here that you're using WinForms-hosted XNA code like from this example (http://creators.xna.com/en-us/sample/winforms_series1). If not, you'll have to fiddle with how to get this working in your environment. The basics are to set up a PresentationParameters variable with your desired width/height and to then do a graphicsDevice.Reset() and pass in that variable.

A few last points of interest:

- You'll notice that the zoom is inversed here. The zoom of 0.8 is actually equivalent to zooming in 1.2. The reason for the inversion is that we are shrinking our back buffer relative to the surface it will be rendered to.

- "this.ClientWidth" is assuming that you are calling this method from the Form, Panel, or whatever handle is your render target.

- As you may have already noticed, this method isn't compatible with your traditional "camera" approach, where you move a viewport relative to the world coordinates. To implement scrolling in your window (which is presumably the point here), you'll want to implement a global offset to your X and Y coordinates that are passed to SpriteBatch.Draw. NO NEED to do some massive global update of all your objects' coordinates as your window moves -- that's crazy. Leave your game world coordinates alone, and just do an offsetting of them as they are rendered in SpriteBatch.Draw. That way everything gets rendered efficiently, no massive updates are needed, and there isn't significant processor overhead incurred.

Happy coding!

Monday, September 22, 2008

Regarding Breaking Dawn

***SPOILER ALERT***
If you want to read this book and have not, don't read any further.





















Okay, so you've already read the book, or you're that sure you'll never have even a passing interest in it. Fair enough either way. My wife and I have both enjoyed every book that Stephanie Meyer has published so far, and Breaking Dawn was no exception. I tend not to read criticism of books I like (there is rarely any point, as it boils down to taste), but in this case the criticism was inescapable.

I started reading this book the day it came out, and finished it within a day or two, so it's been a few months since I've read it. I'm a bit late to the party with posting my thoughts on the novel, but I've been busy. Mainly I want to respond to some of the criticisms that have been made against this book:

1. The book is fan-service.

Well... this is true. Seems like kind of a fitting way to end a series to me. The protagonist gets what she wants, and everybody goes away happy. It doesn't make for a groundbreaking, emotional knife-twisting, but it sure made me happy. The Time Traveler's Wife was both wonderful and haunting, and it left me miserable and depressed for days afterward. Quite the opposite with Breaking Dawn. Personally, I think there is room for both kind of books -- those that reaffirm life, and those that speak to the inevitability of death. I'd really hate to imagine a world with just one or the other. I tend to trend toward the bittersweet or dark endings in my own writing, so this is in no way a defense of something I might do. But I'm not opposed to the idea that something I'd personally never do is still a valid thing to do.

2. Bella is too perfect, creating a vehicle for the author to fantasize through.

Well... I can see that, too. But this is hardly new. Superman and a lot of other comic book heroes come to mind as falling into a similar mold. It's satisfying to read something like this every once and a while, though it would have been boring if the whole series had been this way. It is indeed more interesting when the main characters have flaws, but Bella has been so flawed for the rest of the series that it's quite an interesting change to see her as the active, powerful one for a change (she has been so passive in many ways in the other books, so it's a notable shift). I can see why this would turn some people off, but I don't think it's right to make a sweeping dismissal of the work for this reason.

Oh, and the complaint that all the guys fall over her even though she thinks she is ordinary? Well, this really happens. Whether or not it happened to Stephanie Meyer is irrelevant, this is the story she was telling and it is not as fantastical as some people seem to think. The same thing happened to my wife a lot in high school before we got engaged (and after, a bit). Of course, I know the truth is that my wife is far from ordinary, even if she never seemed to believe it!

3. The birth scene.

Squeamish, are we? My wife and I plan to have kids in a few years, and this scene did not change our views on it one iota. It's an interesting bit of science fiction. I guess maybe this was unexpected for some in a YA book, but Stephanie Meyer has noted that she never set out to write YA with this series.

4. Overuse of adjectives and descriptors like "dazzling."

This is definitely a glitch in Stephanie Meyer's writing, but it's hardly something worth condemning her for. If she were not so popular, people wouldn't complain about this. For a relatively new author, she's extraordinarily polished and professional in her presentation and wording. People complained about "saidisms" and other extra adjectives in J.K. Rowling's books, too, but I also felt that those complaints were a bit on the nitpicky side.

5. The book is angsty.

Well, so are a lot of teenagers. So are a lot of people in love. I think that part of the reason this series works, and the reason it resonates with people so much, is the fact that it is truthful in its emotions and its story arcs. If you're jaded and don't remember what it was like to be young and in love (or missed that boat entirely), I guess it would seem a little overmuch. But again, this boils down to a taste thing. I wouldn't want every book to be like this, but I wouldn't want every book to be like any single work. This book does an excellent job of honestly telling the story it is trying to tell.

6. Characterization blunders.

(Jacob and Edward's shift in views throughout the book, the easygoing nature of Charlie and the mother when it comes to Bella's wedding, etc.) Some people have complained that these parts of the story seemed out of character with past novels, but I didn't feel that way. I was surprised at how easy Charlie and the mother took it on Bella, but it wasn't grossly out of character -- his laid-back attitude and the mother's flighty nature had been long established. Given that, it wasn't much of a stretch to have their reactions be comparably tame so that the story could move along.

As for the changes with Jacob and Edward, there was support for their changes in past books, too. Edward has long made it clear that he would do whatever is best for Bella even at the expense of his happiness (hence his offer for her to have "puppies"), and Jacob has also been fairly prey to Bella's whims. The "imprinting" thing was also long established, and provided an interesting and funny plot arc.

7. Build Up To Nothing

So they do all this preparing for a battle that doesn't happen, right? I disagree. The battle very much happened, but it was more about positioning and maneuvering and discussion than just brawn-on-brawn. Surely you don't think the Cold War wasn't a real war just because we didn't have tanks and planes and nuclear weapons firing left and right?

Yes, there was not a battle in the traditional sense (as there was in Harry Potter), but I think this was one of the strengths of this work. The physical/magical battles in Harry Potter were long established through the series and so to not have one at the end would have been a letdown to be sure. But in the Twilight series, physical violence has been far overshadowed by the threat of violence along with emotional and mental conflict. Stephanie Meyer delivered on all these fronts without taking the story in a cliche direction just for the sake of having a "big battle" at the end. I thought it was the right decision, and it tied together nicely with everything else she had written so far.

8. Bella doesn't lose anything. There are no sacrifices.
Yep, this is a pretty "happy ending" type of book. In some respects, it is almost one long epilogue to the rest of the series. As I said before, that's not the sort of book I'm likely to write (I trend darker than that), but it doesn't offend me in the least that Stephanie Meyer chose this path. I found it interesting, and enjoyable, and a wonderful way to say farewell to the characters. In fact, if she wrote another book that was an "epilogue to the epilogue," so to speak, I'd read that one, too.

There are room for all kinds of stories, and not all of them have to center around suffering and loss. Bella and Edward (and Jacob) certainly suffer plenty during this novel, and there is conflict everywhere even when an overarching plot is not evident, and I felt like that was more than enough to keep the story interesting and meaningful. The fact that the suffering is passing and that everything works out is perhaps part of the uplifting theme of this book -- some genuinely dark and scary stuff happens (the birth in particular), but at the end of it things are better and life goes on. Surely this is a message worth writing about at least in some books?






There were other complaints in addition to these, of course, but most of them were so clearly rooted in taste that they aren't really debatable. To me, the most important thing is that Stephanie Meyer's work was original and interesting -- she didn't fall back on formulaic tropes, and she didn't bore her audience with self-indulgent tangents and explanations. Almost everything fit, the pace was reasonable, and she left at least this fan with a pleasant memory of her series at the end of it all. You can argue the artistic merits all day long, but I think there's value to be had in doing just what Stephanie did.

New Art

Over the last few months, I have added a variety of new images in my latest gallery. Some highlights:

Back Creek 2

Blowing Apocalypse
(This monster is the one I am considering making a plastic model of.)

Broken Gravity - Panoramic

Hangar Scaffolding

Power Substation

River Vegetation 2
(Now with realistic shoreline)

Swallowing Pills

This is more of a public service announcement than anything else. All my life, I have been unable to swallow pills. In twenty-some years, I've never swallowed ONE single pill. For years I have had acid reflux disease, but it has gone untreated because I couldn't take the medicine. Now the consequences of that have become more serious, so I finally managed to teach myself how to take pills.

According to some statistics on the Internet (who knows how reliable these are), perhaps as many as 40% of all adults have trouble swallowing pills -- to the point that they sometimes skip their medication out of frustration, etc. I tried all the various techniques from all sorts of different sources. I also bought the surprisingly-inexpensive Medi-Straw to try to improve the situation. Nothing worked for me (but there are lots of good ideas on those links, and the Medi-Straw would probably do great for people with different swallowing methods than me).

But I kept at it for weeks, trying to swallow this stupid little slow-release pill that was fast turning into a demonic tormentor. The trick, for me, finally came with analyzing how I normally swallow and focusing on that. Let me explain:

Like a lot of people, I eat relatively quickly. This means I was already swallowing fairly big chunks of food while eating -- much bigger than a pill at times -- without thinking about it at all. This is something we all do, and so it stands to reason that we can all learn to swallow pills easily with practice. Two months ago I would not have believed I would say that, though!

My breakthrough came from tearing off half-dollar-sized chunks of wonder bread and chewing it, then swallowing it. No pill yet, just the bread. I noticed that I could comfortable swallow pretty much the whole thing in one go without incident or discomfort, after chewing it a bit. I focused on the way my tongue stayed out of the way (it had historically been blocking the pill from going down my throat, or keeping it pinned against the roof of my mouth), and the mechanics of how I swallowed when I wasn't stressing about something foreign (like the pill) being in my mouth.

At least for me, it was nearly impossible to swallow the pill until I paid more attention to how it felt to swallow naturally. I suspect others will find the same. Once I was comfortable with how it should feel to swallow the pill, I took another half-dollar-sized piece of bread and chewed it up. At the last second, when I was ready to swallow, I instead paused and dropped the pill in first. Then I swallowed, and presto -- I could hardly believe the pill was gone.

This remained difficult for another week or so, often taking up to 45 minutes of trying to successfully complete, but with more practice it became gradually easier. Sometimes I had to chew the bread a little more with the pill actually in my mouth (careful not to chew the pill itself), but in this general way I was able to get the pills down reliably.

Now it's been about two months, and I can easily take pills on the first try with just a bit of bread. I've also taken them with brownies, grapes, lasagna, and other random foods that happened to be handy at the time. I still can't take it with liquid, but pretty much any food can be chewed up and swallowed with the pill. It's not a matter of "disguising" the pill inside pudding, or some other sort of food -- it's a matter of suppressing my gag reflex and satisfying my subconscious that there aren't harmful foreign bodies in the food. Once I learned how to do those two things, it all became possible, and in fact surprisingly easy.

You can do it too! The last tidbit that helped me on this long road was this: evidently it is impossible to accidentally inhale a pill given the mechanics of how your mouth is constructed. This was extremely reassuring, let me tell you. Best of luck everyone out there who still can't take pills reliably -- I have every confidence that you can accomplish this thing. If I can do it, after all those years of failing, truly anyone can.

The Protomen

The Protomen are absolutely amazing. I've never been a particular fan of Mega Man, but their music video (see link) really hooked me and I bought both their albums. If you aren't into NES-style chiptunes (I love them) you should stick with the first album, though.

The Protomen are basically a band that creates rock operas surrounding the story of Mega Man. Their title track, Hope Rides Alone (the music video linked to above) is pretty amazing, but a lot of their other tracks are just as good, if not better. The Will of One is just incredible, as are The Stand and Sons of Fate.

As with most rock operas (another personal favorite: Beethoven's Last Night), I found I had to listen to the Protomen album multiple times before I caught everything that was going on. The first few listen-throughs I simply found the material compelling, and a good listen. After I really understood the story, however, I discovered a truly unexpected emotinal weight to it. I've always thought of Mega Man as largely uninteresting, lightweight robot fare (apologies to fans), but the story presented here is something I won't stop thinking about for a long time. This just became one of my favorite albums.

Shapeways

If you haven't heard of Shapeways and you're at all into 3D computer design, check it out. It's a service for printing three-dimensional objects made of lego-like plastic. That probably sounds like sci-fi if you haven't heard for 3D printing before, but it's quite real. What's unique about this service is its relatively low cost compared to most 3D printing shops.

For authors that are also into 3D modeling, or who know (or can pay) someone with that skill, this is a pretty cool opportunity. Personally, I'm planning on making a plastic model of one of the monsters from my current novel -- if it is published, that will be a pretty cool thing to have for giveaways, and as a talking point at any signings, etc. Definitely better than pens or buttons or whatever (though those have their place).

Maybe I should be selfishly hoarding ideas like that for my own personal use, but someone else is bound to think of it anyway. And really, hoarding good ideas is for lonely jerks. Let's see some durable, painted, limited-edition figurines of characters from upcoming novels!

State of the... me

It's been a long time since my last post, hasn't it? Well, there's no surprise there for me -- it was inevitable. I stink at routines. Everything I do in life seems to happen in spurts, since I have so many things competing for my attention. I'm sure everyone here is familiar with that juggling act.

"Everyone here? You mean he expects that someone is still hanging around this dusty old blog?"

Well, oddly enough, the weekly hits to my blog/website have hardly dropped at all during the long silence, though the visitors are of a different nature. Where once I primarily had aspiring writers popping in from blogs like Miss Snark, Nathan Bransford, or Anne Mini, now it's mostly people finding me through keyword searches on Google or Google Images. Amazing how free art can bring in random traffic. I hope people are putting it to good use / enjoying it.

But I digress. At this point I should be launching into the cliche Blogger/Livejournal "I'll try to do better" post, right? God knows I've written my fair share of those already this year. But I'm not going to flog that dead horse again -- time to stop apologizing. Fact is, I'm not a "good blogger" and I don't really aspire to be one. Daily content of merit? Lord, I don't think I have it in me. Weekly is even a huge stretch. I've long been fascinated with the cartooning careers of Gary Larson and Bill Watterson, wondering how they managed to keep up a daily flow of great work over what basically amounts to a decade. And now I know... I'll never know. I'm just not that sort of writer. I don't write poems or short stories for much the same reason -- everything worthwhile I write requires forethought and marination, as well as page space to stretch its legs.

Hence why my blog posts have always been a bit too long for comfortable daily-digest-style reading. This just isn't my format. Besides, all the time and effort I might spend on trying (and ultimately failing) to maintain a "good" blog would just be siphoning that time away from more meaningful pursuits.

Here I considered going into a lengthy definition of "more meaningful pursuits," supported by commentary on why I'm unhappy with many of my prior posts about writing, but one thing I'm learning these days: less is sometimes more. I trust you can draw the needed inferences yourself, and if not... well, you probably don't really care anyway.

SO. What's this blog still doing here, if I'm not going to treat it like a proper blog? Well, my current plan is to mistreat this poor webspace for years to come. Yes, blog, you're in for an extended, lonely, world of pain: you've just become primarly... *gasp*... a news page.

Basically, if I have some news to share, I will. If I don't, I won't. How frequently will I update? Who the heck knows? Will my posts be long and insightful? Probably not! Will I provide interesting links on occasion? Yes! Posts of new art? Yes! Lot's of rhetorical questions and exclamation points? Let's hope it ends here!

In all seriousness, sometimes I have things I need to share with the world, but there's not a lot of value in me blathering on about nothing during the in-between times. I'm not very good at it, and it's not a personal goal. Lately it's been quiet on the personal-news front because I've been writing, working on another project of a different sort (to be announced in around a year, most likely), and basically taking some time to enjoy life and spend time with my wife.

The writing well, for me, really dries up without those other stimuli and activities. This is the main thing I have learned about writing in the last quarter year: some activities sap my ability to write well (like watching copious amount of low-grade television or movies, Internet/blog addition, reading too many novels that aren't in a style I admire), while other activities enhance it (video games in moderation, exercise, healthy eating, watching mostly movies and reading books with writing I do admire).

I've also finally been able to answer my most burning question to my own satisfaction: What is a novel? As in, what does it consist of, how is it made, why and in what way do some novels become more than the sum of their parts, while others sputter on the runway? I'd love to be able to share that revelation with you, but I can't really express it. It's a personal thing, anyway -- everyone who's really considered the question could probably give you a wildly different dissertation on the subject. It's not so much my answer that should matter to you; the important thing is, if you are truly serious about writing, that you take the time to vigorously search for your own answer. Finding mine has taken roughly three years of struggle, and I'm quite positive my thoughts on the matter will grow and evolve -- perhaps even change completely -- over the coming years.

So, for now, that's the news. All is well, my writing is proceeding at the correct pace for maximum quality of the novel and sanity of the author, and so on. A few more frivolous posts to follow (links to things I've found interesting recently, but haven't posted about).

Wednesday, June 4, 2008

Character Names

Originally in response to a post by Anne Mini:

Character names are definitely something I agonize over, and I use everything from baby name resources, to phone books, to random name generators (often just looking for syllables I like), to census records from various locales (the census records make for particularly interesting results).

I almost never use a first name I find with a last name I find with it. I search until I find one name that sticks, and then search for its companion. Of course, if the names are at all common, someone has that name, but I never start out trying to pick the same name as someone else.
Even my main characters tend to change names over the course of my planning, and sometimes also over the course of my writing and even late-stage editing.

In a literal sense, the person’s name is all we can “see” of them, and so the name has a lot of connotations for how I picture a character. A Mary looks a lot different from a Tzer-Talan, even if you give them the same detailed physical description. Even a Pam looks different from a Mary in the above situation.

I’d say I agonize over the major character’s names just as much as the title (even though I know the title is probably going to change, I want it to be the best it can be out of the gate). The minor characters are less troubling, but still really important and often hard.

Sometimes, when I don’t have much planned for a character, I pick a name that evokes something interesting and then build the character up around that. An unusual character name can almost be as good as a writing prompt!

Saturday, May 24, 2008

More Art, and Checking In

I apologize for not blogging more in the last few months (or posting on other people's blogs more). I've been very busy in my day job, and when I have had spare time I've been writing or making art instead of blogging. I can't show you any of the writing yet (though I will say that I started completely over on Alden Ridge), but here is the art I've done since mid-April or so:



River Vegetation


One of my new favorites from my own work. Somehow everything just gelled in this one -- the water, the light, the trees and the rocks and the sky. This is a rare image where I used an secondary light source (in addition to the sun) in order to achieve a specific effect. The same shadow and light effects could have been achieved if the positioning and density of the clouds was just right, but that would have been much harder to set up and then control.

Perhaps my favorite thing about this image is the sense of depth to it, and the way the river winds through the landscape. I used four separate terrains in this image to achieve that effect (rather than trying to chop a river into a single huge terrain). Not sure why I haven't ever done that more before...




Rural Ruins


I was very pleased with how this image came out, not the least of which because I learned more about how to effectively use displacement mapping in Vue. I modeled both the fence and the ruined house in SketchUp, but the house was rendered almost a year ago for a Bryce rendering called Snow Crest. I was very unhappy with how the house looked in Bryce, and so stuck it way off in the distance in the original image. In this new rendering, the house is right up close and I used displacement maps to add that extra realism that makes it work (the much better lighting also helps with the realism factor).



Rolling Arch


This is something of a spiritual successor to the very first rendering I ever did (though I had done some games related 3D modeling before that rendering). I love the refraction and reflections of the glass of the arch.

I modeled the arch in SketchUp.



Angry Desert


The sky in this one was rendered at unusually high quality, and I think the results are quite worthwhile. I recently upgraded my computer to a quad core, however, and it still took about 4 hours to render. On my old computer, based on speed comparisons I've done with other scenes, it would have taken more like 12 days to render (yes, days).

The building shown here is a modified version of the office from Treetop Office. I think it quite works as some mysterious semi-camouflaged desert outbuilding.



Night Pier


This rendering is based on something I saw during my weekend in Virginia. This rendering is from memory, and isn't an exact match, but it's a pretty good approximation of a very cool view I saw near the end of sunset. If you'd like to see a photo of exactly what I was looking at, that is now available here.

I modeled the pier in SketchUp, but the lamp post is an object packaged with Vue.

Monday, April 14, 2008

Forest Fence and Other Renderings

It's only been a few days since my last art post, but right now I'm in an art-creating binge. Also, I recently upgraded my computer to a quad-core, so I'm now able to get a lot more artwork done in the same amount of time (my time just waiting for the renders to complete is drastically reduced by this). Without further ado:



Forest Fence


This image is a bit darker than I would have liked, but what can I say, this is the lighting in which it looks the most realistic (I tried several sunnier variants with no luck).

I'm definitely really happy with the overall look of this, though -- if you've been following my renderings for a while, you might remember that I've previously had a lot of trouble trying to get anything approaching a realistic forest scene. I feel that I've finally done it.

I'm also pleased with the quality of the fence, which is something that I modeled from scratch in SketchUp. I think it turned out exceedingly realistic. My wife and I went up to Virginia this past weekend, and I saw some fences like this and knew I wanted to render them.



Loss 4


Thanks to an excellent comment by Stephen Parrish, I decided to take another stab at my Loss theme. This is the same image as Loss 3, except that I've completely redone the water (new waves, light flares, two layers of water, displacement mapping, and subsurface scattering). The result is a much more pleasing shadow for the tree (I think), softer waves, and a more vibrant solar reflection in the water.



Rural Overhead


Another great suggestion by Stephen Parrish, who asked about orthogonal views in the rendering packages I use. While this rendering isn't strictly top-down, it's as close as I wanted to come (a little bit of side-perspective adds more depth).

The fence is the same one I used in Forest Fence, while the houses, tower, and chapel are all free models by the fine folks at Turbo Squid.

Rob!

This is hilarious. I'd never heard of Improv Everywhere until literary agent Kristin Nelson mentioned them, but this is just the sort of thing I love. It's sort of like Candid Camera, except much larger scale. Another favorite is the Slo-Mo Home Depot stunt -- the reactions of the employees are priceless.

Friday, April 11, 2008

12 Dreams of Steel and Coal

It's only been a few months since I got Carrara, so I'm surprised to find myself already moving on. Vue is an even better program that recently came into my price range (it's still on sale, if you want to give it a look). This is one of the few rendering packages I've used that has made appearances in commercial special effects (Pirates of the Caribbean 2, most notably).

I'm sure I'll continue to use Carrara some, as I may use Bryce on occasion, but Vue is now the prime tool in my art milieu. All of the pieces from my latest gallery (still in progress) were done in Vue. Here are some of them:


Overcast Marsh


This is an instant favorite for me -- and it's also one of the most realistic renderings I've ever done. I hope to be able to realize this level of fidelity in many more renderings.


City Cloudscape


My 300th rendering (not counting those in The Dregs or those that have never seen the light of day at all)! That seems fitting, because this was an instant favorite for me -- its a spiritual successor to one of my earlier works, Sky Castle, which was created nearly ten years before. 300 renderings in 10 years... that's not too shabby for something that is, after all, a hobby.

The building models are not by me, but rather came packaged with Vue 6.


Loss 3


This is my second remake of perhaps my most popular image ever, Loss. The original version was done in Bryce 2.0, way back in 1998 when I was first learning how to do renderings. The second version was done in Bryce 6.1 in 2007.

When I was heavily into Carrara rendering, I tried to make a version of this image using that program. However, I found that the fantastical nature of the image just didn't turn out very well in such a realism-minded program. I was afraid the same thing would be true with Vue (which is equally realism-minded), but the flexibility of the atmospherics model in Vue is such that I was able to achieve my unrealistic sunset with a modicum of tweaking.


Overland Sailboat


It's been a really long time (almost a decade, I think) since I last rendered a low-lying landscape from this height and perspective. I love this sort of view, but the challenge of realistically managing the horizon has always kept me sticking with more mountainous terrains (which I also love, of course). Finally, with Vue, I'm able to achieve the sort of effect I've been looking for all these years. This is one of my few renderings that someone has mistaken for a photograph at first glance.

The sailboat is a stock item from Carrara 6, imported into Vue.


Distant Skyscrapers


These are the first building models I've created myself in a while. Vue is able to import directly from Google SketchUp, and is able to do so in a manner that makes it easy for me to apply complex textures (which Carrara and Bryce both had trouble doing with SketchUp objects), so I imagine I'll be doing more such modeling from now on.

The twiggy brush in the foreground is also of my creation, based on a different solidgrowth tree in Vue. In general, I was very pleased with how dismally industrial I was able to make this scene.


Cliff Rays


"God rays" are a favorite subject of mine in landscapes, and this image marks my first foray into that territory in Vue. I was also particularly pleased with how the crags of the mountain came out, along with how the foreground grasses add realism and perspective.


Subcon Palms


I love this one. In some ways it reminds me of the opening chapters of the Prince of Persia: Sands of Time game, but I designed it as a 3D re-imagining of Subcon, from Super Mario Bros 2 (one of my favorite games). I love the look of this one in any case, though, with its multi-layered ecosystems.

This is also the first night scene I've done in some time, because I was having a hard time making those look right in Carrara. It's actually more complicated to make night scenes in Vue (in Carrara and Bryce there is a simple toggle), but the end result can be much better. I imagine I'll be doing more of them.


Desert Fire Fog


This was my second rendering in the full version of Vue. I wanted to see just how good the lighting and cloud effects could be -- the answer is "quite good," I think you'll agree.

One thing I really like here is how volumetric clouds are treated almost like meta blob objects (rather than simple bounding cubes). This allows for low-level clouds that look more organic, both by giving each component cloud a more realistic shape, but also by letting them "merge" together into larger clouds in a realistic manner. It's a little hard to explain if you aren't already familiar with this sort of thing, but let's just say that it lets artists model unusual natural phenomena more easily.


Sunset Ruin 2


This is a re-envisioning of one of my favorite early renderings.


Sky Canyon


This one was unusually tricky to get right, and took me several more iterations than normal to get right. I'm pleased with the end result, except for the horizon line.


Blue Crags


This is another one that took me forever to get right. In the end, the composition is completely different from what I had originally imagined, but I'm happy with it.


Autumn Mountains


My first rendering in the full version of Vue. I was immediately floored by how realistic the "ecosystems" component is. These sorts of grasses and trees wouldn't be possible in any other rendering package.


Stormy Islet


One of my moodiest pieces ever. I was particularly pleased with how the ocean waves turned out.

Tuesday, April 1, 2008

Two Tone Range

Two Tone Range



Purely an experiment in lighting and atmosphere, the end result is something I really like. I enjoy the contrast of the ruddy darkness beneath the clouds with the grayish light above them. This sort of duality is the sort of thing that occurs all the time in nature, if you think about it, but it's the sort of thing we are rarely able to see from ground level.

Saturday, March 29, 2008

Hairy Spaceship

Hairy Spaceship



One of my stranger renderings of late, it's also one of my favorites. I wasn't really sure what I was going to create when I started with a blank slate in Hexagon, but the underlying structure of this model was what emerged. I thought it would make a good base for a translucent crystal of some sort, but when I started working with it in Carrara I quickly decided to go with something darker, opaque, and reflective.

The hair was the stroke of inspiration that tied this all together for me -- the weather, the water, and the patchy mist clinging to the ship all serve to refine and emphasize this one aspect of the scene.

Frankly, I find the end effect pretty menacing. Always a good thing.

Thursday, March 27, 2008

So Many Clocks!

I've never really thought about this before, but this world really is filling up with clocks. Doing a quick mental inventory of the clocks in my house, I come up with:

1 oven clock
1 microwave clock
2 wall clocks
3 alarm clocks
2 desk clocks
2 watches (at least -- probably more)
3 computer clocks
1 clock in answering machine
1 clock in VOIP phone
4 clocks in entertainment center equipment
3 clocks in miscellaneous other electronics
1 clock in wall thermostat
1 clock in bike odometer

That's 25 clocks right there, and I know I missed a good number of them. I also only counted those clocks that have some sort of visible display, whether on a monitor/screen readout or whatever. I'm sure various other electronics have some sort of internal clock of which I'm not even aware.

This is a pretty random thing to quantify, on the surface -- but on the other hand, it seems pretty descriptive of our society that we are perhaps more surrounded by timepieces than any other civilization on Earth has ever been.

Wednesday, March 26, 2008

Force Feedback In Managed DirectX

I recently wrote my first article for Code Project. It's on a pretty niche programming topic, specifically controlling the actuators in game controllers via C#. This is something that should be a pretty basic topic, but a longstanding bug in some Microsoft libraries prevent their examples from working with many game pads. My article outlines the basics of how to do that sort of code, and shows how to work around their bug.

Let go of my CD!



I recently discovered an online comic called xkcd, and I must say it is hilarious. A lot of the jokes are things that would only be funny to programmers, but I think anyone can appreciate this one. I enjoyed many others from that strip about turing tests, sysfaults, compiling, imaginary kilobyte denotations, and many other topics, but I doubt you'd be as interested in those if you're part of my normal readership (aka, other writers).

Monday, March 24, 2008

Island Chain

Island Chain



Another Carrara sunset, this time I was playing with light to see how dramatic I could make the effect. The result was quite pleasing, though I did have to massage the colors and contrast a bit in Photoshop to get the final effect.

The tower model was a freebie from Turbo Squid.

Saturday, March 22, 2008

Unintended Influences

Whenever my family gets together, we generally play games. Xactica, Turn the Tide, Five Crowns, Phase 10, and Coloretto are long-time favorites of the Card variety (though we also enjoy others such as Descent, Settlers of Catan, Princes of Florence, among dozens of others). Anyway, the point being that we have a very wide variety of games we play.

Recently, we've added Three Dragon Ante to the mix. It's a fun, semi-strategic, card game under the Dungeons & Dragons license. I've never played D&D much, though I have played some of the computer spin offs such as Unlimited Adventures and Neverwinter Nights. I have a reasonably thorough understanding of most D&D mechanics, though I've never been wholly invested in the property.

Imagine my surprise, then, to discover the names of two particular cards in Three Dragon Ante: Bahamut and Tiamat, the two dragon gods. These were names I had given to two of my seven Elder Dragons in THE GUARDIAN (which are also the only dragons in my series -- and there are no elves, dwarves or fairies/faeries, I swear).

I hadn't realized that these two names were used together in D&D, or I never would have chosen them to use in my own work (I picked them for their mythological significance). Fortunately it was something I caught on my own, well before the work was even sold -- how much more embarrassing would it have been to stand accused of plagiarism years later? At that stage of the game, it would have been very hard to convince anyone that the choice of name was unintentional. I hear the same sort of thing happened to Katherine Paterson with Bridge to Terebithia. I've been sympathetic to her on that issue since I first heard of it, but now I can really relate.

From now on I'll be googling every name I use if it seems at all familiar. A lot of the names I use have their roots in various world mythologies or classic works, but using names from modern writers/works isn't the same thing. I've renamed Bahamut and Tiamat to Deinderak and Tiarak, which are definitely unique. The characters were already quite unlike their (unintentional) counterparts in the D&D universe, so at least their monikers were all I had to change.

Writing a novel is an interesting endeavor in that you are simultaneously inspired by others' works and setting out to do something wholly original. The more original the better, of course, but there's no way to be original unless you know what else is out there (and, come on, good writers enjoy reading for pleasure, anyway). Sometimes a little too much of some other writer's influence sneaks into our works, and we have to guard against that. Even without the issue of plagiarism, reusing characters, names, ideas, or phrases from other works isn't going to make your own writing stand out. Where would we be if writers weren't out there inventing words like "hobbit" and "muggle" and "jedi?"

Wednesday, March 19, 2008

Doctrine of Insufficient Adulation

Via Slashdot, I found an interesting article called Why Apple fans hate tech reporters. The basic premise is that when people are really rabid about an idea -- the merits of a certain product, religion, or political stance -- they perceive even-handedness as an insult. In other words, if I think you're completely wrong/evil/whatever, and someone else comes along and doesn't immediately leap to my side, I'll feel like they're siding with you.

Interesting. Disturbing. This is apparently just part of human nature, because I've certainly seen it before in life, though I'd never thought much about it until WSJ columnist Walt Mossberg pointed it out. It's particularly troubling for me, because I tend to avoid political conflict by remaining neutral. Go ahead, ask me what I think about abortion or Israel or Global Warming -- I'm not going to debate those things with anybody, at least not at present.

There are many conflicts in the world, a great many of which affect me, but I am not enough of an expert on them to feel like I can take a meaningful stance. On those issues with which I do have first-hand experience (the need for helmets on bicyclists, issues with violence in schools) I'll definitely speak out. I know it's more popular for people to have ardent opinions on anything and everything, but that's never sat well with me. I've always been a moderate, only taking one side or the other when I feel particularly informed or knowledgeable about the issue.

And now I discover that even moderation is likely to drag me into ideological scuffles I want no part of. How the heck does Switzerland do it? Oh, well, life wouldn't be interesting without conflict.