I'm building a turn based 2D physics game where I want a server to be authoritative of a physics simulation and relay the sim back to clients. The game is similar to snooker, 10 balls collide for a fixed time (5 seconds). The simulation is captured at 60 fps all at once and relayed back to both players.
This would be 3000 vectors (60fps * 5 seconds * 10 balls) of positional data calculated and returned to clients each turn. There will be roughly 20 turns per challenge.
Would this be viable to do in cloud code? Apart from the difficulty of implementing it, is this outside the remit of cloud code? Currently I'm working with a typical client/dedicated-server in UE4 but if this was viable in cloud code it would save maintenance and cash spent on server hosting.
Thanks,
Ronan
Best Answer
C
Customer Support
said
over 4 years ago
Hi Ronan,
Apologies for the delayed response. We don't have any special support (or restrictions) for physics as such but as it is essentially maths you could try to implement it yourself. Cloud Code scripts have a default timeout of 30 seconds so as long as your calculations come in under that (I assume they would to keep the game moving as quickly as possible) you should be ok to do this. Try it out and let us know how you get on.
Good question, I'll run this by one of the tech guys and get back to you.
Thanks,
Liam
Customer Support
said
over 4 years ago
Answer
Hi Ronan,
Apologies for the delayed response. We don't have any special support (or restrictions) for physics as such but as it is essentially maths you could try to implement it yourself. Cloud Code scripts have a default timeout of 30 seconds so as long as your calculations come in under that (I assume they would to keep the game moving as quickly as possible) you should be ok to do this. Try it out and let us know how you get on.
Thanks,
Liam
R
Ronan Doherty
said
over 4 years ago
I'll give it a go. On my local machine the simulation is practically instant so 30 seconds is overkill.
Ronan Doherty
Hi.
I'm building a turn based 2D physics game where I want a server to be authoritative of a physics simulation and relay the sim back to clients. The game is similar to snooker, 10 balls collide for a fixed time (5 seconds). The simulation is captured at 60 fps all at once and relayed back to both players.
This would be 3000 vectors (60fps * 5 seconds * 10 balls) of positional data calculated and returned to clients each turn. There will be roughly 20 turns per challenge.
Would this be viable to do in cloud code? Apart from the difficulty of implementing it, is this outside the remit of cloud code? Currently I'm working with a typical client/dedicated-server in UE4 but if this was viable in cloud code it would save maintenance and cash spent on server hosting.
Thanks,
Ronan
Hi Ronan,
Apologies for the delayed response. We don't have any special support (or restrictions) for physics as such but as it is essentially maths you could try to implement it yourself. Cloud Code scripts have a default timeout of 30 seconds so as long as your calculations come in under that (I assume they would to keep the game moving as quickly as possible) you should be ok to do this. Try it out and let us know how you get on.
Thanks,
Liam
1 person has this question
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Ronan,
Good question, I'll run this by one of the tech guys and get back to you.
Thanks,
Liam
Customer Support
Hi Ronan,
Apologies for the delayed response. We don't have any special support (or restrictions) for physics as such but as it is essentially maths you could try to implement it yourself. Cloud Code scripts have a default timeout of 30 seconds so as long as your calculations come in under that (I assume they would to keep the game moving as quickly as possible) you should be ok to do this. Try it out and let us know how you get on.
Thanks,
Liam
Ronan Doherty
I'll give it a go. On my local machine the simulation is practically instant so 30 seconds is overkill.
Thanks for the response Liam.
Customer Support
Hi Ronan,
No problem, best of luck with the game.
Thanks,
Liam
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2485 topics