Unity3d - Online multiplayer Turn - c#

Sorry for my English grammar :( (I try learn it)
I want to try write online turn based game with Unity3d.
I want that people will have login with their username and password and will can play from different device like :
1 player from android/iphone and second from facebook
or 1 from web - second from tablet
etc...
Right now I think to create game 1 vs 1 (for 2 players) - but maybe in the feature I will open a new mode for multiplayer
it's simple to card game.
I'm c# developer so I will write code with c#.
My question is:
1) What I have to use for TURN BASED game (if you can give me link)
I think about WCF or WebAPI - for cross-platform
So what is best practice???
2) I want integrate a premium feature in the game - what you can suggest about billing system inside the game? With which company work is better?
3) I also can write code on JavaScript - if is give me plus in performance??
4) Authorization in the game:
What is best practice today?
User have create account in my system or better to give to user login with his facebook account??
5) How I can sync. between mobile device and facebook game? if is possible?
Where I can save his credentials? If in mobile/tablet I can save in local database, in web - in cookie? where in facebook??
6) server - where the best place to publish the server side ? Amazon cloud? or not??

Unity itself supports networking. But there are other plugins like Photon Unity Networking which are enhanced version of unity networking. It also supports Turn based game plus it is a cross platform will support iOS, android and web.
Photon Engine for Unity Networking
I assume by Billing System you mean In apps in the app. I have used UniBill its works fine with iOS,GPlay,Amazon etc stores. With so much less effort you can integrate the plugin. Unibill by Outline Games
C# is enough i think.
You can use facebook it good enough. You can also add simple guest login for authorization. Guest will be registered on the basis of Unique User ID which is provided by unity.
For storing data, you can use Parse Third party plugin. I have tried it and it works great. If you are going to web app as well then try using their Rest API. It will work will all their supported platforms.

Q1) What I have to use for TURN BASED game (if you can give me link) I think about WCF or WebAPI - for cross-platform So what is best practice???
WCF might not be the best choice, though it functions, but in typical cases, you might wish use Socket or Websocket to communicate.
The benefits of Websocket is that the connection, once established, remains active, and this is quite different from http protocols, in which request-response model is used. With http, the connection dismisses once the message is sent/received, you need to repeatedly setup the channel which has overheads if you have massive message, be it large in payload or frequency.
As a comparison shown below, the performance of Websocket is much better than http based communication, refer to this link for more details.
Another option is to use Redis or MongoDB, which has built-in support of the pub-sub model. Since you are talking about the card game, you might wish that:
Player 1 flips the card, all the other players in this game/room can immediately see this change
Player 2 does sth else, all the other players in this game/room can immediately see this change as well.
This is very simple if you use Redis, one client publishes a message (e.g. card flip), then let all the other clients to subscribe this, then all other players (Android, iOS, web, facebook, tablet whatever) get notified immediately, it is then up to you implement your game logic.
The 3rd option is to use xxx-MQ (e.g. RabbitMQ, ZeroMQ, MSMQ, ActiveMQ) which are essentially message brokers, you can use the pub-sub model easily to implement the turn-based game logic.

3) I also can write code on JavaScript - if is give me plus in performance??
No really different.
Here is performance test
Result is:
The average of C# is 8,075ms and Unityscript is 8,142ms. So C# is a little bit ahead,

Related

Real User Monitoring for a C# Desktop App

I am looking a viable approach to record the usage / performance of various parts of a C# desktop application. I see strong parallels with the web focused Real User Monitoring technique and have access to Datadog to process my data.
Is RUM outside the web a viable approach? I believe I will have to implement the equivalent of the JS Datadog SDK if I want to go down this road, is there a way to do this out of the box?
I want to be able to track user usage for certain function calls and capturing exceptions seem sensible.
There are some event model disconnects between the desktop and web but RUM can be used with Android and iPhone apps as well. I implemented this using the json-schema files in the Android SDK and a bit of trial and error on how I wanted to map function calls into the RUM event model.

Video calling in desktop application .net

I am working on a wpf application which is suppose to have video calling feature. So I am going for Skype to provide me with the solution.
I am using Skype4COM library to do it. I got all the friends from Skype in my application, I can make call to my friends and even can do video call, but I cant control streaming. Video is being shown in Skype window, I want to show it inside my application like a part of my application.
I don't even know which control should I use to handle the video streaming.
If there is another better way or free way to add video calling in a WPF application. I am ready to change my preferences.
I had previous plans to use Web browser control and go for WebRTC but that does not support IE and believe there is no web browser control from Mozilla and Chrome.
Videoconferencing is not trivial to implement. You have to first look at a signalling protocol like SIP or XMPP which would provide infrastructure to maintain a list of 'friends' and whether they are online or offline. The signalling infrastructure would also let you place a call and alert you when you receive a call. And then there is the question of actually flowing video/audio between two endpoints. There is no single solution that you can plug into your app.
You can look at Google's Libjingle or ConferenceXP for a starting point.
To establish a video conference you would need the following information:
Whom can you call? This is your friends list. You would need a mechanism to add friends to your list and ensure that you can only add friends that are willing to communicate with you
How do you establish a communication channel with your friends? For example what is their IP Address, can they support a particular video codec and so on.
Once you have established a way to communicate with your friend, then there is the question of receiving audio and video information and displaying it with correct timing.
For points 1 and 2 you would need what is called a signalling and presence protocol. SIP and XMPP are two very popular open protocol.
For point [3] you would look at a protocol like RTP.
You can google SIP, XMPP and RTP. You would receive a wide variety of literature. Look at the RFC documents for exact information they they can be a bit arcane.
Libjingle is a library written in C++ implements XMPP and RTP
ConferenceXP is a RTP implementation in C# with some basic signalling but I think you can get a start with the examples without really getting into details.
You may or maynot be able to control that screen. If skype decides to share that level of control with you.
But it looks like skype4com library is on a dead end. It will stop working soon. :(
http://gigaom.com/2013/07/13/skype-says-it-will-kill-desktop-api-by-end-of-2013/
http://aragonresearch.com/microsoft-kills-skype-desktop-apis-leaves-developers-scrambling/
I'd recommend you not to invest time on skype4com, but look to other solutions to get the video chat working.
Please go through the following thread, as this discussess few alternative ways for video chatting.
Developing a Video Chat Application with high quality video streaming
Another promising thing is the Bittorent Live. But you will have to wait. It claims
BitTorrent Live is a powerful new web-based live streaming technology.
Designed to eliminate barriers to broadcast, Live is an entirely new
protocol, designed to deliver high quality video to large audiences -
with significant reduction in infrastructure cost and network delays.
http://live.bittorrent.com/
Its not open yet, let see :)

Tracking screen recorder in windows app

I am working on a web project where content security is client's first priority. I need to create a windows app which will track if the user while visiting the website, is running any screen recorder. If he is, I need to log him out. I have knowledge on c#, vb.net. Can you please tell me if it is possible to track if screen recorder is running on user's computer?
You seriously want to prevent access to a web-site being recorded?
The simple answer is no, you can't tell. However, MS does offer some content protection APIs that might be more what you need, IF you are rendering to a DirectX 11 surface:
Direct 3D Video APIs on MSDN has more info.
It might cost colossal resources to implement such solution (that will have holes and must be maintained). Monitoring web site by means of a desktop app sounds like a dirty insecure hack. What if the user has a mobile phone with the camera?
Better, you shall rely upon standard widely accepted security principles of HTTP/TSL, such as proper authentication, authorisation, security policies, encryption, strong passwords etc.

fingerprint reader software using C#

I am planning to verify the user input for my application using the biometric input. I did some research on net and came up with following options of biometric input:
Fingerprint
Facial Recognition
Retinal Scan
Iris Scan
Voice Recognition
Signature Verification
Out of which I felt the fingerprint as most suitable options. But the problem with this is the API of the fingerprint device will vary with its hardware. So most probably I think I will need to code against the multiple devices API, which I don't find friendly.
I intend to do the programming stuffs in C#. Is there any way out of this. As I am new to this I'm clueless. What is the way to attack this problem and how vast is the project scope and what should be my approach for this project.
The problem is not unique to fingerprint readers, it will apply to all other options in your list and many other peripherals. In fact a standard API is the exception.
So you will have to look for somebody selling a library for this or writing your own (COM and/or Interop). And rolling your own will usually not be small or simple project.
Your program will have a list of supported devices, excluding the rest.
A colleague of mine was tasked with building a biometric based staff clock-in system for the company we both worked for. We, IT, choose Fingerprints as the biometric source. He researched and used this library from Bayometric - Griaule Fingerprint SDK along with some cheap MS print readers. From what he showed me and talked about at the time, does lead me to believe that this .net library had a nice API and was easy to work with.
The biometric system is still being used today, some 5 years later.
I work in the biometric field, and I use C# for a lot of the fingerprint stuff I do. My company had to develop a fingerprint device abstraction library for this very reason. Consider that all fingerprint scanners only REALLY need one call: getImage. Knowing this, my company wrote a library which initializes and sets up each device, creates a generic wrapper, assigns a unique ID, and throws it into a big list that you can enumerate over.
Then from the C# side all you have to do is "pick" a device (all you have to go on is a unique ID and maybe a manufacturer) and then use it. The image data that comes back has to be decided on in advance so that you know what you're going to get every time
The main problem with this approach is that a lot of devices these days have various gimmicks (e.g. programmable flashing lights), and by abstracting the devices away you lost the ability to access these special abilities. Furthermore, some devices actually return multiple channels of data (various spectrums of light for example) and you have to throw away all but one channel so that the application can remain device agnostic, which is a hard decision.
Finally keep this in mind: if you do minutiae extraction, the device you use unfortunately WILL impact which minutiae are detected. Some devices are "tuned" for certain algorithms, and so enrolling with device A and matching with device B may not work at all despite having picture-perfect fingerprints.
There is a similar question here: finger print reader for .net windows forms / WPF or silverlight client
Check the links in the answers

What tools do I need to make a GIS/GPS Navigation Software by C#

I have been assigned to know to how to make a GPS Navigation Software for Win CE 6.0 operating system. But after searching a lot, I couldn't find a good way to start.
I have downloaded some free software by which i can view the provided ShapeFile files but I want to make a software by which I can view those files in my customized mode.
My preferred technology is .NET 3.5 / 4 and my OS supports silverlight.
You can visit this link what exactly I want to do.
Thanks in advance.
I have to work on a predefined data set (shape files) provided by my client and i have to put my app in GlobalSat [GA-5718] device.
Your suggestions are very fine but it won't work for me. Thats why I am in a confusing position.
At first you'll need to get access to the GPS data and read it. Most GPS modules act as a serial device on some COM port and provide their information in the NMEA Standard.
To get this easily read you should take a look at the OpenNETCF Serial Library, cause it provides an easy access to the informations and is able to read the NMEA strings.
But most GPS modems needed to be initialized by sending a correct NMEA input string. For these you should take a look into this documentation, this site or in the comment in the source above function public bool SendGpsMessage(string GPSSentence).
With these informations you should have a good starting point to correct read in the GPS data. Visualization of these informations to the user (like showing a Map with the current position) is another task. But maps.google.com API would be a possible candidate if you software runs on a machine with internet connection and you don't mind the costs for this connection.
The fact that you are asking this question strongly suggests you do not have the resources or ability to write it from scratch (it is a substantial project). Therefore you will have to use existing toolkits. You mention Silverlight, so I suspect you are going to be working in an online environment. Therefore I would recommend the Bing Maps Silverlight Control. IMHO, this outperforms the Google Maps control at the moment - but it is a moving target. This is a place where active competition results in two products (Google Maps & Bing Maps) constantly trying to out do each other.
If this is for a commercial application, then check the EULAs for these services - although many enthusiasts assume they are free, this is not necessarily the case. Most commercial applications cost significant sums ($1000s per month). In such a situation, the choice of service will probably come down to cost rather than technology.

Categories