API for a game

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2009
Posts: 52
Reputation: ShadowScripter is an unknown quantity at this point 
Solved Threads: 0
ShadowScripter's Avatar
ShadowScripter ShadowScripter is offline Offline
Junior Poster in Training

API for a game

 
0
  #1
Oct 10th, 2009
Hi,

[? 1] How do I create an API for a game?
[? 2] If this subject is too hard for a novice/intermediate programmer, where do I best find tutorials/resources about API's?

[1]
I asked myself this question, as well as google, yet no easy answers or explanations popped up, so this is where I go when everything else fails.

The reason for asking this is, I downloaded an application that used a so called API-hook, a term which is much unfamiliar to me. My guess is that it is linked with the game's natives and can therefore use its functions and also through this API use the natives from the game to create a chat message in the game. An example would be:
  1. API sends a query to game, GetLastJoinedPlayer(), and returns the name of the last joined player, "Adam".
  2. API uses native, SendChatMessage("Adam"+" has joined the game.") and displays in game "Adam has joined the game."

In this case, I want to learn how to create an API for Warcraft III, such as this program: Warcraft 3 Banlist

I hope I've expressed my intentions well, otherwise I'll have to explain further.

If this thread is in the wrong section, I apologize
Last edited by ShadowScripter; Oct 10th, 2009 at 9:08 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 27
Reputation: triumphost is an unknown quantity at this point 
Solved Threads: 2
triumphost triumphost is offline Offline
Light Poster
 
0
  #2
Oct 11th, 2009
Ok so first off you going to use strings... you can use strcmp() for comparing two strings such as Game: "adam ahs joined the game" compared to " " has joined the game... then itll basically tell you who joined the game... for the second part you can use
sk.SendKeys(" Adam Has Joined the game ");
Reply With Quote Quick reply to this message  
Reply

Tags
api, application, game, warcraft3

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC