Using a Unity standalone as a backend
Posted: 05 Feb 2015, 17:42
I would like to use Unity as a backend for the physics and AI (and possibly authoritative movement)
Probably be using the mmoroom, but possibly just a normal room as I do not expect rooms to be too large. (a few players and a couple dozen npcs)
From reading your docs it seems that mmoitems can only be spawned through extensions?
Is there a way for one user (the backend instance) to spawn/control multiple users in a room with their individual user variables?
Is there a way for one user (the backend instance) to control the user variables of other users? (to make it authoritative?)
I am just a hobbiest, and still learning alot, but reading as much as I can. I just want to figure out the best way for me at my stage of learning to do something
My last burst of studying had been with photon, but I was wanting to focus more on mobile this time around and read that it wouldn't work on android, so I chose smartfox.
Turns out smartfox doesn't either unless you get Unity Pro, or what I did which is buy Good 'ol Sockets from the unity asset store, which I believe would also allow me to use photon as well.
(I already have smartfox installed on a linux server though, and would rather not switch back to using a different server again(which photon requires) unless I have to)
So, here is my rough plan of attack, all of which I will be modifying as I go and learn more about the proper processes.
Doing everything through unity.
Backend will be standalone without any need for human input, it will run the NPCs, AI, physics, etc...)
The client sends input to the backend through the server. (updating user variables?)
The client predicts movement based on their own input.
The backend moves them, and sends back their actions/position/etc... (updating their user variables?)
The client smoothly adjusts the difference between their predicted movement and what the backend sets.
The client places and moves other players, NPCs, and AI according to where the backend sets, and smoothly adjusts them between updates.
Is this logical?
Is this possible with smartfox?
Thanks for your time
narfi
Probably be using the mmoroom, but possibly just a normal room as I do not expect rooms to be too large. (a few players and a couple dozen npcs)
From reading your docs it seems that mmoitems can only be spawned through extensions?
Is there a way for one user (the backend instance) to spawn/control multiple users in a room with their individual user variables?
Is there a way for one user (the backend instance) to control the user variables of other users? (to make it authoritative?)
I am just a hobbiest, and still learning alot, but reading as much as I can. I just want to figure out the best way for me at my stage of learning to do something
My last burst of studying had been with photon, but I was wanting to focus more on mobile this time around and read that it wouldn't work on android, so I chose smartfox.
Turns out smartfox doesn't either unless you get Unity Pro, or what I did which is buy Good 'ol Sockets from the unity asset store, which I believe would also allow me to use photon as well.
(I already have smartfox installed on a linux server though, and would rather not switch back to using a different server again(which photon requires) unless I have to)
So, here is my rough plan of attack, all of which I will be modifying as I go and learn more about the proper processes.
Doing everything through unity.
Backend will be standalone without any need for human input, it will run the NPCs, AI, physics, etc...)
The client sends input to the backend through the server. (updating user variables?)
The client predicts movement based on their own input.
The backend moves them, and sends back their actions/position/etc... (updating their user variables?)
The client smoothly adjusts the difference between their predicted movement and what the backend sets.
The client places and moves other players, NPCs, and AI according to where the backend sets, and smoothly adjusts them between updates.
Is this logical?
Is this possible with smartfox?
Thanks for your time
narfi