The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Dragonware~Lupe on January 04, 2006, 04:44:18 AM

Title: Chess
Post by: Dragonware~Lupe on January 04, 2006, 04:44:18 AM
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.
Title: WoW
Post by: SiR_VaIlHoR on January 04, 2006, 02:25:50 PM
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
Title: Chess
Post by: zxm on January 04, 2006, 02:36:31 PM
If were going to, wouldn't you have to have A.I.?
Title: Chess
Post by: SiR_VaIlHoR on January 04, 2006, 02:43:39 PM
i've posted a script for A.I. fo ennemy maybe we can use this for chess
Title: Chess
Post by: Dragonware~Lupe on January 04, 2006, 03:26:16 PM
Yes, that might work, but we'd still have to have the peices move correctly ex: knight move in the shape of an "L"
Title: Chess
Post by: SiR_VaIlHoR on January 04, 2006, 03:32:07 PM
Yep it's true...that's will be a little more difficult but possible
Title: Chess
Post by: Dragonware~Lupe on January 06, 2006, 02:23:16 PM
Please, if anyone can help me with this, I'd be extremely grateful.
Title: Chess
Post by: blueXx on January 06, 2006, 02:35:12 PM
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 )
Title: Chess
Post by: wildrj on January 07, 2006, 03:43:08 PM
man sounds hard but im a good chess player so if u need any help with the situation things im your man.
Title: Chess
Post by: Dragonware~Lupe on January 08, 2006, 03:55:20 AM
Ok, thanks, I'll keep that in mind
Title: Chess
Post by: ahref on January 08, 2006, 01:32:48 PM
ive never lost a game of chess so again if you need any help with the rules like wildrj i can also help :)
Title: Chess
Post by: Zeriab on January 17, 2006, 12:44:03 AM
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.
Title: Chess
Post by: Nightwolf on January 17, 2006, 02:09:05 PM
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!
Title: Chess
Post by: wildrj on January 20, 2006, 03:00:41 AM
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.