Thursday, January 31, 2013

Shallow Blue v1.0

I haven't been posting 4 days in a row... Pity...

Fortunately that doesn't mean that I didn't work :) Shallow Blue is finished, I can say that. In fact there is always much more to do, but there is a deadline and it's all about finishing the game. I've spend last few days on a fight with WinApi, DirectX "sprites" rendering and some general bug fixes. Right now 3 play modes are available:
  • Player vs Player
  • Player vs CPU
  • CPU vs CPU
Here are some screenshots:


Download:
Feel free to download it and comment!

Saturday, January 26, 2013

Edges #2

Hello there! My second approach to edge detection is almost over. See what I got:


I know it's not perfect, but let me call them good enough. Normal vectors of faces are rendered to texture, then Sobel operator is applied and the result mixed with a regular render.

I had a really serious problem with my first render to texture. I didn't know why, but a geometry didn't wanted to render on a giver render target view. After hours of surfing I came at some really weird... It's because MSAA. I've turned it off and render-to-texture began to work, it's some DirectX issue that stands for disability to have more than one high quality texture in use (for MSAA).

Actually, I'm a noob so I don't know how to fix it :D So all I need is to implement supersampling, this should work, if only I'll make it ;)

But right now it's high time to get everything to work. Make some menu and stuff, then I can go to visual upgrades.

Friday, January 25, 2013

Edges #1

OK, so here's my first try to do toon edges. It looks very badly, but it's the simples method I've found. Check out this:
http://rbwhitaker.wikidot.com/toon-shader

Oh It looks so nice on that turtle... Unfortunately only there. The mesh must be smooth to accomplish a good effect, other way the neighbouring normals will be orthogonal to each other and edges get gaps between them. Also, the line won't "stick" to an object, it can "float" a few units next to it. See it here:


Screen looks very untidy. This isn't a look I want to have ;)
So today I'll have more time to try the-way-better method; render normals and depth to texture, do a edge detection and mix it with a regular render. Simple post-processing but in fact, (another time) my first one ;)

Wednesday, January 23, 2013

Chess engine?

Yeah, I was thinking about connecting some chess engine to my game. Of course, I want to have a Player vs CPU option so there must be some AI. I had 3 ways to do it:
  1. Write my own chess AI algorithm
  2. Use a freeware chess engine
  3. Find some simple open source chess game and copy/paste game logic from it.
Guess what I choose.

I really don't think writing my own AI would be a good idea, it's a problem for a month alone. I just want to make a chess game, why breaking a open door?
There's a lot of ready-to-go chess engines over the Internet. It's a small, individual program that can make a chess decisions and communicate with a chess GUI by standard system pipes. Personally I think that it's the best idea - I just need to write some communication protocol based on the UCI or something. So I take a look over the Internet. OMG. After hours of searching I've found the article that describes this problem best:
http://novelthought.org/talking-to-chess-ai-using-c/
And my reaction was:
OK, so here's my try. I've found this:
https://github.com/tobijk/simple-chess

Yesterday I've made a Player vs Player possible version, so adding a CPU option to this should be quite simple. Today I'll try to connect these functions above...


Monday, January 21, 2013

Only juice

Juiciness day. I've made a lot of animations and graphical improvements today, added planar shadows also.


Board model is quite upgraded, I've finished with this boring rectangle and put some variations in it. Looks better I think. Another thing is model selections. If you click on a model, it will get a black cursor on it, and really, black is the only color I found useful for both of the sides.


Piece hovered by the mouse cursor is bigger than the others, just to see which one is selected (see tank above). I've also updated materials and lightning to make it looks better. I put my trust in cel shading all the time and probably will give it a try faster than I though.

Saturday, January 19, 2013

Picking

"Do you have a quarter? My mom told me to call her when I found the woman of my dreams?"
--Pickup Line Panda

No exactly what I mean, but yeah! Picking is ready!


The screenshot is really ugly (all they are?). Wild animated cursor appears when you roll in the chessboard. It was kinda easy to write, and it's quite quick 'cause I don't need to make ray and models interception. Only virtual chessboard representation (some simple horizontal quads) is checked. Also the current hovered model is a little bigger, I was experimenting with tweening in 3D, a piece of cake I need to say :) If you haven't seen this already, you need to:


The next step is units movement. They need to turn, ride and turn back. If I made this, the simple PvP game will be ready :)

Friday, January 18, 2013

Graphical problems?

Yeah, I dunno... I probably have some problems with my aesthetic sense. Really can't figure out what to do to make it looks better. Maybe next project I'll made with some "photorealistic" graphics so it will be easier that way...



Probably with cel-shading and some flat shadows under vehicles it'll look better. But I don't know, really :/

So graphical part need to sleep a little and get some rest. Time for picking implementation, then, some basic pieces movement - without any rules or something, just like real figures. At that stage playing PvP will be possible and afterwards will be the time for a chess engine :)

Thursday, January 17, 2013

The work is on!

Oh gosh... I got a terrible flu last Sunday. I wasn't capable of thinking not only coding...
So, from the OGAM POV I'm 5 days late.

Fortunately, I managed to sit on my ass today and do some work. Custom OBJ loader went to a trash, in case, it was junk :P I've used the Assimp (Open Asset Import Library) for importing my OBJ and MTL files and it looks alright. Quite simple to pin it to the project and extract all the useful-for-me data from its objects. But in fact, documentation for Assimp is terrible.

I've manage to load two models with different materials on mesh subsets. The funny thing is that I made "materials library" global, so I can take vehicle body material, change its color and all models on scene using this material will change its color as well.


Of course some simple instancing was made. You know, just for not loading and holding two identical meshes. 13 FPS on the screenshot below but we have here ~400 objects, no frustum culling and it's in debug mode, quite OK I think.



I've made my try to cel-shading. The only acceptable method will be the one with post-processing. Normals map need to be rendered for the full scene, then some edge detection algorithm implemented for this. I probably wait with that kind of stuff and right now focus on main gameplay :)

Friday, January 11, 2013

OBJ Loader

I've choose a OBJ extension to load models from. Its quite simple and popular. In the DX11 there's no more ID3DX10Mesh class, so all the utils thing like loading a mesh from a file gonna be made by hand. I know there's a lot of open libraries etc, but it's always better to write it by yourself for the first time.
So I haven't done much more than the LoadObj() function and some basic classes like Mesh, Material and Model. It's still much to write.

Thursday, January 10, 2013

The Project

Ok, the worst thing's done. I really like to code, make some funky classes, super duper functions, do refactoring etc. but the thing I hate is configuring the project. Adding all this dependencies, include and lib directories, project configurations... I'm really not into that kind of stuff.
Hopefully I can now start to code some basic DirectX encapsulation. I really don't want to make another 3D engine or something, but you know - there must be some layer of interface. Eventually this "core" classes will get better and better with making this project and next ones, after a year and 12 games it should be awesome :D Omg, I really believe in that :P

Chessboard

Ok, so we have a little change of plans. Green color was too similar to grass and was blending with it (omg, really?!), so I've come with a standard blue-red convention. Celshading is on only on units, it looks better that way ;) Of course the map could look a lot better and readable, but I think it's all I can afford right now.

Soooooo... I'm starting with the code tommorow. Just as now, I'll be posting daily about my next steps etc. I really can't wait to see that in game!

Tuesday, January 8, 2013

King

Nuclear King. Who gets checkmatted looses the atomic war. It reminds me of something ;)

Ok, so for now all chess pieces are up and ready. Tommorow I'm making a board, it will be in TBS map style!

Monday, January 7, 2013

Saturday, January 5, 2013

Knight

What a nice issue we have here. Smooth shapes are kinda hard to handle in this graphical style. I wonder what I'll do to make it look good enough in the game...

Friday, January 4, 2013

Thursday, January 3, 2013

Pawn

As you can see, there're two color versions (black and white pieces are now green and yellow armies). Model was made in Blender, here we have a render with ambient occlusion and cel shading. I doubt if I'll make AO in the game, but cel shading should be achievable for me ;)

Wednesday, January 2, 2013

Here we go!

Ok, here's the deal:
http://www.onegameamonth.com/

I will motivate and force myself to make 12 games in this new 2013's year. This blog will held all of my project progress, that means screens, demos, movies (I wish) and of course my great ideas! ;)

Starting with January, I'm making mine DirectX 11 Hello World game. The idea: just a normal chess game with some unusual graphics. As far as I'm learning D3D I'll try to cut gameplay designing to minimum, so right now I'll use a premade chess engine to impelement an AI.

From tomorrow, I'll model and texture one object per day. Unusual graphics means war vehicles and weapons instead of a classical chess pieces. I think about low-poly carton-like tanks, planes, etc.

Cross your fingers and get ready for a first render tomorrow!



Yeah, I know my english sucks, but as far as #onegameamonth is an international community I wish that maybe someone not speaking polish will find something interesting here ;)