July 31, 2009

Constraints

Posted in Computer Graphics tagged , , , , , , , , , , , at 11:11 pm by sagito

Hi everyone! After some absence due to the lost of someone who was very close to me, I’m back to posting… This time to talk about a constraining system that I will attempt to implement within the Conspiracy Engine.

I have been having some problems with some DirectX functions, namely GenerateAdjacency and OptimizeInplace. These functions just crash unexplainably in some memory address that is not in my addressing space. Also, neither the DirectX debugger nor the PIX (tried it in despair), not even the Visual Studio 2008 debugger could do anything to show me the problem… So, I analyzed the assembly code, to find out that something inside the mesh is not properly set. However, I don’t have the means to find out what, so I just commented out the functions and moved on until I have the patience to deal with Microsoft’s brilliant lack of information.

So, I decided to implement a constraining system. Now, what the hell is that? Basically a system of something that constraints something to some other something. 😛 Ideally, this will, for example, stick a camera to a travelling object! Imagine a car in a racing game. We want the camera to be able to follow the car along the track as it moves, otherwise the camera would just be left in the beginning of the track.

It is important to say that… I never, ever, whatsoever, tried anything even near such a thing… My basic idea so far is really making an object stick with other… You could say that this can be achieved using hierarchy. Yes it could! However, I think some more flexibility is desirable… For example, if I want to attach a gun to my vehicle, I would probably like to place it in the door or in the roof… I need something that allows me to control its position and the constraining system will hopefully give me that kind of offset.

I know that there is a huge number of possible constraints to be implemented. However, I will stick to this one at the moment, but I will create a solid enough structure that can be expanded to some other constraint types further on… For now on, I will be keeping you posted! 😉

Advertisements

July 15, 2009

Project Natal

Posted in Computer Graphics tagged , , , , , , , , , , , at 10:50 pm by sagito

For those of you who never heard of it, Project Natal is a new Microsoft project for the XBox360… Ok, let’s see this from a real-world perspective. I build games and play games. I have a XBox 360 and a Wii. The concept of Wii is just brilliant, I loved every cent I paid for each and every one of the games I bought. The very same can be said for XBox 360, except for the concept which is pretty much common nowadays…

Ok, so what is Project Natal? Microsoft’s attempt to control a console without controllers… Ok, right… So, what can I do? If I move my arms, then the character moves the arms in the screen. One of the videos from this year E3 shows someone playing a dodge ball-like game in a XBox360 without controllers. Hmm, nice, but I would prefer to actually PLAY the game with some friends in a real-world field rather then making a fool out of myself in front of a TV. But you can say: “Yeah right, but you could say the same about Wii”. Yes I could, but Wii was created as a party-game console from the beginning. XBox 360 was created for Halo 3 and Gears of War, and you can’t really make a party out of those…

Moving on… What if I don’t have an arm? What will the console do? Throw a NullReferenceException? What if I’m on a wheel chair? Or if I am a midget? Or if I’m tired and just want to sit down? Yes, I sometimes play Wii while I’m confortably sitting on the couch…

For more technical stuff… How the hell do you play a FPS with this system? The answer is simple, you probably don’t… Once again, you could say: “But wait… This is meant for party games”. Yes, I think that Microsoft has already planned the “DodgeBall Instincts Trilogy”, “Overdrive that cube!” and the “Kill the old blocky man – Collector’s Edition: Director’s cut”. Trying to transform a console which was prepared for bleeding-edge graphics into a party-game console seems to be a complete failure to me… You should have thought of that before, Microsoft… 😛

Here is the project Natal video from E3:

June 27, 2009

Conspiracy Engine is born!

Posted in Computer Graphics tagged , , , , , , , , , , , , at 12:41 am by sagito

Hi again! My new engine is already moving… And in quite different directions at the same time! I have implemented a window manager which basically is responsible for creating a window and saving its internal state and a video driver which fires up DirectX and provides basic window painting features – i.e.: paints the window background with a chosen colour! That is very simple indeed, but from my experience with DirectX is a nice way to see if everything is working fine…

However, I’m also evolving it in some different components as I have already built an Observer Pattern Architecture. So basically, any object can now be an observer of any other object which declares itself as a subject! Events are then handled by a Mediator which notifies every one it should. How does this work? Pretty simple, the Mediator registers every subject and every observer which wants to listen from that particular subject. Then, when the subject has some new information, it informs the Mediator, which informs every observer interested in that subject! I believe that this will be a great way of passing events and notifying entities. Also, the Observer, Subject and even the Mediator classes can be easily extended in order to create or provide further specifications for this information flow.

Besides this, I have also implemented an utility class, which follows the Singleton pattern, and a custom exception handler which has already proven to be one of the greatest additions to the engine. Finally, in order to have a better memory management, every class inherits from an IObject interface, which forces its children to implement a drop method. This method is used for clearing everything from memory before leaving the program. This way, the engine becomes much more organized and clean I hope!

I will be having more news, very soon, I hope you are liking! 😀