|
-
Hey Ericlin, I have made a chinese chess game in Flash,now I want to make it so people can play online, I just want to see if it's faster than java or not. Are you interested in joining me?
-
It is interesting. But I am afraid that I dont have much time to do a real project.
My experience with java applet was about 2 years ago, and I have forgot many things. My impression is that, on line java is also not a directly executable file, it is something like VB (B code). I dont think it would be much faster than Flash.
Java supplied many "window" components but we will not need them in Xiang-Qi chess game.
Java paints the screen by Pixel and every image is a bitmap. Animation needs very heavy calculation. Calculation need CPU time. This would make it slow down severely. And to refresh a large area is difficult to be smooth. And, the size can not be zoom in-out.
And most important point is: I think, animation by Flash need less script lines than java. Just think about a "move" on the chess board !
I dont know how to make on-line multi-player game. I am not a professional programmer. If you plan to make computer-user contest, Oh, it would be a big job to "tame" your scipt to follow the complex rules, do analysis and make a smart move.
I really believe this a very very great idea.
-
Let's team up.
Remember you helping me out with loading array from text file? I was trying to load a saved game onto the game using array. Now I have 2 applications, first one just to view saved games, second one is for playing head to head. Second app check every possible moves, legal moves, and check mate moves. So that's the start for playing online, no one can cheat. And now you gave me an idea of making a game for human vs computer.
How big this would be? Since we need lot of data for Flash to analyze and make a smart move? Are you familiar with this kind of project?
By the way, doyou play xiangqi? I play at chesshub.com.
One more thing, give me your email address, I will email you the swf or even fla if you want to. Mine is [email protected]
[Edited by rapidcarbon on 07-13-2001 at 12:37 PM]
-
Last week, I saw a post talking about how to make a boat sail toward a port, while the position of the port can be changed by dragging. And, the boat must avoid hitting against several islands sitting in the occean.
I tried a recursive function to make the boat find the correct and shortest pathway. It worked, but, the calculation need about 3 sec for a 7x7 grid. So, I made a textbox showing "refueling...please wait !". If I increase the grid to 10x10, Flash shows warning message: "some process makes the movie slow, do you want to abort it?"
I think, chess game is much more complicated. My recursive function needs only time for looping. But chess game scriptting needs inteligence and logic. The computer that can play chess game smart and reasonable might be only the IBM "DEEP BLUE" ? I forgot the correct name.
I played Xiang-Qi only when I was a child. You know, there are books, with collection of difficult board-puzzles ever in the history. That is something long time ago for me. (I am 43-year-old now.)
My email:
[email protected]
(ms1 is mail server one, not L)
-
Most of the chess softwares take 1, 2 minutes per move, or even longer. So if Flash player have to take that long to process, it will give a warning. But how the looping works? Base on data we feed them or what?
-
What loop ? You mean the script in my sailing boat ?
My recursive function let the boat goes all possible ways, go up-down-right-left and for each next step goes up-down-right -left .... continues and checked repeatedly. You see, how a hot job the Flash did. - I only did several lines of script and Flash loops and exausted. Then it save only the pathway that leads to the port.
I created a map data (an array- created by hitTest with the islands.) And the recursive function use two parameters, this map data and the port position (changed by user dragging).
When I put in the web page, the hitTest is weird. And the map data goes wrong. So, in the html version, I just hardcoded the map data which I got by trace(this array) in SWF version.
http://www.geocities.com/~dr_ericlin/aaa/sail3.html
http://www.geocities.com/~dr_ericlin/aaa/sail3.fla
-
Your fla is very cool Eric!!!!
I have sent you those .flas. I did a very poor job on commenting the code, so it can be very confusing. Just ask any thing.
Oh, may be you can help me to improve the xiangqi.fla. I want to create objects on the fly. Say, you want to move the game to Move Number 15. What I did was, start the game from the beginning, then replay the game up to move 15, no matter where you are, it will always start from beginning, if the game already at move 14, it will still start the from the beginning. Same problem when you hit back button. Say, you are at move 15, now want to go back 1 move which is 14, it will replay from beginning up to 14. I haven to do that becuz I could not figure out the best way to remember the all the piece position from the last move, so I think I have to loop from the beginning for now. Are you still with me? Anyway, just take a look and let me know what you think, and what I can do to make it better, and how far behind we are from making a human vs computer chess game.
-
I have not study your fla in detail. You must have spend much time in this already. A big construction.
I clicked "back" button, and it did well. I see no problems.
To go back, if the move data is (X+3,Y-1), then pick the data in the array and just make it (X-3,Y+1) will make it back, right ? And if necessary recover the piece that was take out.
I will see the details later.
You have almost finished the essential components. You can create a web page to display the collections of famous XiangQi boards now. Although the goal of "human vs computer" game still needs much work.
-
There is a site already done that http://txa.ipoline.com/
They use Java to view games. Very simple but very good. What I try to do to prove that Flash is better than java in this kind of thing, by making a 3d animated piece, so kids will enjoy watching a game, see how pao takes down a king, how a ma kicks bing, how a ju cruising. That sounds fun, right? But I have not found any artist to work on that yet.
Talking about my move back feature. I need to create an object that holds information about all the piece from previous move. I am thinking using an array to store all the captured piece. Say, at move 4, red pao was taken at this coord and this coord, at move 15, blue bing was taken at this and this. I have not work it out in details, but you think that's a good approach?
I think I will go to Games forum and ask if anyone over there have done chess game for human vs computer yet. Hopefully, I can gain some insight.
By the way, I got to study your code for sailing thing. Very cool. We can figure out something the same for xiangqi. Calculate the path to capture the king without being captured.
-
Hey, I have seen your fla file. Great. I also searched the web. I did not find any XiangQi web designed by Flash. After adding animation, it is much much more enjoyable.
I am sure you can beat them all.
I have send you email. Lets talk by email unless you want to post your XiangQi works here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|