Pages

Wednesday, September 21, 2011

Pacman #3

OK, version 1.9 is there. Major changes are:
+added "shield" when the ghost hit us,
+added fruits, when you eat fruits you get extra points and sometimes a bonus and from time to time a penalty,
+added bonuses (high speed, double points, lives),
+game is more balanced than previously
+fixed some minor bugs.

Friday, September 16, 2011

Pacman #2

There is new version of my pacman game. Exactly it is a level editor and the gameplay is locked. You can download it from here and play a while.
LMB - add object
RMB - remove object
1 - 8 - change object type
R/F - change color
A/D - prev/next level
0 - eraser
Enter - save

Wednesday, September 14, 2011

Pacman #1

I've finished first version of my pacman game. You can download it from here. This is clone of the game (one of my favourites) from Commodore 64, which I played when I was young. The game requires OpenGL 3.3 compatible graphic card.

Monday, December 20, 2010

Miscellanea # 1

I've been unpleasantly surprised by very usual thing. I was coding bitwise shift of array of ints and I encountered a certain problem. Let's consider that code:

unsigned a = 0x01234567; //unsigned is 32-bit
unsigned b = a << 32;

What do you think, what it does? I am sure that some people smile at the moment, because they know that the value of b doesn't have to be 0! Yes, that's true at least on the Visual C++ compiler. As we can read on MSDN: "The results are undefined if the right operand of a shift expression is negative or if the right operand is greater than or equal to the number of bits in the (promoted) left operand."
So, as you can see even simple operations can be sophisticated...

Monday, January 11, 2010

Fighting with DirectX 11 - part 3


So, what's new? Firstly - there are many changes, as you can see in the image beside. There are a sky with clouds and the sun (it is the skybox). It is invisible in the picture, but in application there are ugly seams on the connection of skybox faces - it is my fault, because when I finished preparing of skybox texture, I changed size of it and in consequence the image editor blended edges of faces and the grid get in the sky ;P. Secondly, I've add a camera and a user input (from mouse & keyboard), so flying through the world of my demo is possible now. And the main change, is that I've written a terrain loading from heightmap. I've added simple lightning also, so that the terrain don't looks so flat.

Wednesday, December 30, 2009

Fighting with DirectX 11 - part 2


I've just finish my first demo in Direct3D11. It is not any wonder, probably, but I am very proud of it. I've added image galery to my blog, so you can see how the application is. There doesn't see it in the picture, but the cube is rotating. In the future, I am going to add textures and maybe lighting.

As you saw, there is one important change. I've decided develop the blog in english, since now. If you know me a little, you would think probably, that I am crazy - I don't deny it, maybe it is true ;D. I've resolved also, that I won't try to write any tutorials, lessons there or to teach anything there. Since this time I will place stricte informative notes, like in a diary or some kind of a log (I think from log is name b-log...), as I've done that in first paragraph.

And one matter else. If you see a mistake somewhere (in english, of course - grammatical or lexical), tell me about it, in the comment - for example. I realise that there will be a lot of them, especially in the begin.

Sunday, December 27, 2009

Fighting with Direct11 - part 1

I've recently got onto 3D graphics and I resolved to code something interesting. As you know, some time ago Microsoft gave us a new SDK for DirectX11. As I always prefer to use the most recent technology I decided to give it a try. And from there the steep steps stairs began. Microsoft didn't show off very well with its SDK. Firstly, a manual is very succinct and there is no good tutorials. Secondly a new Effects system API and DXUT sucks. For example you have to compile those two on your own. But that's not the end of the story...

D3D11 introduces a concept of Downlevel Hardware - generally this feature allows you write an application in D3D11 for the hardware compatible with at least D3D9. I decided on the start to implement available tutorials from D3D10. Everything was going smoothly to the time, when I tried to run application. I had spent two days to get known why ID3D11DeviceContext::Draw(...) reports access violation error. Fortunately, I found a note on this blog. As it turned out it is impossible to use the Effect Framework from D3D11 on Downlevel Hardware without any hacks. The only solution I could find was modification of few lines of code inside the Effect Framework.

Happily, at last everything ended well and I saw a beautiful red triangle on the blue background. No more such suprises in the future!