• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,406
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
51
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. Android game development Rokon game engine
  • 2. Who am IDaniele MontagniJava developer, Android enthusiasthttp://twitter.com/dmontagnihttp://www.jugroma.it
  • 3. What we’ve doneGameset:Tankattack is a turn-based strategy game. The setting is a fixed map and player cancontrol 2 tanks each game:Goal of the game:win the match by destroying all against players tanks
  • 4. How... Architecture and frameworks: • Android platform: 1.6 (2.3) • Rokon game engine: 1.1.1 (2.0.3) • Smack libraries: 3.1.0 Tools: • Android SDK for Mac: 2.1-r5 (r8) • Netbeans: 6.8 (IntelliJ 10 CE) • Android plugin for netbeans
  • 5. SDK ToolsCreate your emulator through Android SDK and AVD managerdaniele@Daniele-Montagnis-MacBook~/android-sdk-mac_86/tools$./android Starting Android SDK and AVD Manager...
  • 6. Easy project setup Create "android" type project into NetbeansThat has this structure ...than click "Run" project
  • 7. Emulator & adb This will run the emulator and deploylogcat through Netbeans show status:
  • 8. RokonRokon basicspublic class TankAttack extends RokonActivity {public void onCreate() {    createEngine(480, 320, true); }public void onLoad() {   ...   Background background = new TileTextureBackground(atlas,tileloader.getLayers());   ...   Sprite tank = new Sprite(80, 180, spriteTexture); Hotspot hotspotTank = new Hotspot(tank, 1);}public void onEvent(GameEvent event) { rokon.addSprite(tank); rokon.addHotspot(hotspotRedTank1);}public void onLoadComplete() {   rokon.setBackground(background);   rokon.addSprite(tank);}
  • 9. SmackSmack basics:ConnectionConfiguration connConfig = newConnectionConfiguration(host, port, service);XMPPConnection connection = new XMPPConnection(connConfig);connection.login(username, password);Presence presence = new Presence(Presence.Type.available);connection.sendPacket(presence);xmppClient.setConnection(connection);Message msg = new Message(to, Message.Type.chat);msg.setBody(text);connection.sendPacket(msg); Type Format Sample START START:[ROOM_ID]:[PLAYER_NUMBER] START:234523:1 MOVE 1:[XX]:[YY]:[ROTATION] 1:3:7:4 SHOOT 2:[SENDER]:[TARGET]:[DAMAGE] 2:1:3:500 ACK TRUE TRUE:[TANK_ID] TRUE:2 END GAME END:[ROOM_ID]:[PLAYER_LOSER_NUMBER] END:234523:1
  • 10. Tips & Tricks• Rokon is under development: things must be done from scratch! (ex. TileTextureBackground...)• Android plugin for Netbeans is not stable (build.xml must be modified...)• For rapid development use Eclipse that is supported by Android community: http://developer.android.com/sdk/eclipse-adt.html#installing ...or IntelliJ Idea 10CE
  • 11. What’s new?Game engine IDE +
  • 12. How’s going our baby? June 2010 January 2011
  • 13. ...and his toys?Android market Free vs. Paid 1 year 6 months
  • 14. Links• Android SDK: http://developer.android.com/sdk/index.html• Rokon: http://code.google.com/p/rokon/• Smack xmpp: http://www.igniterealtime.org/projects/smack• Netbeans plugin: (old) http://kenai.com/projects/nbandroid/pages/Install• Google App Inventor: http://appinventor.googlelabs.com/about/
  • 15. Thank you ... B ye