Sie sind auf Seite 1von 11

Board service for IPB 3.

x
Introduction:
Before finding Cubeia's greatness in gaming software, I was watching other players but none allows me to do what Cubeia allows with so much flexibility and in few programming languages I happen to know well. Most importantly support was key to success, which Cubeia has been tremendous help. And most of them are closed source preventing custom modification, some did have full source code but database code is close source just make you go away. They just don't have the best of both worlds. Making it simple, free, open source and powerful enough to be attractive. Cubeia using Java is a smart move because its application can run on any device. It simply just makes you feel like right home by developing on Windows and deploy it on Linux using the same binary code. The first Cubeia poker was done with flex technology on the client side which I have released code as open source on GitHub repository but since Adobe drops flex to Apache foundation leaving most of us no choice to move on with better technology so we can be on track with market trends. HTML5 is the way to go now due to its widely adoption and as Google pushes a lot toward this technology, it's likely some market win if product is out first. Therefore, I'm happy that Cubeia has opted for the right path, which means there is no more download as previously done with Flex as it is probably dying so fast that I have not been programming it for already a year. And most importantly Cubeia shifts gear to providing powerful Websocket which has been proved extremely fast and browsers are starting to support WebSocket. I want to thank Cubeia's team involving in making this possible: Fredrik, Peter, Patrick, Victor as they are providing me fast private email support during my

learning Firebase and Poker modules. I also personnally have much respect for their professionalism and expertise due for only the fact that I didn't expect much for such big help given so friendly and freely since day one. Before I talk about installation, few reminders still stand: Keep in mind that Cubeia poker source code is Cubeia's property. It's open source filed under AGPL3 licence. If you don't know what it is, it's better read. You can not modify their code without abiding to the AGPL3 licence. You are allowed to deploy the server and the client game using the Firebase Community Edition (CE) which can only support up to 100000 players. Going abobe this limitation, you will need to buy a commercial licence. If you have specific questions, please contact Cubeia for what you can do and don't. I'm releasing this board service module which will automatically be loaded at server startup to provide game interfacing with IPB. Originally, it was only for IPB, which I love very much since IPB is easy of use besides beeing nicely modular designed make forum much enjoyable to install and manage. Plus, it's backed with a strong community support if you happen to look for answers of any issue. I previously had experiences of Joomla, phpBB3 on my previous sites and have helped a friend on Vbulletin 3.x site. I've never looked back once I swiched to IPB due for the simple fact how hard and the amount of mods that I've added manually and painfully time consuming. Recently friends wanted phpBB3 and SMF support which I had added forcing me to redesign it using injection so it can deals with many type of boards. And it turns out working extremely well through configuration file. Xenforo was done based on an old nulled version just for authentication scheme learning purpose and to test how easier to support different forum software based on the same code. I've never thought I get back to work on Cubeia's poker again but Cubeia puts more manpower to get the game done with new technology with beautiful graphics is hard to resist. I've showcased the game in working progress and it's time to make it available to the community to whoever is interested in having multiplayer texas hold'em as a separate independant add-on. This is because it's a

separate web application which only interfaces with IPB for authentication, forum avatar and possible future features. As I previously stated in forum that I've decided to use IPB market place to release board service to community licencees. I think it's best this way so everyone can come and grab when they need. Installation under Linux:
All softwares to download can be downloaded in below link: https://www.dropbox.com/sh/m7llrl5jfpvlb64/_U5jIRdGo2
1. Download Java Development Kit. The JDK is required to compile the Java source files After extracting, define a JAVA_HOME environment variable, and add $JAVA_HOME/bin to your PATH. http://www.oracle.com/technetwork/java/javase/downloads/index.html In Java SE Downloads, Select previous releases, select Java SE 6 Click Java SE Development Kit 6u37, check Accept Licence You will need to know the server hardware, if it's based on Intel or AMD. Intel pick the i586 and for AMD pick the x64 For my site, eg. Ubuntu 11.04 64bit, I have to select You can use uname -mrs, in my case it will display Linux 2.6.32-pony6-3 x86_64 which is i586 architecture. and download to a known location (ex. /dist). mkdir /dist cd /dist Save the downloaded file to /dist folder sh ./jdk-6u38-linux-i586.bin if you happen to have this kind of below error:

./jdk-6u38-linux-i586.bin Unpacking... Checksumming... Extracting... ./jdk-6u38-linux-i586.bin: 113: ./install.sfx.24067: not found Failed to extract the files. Please refer to the Troubleshooting section of the Installation Instructions on the download page for more information. Run the following command, and rerun the sh cmd apt-get install g++-multilib Rerun: ./jre-6u30-linux-i586.bin You should be good after that. vi ~/.bashrc export JAVA_HOME=/dist/jdk1.6.0_38 You can also run the above command whenever it fails to run java vi ~/.bash_profile PATH=${JAVA_HOME}/bin:${PATH} For example, type echo cmd echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games root@YOUR_SITE:/dist# PATH=${PATH}:${JAVA_HOME}/bin root@YOUR_SITE:/dist# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/dist/jdk1.6.0 _38/bin Type java -version You will see similar lines displayed as below: java version "1.6.0_38"

Java(TM) SE Runtime Environment (build 1.6.0_38-b05) Java HotSpot(TM) Client VM (build 20.13-b02, mixed mode)

2. Maven 3

Link for ubuntu: http://blog.btmatthews.com/2011/08/04/installing-maven-3-onubuntu-11-04-lts-server/ You will need to google to find out how to do it for other distro. Upon successful installation, you should be able to run mvn -v and get a display message as below Apache Maven 3.0.4 (r1232337; 2012-01-17 12:44:56+0400) Maven home: /usr/local/apache-maven-3.0.4 Java version: 1.6.0_38, vendor: Sun Microsystems Inc. Java home: /dist/jdk1.6.0_38/jre Default locale: en_US, platform encoding: ANSI_X3.4-1968 OS name: "linux", version: "2.6.32-pony6-3", arch: "i386", family: "unix" From above guide link, you should be able to perform following command lines: http://maven.apache.org/download.cgi eg. wget http://apache.mirror.iweb.ca/maven/maven-3/3.0.4/binaries/apache-maven3.0.4-bin.zip 7z x apache-maven-3.0.4-bin.zip cp -R apache-maven-3.0.4 /usr/local ln -s /usr/local/apache-maven-3.0.4/bin/mvn /usr/bin/mvn You will need to install 7z if you don't. apt-get install p7zip-full 3. Poker Server Download pokersvr.7z from shared holder dropbox

The file pokersvr.z contains untouched Cubeia poker source file downloaded at Cubeia's repository at an earlier time. It may be already obsolete as Cubeia's pushing new code everyday but it does not prevent the game from having all of its playable functionalites. Thus, a later version will be provided when it's found as stable enough. Create a folder under /usr/local folder eg. mkdir /usr/local/poker/ cd /usr/local/poker Copy pokersvr.z to the abover folder 7z x pokersvr.7z It will create a folder called holdem which contains all files needed to run Cubeia poker.

4. Poker Client Download and extract pokerclt.7z which I have modified to support IPB avatar and sound to /var/www/WHATEVER_NAME, which will be the URL that your community members will access to the game

5. Poker Config Custom add-on starts here: Download pokerconfig.7z and extract the corresponding files as explained below Extract beans.xml to /usr/local/poker folder Edit beans.xml with VI editor or similar tool Replace DATABASE_NAME, USER_NAME and PASSWORD to database credentials. Extract JDBCConfig.ini to /usr/local/poker/holdem/server/game-modules/poker-uar Edit JDBCConfig.ini with VI editor or similar tool Modify siteUrl, database, user and password to suit the configuration of your site as shown below [JDBCConfig] driverClassName = com.mysql.jdbc.Driver

jdbcDriver = mysql connectionUrl = localhost siteUrl = http://YOUR_SITE_DOMAINE_NAME_OR_IP_ADDRESS/YOUR_FORUM_ROOT_FOLDER database = YOUR_DATABASE_NAME user = USER_NAME password = PASSWORD dbPrefix = PREFIX_IF_NO_LEAVE_IT_BLANK If you don't know, you can check the values stored in conf_global.php of your site folder where you install IPB. Extract PokerConfig.ini to /usr/local/poker/holdem/server/game-modules/poker-uar folder

6. Third Party Modules Download thirdpartymodules.7z and extract all its contents to /usr/local/poker/holdem/server/game-modules/poker-uar/target/firebaserun/firebase-1.9.0-CE-RC.3/lib/common folder

7. Service Board Download board-service-1.0-SNAPSHOT.sar.7z and extract board-service-1.0SNAPSHOT.sar to /usr/local/poker/holdem/server/game-modules/pokeruar/target/firebase-run/firebase-1.9.0-CE-RC.3/game/deploy folder Download board-service-1.0-SNAPSHOT.jar. from IPS marketplace to /usr/local/poker/holdem/server/game-modules/poker-uar/target/firebaserun/firebase-1.9.0-CE-RC.3/lib/common folder

Game launch:

1. Server
Do this step on last as files and config have been done to start the poker server. cd /usr/local/poker/holdem/server

mvn clean mvn -Dmaven.test.skip=true install Be patient, iI will take sometimes depending on the speed of your server but the subsequent times will be much faster since it's only download whenever newer module is needed.Once required libraries, it will compile source code and create binaries to run the game. When all goes well, you need to have the following similar output: [INFO] --- archive-plugin:1.8.0:uar (default-uar) @ poker-uar --[INFO] Building jar: /usr/local/poker/holdem/server/game-modules/pokeruar/target/poker-uar-1.0-SNAPSHOT.uar [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ poker-uar --[INFO] Installing /usr/local/poker/holdem/server/game-modules/pokeruar/target/poker-uar-1.0-SNAPSHOT.uar to /root/.m2/repository/com/cubeia/games/poker-uar/1.0-SNAPSHOT/poker-uar-1.0SNAPSHOT.uar [INFO] Installing /usr/local/poker/holdem/server/game-modules/poker-uar/pom.xml to /root/.m2/repository/com/cubeia/games/poker-uar/1.0-SNAPSHOT/poker-uar-1.0SNAPSHOT.pom And at near towards the end, you should have such following output:
[INFO] -----------------------------------------------------------------------[INFO] Reactor Summary: [INFO] [INFO] Poker ............................................. SUCCESS [1.132s] [INFO] Protocol Modules .................................. SUCCESS [0.020s] [INFO] Poker Protocol .................................... SUCCESS [3.902s] [INFO] Bot Modules ....................................... SUCCESS [0.018s] [INFO] Poker Bot ......................................... SUCCESS [1.551s] [INFO] Common Modules .................................... SUCCESS [0.035s] [INFO] Backend API ....................................... SUCCESS [0.375s]

[INFO] Hand History API .................................. SUCCESS [0.328s] [INFO] Poker Timings ..................................... SUCCESS [0.199s] [INFO] Firebase Service Modules .......................... SUCCESS [0.016s] [INFO] Backend Service ................................... SUCCESS [0.012s] [INFO] Backend Service Contract .......................... SUCCESS [0.208s] [INFO] Backend Service Mock .............................. SUCCESS [1.175s] [INFO] Backend Service Adapter For Cubeia Wallet Service . SUCCESS [0.736s] [INFO] Bot Service ....................................... SUCCESS [2.180s] [INFO] Hand Debugger Service ............................. SUCCESS [2.640s] [INFO] Handhistory Collector Service ..................... SUCCESS [0.496s] [INFO] Handhistory Storage Service ....................... SUCCESS [0.447s] [INFO] Game Modules ...................................... SUCCESS [0.070s] [INFO] Poker Blinds Logic ................................ SUCCESS [0.672s] [INFO] Poker Logic ....................................... SUCCESS [0.704s] [INFO] Tournament Modules ................................ SUCCESS [0.038s] [INFO] Poker Tournament .................................. SUCCESS [2.220s] [INFO] Poker Game ........................................ SUCCESS [3.061s] [INFO] Poker Unified Archive ............................. SUCCESS [5.750s] [INFO] -----------------------------------------------------------------------[INFO] BUILD SUCCESS [INFO] -----------------------------------------------------------------------[INFO] Total time: 29.089s [INFO] Finished at: Fri Dec 28 09:34:59 MSK 2012 [INFO] Final Memory: 15M/36M [INFO] ------------------------------------------------------------------------

Start Cubeia Poker game by issuing the following command line mvn firebase:run

2. Client
Open compatible websocket browser like Firefox, Chrome or Safari and enter the poker site address as you have defined in poker client section. eg. /var/www/WHATEVER_NAME will result on entering http://YOUR_DOMAIN_NAME/WHATEVER_NAME You will see the Cubeia login panel, check the status must be shown as Connected. Enter your IPB user/password to enter the game.

Disclaimer: Important: By installing Cubeia poker and the service board provided as it is, you must accept and abide to AGPL3 licence that Cubeia has applied to the poker source code. The service board is provided FREE as it is. I can not be held responsible for any thing related to any site which uses it. There is no malicious code that makes harm to the IPB database since it runs in the owner's site secure environment and performs read only operations such as queries member credential, uses the same authentication algorithm as done in IPB and retrieves avatar location to provide access in game and displaying member's avatar. Conclusion: I hope you enjoy Cubeia poker created from the foundation of technologies they have built with web games in mind making their firebase technology state of the art which opens with many possibilities of gaming creation. I've jumped on the firebase for a game I wanted to write and never have time to do it but I gain in the process of learning how their architecture works. It will be much easier to code now than ever. I do have something I plan to work on before doing that. This is using Scierra Construct 2 SDK to write an another client as for experimenting creating game without code. Until then, happy texas hold'em. Hope you enjoy the service board add on which bridges Cubeia's poker to IPB board so all of us who love IPB can all enjoy extra values.

If you want to thank my work, it's simple. Just invite me to play some games on your site, I'll happy to drop by! Cheers! Happy gaming! :)

References:
Cubeia Ltd: http://www.cubeia.com/ Cubeia Poker repository: https://bitbucket.org/cubeia/cubeia-poker Invision Power Services Inc. : http://www.invisionpower.com/apps/board/

Das könnte Ihnen auch gefallen