GameExtensions

(GameExtensions@groupWiki:goim) 1329 Hits - Changes: 5 - Last Change: 2006-02-09 21:56:11 by Herbert Poul (Kahless) - [ History ] [ Latest changes ]

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.

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

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 :)

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

Contact Me ;)

Last but 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:



0 Comments
You need to be logged in to post a Comment !