Hi there,
I am writing this idea down here, because I don't have the time to actually develop this concept. Perhaps we can start a dialogue here: is this a good idea, or is there a better way?
The code is in pseudo Blitz3D, but ofcourse the target language would be BlitzMax.
----------------------------------------------------------
CURRENT STATE OF BLITZ NETWORK LIBRARIES
The programmer sends and receives network messages by using a library like Blitzplay. By checking the message ID and sending values, you know what is going on 'on the other side' (e.g message id 5 is: the player died) and then you act accordingly to that signal (delete mesh, remove player record). This is cool and should be in, but sometimes it is not very practical.
SHARED OBJECTS
The concept is this: the whole network shares objects like normal variables.
Let's say all computers share the object:
The "big" command that makes it a shared object:
This tells the network module: the 'human' object is going to be shared across the network. Whenever something happens with an object (created,trigger,variables being set), the request and data is sent to all other computers, and is set (variables) or executed (methods, functions) over there as well.
...If the human object is a shared object, it will contain the values above, on every connected computer!
The same would count for executing methods and functions in that object. E.g: human.shoot("shotgun");
or delete h (remove the instance on all computers).
----------------------------------------------------------
Now, I do not know if it's possible to do this in Blitzmax. Somehow you will need to write a module that somehow knows about Blitz' internal object creation/deletion mechanism.
Secondly, it would be nice to set exceptions for certain variables inside a shared object. You could "unshare" them.
Lastly, perhaps a network Player() object would be required in order to do things like:
I am writing this idea down here, because I don't have the time to actually develop this concept. Perhaps we can start a dialogue here: is this a good idea, or is there a better way?
The code is in pseudo Blitz3D, but ofcourse the target language would be BlitzMax.
----------------------------------------------------------
CURRENT STATE OF BLITZ NETWORK LIBRARIES
The programmer sends and receives network messages by using a library like Blitzplay. By checking the message ID and sending values, you know what is going on 'on the other side' (e.g message id 5 is: the player died) and then you act accordingly to that signal (delete mesh, remove player record). This is cool and should be in, but sometimes it is not very practical.
SHARED OBJECTS
The concept is this: the whole network shares objects like normal variables.
Let's say all computers share the object:
type human field head field intelligence field hair method deletePlayer() // delete this object end function method createPlayer // automaticly ran when creating record end type
The "big" command that makes it a shared object:
setSharedNetworkObject(human) // make 'human' shared.
This tells the network module: the 'human' object is going to be shared across the network. Whenever something happens with an object (created,trigger,variables being set), the request and data is sent to all other computers, and is set (variables) or executed (methods, functions) over there as well.
h.human = new human h\head="red" h\intelligence = 50 h\hair = "dark"
...If the human object is a shared object, it will contain the values above, on every connected computer!
The same would count for executing methods and functions in that object. E.g: human.shoot("shotgun");
or delete h (remove the instance on all computers).
----------------------------------------------------------
Now, I do not know if it's possible to do this in Blitzmax. Somehow you will need to write a module that somehow knows about Blitz' internal object creation/deletion mechanism.
Secondly, it would be nice to set exceptions for certain variables inside a shared object. You could "unshare" them.
Lastly, perhaps a network Player() object would be required in order to do things like:
answer=isPlayerLocal(playerID) if answer=1 then do collisionDetection