API

Started by
4 comments, last by Raymondo 21 years, 4 months ago
haha, heres a good question... What EXACTLY is an API?? I was under the impression it stood for Application Programming interface...I signed a book out on windows API once, and it explained that a windows API, allowed "lower" access to the operating system...So you could program on a much "Deeper" level...For example, rather than telling the computer to store something in memory, if you used API you could tell the computer EXACTLY where to store the information etc etc... So now i''m confused because I keep hearing people refer to the API on a game engine... So, what is it? When I look at a game engine, all I see is C++ code and python scripts, I don''t see an API.... ACK! im so confused now!
Advertisement
An API is basically a library of functions that a programmer may use to interact with whatever the API interfaces with (usually an OS like Windows, but can be things like DirectX). For example, the Win32 API (the API that Windows games use) is a massive grouping of functions that let you create and manage windows, adjust settings, and do just about anything else a Windows app would need to do.

-Mike
Are these things that can be done without the API? Can you create a window with just plain old C++ and the STL?

If not, then what are these libraries written in? Do these libraries include some sort of microsoft-property files that cannot be accessed or read by us?

I guess what I''m asking is, is it possible to write my own Windows programming API or did Microsoft find some way of keeping me from doing that.
---signature---" Actually, at the time, I didn't give a damn about the FoxNews issue... just that you would come swooping in with your Super Mith cape flapping behind you and debunk it just because it didn't happen in your living room." - InnocuousFox
Ooooooh okay...

So how would an API relate to a game-engine?

There would be an API for interfacing with the game-engine functions, which would then interface with OpenGL or win32?

How many different API's would that be?

[ That was worded poorly ]

[edit] Just saw the other question....Explain that too, im curious about that too [/edit]

[edited by - raymondo on December 6, 2002 1:48:34 PM]
quote:
So now i''m confused because I keep hearing people refer to the API on a game engine... So, what is it? When I look at a game engine, all I see is C++ code and python scripts, I don''t see an API....

If the game engine is being used to make a game, then the game engine code that you are seeing constitutes the code behind the API. When you write against a game engine, you *generally* don''t make modifications in the engine''s code. You call the functions of the engine. To do this you would include the header file at the top of *your* source file with #include "blah.h". When you do this, you are using an API.

quote:Original post by Utwo
Are these things that can be done without the API? Can you create a window with just plain old C++ and the STL?


No. A "window" is a part of a specific operating system. When you write programs in C++, you could be programming for a Intel/AMD desktop computer running Windows/Linux/MacOS or you could be writing for an imbedded processor for a refrigerator. Creating a "window", as you would in Windows/Linux/MacOS/etc. is a job of that OS''s API.

quote:Original post by Utwo
I guess what I''m asking is, is it possible to write my own Windows programming API or did Microsoft find some way of keeping me from doing that.


I can''t say that it would be impossible to write your own Window''s API, I highly doubt its probability.

quote:Original post by Raymondo
So how would an API relate to a game-engine?


An API is used by a game engine to manipulate Windows/OpenGL/etc.

Hope that helps...
-Mike

This topic is closed to new replies.

Advertisement