Is there any library to connect to Dota2 game server? - reverse-engineering

I am looking for a way to create a program to get real-time game data from live Dota2 games. In the official Dota2 client there are several ways of doing it. You can connect to a game server through DotaTV, you can join your friend's game or you can join a lobby as a spectator or a broadcaster before the game starts.
I think, all these ways use the same protocol to connect to a game server and to retrieve game data. So could you, please, propose any library for doing this? If there is no such a library, could you please give me some advice about how to create it by myself.

There is no library, but there is a console command _record file_name which tells Dota2 client to write replay of the currently played or spectated game to file. Than you can parse this file using Dota2 replay parser (Skadistat Clarity for example). They already have example for realtime parsing.

Related

Calling C++ code from ActionScript

Here's the problem: I'm creating my new game which has some inapp items. I am using the Starling Framework for the game so I develop on AS3. I want to protect the game from genius(!) players who may attempt to break into inapp purchase process.
AS3 calls an in-app ANE (Milkman's), when a success returns from the ANE, my AS3 code sends an acknowledgement to my game server. So a malicious player can always send this acknowledgement info to my server without completing the in-app purchase process as if it was completed successfully.
So I thought of creating my own ANE which will also send this acknowledgement after it completes the process, so no AS3 code to mess with. I also don't want to use Java on Android to make things a little harder so I wonder if it's possible to call C++ code (which calls JNI for in-app purchases) from AS3.
Milkman ANE is fine to use, google play has a proper secure way to protect your purchases from hacking - check out billing-security for GooglePlay.
iTunes also has similar solution.
The main idea is to verify a purchase on server side with a private key which is only available for provider store (google play or iTunes) and your backend.

MySQL+PHP+Flash+as3 How to save into a mySql data from a Flash AS3 2d RPG game in OFFLINE programming.?

It's my first time to ask online about my programming problem and I hope I can get feed backs as soon as possible. Me and my partner are working on a project of doing a 2D RPG game using FLASH CS5.5, AS3, PHP(Dreamweaver cs5.5) and Mysql(xampp). I would like to know if there's any way that wwe can create the game and connect it to mysql where we can save and retrieve data after a game is played and save it in the players status so that when the player plays again, he can have the last status of his game to continue. We want it to be an OFFLINE game and anywhere i search in the net, all of the tips are for online games. PLease help us. Thank you.
Assuming the game is mostly written in ActionScript 3
In order to save data on the an SQL server you need to pass the data from AS3 to PHP and insert it into the server.
To do this, you will need to become familiar with AS3's JSON library. There are numerous ways to do this, including the popular as3codelib, but the JSON library is built in and is much simpler than it first appears.
I would explain it all, but this tutorial will get you familiar with it.
P.S: Like others have said, you will want to test this locally so make sure you know how to perform basic SQL queries and run PHP scripts using XAMPP. If you do not, this should help
If you only want this to run locally (i.e. a user has their own set of data), why don't you just use a SharedObject?
This lets you save data to the users machine very easily and much more efficiently.

Converting an application from Unity3d to Flash

I am attempting to convert my Unity3d game to flash but am experiencing trouble with comments. Because of the socket trouble, I am trying to use Json and Post, but I don't know where to start. I saw this
Java server- client socket communication
but it incorporates sockets.
This is for the user client, but I also need to redo the server side. I believe I need a web server to get the Json strings and return the appropriate response.
Am I doing this right, or is there something I am overlooking?
This may lessen the amount of work quite a bit if you are interested in using an API. Smartfox is an awesome Client API / Multiplayer server tool that can increase output time as well as allow you to implement efficiency code to improve server stability.
It works for both Unity3D and flash.
http://www.smartfoxserver.com/
Addressing your main question I believe you would need a server to effectively use Json and be able to communicate to the clients however this is where smartfoxserver can come in handy. I have not had much experience in the flash multiplayer programming however smartfox is a great tool and I used it to make multiplayer programs in unity3d.
Hope this helps!
Mitch

Sound Cloud and FLASH

I'm having troubles with connecting flash and sound cloud api so i would really appriciate if someone with bigger experience could help me out.
Is it possible to stream an audio file through flash without
embedding the sc player? What i mean is accessing the audio file
without any redirects plus granting access through crossdomain.xml.
Is there an up to date documentation how to autenticate an
application, how to get tokens and everything necessary?
Are there any sample solutions or tutorials in flash wich is up to date and really works (what i found was pretty much outdated)?
Thank you for your answer in advance.
Regards:
Gabe
Point 2) How to authenticate with Flash?
If you are building a flash web application, you could use the Javascript SDK to authenticate, then pass the access token back to the flash app via the flash external interface.
There's tons of information on how to authenticate in Javascript. One great walkthrough is on codecademy: http://www.codecademy.com/courses/javascript-intermediate-en-txGOj/0/1

What is a good Flash Socket Server for a Newbie?

I have been debating which Flash Socket Server to use for a virtual world (multiplayer game).
I want something that has a very abstract api and requires little to no server side programming.
From what I see only Smartfox and ES sort of cater to game development.
I'm open to any suggestions and if anyone knows which API is easier to learn (Smartfox or ES) don't be afraid to chime in :)
I'm currently developing a flex+smartfox mmo project.
my experience with smartfox is not so "easy", if you need some custom behaviours or some bandwidth saving protocols you just have to choose another way.
the great lack of smartfox is amf support, the data is not sent and received via a binary socket, everything is transfered as a string, so you can only imagine how bandwidth sucker the transfer is...
however the plus of smartfox is you can cluster it quite easily via terracotta and can you can implement your extensions in java, python and as3. further it supplies some ready to use functionalities such as chat rooms, friendlists, etc..
I have some experience with red5 too, it's a completely different approach, the main plus of working with it would be streaming assets such as mp3 or video to the clients, so if you need ambient sounds or something similar red5 or fms could be your choice.
however I don't have experience with electroserver nor union, so i can't say much on them.
Well, the easiest to program for would probably be Flash Media Server since you program the server in a variant of ActionScript.
I have experience with a bunch of them - FMS, ElectroServer, Union(used to be Unity), Red5, etc and I have to say that I really liked Union. Union's website has a bunch of good beginner tutorials as well.