How to create webservice for online game - web-services

I created a game in flash, for android(I know flash is dead, but was the only platform I knew how to code a game). It's based on matches, I did the AI and the game works very well offline.
But now I want to make it online and I never developed anything for web, like websites, webservers. I do not even know what SOAP, REST and this methodologies are.
So what do I need to learn to develop something like this? Here are the requirements :
I want to create a "room" with your facebook friends that are online in the moment.
In this "room" you can invite them to play a match.
The information that is passed client to client is only two points in the cartesian plane(e.g., {(1,2), (3,5)}) and the information that the game may have ended.
It's important to notice that the server must hold connections from
cellphones. The information passed is from cellphone to cellphone.
Develop the whole game in another language or platform is not an option. This is my first game that will be published, so its more like an learning exercise. I dont know PHP nor Python, but I can learn it.
Thanks.

there is a service called Flox (https://www.flox.cc/docs/getting-started) which has a AS3 integration, take a look at it, may help you

Related

want a common DataBase for Unity Game and a Website

I am making a game in unity 5 where i need to load description and items from a database which gets updated when we enter values in a website.
I need to know some way to consume asmx webservices in unity 5.
Can somebody tell me in detail How can i do that.
I don't know too much about Unity. I have only tinkered with the game engine. So the only advice I can offer is, try posting your question on this site https://gamedev.stackexchange.com/ (if you haven't already). It's the same thing as SO just for game development specifically. Good luck in your endeavors.

C++ Troubles with bot (MY private server)

I am making a server for a mmorpg somewhat soon, and I want to release a bot to go with it, since I don't want people having the ability to level to the maximum within a week or less but I don't want them to be discouraged from the amount of farming exp and items, so I want to make a bot that handles 1-8 accounts. I'm somewhat good with c++, do not tell me "use autoit" I am trying to make it look somewhat professional and actually work with the settings on their computer, I am good with the functions for windows.h but I can't figure out how to make the bot read or write to memory nor can I figure out how to use softice (not sure if I even have the correct one).
Now, the game is simple and I would have only 2 spells per account being used (long or short ranged) and monster icons and hp are always in the same x,y pos so the AI is very basic having all the accounts do the exact same things, but I can't figure out how to look at let alone edit the packets to allow my bot to work without having each account become the focus window at every step of the fight.
the reason for 1-8 accounts is that most people on the normal server have anywhere from 1-8 usually 4-8 once they reach higher levels to allow for them to be able to do things without searching for a group since most dungeons take up to 5 hours at higher levels and it would be easier to have all you need instead of being stuck half way through once someone decides that they have to get off or you need to leave.. you know how it can be. anyway,
it is strictly for my server, but its not up yet so I can't learn with it, and I'm not the host I am paying my friend to set it up but he has no idea how to make a bot so I'm looking for some help.
I would like help with
-some tutorials on or around the subject.
or
-someone to help me through it (I don't need much help, an hour or two would probably be enough for me to get in the right direction)
or
-the source code to someones bot (I could probably look through it to find what I need.)
or
-where to go to find someone to teach me (cheap)
Now Please don't post things like "you shouldn't cheat" I am making this for a server I am supplying, so its not cheating since I allow it and give people the program for free on my website. And if you say something like "you'll have to practice with it on the real server", Yes I will, but I would be using level 1 accounts in the "noob" area in a place nobody ever goes (plus on the real server the noob area has individual 200 people servers so even if I go on it I wouldn't disturb anyone) and I am only using it for practice and then I would edit it once my server was up, so I am not cheating to get farther in the game or anything, it is purely for the use in my server. I also ask that people take this somewhat seriously, I am fairly good with C++ I am just stuck since I can't find where to teach myself this.
Also, admins please don't shut this down I realize that this could be taken as I am violating the terms of service but if you read this, I am not. Since it is for own MY server and I am not using it to cheat, I have a viable reason for making this and I do really need help.
EDIT:
I found some information that said I need to learn about sockets and networking in C++. I have located some tutorials for networking, but I would greatly appreciate something on sockets (all I have found are useless tidbits of information).
In my opinion it would be way easier if the bot was a game-client itself. This way it could do everything a client could without hooking anything. The bot doesn't even need a useinterface, it could just run in the background. If this is possible depends on how modular your code is. In an ideal situation you could make a new application, referencing the game-client dll with the gamelogic and recieve requests from the server and send actions as a player would do.
Creating a bot that clicks on a client windows button is possible but complicated. But to help you with your request we need more info about how the client and server work. What languages are they written in, what APIs and Libraries are you using?
If you have no idea how to achieve this it and got no idea how the client works it would probably better for your friend to write the bot.

Techniques to master about implementing a network player

I have a final project abount database design this semester. And my teacher gives us many tasks for alternatives, such as Student Information Management System, Airline Reservation System and so on. However, I want to design such a player that it allows users to upload their own works and share together. Of course it also provides download service. I'm a sophomore this year. I'm familiar with c++ programming, but do not know much about network programming. Furthermore, I learnt T-SQL this semester and also did some works on MySQL in java(course in this semester, too). My idea is here (I have drew a picture):http://tmjfzy.blog.163.com/blog/static/66447025201242553045/
I need some advice about network programming. Could you give me some to help me realize my imagination? Thank you :-).
So, you're basically reinventing YouTube but with dedicated client?
Actually it's very easy to start without any clients or C++ : all you need is a server with MySQL, Apache and PHP. I recommend WAMP server if you're on Windows. FlowPlayer is a flash video player quite easy to integrate, but today using HTML5 video features should be a better idea. I believe you can have the reference Web system up and running in about 3 to 6 days.
(I'm also a C++ programmer and I had no problem with learning enough HTML, PHP and JavaScript to do very similar thing ).
Once you have a system up and running (possibly with limitation on video file format) you can design and implement API. From server side it's nothing more than PHP files, just returning data in your format of choice (eg. JSon, XML) instead of generating HTML.
With server-side API done, you can start working on client. Registration, login, upload from file and download to file should go first. Once the client can get the video files, you can implement a player. A streaming player goes next. If you encounter problems with playing back the video files, this is good moment to break compatibility with web version and change video file format. Now that you know what playback formats are supported, you might implement converting before upload. (Conversion makes sense if you want to have all files on server in one format. Otherwise it's not really usefull: if a client can convert a video, it should be able to play it back. This means all other clients also should understand the format and be able to play it back.)
At this point you can consider rewriting the server. Or other student can be writing the server in the same time as you're busy with client.
Having working Apache-PHP reference all the time makes such parallelism a breeze.
All the above requires using HTTP as underlying protocol. I think Qt has built in support. If not you can use some library (like cURL) or implement it from scratch on sockets.
Eventually streaming, like RTP+RTSP, can be added for playback.
If you feel really adventurous, you can start designing your own protocol, but this is the very last step, after having both own client and own server working flawlessly on hand-implemented HTTP.

C++ online Role Playing Game (RPG)

So I've been learning C++ and SDL to make some basic 2d games. I want to create a game sort of like World of Warcraft but a 2D version. I want it to be on-line and use a database or something to start data like amount of Gold, HP, etc. I was wondering though, if I do this in SDL, would it still work on-line or would the user have to download SDL themselves to play?
I just want a game like this but be able to play it with some friends, just for learning purposes you know. I was also looking at DirectX because everyone has that on windows pretty much. Anyways much help is appreciated, thanks!
No offense, but an RPG is definately the last thing a new programmer should attempt to create. They are the most time, resource, and skill intensive style of game one could possibly try to create. I speak from experience here and can say that RPGs are huge time sinks, even for experienced game studios. At best, you might get a basic map working before you run out of time and patience.
If you want a game you can play with your friends, why not multiplayer tic-tac-toe or even artillery or something similiar. You'll have more success and may actually have something to show your friends when you are done.
You'll probably need to include SDL's runtime library for the game to run on other computers. This will apply no matter what library you use.
For the game itself some libraries are installed in Windows, but in order to achieve other functionality (online gameplay, gampad, etc)you must tell the user to install the other libraries.
If you use SDL, you would be using it for a local graphical client that the user would either download or install. For that, you don't need to have the user download the SDL library separateoly – you can simply put the SDL runtime DLL in the same directory as your executable and package both into the client installer. Of course, you must abide by the GNU LGPL requirements if you do this; the SDL website has details.
As far as the online piece, I'm not sure what you have in mind. I'm guessing either you'll have clients talking directly to each other in some sort of peer-to-peer fashion, or you'll have an back-end server run by you that handles the common game mechanics. I don't think you'll find SDL of much help in either case. But if you go with the back-end server, you can use whatever libraries you like for that server without impact on the user, since the user will only ever deal with the client.
For flat 2D, probably the easiest approach is to use a web interface not SDL. Web browsers are common on Macs and Linux, too, and you might even be able to support smartphones.
Still, you would have to learn how to split work between the clients and the central server. This is not always trivial. Obviously, stuff like # of gold coins would be on the server. Keyboard input is accepted first on the client. But the direction in which your toon is looking? Should the server know that?

Connecting Actionscript 3.0 with a C++ backend?

I am curious to know if there is a way of connecting a flash front-end to a C++ driven backend? I'm not currently working on a project that involves this, but I found out about an application used in the gaming industry, called Scaleform, that requires knowledge on doing such things in order to create menus in games.
Another way to resolve the problem would be to create webservices using C++ and consume them on the flash side. It is a more naive approach and certainly not as good as Scaleform but it is certainly simpler to implement.
You could also have a look at FluorineFx which is an implementation of Flex/Flash Remoting services for the .NET framework. The project is open-source so it could help you get started. Basically, FluorinexFx catches the remote calls in AMF from the flash player and pipes it through the corresponding .NET method and corresponding arguments. It also helps you convert back to flash native .Net objects such as ArrayList, DataTable and even lists of typed objects.
Scaleform implement their own custom Flash Player, thats probably not what you had in mind.
What you can do in a reasonable amount of time is pretending to Adobes flash player that you are a NPAPI-compatible browser - see e.g. here how screenweaver-hx does it.