GameExtensions


[ Show snip ]

Change 5 at 2006-02-09 21:56:11 by Herbert Poul (Kahless):

0a1,3
> You might only want to look at the [RequestGame] site. It describes how you can send
> me a request so i add the game of your choice.
> 

			

Change 4 at 2005-09-16 23:11:45 by Herbert Poul (Kahless):

55c55
< Last bot not least: If you've got additional games working i can include in the 
---
> Last but not least: If you've got additional games working i can include in the 

			

Change 3 at 2005-09-16 23:11:33 by Herbert Poul (Kahless):

50a51,59
> 
> 
> 1 Contact Me ;)
> 
> Last bot not least: If you've got additional games working i can include in the 
> distribution, have problems creating them or any other comments please contact me:
> 
> * Jabber ID: kahless@sphene.net
> * Email: herbert.poul@gmail.com

			

Change 2 at 2005-09-16 23:08:41 by Herbert Poul (Kahless):

			

Change 1 at 2005-09-16 23:08:33 by Herbert Poul (Kahless):

1 Creating Game Extension

A Game Extension is an extension to GOIM which will add another game so it can broadcast
information when you join a server and displays when your contacts are playing this game.\\
It is also responsible for launching the game.

The easiest way for a game extension is if this game uses a default UDP port for it's 
connections and connects to a server when called with the IP:Port as it's first parameter.

e.g.: ut2004.exe 213.202.211.30:7777

If this is the case, no line of code needs to be written, but we can use the default
implementation called 'GameAdapter'

Game Extensions are based on the eclipse plugin extension mechanism, so to extend GOIM you
will need eclipse. Get it from http://www.eclipse.org


1 Flash Demonstration

I've put up a small flash demonstration on how to create a game extension:

http://yourhell.com/~kahless/goim_game_extension_v2.htm (1.8 MB)

It starts with a fresh installation of eclipse SDK 3.1 and downloads GOIM through the
eclipse update manager. Afterwards it shows how to create a new plugin, edit the plugin
manifest to add a extension. And last but not least .. it shows how to set up a Run
entry for GOIM to test your plugin.

This is basically it. I hope it is somehow helpful .. If not, tell me and i'll change it :)


1 More Customization

If you need more customization (e.g. if the launch parameter needs to be changed) you 
have to create your own class.

To do this, select New -> Class and choose 'GameAdapter' as super class. and enter a name
for your own class.\\
Afterwards you need to go back to your plugin manifest to the Extension tab where you
created your Game Extension. In the field 'class' needs to be set to your own class, 
not GameAdapter.

After this your class will have full control on how your Game Extension behaves.

Just overload the 'execute' method to specify custom commands.

You may also look at the source code of GameAdapter to get an idea of the things needed to be done: 

http://yourhell.com/WebSVN/filedetails.php?repname=GOIM&path=%2Fnet.sphene.goim.rcp%2Fsrc%2Fnet%2Fsphene%2Fgoim%2Frcp%2Fextensionpoints%2FGameAdapter.java&rev=0&sc=0