Curious problem

Community Forums/General Help/Curious problem

Matty(Posted 2015) [#1]
My game is primarily an online game. Single player is supposed to be supported but is not the main focus.

However because the entire data set and 90% of the game is controlled by the server I'm not entirely sure how to best implement offline play.

I'd rather not have to recode all the php and database fields into a java version. If I could create a virtual apache server with php and mysql as part of the app or if there was one available as a library that would be very useful....not sure how much resources it would hog though.....

I really dont like the idea of single player requiring an internet connection. ...

Something I need to work out eventually.

Got a lot done tonight.....every interface/screen bar two have been written and should work....test tomorrow. There's about 16 individual (major) screens in total.....Theres a few services as well that run in the background at times. Note....the screens are just bare basic data output/input displays....once everything works and I'm ready I'll have to start looking for artists to put together the ui....


Derron(Posted 2015) [#2]
You just bet on the wrong horse

Normally the "php"-site is just one end of some kind of "API" you connect to.

As soon as you include "php" in your download version, they will see how things work in there ... it like "lua scripts" containing the game mechanics (and the hidden "calculations").


A webserver isnt the troublemaking thing, the trouble is to include the whole php-part in your binary (or "assisting tool").

Regarding MySQL you will find a module in Brucey's collection. I think sqlite would work too (and is lower on dependencies).

I think you should get rid of the php-dependency for your clients - means recode the php-portion in your app.


bye
Ron


Matty(Posted 2015) [#3]
I think it is okay. As far as I can see the way the server manages everything the input that is allowed is expected input. The actual client doesn't have any php code....it simply calls a few scripts on the server passing various parameters that can only take certain values....whitelist.

I'm just wondering how to approach the single player method. ..


Matty(Posted 2015) [#4]
But I agree including php in the client itself is a v bad idea.