haiku-website/static/legacy-docs/bebook/TheGameKit_Overview_Introdu...

42 lines
8.8 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - System Overview - The Game Kit</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheGameKit_Overview.html" title="The Game Kit" /><link rel="prev" href="TheGameKit_Overview.html" title="The Game Kit" /><link rel="next" href="BDirectWindow_Overview.html" title="BDirectWindow" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="TheGameKit_Overview.html" title="The Game Kit"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheGameKit_Overview.html" title="The Game Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="BDirectWindow_Overview.html" title="BDirectWindow"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - System Overview - The Game Kit</div></div><div id="headerB">Prev: <a href="TheGameKit_Overview.html">The Game Kit</a>  Up: <a href="TheGameKit_Overview.html">The Game Kit</a>  Next: <a href="BDirectWindow_Overview.html">BDirectWindow</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheGameKit_Overview_Introduction"></a>Introduction</h2></div></div></div><p>The Game Kit provides features that game developers will find
particularly useful:</p><p>There are two types of functionality provided by the Game Kit:</p><ul class="itemizedlist"><li><p>Low-level graphics access</p></li><li><p>High-performance and convenient sound playback</p></li></ul><p>There's also one global function,
<a class="link" href="TheGameKit_Functions.html#set_mouse_position" title="set_mouse_position()"><code class="function">set_mouse_position()</code></a>,
which lets you move the mouse cursor programatically.</p><p>Although designed with games in mind, nothing in the Game Kit is
restricted to game applications, except that the user will have to
deposit another 50 cents every three minutes.</p><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheGameKit_Overview_Low_Level_Graphics"></a>Low-Level Graphics Access</h3></div></div></div><p>There are two classes provided for direct access to the underlying
graphics hardware:
<a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a> and
<a class="link" href="BDirectWindow.html" title="BDirectWindow"><code class="classname">BDirectWindow</code></a>. These two classes
both give you direct access to the graphics card's frame buffer; the
difference between them is that
<a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
always takes over the entire screen, bypassing the Application Server, while
<a class="link" href="BDirectWindow.html" title="BDirectWindow"><code class="classname">BDirectWindow</code></a> can
draw in a window on most graphics hardware.</p><p>Although <a class="link" href="BDirectWindow.html" title="BDirectWindow"><code class="classname">BDirectWindow</code></a>
can do everything
<a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
can do,
<a class="link" href="BWindowScreen.html" title="BWindowScreen"><code class="classname">BWindowScreen</code></a>
can be a little easier to use.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheGameKit_Overview_High_Performance_Audio"></a>High-Performance Audio</h3></div></div></div><p>Several classes are provided for high-performance audio playback:</p><dl class="variablelist"><dt><span class="term"><a class="link" href="BGameSound.html" title="BGameSound"><code class="classname">BGameSound</code></a></span></dt><dd><p>Is a base class and isn't used directly; it's the foundation
for all the other audio classes in the Game Kit.</p></dd><dt><span class="term"><a class="link" href="BFileGameSound.html" title="BFileGameSound"><code class="classname">BFileGameSound</code></a></span></dt><dd><p>Is used to represent a sound effect stored in a disk file,
and provides functions for playing the sound. It can be used for playing
music loops from audio files, or for playing the occasional large sound
effect.</p></dd><dt><span class="term"><a class="link" href="BSimpleGameSound.html" title="BSimpleGameSound"><code class="classname">BSimpleGameSound</code></a></span></dt><dd><p>On the other hand, preloads the sound into
memory, so that it can be played back with extremely low latency and low
overhead (at the expense of memory space).</p></dd><dt><span class="term"><a class="link" href="BPushGameSound.html" title="BPushGameSound"><code class="classname">BPushGameSound</code></a>s</span></dt><dd><p>Are used to let you fill buffers flowing to the speakers
(or headphones, or whatever audio output device is being used). Their
missions are the same, but their methods are different;
<a class="link" href="BPushGameSound.html" title="BPushGameSound"><code class="classname">BPushGameSound</code></a>
also provides a way to play sound in a cyclic loop, keeping ahead of the
playback point in the buffer. This is the extreme in high-performance,
low-latency audio, but does require some extra work on the programmer's
part.</p></dd><dt><span class="term"><a class="link" href="BStreamingGameSound.html" title="BStreamingGameSound"><code class="classname">BStreamingGameSound</code></a></span></dt><dd><p>Requires magic powers to use; its functionality is
closely tied to the implementation of the Kit, especially when hardware
sound acceleration is involved. So don't touch it, we beg you.</p></dd></dl></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="TheGameKit_Overview.html">The Game Kit</a>  Up: <a href="TheGameKit_Overview.html">The Game Kit</a>  Next: <a href="BDirectWindow_Overview.html">BDirectWindow</a> </div><div id="footerB"><div id="footerBL"><a href="TheGameKit_Overview.html" title="The Game Kit"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheGameKit_Overview.html" title="The Game Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="BDirectWindow_Overview.html" title="BDirectWindow"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>