944,120 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 2383
  • C++ RSS
Oct 10th, 2009
0

API for a game

Expand Post »
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.
Similar Threads
Reputation Points: 12
Solved Threads: 6
Junior Poster in Training
ShadowScripter is offline Offline
94 posts
since Apr 2009
Oct 11th, 2009
0
Re: API for a game
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 ");
Reputation Points: 55
Solved Threads: 20
Posting Whiz in Training
triumphost is offline Offline
261 posts
since Oct 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Output not showing up
Next Thread in C++ Forum Timeline: Send commands to a window HELP PLS





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC