wonder Expert Licensed User Longtime User Dec 24, 2014 #1 Hey guys!! Hey @Erel! I was wondering, would it be possible and reliable to create a simple Pong game, where the 2 players compete via bluetooth in real-time, with negligible lag? I guess the way to implement it would be a host/guest model, where the app in host mode is fed the Player 2 input and performs all the calculations before sending the data back to the second device running the app in guest mode. Please correct me if there is a better way to do it.
Hey guys!! Hey @Erel! I was wondering, would it be possible and reliable to create a simple Pong game, where the 2 players compete via bluetooth in real-time, with negligible lag? I guess the way to implement it would be a host/guest model, where the app in host mode is fed the Player 2 input and performs all the calculations before sending the data back to the second device running the app in guest mode. Please correct me if there is a better way to do it.
Erel B4X founder Staff member Licensed User Longtime User Dec 24, 2014 #2 Connecting two devices over Bluetooth is simple. I don't think that the latency will be a problem for a simple game. Upvote 0
Connecting two devices over Bluetooth is simple. I don't think that the latency will be a problem for a simple game.
wonder Expert Licensed User Longtime User Dec 24, 2014 #3 Thank you Erel and happy holidays!! If you have time to answer and assuming you are familiar my project (signature), do you think it's worth to pursue the implementation of multiplayer bluetooth support? Upvote 0
Thank you Erel and happy holidays!! If you have time to answer and assuming you are familiar my project (signature), do you think it's worth to pursue the implementation of multiplayer bluetooth support?
Erel B4X founder Staff member Licensed User Longtime User Dec 25, 2014 #4 Not sure. Might be better to concentrate on the "core features". Upvote 0
Beja Expert Licensed User Longtime User Dec 25, 2014 #5 The implementation you are suggesting is time consuming and will double the lag time, because the host will process for himself and for the guest.. but if each one just sent it's new position and let the other process it, this way you will save time. Upvote 0
The implementation you are suggesting is time consuming and will double the lag time, because the host will process for himself and for the guest.. but if each one just sent it's new position and let the other process it, this way you will save time.
wonder Expert Licensed User Longtime User Dec 25, 2014 #6 The problem is the randomized behavior of the AI. Without a host the AI would have different movement patterns on each device, henceforth creating a different experience for each user in cooperative multiplayer. However, for a simple versus match (such as a Pong game), yes... there's no need for a host/guest scheme. Upvote 0
The problem is the randomized behavior of the AI. Without a host the AI would have different movement patterns on each device, henceforth creating a different experience for each user in cooperative multiplayer. However, for a simple versus match (such as a Pong game), yes... there's no need for a host/guest scheme.
Beja Expert Licensed User Longtime User Dec 25, 2014 #7 you are right, I was thinking about Ping-Pong game that you mentioned.. Upvote 0
wonder Expert Licensed User Longtime User Dec 25, 2014 #8 The Pong game would be a proof of concept and if it works properly, I would happily publish the source code. I would then implement what I've learned in my own game. Upvote 0
The Pong game would be a proof of concept and if it works properly, I would happily publish the source code. I would then implement what I've learned in my own game.
Beja Expert Licensed User Longtime User Dec 25, 2014 #9 wonder said: The Pong game would be a proof of concept and if it works properly, I would happily publish the source code. I would then implement what I've learned in my own game. Click to expand... That would be great and can't wait to read your Ping-Pong code. I will definitely benefit from it.. Some time ago I think someone posted a project like Ping-Pong, but not quite sure. but that was single player. Upvote 0
wonder said: The Pong game would be a proof of concept and if it works properly, I would happily publish the source code. I would then implement what I've learned in my own game. Click to expand... That would be great and can't wait to read your Ping-Pong code. I will definitely benefit from it.. Some time ago I think someone posted a project like Ping-Pong, but not quite sure. but that was single player.
wonder Expert Licensed User Longtime User Dec 25, 2014 #10 I can't promise, but I'll try to deliver, even if it's only single player. Upvote 0
Beja Expert Licensed User Longtime User Dec 26, 2014 #11 Did you find the single player code posted here some time ago? edit: Just remembered it was not Ping-Pong, but only ping.. a moving bar at the bottom of the screen that will return the ball.. the ball will return in random angle and if hit a small box will destroy it.. when all boxes are destroyed then the game is over. something like this: Attachments pingpong.jpg 9.1 KB · Views: 748 Last edited: Dec 26, 2014 Upvote 0
Did you find the single player code posted here some time ago? edit: Just remembered it was not Ping-Pong, but only ping.. a moving bar at the bottom of the screen that will return the ball.. the ball will return in random angle and if hit a small box will destroy it.. when all boxes are destroyed then the game is over. something like this:
wonder Expert Licensed User Longtime User Dec 26, 2014 #12 Hello again @Beja, As promised I created the Pong Game (no bluetooth) this morning: https://www.b4x.com/android/forum/threads/simple-pong-game.48624/ Upvote 0
Hello again @Beja, As promised I created the Pong Game (no bluetooth) this morning: https://www.b4x.com/android/forum/threads/simple-pong-game.48624/