Tutorials/quickstart
From CubeiaWiki
Introduction
This quickstart will get you up with a Firebase and a Flex client in a few minutes. Within this time you will:
- Create and compile a new server game.
- Run your new game on a Firebase server.
- Create and compile a new Flex client.
- Connect with your new client to the server.
This tutorial is hard core by design, it will not explain itself along the way, but there you go: You have been warned :-)
Prerequisites
- Java (v. 6 or higher)
- Maven (2.0 or higher)
Tutorialize
- Open a new terminal.
- Create a new game server project:
mvn archetype:generate \
-DarchetypeGroupId=com.cubeia.tools \
-DarchetypeArtifactId=firebase-game-archetype \
-DarchetypeVersion=1.7.0 \
-DarchetypeRepository=http://m2.cubeia.com/nexus/content/groups/public \
-DgroupId=net.test \
-DartifactId=helloWorldGame \
-Dversion=1.0-SNAPSHOT \
-Dpackage=net.test \
-DgameId=888
- Change directory to "helloWorldGame":
cd helloWorldGame
- Compile the server game, and start Firebase:
mvn package firebase:run
- Open a new terminal.
- Create a new Flex client project:
mvn archetype:generate \
-DarchetypeGroupId=com.cubeia.tools \
-DarchetypeArtifactId=firebase-flex-archetype \
-DarchetypeVersion=1.7.0 \
-DarchetypeRepository=http://m2.cubeia.com/nexus/content/groups/public \
-DgroupId=net.test \
-DartifactId=helloWorldClient \
-Dversion=1.0-SNAPSHOT \
-Dpackage=net.test \
-DgameId=888
- Change directory to "helloWorldClient":
cd helloWorldClient
- Compile and package Flex client:
mvn package
- Open a browser and drop "target/helloWorldClient-1.0-SNAPSHOT.swf" into it.
- Click "login" on the first window:
Firebase Server Address: 127.0.0.1 Port: 4123
- Log in with a username of choise and any integer as password:
Username: testing1 Password: 1234
- That's it! You can now join tables, and chat with other players at those tables.

