TorqueX Game: "Blade's Edge", Part 1
by William Clark · 05/28/2008 (3:25 am) · 2 comments
I've just finished my first complete game, which consisted of a series of 2D minigames based upon the various Hovses at Caltech for Ditch Day, and I'm now planning a semi-professional game as a side project for while I work at MGS. I've decided to do a relatively traditional turn-based RPG, styled loosely after Chrono Trigger. I'm going to target Xbox Arcade as the primary way of playing the game. As a big graphics nerd, the first part I'm working on is a set of graphical effects that I think will help establish the style.
So far, I've combed through the system to learn how shaders work, and am very impressed. No need to learn how to set up a back buffer, draw fullscreen quads, etc. Postprocesses are very elegant and simple, as are customized material types. The two major effects I'm working on are going to be recoloring of sprites based upon a very simple system to allow for automatic Diablo2 style artwork reuse, and a fullscreen color-flash effect.
Chrono Trigger repaletted goblins.
The first effect will consist of a material that can be applied to monsters that will allow the system to color them using a set of palettes. Basically the idea is that my artist will draw sprites that will be targetted for recoloring using a relatively small set of colors (probably <= 16). They will also supply a palette texture. The first row is the colors they used in the given image, while any other rows will be alternative palettes. By selecting one of the palettes with an index supplied in the RecoloredCharacterComponent, the correct set of colors can be selected. Then, in a shader, the index will be used to look up which color off the palette texture to use. This may sound overly complicated, but it's like a system I did in the game demo I worked on this summer, and it'll be fast to implement. The advantage is that it will remove the need to juggle tons of near-identical sprite files, and run some sort of obnoxious Photoshop batch process anytime the artist decides to change a few frames of animation on an enemy.
The second effect will be used for the elemental magic system of the game. My idea is that the Xbox controller has 4 very elemental-colored buttons, and I would like to link those to four elements for use in the game. The main character is a sort of elemental spellblade, where he channels Air (Y button, lightningy), Fire (B button), Water (X button, icy), or Earth (A button, naturey) through his blade during attacks, and choosing which element to use at any given moment will be a big part of the strategy. From there, I want to allow for a FF8 (and probably other FF's) style combat system, wherein pressing a button at the moment that the attack connects will make it more powerful.
Thus, once during the course of each attack, the player can press the button corresponding to an element in order to flare the energy of the blade, causing the particle system on the blade to flare up and the screen to be tinted the appropriate color. Both of these will rapidly spike, then exponentially fade off over a quarter or half second or so. The intensity of the effects when the attack connects (as measured in the function generating the spike and fadeout) will correspond to the increase in the attack's power.
The exact control scheme behind this needs to be ironed out (for example, does the player pick the element of the attack at first, then have to match the color, can they make multi-elemental attacks by pushing a different button, or do they choose an element only by doing this button press), but making the effects will be useful.
So far, I've combed through the system to learn how shaders work, and am very impressed. No need to learn how to set up a back buffer, draw fullscreen quads, etc. Postprocesses are very elegant and simple, as are customized material types. The two major effects I'm working on are going to be recoloring of sprites based upon a very simple system to allow for automatic Diablo2 style artwork reuse, and a fullscreen color-flash effect.
Chrono Trigger repaletted goblins.The first effect will consist of a material that can be applied to monsters that will allow the system to color them using a set of palettes. Basically the idea is that my artist will draw sprites that will be targetted for recoloring using a relatively small set of colors (probably <= 16). They will also supply a palette texture. The first row is the colors they used in the given image, while any other rows will be alternative palettes. By selecting one of the palettes with an index supplied in the RecoloredCharacterComponent, the correct set of colors can be selected. Then, in a shader, the index will be used to look up which color off the palette texture to use. This may sound overly complicated, but it's like a system I did in the game demo I worked on this summer, and it'll be fast to implement. The advantage is that it will remove the need to juggle tons of near-identical sprite files, and run some sort of obnoxious Photoshop batch process anytime the artist decides to change a few frames of animation on an enemy.
The second effect will be used for the elemental magic system of the game. My idea is that the Xbox controller has 4 very elemental-colored buttons, and I would like to link those to four elements for use in the game. The main character is a sort of elemental spellblade, where he channels Air (Y button, lightningy), Fire (B button), Water (X button, icy), or Earth (A button, naturey) through his blade during attacks, and choosing which element to use at any given moment will be a big part of the strategy. From there, I want to allow for a FF8 (and probably other FF's) style combat system, wherein pressing a button at the moment that the attack connects will make it more powerful.
Thus, once during the course of each attack, the player can press the button corresponding to an element in order to flare the energy of the blade, causing the particle system on the blade to flare up and the screen to be tinted the appropriate color. Both of these will rapidly spike, then exponentially fade off over a quarter or half second or so. The intensity of the effects when the attack connects (as measured in the function generating the spike and fadeout) will correspond to the increase in the attack's power.
The exact control scheme behind this needs to be ironed out (for example, does the player pick the element of the attack at first, then have to match the color, can they make multi-elemental attacks by pushing a different button, or do they choose an element only by doing this button press), but making the effects will be useful.
About the author
#2
But ya, I'm learning about XNA content importing, cause I'm writing a minor change to .png importing to allow me to do the recolored enemies. Should be ready tonight. Basically, I'm identifying upon import which color from the palette is present at each pixel of the input image, and replacing the color with a texture coordinate into the palette texture, to make the shader easy and fast. As soon as I finish that effect, I'll post a full explanation with pictures of what I did.
05/28/2008 (1:19 pm)
Wow, you got a lot done there. I'm sorry you had to quit. I definitely know the feeling, though, from my many attempts to make games before I finally finished one. :-PBut ya, I'm learning about XNA content importing, cause I'm writing a minor change to .png importing to allow me to do the recolored enemies. Should be ready tonight. Basically, I'm identifying upon import which color from the palette is present at each pixel of the input image, and replacing the color with a texture coordinate into the palette texture, to make the shader easy and fast. As soon as I finish that effect, I'll post a full explanation with pictures of what I did.
Torque 3D Owner Will O'Reagan
Modern Intrigues
http://www.youtube.com/watch?v=OPH4ouZU69Y
Also made in Torque-X, unfortunately my design pattern had some major flaws.. so I quit the project for now.
I think your ideas are interesting, and you are on the right track. Good luck!!
Will-O