Advertisement

How to program a chess: a forum based tutorial

Started by December 23, 2004 11:09 PM
276 comments, last by da_grat1 19 years, 8 months ago
llvllatrix... are we moving on to the final tutorial..,:) I am really looking forward to that... :) Happy Good Friday!!
Happy good friday :),
- llvllatrix
Advertisement
any progress...
Interesting!
Welcome to my blog:http://arenak.cnblogs.com/
Something should be out today.. right.. :)
Hey guys,

I currently have the main game scene drawn, the camera movement all worked out (very smooth :) ) and I'm currently working on the picking (selecting a square). I'm only going to put in the necessities for this last tutorial. I'll leave the pollish up to you guys :).

Cheers,
- llvllatrix
Advertisement
Quote: I'm currently working on the picking (selecting a square).


llvllatrix..does that mean we can drag the piece from one square to another square? ;)
if that works, then can start playing the game already... even without implementing the chess rules.. :) ...
Hey guys,

Its done :)
http://www.eng.uwaterloo.ca/~rramraj/Gamedev/chess_tutorial/src_tree/chess_src.zip

Here are the controls for the game so far:

Menu:
- f10

Camera movement:
- hold down the space bar and use the mouse to rotate yourself around the chess board
- hold up to zoom into the board
- hold down to zoom out

Playing (note that it is human(white) against computer(black)):
- use the mouse to move your cursor around the board
- left click on the mouse to select a piece
- left click again to move the piece
- if the move is illegal, repeat the procedure

Once you make your move, the computer immediately responds with it's move, so there is going to be a bit of lag after you make your move. That said, there are still quite a few things to do to the program to make it "playable" in the sense that you could commercially sell it. I'm going to leave this stuff up to you guys because it's good practice. Here's a list:

- remove the lag (you can do this by using threads to run the computer's thought routine through)
- provide a better user interface for the game (this means displaying who's turn it is, which pieces are captured, and other stats)
- provide more options for the game (ie setting the computers difficulty, the screen resolution...ect...)
- provide multiplayer and networked multiplayer.(This would require a bit of an addition to the engine, but it shouldnt be too hard. Just be advised that this is one of the only instances where you can add networked multiplayer after the game is completed. Its just too hard for larger games.)
- drag the pieces accross the board
- make some more asset mods (Use milkshape or blender and make your own pieces. You could do lord of the rings chess, Open Source vs Microsoft chess, Halloween town vs Christmas town chess...the skies are the limit :) )
- Add music and sounds
- Replace that horrible main screen text
- make better UI (ie better buttons ect...using texture maps for the buttons is an idea :) )
- Stick your own logo on the loading screen :)

I'm very curious to see what you guys come up with :),
- llvllatrix


[Edited by - llvllatrix on April 7, 2005 6:50:04 PM]
Congratulations llvllatrix for completing the game... :)
I just one to give one suggestion.. I think we can make it as two player game aswell..but that only happens if we change the code and remove the AI.. why don't we put a selection mode in the interface... lets say.. after we click new game button it will go to another interface with 2 buttons human vs computer button and human vs human.. that way we can play with other player as well as computer...
what do you think.. :) Do you think it is too difficult to be done? :)
Quote:
Do you think it is too difficult to be done? :)


lol, nope. In fact, I think its extreemly easy :) Thats why I think you guys can do it. Review the code and see if you can figure out a way. If you have any questions, just ask ;).

Cheers,
- llvllatrix

This topic is closed to new replies.

Advertisement