Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Render on server, play back on device.
Started by prographodeveloper Sep 22 2018 06:13 AM

5 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 281 posts
  • Corona SDK

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.

 



[TOPIC: post.html]
#2

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Contributor

  • 850 posts
  • Corona SDK

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.



[TOPIC: post.html]
#3

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 281 posts
  • Corona SDK

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.

 

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.



[TOPIC: post.html]
#4

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Contributor

  • 850 posts
  • Corona SDK

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.


  • roaminggamer and prographodeveloper like this

[TOPIC: post.html]
#5

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Contributor

  • 850 posts
  • Corona SDK

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:

 

Attached File  simulator.png   67.22KB   0 downloads

 

On iPhone 7 running iOS 11.x:

 

Attached File  iphone7.png   734.92KB   0 downloads

 

On Essential PH-1 running Android Pie:

 

Attached File  essential.png   793.51KB   0 downloads

 

On my K88  running Android Nugget:

 

Attached File  zte.png   282.51KB   0 downloads

 

And finally, I have attached the file I used.

Attached File  drop test.zip   182.06KB   1 downloads

 


  • prographodeveloper likes this

[TOPIC: post.html]
#6

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 281 posts
  • Corona SDK

wow nice :)




[topic_controls]
[/topic_controls]