are java extensions fully oop?, can I split my extension into classes and pakages?, how would the architecture look like... should I prepare the classes and use them in the extension? any example? did I miss some post about this?, also I think the docs should include advanced java extension game that can help better understanding java extensions.
thanks,
are java extensions fully oop?
hi mhdside,
your javaextensions are as much as OOP as you design them to be.
yes, you can split them into several packages, if you see the need to.
for example, i have an abstract base class MyExt extending AbstractExtension, defining some common initialization code etc.
All my extensions then extend MyExt.
cheers,
thomers
your javaextensions are as much as OOP as you design them to be.
yes, you can split them into several packages, if you see the need to.
for example, i have an abstract base class MyExt extending AbstractExtension, defining some common initialization code etc.
All my extensions then extend MyExt.
cheers,
thomers
mmm, interesting. Thanks thomers1, I have no java experience yet but I want to start writing my extensions in java.
One more question, is it better to have the game extension at the zone level or room level?
The idea is if I want to keep the game state at the server, I have to attach the extension at the room level but this way I`ll consume more resources. While if I attach the extension at the zone level, I'll save resources but I`ll have to save the game state at the clientside.
Which apprach is more common, better?
One more question, is it better to have the game extension at the zone level or room level?
The idea is if I want to keep the game state at the server, I have to attach the extension at the room level but this way I`ll consume more resources. While if I attach the extension at the zone level, I'll save resources but I`ll have to save the game state at the clientside.
Which apprach is more common, better?
The idea is if I want to keep the game state at the server, I have to attach the extension at the room level but this way I`ll consume more resources. While if I attach the extension at the zone level, I'll save resources but I`ll have to save the game state at the clientside.
i'm not an expert, but i would avoid storing the game state on the client side.
if its simple enough, you could store the game state in room variables, that are broadcasted to the clients on change.
cu
t
I think to put the game state at the server. I need 1 extension per game so each extension variables will save the state of the game they are attached to.
If the extension is at the zone level, how am I going to save state for all the games in this 1 extension? It doesn't make sense to, does it?
correct me if I'm wrong.
If the extension is at the zone level, how am I going to save state for all the games in this 1 extension? It doesn't make sense to, does it?
correct me if I'm wrong.
Hello-
Im assuming if i understand your previous posts that each room is its own game.
If that is the case, instead of having the properties of the game be properties of the extension you would have them be stored in the rooms properties. This way when the extension needs to access the properties for that particular game you simply access the room in question to get the information.
Another option would be to have a custom class that stores the games properties, then create an array/hash table of your custom class in the extension so as to be able to reference them as needed.
Hope that helps
_-Menser-_
Im assuming if i understand your previous posts that each room is its own game.
If that is the case, instead of having the properties of the game be properties of the extension you would have them be stored in the rooms properties. This way when the extension needs to access the properties for that particular game you simply access the room in question to get the information.
Another option would be to have a custom class that stores the games properties, then create an array/hash table of your custom class in the extension so as to be able to reference them as needed.
Hope that helps
_-Menser-_
Personally, I want to minimize the use of room variables as possible. I don't feel comfortable working with them, I think sending extension messages is more flexible.
Yet your second suggestion seems interesting. Actually working with only 1 extension at the zone level would make things more easy, for example it will be easy for a lobby user to send xt msg to the game extension to update his view of this running game...etc, I`ll go for it and see how things go. Thanks a lot for your help.
But as you can see there is lotta possibilities, there should be a best practise or templates for differnet kinds of applications in the docs.
although using zone ext. saves resources and would be more flexible especially after your second suggestion. Why are all the examples in the docs use room level ext. for game apps!!
Yet your second suggestion seems interesting. Actually working with only 1 extension at the zone level would make things more easy, for example it will be easy for a lobby user to send xt msg to the game extension to update his view of this running game...etc, I`ll go for it and see how things go. Thanks a lot for your help.
But as you can see there is lotta possibilities, there should be a best practise or templates for differnet kinds of applications in the docs.
although using zone ext. saves resources and would be more flexible especially after your second suggestion. Why are all the examples in the docs use room level ext. for game apps!!
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 51 guests