cklester Well-Known Member Licensed User Dec 23, 2023 #1 Saw this on Reddit today. SpaceBots. There's no doubt someone here that could whip up a quick, easy-to-use, UI for the game! Would be a good showcase for B4X xplat capabilities, and maybe a good test vehicle for everybody's web app libs!
Saw this on Reddit today. SpaceBots. There's no doubt someone here that could whip up a quick, easy-to-use, UI for the game! Would be a good showcase for B4X xplat capabilities, and maybe a good test vehicle for everybody's web app libs!
peacemaker Expert Licensed User Longtime User Dec 23, 2023 #2 Really something new and strange Each can build his own interface game. I like the idea of the game structure, here maybe @aeric 's API framework can help to build the game API...
Really something new and strange Each can build his own interface game. I like the idea of the game structure, here maybe @aeric 's API framework can help to build the game API...
aeric Expert Licensed User Longtime User Dec 26, 2023 #3 peacemaker said: Really something new and strange Each can build his own interface game. I like the idea of the game structure, here maybe @aeric 's API framework can help to build the game API... Click to expand... Apparently, the game can be play by using Postman. However, you can build a B4X client app using OkhttpUtils2 (or web frontend) and add some graphical and sound assets.
peacemaker said: Really something new and strange Each can build his own interface game. I like the idea of the game structure, here maybe @aeric 's API framework can help to build the game API... Click to expand... Apparently, the game can be play by using Postman. However, you can build a B4X client app using OkhttpUtils2 (or web frontend) and add some graphical and sound assets.
peacemaker Expert Licensed User Longtime User Dec 28, 2023 #5 It is that what is interesting - all the game algorithm is coded in the server app, but all communication with the users is just HTTP "text" API, instead of video frames generation, audio output. So interface of the user client can be any - text or graphics generated on user's side basing on API replies.
It is that what is interesting - all the game algorithm is coded in the server app, but all communication with the users is just HTTP "text" API, instead of video frames generation, audio output. So interface of the user client can be any - text or graphics generated on user's side basing on API replies.
ilan Expert Licensed User Longtime User Dec 28, 2023 #6 peacemaker said: It is that what is interesting - all the game algorithm is coded, but all communication with the users is just HTTP "text" API, instead of video frames generation, audio output. Click to expand... ok so let say i have a server running this API and each user can get/post to the API like getting his spaceship position etc. but if i want now to create a game based on API calls i am not sure i can get 60 api calls per second for each player to get a smooth game feeling.
peacemaker said: It is that what is interesting - all the game algorithm is coded, but all communication with the users is just HTTP "text" API, instead of video frames generation, audio output. Click to expand... ok so let say i have a server running this API and each user can get/post to the API like getting his spaceship position etc. but if i want now to create a game based on API calls i am not sure i can get 60 api calls per second for each player to get a smooth game feeling.
ilan Expert Licensed User Longtime User Dec 28, 2023 #7 ilan said: ok so let say i have a server running this API and each user can get/post to the API like getting his spaceship position etc. but if i want now to create a game based on API calls i am not sure i can get 60 api calls per second for each player to get a smooth game feeling. Click to expand... but i can try it. ?
ilan said: ok so let say i have a server running this API and each user can get/post to the API like getting his spaceship position etc. but if i want now to create a game based on API calls i am not sure i can get 60 api calls per second for each player to get a smooth game feeling. Click to expand... but i can try it. ?
aeric Expert Licensed User Longtime User Dec 28, 2023 #8 I think it is more like a text based / turn based strategy game.
peacemaker Expert Licensed User Longtime User Dec 28, 2023 #9 ilan said: 60 api calls per second for each player to get a smooth game feeling Click to expand... Why not? API sends you the vector of movement (3D-direction, speed) and you can calculate and generate the video as you need
ilan said: 60 api calls per second for each player to get a smooth game feeling Click to expand... Why not? API sends you the vector of movement (3D-direction, speed) and you can calculate and generate the video as you need
peacemaker Expert Licensed User Longtime User Dec 28, 2023 #10 But it's interesting the API template for games: action one, strategy one, simple single-player 2D game... DB structure: users, actions, items, enemies, achievements... Last edited: Dec 28, 2023
But it's interesting the API template for games: action one, strategy one, simple single-player 2D game... DB structure: users, actions, items, enemies, achievements...
ilan Expert Licensed User Longtime User Dec 28, 2023 #11 peacemaker said: Why not? API sends you the vector of movement (3D-direction, speed) and you can calculate and generate the video as you need Click to expand... yes but 60 times per second??? again i will give it a try!!
peacemaker said: Why not? API sends you the vector of movement (3D-direction, speed) and you can calculate and generate the video as you need Click to expand... yes but 60 times per second??? again i will give it a try!!
peacemaker Expert Licensed User Longtime User Dec 28, 2023 #12 ilan said: but 60 times per second? Click to expand... The API gives you the targets (coords, points...), but the video process of movement to the coords is on your side, at client code
ilan said: but 60 times per second? Click to expand... The API gives you the targets (coords, points...), but the video process of movement to the coords is on your side, at client code
ilan Expert Licensed User Longtime User Dec 28, 2023 #13 peacemaker said: The API gives you the targets (coords, points...), but the video process of movement to the coords is on your side, at client code Click to expand... sure, i understand that. everything that is related to UI is happening on the client side. The server just send/write the coordinates.
peacemaker said: The API gives you the targets (coords, points...), but the video process of movement to the coords is on your side, at client code Click to expand... sure, i understand that. everything that is related to UI is happening on the client side. The server just send/write the coordinates.
peacemaker Expert Licensed User Longtime User Dec 28, 2023 #14 Me: move right hand and taking aim to Enemy23 Me: shoot ! API: missed ! Click to expand...
aeric Expert Licensed User Longtime User Dec 28, 2023 #15 Consider the network latency, it is not going to be a real time updates. Why consider adding video? The client can be just a plain dashboard page.
Consider the network latency, it is not going to be a real time updates. Why consider adding video? The client can be just a plain dashboard page.
ilan Expert Licensed User Longtime User Dec 28, 2023 #16 Me: move right hand and taking aim to Enemy23 API: check Me position/Enemy23 position Me: shoot! Api: track bullet position / me position / enemy23 position Me: moving Enemy23: moving Bullet: still moving Api: check bullet position/ check enemy23 position check if hit Enemey 23: shoot! Api: check Enemy23 bullet position/check me bullet position/check if hit /check me position /check enemy 23 position Api: me bullet missed. .... ? and all this 60 times per second and it its only 2 players. can be very challenging but i want to try it. (already started )
Me: move right hand and taking aim to Enemy23 API: check Me position/Enemy23 position Me: shoot! Api: track bullet position / me position / enemy23 position Me: moving Enemy23: moving Bullet: still moving Api: check bullet position/ check enemy23 position check if hit Enemey 23: shoot! Api: check Enemy23 bullet position/check me bullet position/check if hit /check me position /check enemy 23 position Api: me bullet missed. .... ? and all this 60 times per second and it its only 2 players. can be very challenging but i want to try it. (already started )
peacemaker Expert Licensed User Longtime User Dec 28, 2023 #17 ilan said: Me: move right hand and taking aim to Enemy23 API: check Me position/Enemy23 position Me: shoot! Api: track bullet position / me position / enemy23 position Me: moving Enemy23: moving Bullet: still moving Api: check bullet position/ check enemy23 position check if hit Enemy23: shoot! Api: check Enemy23 bullet position/check me bullet position/check if hit /check me position /check enemy 23 position Api: me bullet missed. Click to expand... Me: moving Click to expand... It's local animation, no any network transmission. Enemy23: moving Click to expand... it's actually the packet: API: Enemy23 is moving to coords = X, Y, Z, speed Click to expand... And all other calculations on client's side. Bullet: still moving Click to expand... It's server's local calculation. Enemy23: shoot! Click to expand... it's actually the packet: API: Enemy23 shoot, bullet's way to coords X1, Y2, Z2, speed2 Click to expand... And next just local client's calculations
ilan said: Me: move right hand and taking aim to Enemy23 API: check Me position/Enemy23 position Me: shoot! Api: track bullet position / me position / enemy23 position Me: moving Enemy23: moving Bullet: still moving Api: check bullet position/ check enemy23 position check if hit Enemy23: shoot! Api: check Enemy23 bullet position/check me bullet position/check if hit /check me position /check enemy 23 position Api: me bullet missed. Click to expand... Me: moving Click to expand... It's local animation, no any network transmission. Enemy23: moving Click to expand... it's actually the packet: API: Enemy23 is moving to coords = X, Y, Z, speed Click to expand... And all other calculations on client's side. Bullet: still moving Click to expand... It's server's local calculation. Enemy23: shoot! Click to expand... it's actually the packet: API: Enemy23 shoot, bullet's way to coords X1, Y2, Z2, speed2 Click to expand... And next just local client's calculations
ilan Expert Licensed User Longtime User Dec 28, 2023 #18 peacemaker said: It's local animation, no any network transmission. Click to expand... no that is not true, when you move the server needs to know where u are if not how should it check for collision with the bullets? i did many apps believe me i know what needs to be checked in background and what is UI.
peacemaker said: It's local animation, no any network transmission. Click to expand... no that is not true, when you move the server needs to know where u are if not how should it check for collision with the bullets? i did many apps believe me i know what needs to be checked in background and what is UI.
peacemaker Expert Licensed User Longtime User Dec 28, 2023 #19 ilan said: how should it check for collision with the bullets? Click to expand... If "me" reported about my movement vector, and received the vectors of Enemy and bullets - it seems to me next should be just local math calculations about the vectors crossing... and the results, without network transmission at this millisecond.
ilan said: how should it check for collision with the bullets? Click to expand... If "me" reported about my movement vector, and received the vectors of Enemy and bullets - it seems to me next should be just local math calculations about the vectors crossing... and the results, without network transmission at this millisecond.
aeric Expert Licensed User Longtime User Dec 28, 2023 #20 I think you guys are going far out of topic.