Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Raymondo

API

This topic is 5725 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!