How to combine Google Services with JavaFX multiplayer game? - javafx

Hi, I am writing a multiplayer turn-based game in JavaFX 8.
For now I have game which is working on desktop and users connect by LAN network. I wrote a class for the client and another class for the server.
I am new in developing games by JavaFX and I know that I can compute my game with Google Services and there are ready-made tools for creating such multiplayer games.
This is link to Google Services: https://developers.google.com/games/services/
I would like to use Google Services because I want prepare game to porting with JavaFXPorts mobile plugin for Desktop, Android and iOS.
Do I have to write client and server class again?
How should I add Google Services to each of systems?
Maybe anyone have any example of using Google Services in similar applications.
Thanks in advance for all the answers and suggestions. :)

Using JavaFXPorts, you can deploy your Java application to desktop and mobile devices, so if your client is a JavaFX application you won't need to write it again.
Surely you will need to take care about the different layouts required for different resolutions.
Since on mobile you will be running Java 7, make sure you don't use streams on your code. Lambdas can be used though.
Regarding the use Google Play Services, they work with JavaFXPorts. Have a look at this question.
But before going into Google Play Services, I will suggest you create some samples first, to get a grasp of the process.
Have a look at the free Gluon plugin to get you started with JavaFXPorts. Follow the samples and have a look at the list of prerequisites to be able to deploy your apps.

Related

Difference in offline-first approach and PWAs?

While googling for the confusion of mine, I didn't found the satisfactory resource.
so the question which I was searching for was, What is the difference between offline-first approached mobile apps and PWAs.
As to my level of understanding any mobile app lets say; a react-native app with redux in use or with SQLITE or with realm can be made as a offline-first approached app.
And with PWAs the service worker(of which i have less knowledge) makes all the offline user-interaction and at last when the net connectivity is confirmed the data is fetch or retrieved as required by PWAs.
Though I am not mentioning about other features PWAs can perform(again of which I have less knowledge). And even when the modern browser can only support for PWAs, why there is a hype of PWAs in todays trends?
Please guide me through with any mistake with my question. Any kind of information, knowledge or link to answer my query is much appreciated.
You can read the first of a series of articles about PWAs to get more details about PWAs features and their benefits.
The two concepts are not mutual exclusive. PWAs, thanks to the Service Worker and caching strategies, are able to implement/provide an offline first approach by caching target assets or data responses.
You can however provide an offline first approach also by using other technologies, without introducing a PWA.
The hype behind PWAs is due to the many extra functionalities we can add to a web app, making it behave and look like a native solution. Think just to the advantages of having your frontend team developing a web app that with very little efforts seems almost entirely a native app. And this without having to hire a dedicated native team (iOS/Android).
However PWAs are not the silver bullet for any scenario. They still have limitations that only native apps can provide (eg. SMS capabilities and accessing to the device contacts), even if there are different APIs that aim to solve these gaps, like Google Contact Picker API.
Most of the major apps till recent times was targeted towards countries having decent internet connections. With access to internet spiking in developing countries, most untapped market is coming to light. Though these parts have internet access now , the connectivity problems are plenty. So, to give the best experience for this new brand of customers, we need apps that can run offline
Offline First Approach :
This approach mostly caters to any device which can run offline until a reliable connection is interfaced. As developers , this would mean build the capabiltity to store information in the device through databases, caches or any other local storage approach.
And then when the user opens the app (desktop/mobile) , these run as normal as possible. Just give the user a heads-up that it is not in sync with the latest.
So, an offline first approach can be
Android native app with an offline capability
IOS App w/ offline features
Internet dependent Desktop app w/ offline support
WebApp w/ offline functionality : PWA is the latest
PWA (Progressive Web Apps) :
A PWA is a Web App which has the capability to run offline. With low cost devices (memory deficient, low processing power ) used by many of these users, it's imperative that people installing new native apps will reduce. Also, it's hard to convince people to download and install a new app.
That is where a Web app can be the game changer. A Progressive Web App which has native experience and offline capabilities could drive more users to try a new offering. Adding to that, without forcing a user to install one more app , a link can be easily marketed.
A Progressive Web App is a subset of the offline first approach. With browsers adding more capabilities to access native functions like Contacts as #Francesco pointed out , PWA might will be the first step towards modern app development to release any new feature.

Is it possible to test Meteor application on multiple mobile phones?

I am developing audio calling application in Meteor and I would like to test if I can call other logged in users, it doesn't matter if it is IOS or Android.
Is it feasible to do so? If not, are there any way I can go about to test the calling functionality?
I’d build production apps and distribute to friends with something like Testfairy. I could be one of your testers if it helps you.
You are clearly using webrtc technology so are your stun/turn servers configured correctly? I've read somewhere that a production build was required to access the device camera via the cordova plugin. That could very well be your problem.

Architecture for an integrated offline windows + Web + android application with minimal duplicate effort

We are looking to develop an application wherein the requirement is such that we need some help on designing the architecture. I am putting down below the requirements of the application.
Brief Description
1) The application shall work on web + Android + Offline desktop version (Offline version meaning entirely offline environment wherein full functionality shall work without internet)
if possible offline android as well (which as per my research is difficult to do in same backend so caching can be used for temporary offline usage)
2) While designing the architecture we want to minimise the rework such that we shall be able to use the same Database, Logic code and Frontend as much as possible
3) Everytime application is updated then web and android will reflect it immediately due to API integration. And for offline application, we want to update the logic and database everytime it connects to internet.
Challenges I am facing
1) Database choice : Since it has to be an offline solution as well, I understand that we will have to use either SQLite or SQL compact edition so that we can use the free version and installation file is also not very big
2) Logic : Due to offline requirement, we may have to put entire logic in Asp.net / (any other suggestions) since stored procedures are not supported in above mentioned databases
Some links I found regarding this :
https://www.codeproject.com/Questions/346702/How-to-make-work-an-Online-Web-application-Offline
3) Application framework : Which framework MVC / MVVM etc would be suitable to minimise the work for web based and offline app.
4) Frontend : I understand that we will have to make different screens for web and android. However want to know whether we can use HTML 5 (cache feature) or Angular JS which can be used in offline environment as well or do we have to make offline screens seperately?
Build an ASP.Net web app with offline functionality
https://www.html5rocks.com/en/tutorials/appcache/beginner/
5) Can apache cordova be used in someway for better architecture (I dont know much about it hence)
6) I am sure I might be missing something. If you can offer some suggestion on best way to go about developing this application then will really appreciate your help
Your requirements are not very clear to me.
But if i have backend which is catering to multiple clients with different devices.
I will take the following strategy.
I will expose the backend functionality through rest/HTTP and let the clients consume them.
If i want to make the same UI and functionality and want to do it quickly for different mobile platforms. i will go for a Cordova,Phonegap or a Xamarin app. But keep it in mind that they lack some native functionality.
For web i will go with a UI framework which is device screen size responsive like like openUI5 ( i am sure there are dozen others ), such that an user can open the application in a web browser in any device and it gets rendered easily.
For Desktop based apps again i have to develop a separate UI. If you again have multiple flavors in Desktop application like Windows , Mac etc. You can take multiple strategies like Have a common Java layer + Minimal native layers for each OS or having full blown native layers or have the logic exposed as API in a low level language as C++ and then let high level languages consume them.
For all the apps you can use DBs like SQLite . Have the common DB and scripts ready which easily replicate the table structure for you.
Determination of a technology for the backend can be upto you (depending upon your requirements) and should not matter to clients if you expose your functionality in a restful manner.
Hope this helps.
Best Regards,
Saurav

screen sharing software creation using as3

I wish to do screen sharing application using as3 as the part of one project.
how to get screen sharing video using as3. Thanks.
Screen sharing with flash is already possible with LiveCycle Collaboration Service. Read this article for more info
Update:
LiveCycle Collaboration Service is now known as Influxis Collaboration Service
AS3 does not support this per se. There are some solutions that use java or other technologies to stream through a streaming media server such as Flash Media Server (I'm guessing Fuze Meetings uses something like this), but you cannot do this with just the Flash Player alone. Adobe's Connect Now supports some screen sharing through their Acrobat.com service.
ScreenCamera SDK is definitily your best option here. It installs a camera on the system just like a regular webcam to which you can connect using Flex. ScreenCamera SDK remains completely invisibe to the end user so it looks like your app is doing all the video capture and recording and sharing.
You can test it from here:
http://www.pcwinsoft.com/download/slsdk/
I think this is the simplest way to do what you want to do,

How to launch game using a 'Launch' button in the website?

It is an online game, I need to develop a 'Launch' button on the game site to launch the client side game. I have seen this in several online games like this one.
How can this be done?
Note: I am using ASP.NET to develop the website.
If the game is an .exe you're going to have trouble due to security. (ie if you could issue commands to be run on the client you could execute viruses etc)
If the game is done in flash or silverlight then there are other options.
I've seen similar solutions with Java Webstart (jnlp files).

Resources