Ok, this may seem like an odd request, but I want a Chess Script. I'm making a game called Chess Wars, where basically you play chess against many people. The only problem is, I can't figure out how to make it so that each chess chess figure obly moves in the pattern it's supposed to. This is a really complex script, but if anyone could help I'd be very thankfull.
Wow...that u need is not so simple.
(and your signature is so strange...)
Btw for the chess script we must try to find something or try to make it
If were going to, wouldn't you have to have A.I.?
i've posted a script for A.I. fo ennemy maybe we can use this for chess
Yes, that might work, but we'd still have to have the peices move correctly ex: knight move in the shape of an "L"
Yep it's true...that's will be a little more difficult but possible
Please, if anyone can help me with this, I'd be extremely grateful.
you can do it using events, giving moving options so on, using move events.
not allowing to choose spots that another tool event of your side is in (by conditional branches) and make a conditional branch of if opponent event is on a square you walk on then opponent event is erased.
the main problems are:
defining king's lock (checkmate)
but possible i think
making the "computer" act like he knows the game
the easy solution is to randomize his moves and try to move the king when another tool got aim on it, but that will make him easy and i doubt he can really save himself under that condition for more than 1-2 turns
basicly for the a.i you need loads of hours and you need to be a good chess player seeing as only a good chess player can tell you what's best to do in what situation ,and then you need to condition every move possible
in total..
hours over hours of work, no matter if you use events or a script since each case have to be setted on it's own.
(so that's hours of work.. as for tool moving.. that's easy.. give the player his legal options each time... need to move 2 up 1 right or 2 up and then 1 left , give him 3 options like:
move to F5
move to F7
Choose another tool )
man sounds hard but im a good chess player so if u need any help with the situation things im your man.
Ok, thanks, I'll keep that in mind
ive never lost a game of chess so again if you need any help with the rules like wildrj i can also help :)
I would say you should script it. It seems easier that way.
If you choose to script it I would suggest this immediate approach:
A ChessBoard-class
A Piece-class that should ave a child for each type of piece (knight, king, e.g.)
So the class-hierarchy would look somewhat like:
Bishop -->
King -->
Knight --> Piece --> ChessBoard
Pawn -->
Queen -->
Rook -->
Where Piece don't extends ChessBoard, but is only used by it.
This of course, would only be the start. The model.
Instead of a script make a real long event page.
I made a chess game with that.
Make a hero touch and many move options.
It worked for me!
YEAH BUT A REALLY LONG EVENT PAGE GETS CONFUSING AFTER A WHILE LETS SAY U MAKE AN MISTAKE IN THE EVENT SOPMEWHERE IT WILL BE KINDA HARD TO FIND SRRY OF ALL CAPS IN A HURRY.