Render on server, play back on device.

This may not be the right place to ask the question, but I’m not sure what the right category is:

I like the way the physics/graphics is done in corona, is it possible to run the simulator on a server, and capture the screen for a period of time (recording as a video), then have the devices (app) download and display the video?  

I realise this is quite strange request. I’m thinking of a kind of “guess the outcome game” where a number of players guess what will happen, then at a point in time, the physics runs, and they watch the outcome - so the physics has to be done on one central server.

Obviously the physics/graphics could be done with another tool, if you think there is a better one let me know, I just think the way corona does it is pretty nice.

I don’t understand why you need to record it. If the scene is set up exactly in each device the results would be the same.

Example:

  1. World is set up.

  2. N players guess outcome.

  3. At some point all players get notified to check the results.

  4. The world is run on each device for each player.

In step 4 all would see the same results. If I needed to know the outcome, I would save the results of the first person that runs it on a server with an ID of the match.

Is that really true? I’m thinking to have people bet on the outcome, so it would have to be absolutely true every time on every device.

Imagine the situation where a ball is dropped into the top of the screen, like pinball, and it exits through one of two holes at the bottom. If a device did anything different (somehow?) the users on that device would see a different result.

I like the idea. But yes as far as I have tested and as long as you don’t introduce a variable from the device a world behaves exactly the same on all devices.

For example, random numbers would not be the same across the devices. Two examples:

On my skillz game, they have an internal random number generator that I call. The first person that calls the generator gets a set of numbers and the second person that calls it also gets that exact set of numbers. 

In my GameOn game that I am currently working on Amazon does not have a random number generator. So I have a call on my server that spits out a random number that I then save. When another person plays the game, I spit out the random numbers in the same order that the first person that played the game got them.

From the category of helping people out is one of the best forms of procrastination:

I modified the sample game project to remove device variables and so that the crate would land on the field of view. I also added a circle so I can sort of approximate where it is landing:

On the simulator:

On iPhone 7 running iOS 11.x:

On Essential PH-1 running Android Pie:

On my K88  running Android Nugget:

And finally, I have attached the file I used.

wow nice :slight_smile:

I don’t understand why you need to record it. If the scene is set up exactly in each device the results would be the same.

Example:

  1. World is set up.

  2. N players guess outcome.

  3. At some point all players get notified to check the results.

  4. The world is run on each device for each player.

In step 4 all would see the same results. If I needed to know the outcome, I would save the results of the first person that runs it on a server with an ID of the match.

Is that really true? I’m thinking to have people bet on the outcome, so it would have to be absolutely true every time on every device.

Imagine the situation where a ball is dropped into the top of the screen, like pinball, and it exits through one of two holes at the bottom. If a device did anything different (somehow?) the users on that device would see a different result.

I like the idea. But yes as far as I have tested and as long as you don’t introduce a variable from the device a world behaves exactly the same on all devices.

For example, random numbers would not be the same across the devices. Two examples:

On my skillz game, they have an internal random number generator that I call. The first person that calls the generator gets a set of numbers and the second person that calls it also gets that exact set of numbers. 

In my GameOn game that I am currently working on Amazon does not have a random number generator. So I have a call on my server that spits out a random number that I then save. When another person plays the game, I spit out the random numbers in the same order that the first person that played the game got them.

From the category of helping people out is one of the best forms of procrastination:

I modified the sample game project to remove device variables and so that the crate would land on the field of view. I also added a circle so I can sort of approximate where it is landing:

On the simulator:

On iPhone 7 running iOS 11.x:

On Essential PH-1 running Android Pie:

On my K88  running Android Nugget:

And finally, I have attached the file I used.

wow nice :slight_smile: