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!
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.
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, but all communication with the users is just HTTP "text" API, instead of video frames generation, audio output.
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.
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.
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...
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
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.
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.
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.