Renju, The Game
Posted on March 10, 2008
Filed Under ActionScript, Flash, Games, PureMVC
I have been playing this game for a while and thought that it whould be interesting to create my own flash version. For those who don’t know this game, a bit about it - Renju or Lianzhu is the professional variant of Gomoku, a board game originated from Japan in Heian Period. It was named Renju by Japanese journalist Ruikou Kuroiwa in December 6, 1899 in a Japanese newspaper Yorozu chouhou. Lianzhu is a Chinese translation of Renju. It is played with black and white stones on a 15×15 intersection board.
Two players, Black and White, alternately place two stones of their own colour, black and white respectively, on empty intersections of a board, except that Black (the first player) places one stone only for the first move. The one who gets five or more stones in a row (horizontally, vertically or diagonally) first wins the game.
So try it here. You can also download the source. Please note that this game is build on PureMVC version 1.7, and it won’t work under a new version 2.0.1 that has just been released. Just in case, I’ve included older version in source.
Hope you like it, and have fun.
Post Update: March 17, 2008
Implemented difficulty level functionality, some bug fixes and updated code to PureMVC version 2.0.1 . Download source.
For any thoughts about improving this game or bugs, leave comments.
Comments
24 Responses to “Renju, The Game”
Leave a Reply
Neat game! Thanks for the source too
I love this. It’s beautiful and smart.
Is it ready for distribution?
Lee,
I think it is ready.
Excellent. After playing 20+ games I still love this. I’m learning how to win, but it still beats me frequently.
Very impressive AI for a Flash game. And very nice music too.
Very pleasing and polished interface. Played several games and did not find any bugs.
Well done!
[...] This is awesome. Here is a polished board game with nice graphics and sounds - full AI - and best of all, the complete source. This is a great example of PureMVC in action. All of the projects on Actionscript Notes utilize PureMVC, and the owner seems to be generous with the source. Many thanks for that. [...]
Pretty cool. This is the spirit. A cool application with source included.
Keep up the good work.
[...] viraux! Bon je me rattrape en l’utilisant avec Flex et quand je vois de beaux exemples comme ce jeu japonais Renju, je ne peux qu’encourager les devs Flash à abuser de ce framework (spéciale dédicace à JP [...]
Gobang is originated in ancient China one of the traditional reversi. Gobang modern Japanese call it “liked” Translation “Renju” English as “Gobang” or “FIR” (Five in a Row acronym), there are “even five sons,” and “even five sons.” “beaded”, “five heads”, “Head of touch”, “five grid” and many title.
Hi,
I am trying to learn this game development and wanted to debug and see working in Flex builder 3. Project is not opening in Flex Builder 3. Someone got this project as flex builder 3 project so I just open and compile it without any problems?
Thanks
Hi lordali,
First of all, that’s Flash CS3 project, not Flex. I used Flex Builder to write code and that’s it.
So to debug/compile/run it, you have to use Flash. There should be Main.fla file in source. Open it, setup API’s paths, publish options, and you’re ready to go.
Hi,
Thanks for the quick reply. I understand.
One question if you got time to answer. You have setup fla file with grafics, animation etc which is fine than you coded the game in FB3. Now question is
What if I want to test your code in FB3 than should I create an action script project and import your files in it or How can I open your project in FB3 as it is ready to debug and test. I want to go through each step of your code to see the implementation for learning purpose.
Help is appreciated thanks
Yes, you can create an ActionScript Project and import files, it’s good if you want to see the file structure of project and read/write the code, but you won’t be able to compile or debug it in FB3.
To go through each step, use debugger in Flash ( ctrl+shift+ENTER ). Hope this would help you.
Very interesting game ,but I found good scheme(bug) to win, when playing at hard difficulty. The explanation is at my site: http://pi7er.ovh.org/renju/index.php
Also possible to win playing another difficulty with this scheme but it is harder
because you need to use little changes. Beginning and conception is the same.
Nice one, but I know even a shorter and simplier way (10 moves). Don’t have time to screenshot it thought.
Yeah, pressing that ‘Print Screen’ button is so difficult and time consuming. Should I mention that I invented a cure for cancer? I don’t have time to publish it or share it with anyone though.
anon,
nice comparison between cancer and pressing that ‘Print Screen’ button! It’s good that you pay much attention on details, but I think that information about simplier way to beat hard level is not as vital as cancer or anything else. So in my opinion that would be a waste of time on not-so-important thing.
thanks for the extensive pureMVC implementation example, it’s very educational!
the only hang up i ran into with the source was a missing font, but it wasn’t hard to google, but here’s the pc font link for convenience:
http://simplythebest.net/fonts/fonts/japan.html
starpause,
thanks for sharing a link to font, I really did forgot to include it in archive.
[...] Renju, The Game [...]
[...] Author Home Here [...]
Hmm, seems like you should be writing a wrapper for the GoAsap engine.
http://www.goasap.org/
awesome… really kool
and thanks alot for sharing the code…
thanks alot for sharing the code