30 Dec 2008

Animation Investigation

Further investigation yield the following:

  • It looks like I should use DirectX (JT) instead of DirectX 8.0 exporter in Milkshape 3D. LINK
  • From DirectX animation example, there seems to be a concept of animation set and multiple animation track combination etc. The DirectX (JT) exporter GUI seems to indicate it can only export 1 set at a time. I am not sure if it's the case. Further experimentation is require in this area.
UPDATE: Well...this is weird...it seems only DirectX 8.0 export works for me. This is interesting...and so far I can't find answers online regarding the difference in usage of this 2 types.

29 Dec 2008

New Idea: Auto-Scroll Zone

Just thought of a new idea when I woke up this morning. Actually it's not new, but just an idea that I can incorporate some of the classic shoot-them-up (Gradius, 1942) gameplay into the mix. The current design is to let the player have total control on where to go, and if the player don't move, the robot will stay stationary. However within a level I could include strips of area, in which the robot has to constantly move in 1 direction as if in a "current." In this zone the gameplay will be like Gradius or 1942, except that the player can still decide to shoot in any direction they want. In another words, when the player enter the zone, the gameplay change to Gradius, where the player has to dodge bullets and obstacles while moving (scrolling) through the area automatically. When the player exits the zone, the gameplay returns to normal.

So what's the point and fun factor of this? I think those shoot-them-up has some different challenge factor like forcing the player to be "on a track," and limiting player dodging area etc. On the visual side, it can give the player a sense of speed and "rush." It has a very different tempo from games like Contra. Yet their game mechanisms have many similarities. So if I can put them together, it might be nice.

Again though I can't be too overly ambitious. I think I should finish the game first then add in this feature later. Now...where did I get this inspiration...I think it might come from Prince of Persia, which I played recently.

Model and Direction Setup

The original model and the entity direction (rotation) has been setup. Also, some process such as entity transformation matrices calculation has been moved to entity update function. The model exportation actually did not cause any trouble. I just use DirectX 8.0 export in milkshape 3D and it works...except a little glitch seen here, which I don't yet have a clear idea why:

The next thing I need to do is to add in animation control and setup a good control scheme or system. The system I used previously, a state system, might still be good, but I have to do a review about it and see if I should try another way, use the old way or improve on the old way. Another thing I should implement probably is a smooth rotation for the entity.

26 Dec 2008

Yet Another Puzzling Problem: 2nd Entity Not Showing Up

Yet I encountered another weird problem. When I added the second mesh, it does not show up. I thought it has something to with the world matrix, but after I reset the matrix with identity matrix, it does not show up neither.

Problems after problems, I wonder when will this ever end.

UPDATE: LOL, Cannot believe this. I left a device Clear (backbuffer clearing) call in the frame rendering function. That's why every time an mesh entity is drawn, the backbuffer is cleared, which cause the above problem. That was kind of stupid...got to watch out for this type of mistakes. In any case, it's always enjoyable to solve problems and see things finally working:


Hmm...so what's next?

23 Dec 2008

Thoughts On Software Intergration

The experience I have with CEGUI and DirectX mesh made me thought about the software integration processes. It seems to me now one way to break game development down is the following:
  1. Software integration (integrate 3rd party tools, code, etc into existing one)
  2. Application development (developing the game itself)
  3. Tool development (developing the tools required by the designers)
They might be proceeded in parallel, or not, depending on the situation I guess.

I think that it's possible sometimes people underestimates the time and efforts required for integration, which causes underestimated schedule in software development. This reminds me of a quote from the movie Apollo 13 (an absolute master piece, by the way):

Gene Kranz: "I suggest you gentlemen invent a way to put a square peg in a round hole. Rapidly."

That's right, sometimes you just have to figure out how to put a square peg in a round hole, even in software. It's probably even more difficult in software sometimes because you can't "see" software so you can't even tell immediately what "shape" the holes and the pegs are.

And I think I can summarize the general software integration process in 3 steps:
  • Find the Holes.
  • Determine how to put "this" into "this" without break them.
  • Repeat if failed.
Maybe I will discover more about it later, but that's the way things usually go and for now I don't think there is a way around it. I remember I read somewhere that software development is a "complex problem," therefore no matter what people do, complexity will exist in one form or the other. Yea, tools and library make things a lot easier, but the work required to integrate them is often not straight forward.

Scaling Progress

Scaling has been done. I was able to do so by buffering the transformation matrix into the existing vertices's transformation.

Now I think of it, I should be able to use MultiplyTransform after SetTransform instead of multiply it directly. Doing that way might make the code simpler, although...it's not that ugly now anyway.

22 Dec 2008

Freezing...

My heater broke on the weekend, and it looks like the cool temperature froze my brain as well |o|. As such I didn't get much done except doing some clean up.
Seriously though it makes me realize an "acceptable" working environment is important to program efficiently. I was thinking of the world "comfortable" instead of "acceptable" but I realize "comfortable" could mean a place where you can just get sleepy as well. I wonder...could a comfortable place makes one sleepy or staying sharp depending on the desire of the individual, or are there 2 types of comfortable places, one that makes you sleepy, and the other makes you stay sharp?

21 Dec 2008

Mesh Reorganization Continue

The mesh functions and data structures have been integrated into EntityMesh class. One function GenerateSkinnedMesh gave me particular trouble, because I wasn't sure where to put that function. Originally I thought to put it in EntityMesh, but CAllocateHierarchy is also using it. So I attempted to use static or singleton etc, but realize those don't seem to work. Eventually I realize that only updateSkinningMethod in EntityMesh is using it, and this function I might not need it anyway. So I just comment it out and put GenearteSkinnedMesh in CAllocateHierarchy class.

Now I look at it once again, I realize I should be able to put updateSkinningMethod in CAllocateHiearchy class, but...maybe I shouldn't do that. Nevertheless I think I will promote CAllocateHierarchy object from local function object to class object to enable the updateSkinningMethod for the future. It makes sense to do it that way I think.

Later I will clean stuff up and try to have 2 entities.

19 Dec 2008

Mesh Reorganization

I am currently doing task 4 - reorganizing the code. I have put CAllocateHierarchy (implementation of ID3DXAllocateHierarchy) into separated .h and .cpp file. The next step is put the rest of functions (frame update and drawing) and pointers into class. Originally I thought to create SkinnedMesh class to hold those pointer and function by itself, but now I think I can actually put those thing in EntityMesh class instead. I think I will try to do it gradually and carefully.

After that is done, I will have to try to resize the mesh and also generate 2 meshes at the same time.

18 Dec 2008

New Look

Hmm...Changed the look of the blog. Not sure if it actually looks better though. Just for the record, this is what it looks like before:


Ha...can't tell which way I like better...but whatever, some experimentation is always fun.

Update: Wow, I just realize with this new setup I can actually put bigger google ads. And for some reason the bigger version seems to show graphics ads more often...very interesting. |o|

Finally...It's Alive

Finally I got the mesh to be drawn and animated. Actually I didn't have to do much but pass the elapsed time to move frame function. But still quite some work needs to be done...:

  1. Needs to fix the visual glitch
  2. Needs to setup to resize the model
  3. Needs to import the model I require in the game. I think I will first try to make a very simple model using Milkshape and see if it works
  4. Needs to put the function into class and demonstrating drawing multiple mesh at the same time.
  5. Lastly, needs to setup some control mechanism over animation

16 Dec 2008

Valkyria Chronicles Afterthoughts: An Epic Fairy Tale Version of War That Offer Some Food for Thoughts

Usually I don't want to take game's story too seriously, but Valkyria Chronicle prompt me to think about some serious issues. I am not expert in history etc, but since the game gave me some thoughts, I might as well write them down.

Yep, the title is my semi-conclusion of thoughts and view of Valkyria Chronicle's story after playing it. When I say fairy tale I don't mean its story is for kids or it's dumb. I mean it's a David VS. Goliath story that cheers people up. It's a struggle of a group of people that might stir the emotion of players. It also has a not too bad love story...although I am not expert on love story so can't say much about it. I might be exaggerating the word "Epic," but certainly I felt some sort of "epicness" after playing the game, especially with the music.

The game touches on some serious issues in human history, especially WW2 history, such as racism, history manipulations and culture manipulations etc. In the real world, those issues occur in various parts of the world. Some are more well known, some aren't. Sometimes you wonder how can human beings come up with such insidious schemes to harm and suppress others, but indeed those schemes occur and some are quite successful. False conception becomes truth...this element also forms one of the backbone of the story. During war, those issues can create gruesome results, such as an massacre. The game touches upon all these issues, with emotional and deep thoughts behind them, but the shocking realism are "water down" because the game is rendering in cartoon water color style, not photo realistic style. And I think that's what the developer intended.

Indeed the game itself is obviously a reflection or parallelism of WW2. The world map and names etc corresponds to WW2 situation. The situation are not exactly the same, of course, and in some respect very different, but the idea of a situation in which arm conflicts of 2 sides, both with substantial arm forces, with smaller nations getting swallowed are similar. Now here is an interesting question I thought of...which real country during WW2 had similar situation as Gallian Principality in the game. An excerpt from wikipedia:

"Gallian Principality: Gallia is a land very much like Switzerland in its policy of mandatory military service despite a stated position of neutrality in armed conflicts."

While the policy of universal conscript might be similar, Switzerland wasn't invaded during WW2, plus it doesn't border a sea like Gallia. The 2 countries which I can think of that had similar situation as Gallian are Netherlands and Poland, but both weren't as fortunate as the fictional Gallia. Most Netherlands territories are overrun and its government exist as exile in London during the rest of the war. Poland were invaded by both Nazi and Soviet and split into 2 zones. That's why I put "fairy tale" in the title. A fictional country accomplished something its real world counterparts (meaning prosperous but relatively small, peaceful and militarily weaker country) unfortunately failed, that's why it's inspiring.

I am sure both Netherlands and Poland fought hard to repel the enemy, maybe they even have heroes like Welkin Gunther from the game, but the reality is of course harsher than the game. Indeed the game itself also bought up a question, how do smaller nations survive? Even the game doesn't really offer an answer to this question. Yes, Gallia survived and has a happy ending, but the cause of their victory contains not just talents of each characters, but also some good fortune. In a real world, both talents and fortune are usually not there, especially at the same time, are they?

When we look at those ambitious, power hungry villains in the game and all those troops and people that follow and support him/her, we would often say to ourselves "that's madness." But when I look back at our own real world, I realize the reality is actually worse and contains even more madness and cruelty.

15 Dec 2008

Mesh Shows Up, Almost Properly

I am able now to render the mesh. I still haven't setup the animation but I imagine it will be easier since now I have the mesh shows up correctly. Well, almost correctly. For some reason, on my game application, the mesh appears to have small glitch, but on my editor side there is no such thing (left from game application, right from editor):



As can be seen, on the application side some polygons are drawn in black or they might be missing. I suspect most likely it's due to CEGUI setup again, or it could be some unknown minor setup differences between the application and the editor. I will have to investigate this more.

The problem before was I didn't actually call the update bone matrix function, which I thought was called in rendering function. Now the problem is I have to update the animation, which I don't have a clear idea how yet.

Although I didn't spend a lot of time with it, it's a good progress now that I have gotten an animated mesh to show up. Again I should spend more time with it to speed up the development. Definitely in the up coming holiday I will do that. Sometimes though it's not just the time, but the energy. During the weekend I have time but sometimes I just find myself exhausted already. But again it's probably just human natural laziness kicks in.

9 Dec 2008

Finally...Something is drawn, but...

Finally, some mesh shows up on screen, but what is this mess |o|:


I suspect it's probably because the time frame is wrong or the bones are not setup properly. I guess the next step would be to debug this problem and make sure the animation is working. Also I have to scale down the mesh (although I am not sure why it should be so big). After those I can finally put the function into objects and see if I can generate multiple mesh entities.

5 Dec 2008

Thoughts On Valkyria Chronicles, "Realism" of Game...and Dreamland Chronicles: Freedom Ridge

I recently bought and play Valkyria Chronicles. I haven't finished the whole thing but so far so good. I think it is a very nice and unique TBS/Actoin/RPG (or maybe it should be categorized as another genre all by itself) game. The visual and art of the game resemble water color arts of course, which is also very unique (I don't think any other games ever done it before). Also the story telling, the presentation and the imaginary world reminds me of Japanese anime, especially the older one directed by Hayao Miyazaki such as NausicaƤ of the Valley of the Wind, Porco Rosso and Laputa: Castle in the Sky.

The idea on the combat system is actually not totally new. In fact, another game I played recently, Eternal Sonata, has similar combat system. They are not the same, and the resulting game play works out quite differently, but the concept of taking turn, move 1 unit at a time to attack enemy or get into position, while the other unit stands by or taking defensive measure (blocking in the case of Eternal Sonata, dodging or firing back in the case of Valkyria Chronicles), is similar. Even the Action Point (AP) system has been used quite often in other TBS including X-Com. Also in X-Com the units will take defensive measure (shooting at enemy) as well, but only if they have extra AP left. There are a lot of difference in camera, controls, AP consumption,...etc, which in accumulation make the resulting game play very different, even though the general concept is similar.

Which brings me to another thing I noticed: is Valkyria Chronicles what Dreamland Chronicles: Freedom Ridge could have been like? For those who don't know about DC: FR, here are some link containing some interesting information on this canceled project from the developer of X-Com:

An excerpt from Arky's X-Com page shows my point: "The game takes place in the third-and first-person perspectives, and promised to be a huge, complex strategy. " The concept of the game actually sounds similar to what Valkyria Chronicles is like. Also, the screenshot (or rather artist concept rendering as suspected by Gamespot) seems to reinforce the similarity. Also, there are old game magazine coverage containing screenshot with scope aiming at alien, which I can't find online anymore, make it even more similar to Valkyria Chronicles.

Now why would DC fail while VC succeed, even though they have similar concept? I think perhaps the technology really makes a huge difference, and perhaps DC was overly ambitious. On the technology side, improvement on graphics, programming and animation technology etc really makes a difference I think. The improvement in animation expands the possibility and makes things easier. DC was overly ambitious I think because the developer of DC seems to want to do more than VC, such as realistic physics, even though DC's development was a generation before VC. I actually saw a small demo of DC physics engine in development back then, it was quite impressive, especially during the time when realistic and versatile physics engine like Havoc isn't quite popular yet. Also, if they want it to be like X-Com, they need random generated terrain and stages, unlike VC which has set pieces of stages. I think my development experience seems to indicate that it's dramatically more time consuming and expensive to make random stages etc interesting. I think a guy from Blizzard also point that out, I remember I put it in the blog somewhere. Plus, they wanted to do all these things on PS2 and the PC back then...It's really an enormous task in my opinion. Other consideration might be how come those publishers spend so much money on so many mediocre X-Com spin offs like Enforcer, Interceptor and others that eventually get canceled as well, instead of on fewer worthy possible successors like DC...but that's out of the scope of this log and probably outside of my game history knowledge. Someone might be able to write an essay on that though o

Another thing that I think really give VC a distinct advantage is the flexibility of today's technology to make things look like arts and unrealistic. A lot of people say graphics don't matter as long as the gameplay is good, but is that real the case? This unrealism might have more impact than just superficial eye candy, and here is my reasoning. The game mechanism is itself unrealistic. You have people getting shot but not dying right on the spot. You have unit "taking terms," which means one unit is running around like crazy while other stay mostly stationary. That's not what real combat is like. It's an entertaining and simplified combat that has nice game play and challenges, but it's not realistic. Now, can you imagine it actually has realistic graphics, in WW2 era, and still play the same way? It might work but I think it will most likely take player "out of the game world." In another words, they will start thinking why doesn't that guy move, he's so dumb, etc. How could a guy taking so many bullets and still standing, with no armor? Man, he should be already dead when that grenade exploded etc. If it has realistic graphics, it probably needs more realistic (although not necessarily more fun, depends on who is playing) squad based combat system like Tom Clancy's Rainbow Six.

Hmm...now if they can somehow make another X-Com type of sci-fi tactical game but with modified VC combat, that would be awesome.

Skinned Mesh Progress

I was able to re-setup the skinned mesh function and get it to compile. Now what I should do is probably trying to call the drawing and update functions, making sure the model paths etc are correct, and see if the mesh shows up at all.
Judging by the progress it looks like I am going at snail pace 0. Although recently I am a bit busy on other things, I really need to spend more time on this.