Implementation of a 2D Game Engine Using Directx 8.1

Total Page:16

File Type:pdf, Size:1020Kb

Implementation of a 2D Game Engine Using Directx 8.1 Computer Science Daniel Linds¨ath and Martin Persson Implementation of a 2D Game Engine Using DirectX 8.1 Bachelor’s Project 2004:24 Implementation of a 2D Game Engine Using DirectX 8.1 Daniel Linds¨ath and Martin Persson c 2006 The author(s) and Karlstad University This report is submitted in partial fulfillment of the requirements for the Bachelor’s degree in Computer Science. All material in this report which is not our own work has been identified and no material is included for which a degree has previously been conferred. Daniel Linds¨ath Martin Persson Approved, 2004-06-03 Advisor: Hannes Persson Examiner: Donald F. Ross iii Abstract This paper describes our game engine written in C++, using the DirectX libraries for graphics, sound and input. Since the engine is written using DirectX, an introduction to this system is given. The report gives a description of the structure of the game and the game kernel. Following this is a description of the graphics engine and its core components. The main focus of the engine is on the physics and how it is used in the game to simulate reality. Input is discussed briefly, with examples to show how it relates to the physics engine. Implementation of audio in the game engine is not described, but a general description of how sound is used in games is given. A theory for the basics of how artificial intelligence can be used in the engine is presented. The system for the architecture of the levels is described as is its connection to the graphics engine. The last section of the report is an evaluation and suggestions for what to do in the future. A user manual for the level editor is included as an appendix. v Contents 1 Introduction 1 1.1 Problem ................................. 1 1.2 Purpose ................................. 2 1.3 Limitation ................................ 2 1.4 Goal ................................... 2 1.5 Disposition ............................... 3 2 DirectX and COM 4 2.1 The DirectX Kernel ........................... 4 2.2 HAL and HEL ............................. 6 2.3 The Components of DirectX ...................... 6 2.3.1 DirectDraw ........................... 6 2.3.2 DirectSound ........................... 8 2.3.3 DirectSound3D ......................... 8 2.3.4 DirectMusic ........................... 8 2.3.5 DirectInput ........................... 8 2.3.6 DirectPlay ............................ 9 2.3.7 Direct3D ............................. 9 2.3.8 DirectSetup ........................... 9 2.3.9 DirectX Graphics ........................ 9 2.3.10 DirectX Audio ......................... 10 2.3.11 DirectShow ........................... 10 2.4 COM ................................... 10 2.4.1 The COM Objects ....................... 11 2.4.2 GUID .............................. 11 2.5 DirectX and COM ........................... 12 vi 3 Game Engine Structure 13 4 The Kernel 16 5 Graphics Engine 18 5.1 Bitmaps ................................. 18 5.2 Bitmap Object Blitter ......................... 20 6 Physics 22 6.1 Newtonian Mechanics .......................... 22 6.1.1 Movements — Acceleration and Inertia ............ 22 6.1.2 Drag ............................... 23 6.1.3 Free-fall ............................. 24 6.2 Physics Within the Game ....................... 25 6.3 Collision Detect ............................. 27 6.3.1 Running Through Walls .................... 27 6.3.2 The Bresenham Algorithm ................... 29 7 Input 32 7.1 Forces .................................. 32 7.2 Impulses ................................. 33 8 Sound and Music 34 8.1 Sound in the Engine .......................... 34 9 The Basics of Artificial Intelligence 35 10 The Level System 36 11 Conclusion 38 11.1 Achievements .............................. 38 vii 11.2 Evaluation ................................ 39 11.3 Future Plans ............................... 40 References 42 A User Manual for the Map Editor 43 B winconsole.cpp 45 C motor.h 48 D bob.h 52 E game.h 55 E.1 Terrain .................................. 56 E.2 Character ................................ 56 E.3 Enemy .................................. 57 E.4 Player .................................. 58 E.5 Sublevel ................................. 58 E.6 Level ................................... 59 E.7 Game .................................. 59 F mapeditor.h 61 G Screenshot 64 viii List of Figures 2.1 “Classical” Programming vs. DirectX ................. 5 2.2 DirectX and Windows ......................... 7 3.1 Module Overview ............................ 13 3.2 Object Diagram of the Game Structure ................ 14 4.1 Game Kernel structure ......................... 16 5.1 Bitmap Example ............................ 18 5.2 BOB Inheritage ............................. 21 6.1 Velocity Vector ............................. 26 6.2 Collision Example ............................ 28 6.3 Another Collision Example ....................... 28 6.4 Line Approximations .......................... 30 10.1 The Different Layers .......................... 37 A.1 Empty Level Editor ........................... 43 G.1 A Screen Shot of an Example Game .................. 64 ix 1 Introduction According to the authors, the gaming industry of today focuses solely on 3D games, often with wondrous graphics as their main goal. This has had the effect that modern games seldom have any depth, story or “feel” to them. The authors think that this is a shame, and decided to create a 2D game engine in the hopes of returning some of the feel of the old games. 1.1 Problem A 2D game engine is a relatively complex thing to design. The main problem is to make the physics in the game correspond — in a good looking way — to the objects on the screen, using the existing graphics engine BOB [1]. The engine will, except for the the graphics API, be built from scratch. Problems that have to be solved is how to make the architecture of the levels1 be useful to the physics. A great part of the problem with the physics will be collision detection between the player and the map2 itself. The input handling using DirectInput will have to be integrated to the movement physics of the player. How to make the enemies in the game orientate themselves in the environment will also have to be solved. A level editor using the same map system as the game will also have to be implemented so that levels created using that editor can be loaded into the game. The main part of the work will be programming the engine itself, and parallel to the implementation write a documentation describing the engine. 1A level is an object containing a set of terrain, a number of enemies and events which one may interact with. 2The terrain parts of a level. Sometimes used interchangeably with level. 1 1.2 Purpose The purpose of this dissertation is to create a fully working game engine that can be used to create two dimensional platform games using DirectX. The engine will also be the base that Martin will use when he creates his first commercial computer game. 1.3 Limitation A fully functioning game engine is, of course, a massive project that can hardly be completed in the amount of time available for this paper. The authors have therefore decided to create the level system and the game physics and then make the rest of the details if there is enough time. 1.4 Goal When this dissertation is complete the following shall be done: • A well documented and working game engine API that allows programmers to create 2D games with a minimum amount of foundation coding, so that they may focus on the gaming experience. • A good implementation design that will make it easy to add new features later. • A working two dimensional physics engine. • A useful level editor that can be used to create the maps of the game. • A simple and general way to program the AI of the enemies in the game. • A virtual class for enemies. 2 1.5 Disposition Section 2 gives a shallow, technical introdction to DirectX and COM. These tools are then used in sections 5, 7 and 8. Section 3 shows how the modules of the game are connected and gives an introduction to sections 4 through 9. Section 4 gives a description of the game kernel which handles startup, exec- tution and shutdown of the game engine itself. Section 5 explains image formats, and relates back to the second section with DirectDraw. Sections 6 and 7 show how a player may alter the playing realm through input and physics. Section 6 also describes some of the issues related to physics in games. Sections 8 and 9 discusses sound and artificial intelligence, none of which have actually been implemented yet. Instead they show how an implementation could be used in the future and what to think about. Section 10 describes how the system for levels and maps works. This is the sys- tem that tells the graphics engine what to draw and where. The levels also contain all the information used by the physics engine, such as gravity and atmospheric density. Finally, Section 11 is a conclusion which summarizes the whole thesis. 3 2 DirectX and COM The purpose of this chapter is to give the reader a brief introduction to the basic concepts of the DirectX Application Programming Interface3 (API) and Microsoft Component Object Model (COM). The chapter comprises: • An introduction to DirectX • An introduction to COM • How DirectX and COM relate 2.1 The DirectX Kernel DirectX is an abstraction of many sub components that allows the programmer to utilize any hardware that is DirectX compatible. Rather than creating a module for each hardware manufacturer (as was common a few years ago), a programmer
Recommended publications
  • Interaction Between Web Browsers and Script Engines
    IT 12 058 Examensarbete 45 hp November 2012 Interaction between web browsers and script engines Xiaoyu Zhuang Institutionen för informationsteknologi Department of Information Technology Abstract Interaction between web browser and the script engine Xiaoyu Zhuang Teknisk- naturvetenskaplig fakultet UTH-enheten Web browser plays an important part of internet experience and JavaScript is the most popular programming language as a client side script to build an active and Besöksadress: advance end user experience. The script engine which executes JavaScript needs to Ångströmlaboratoriet Lägerhyddsvägen 1 interact with web browser to get access to its DOM elements and other host objects. Hus 4, Plan 0 Browser from host side needs to initialize the script engine and dispatch script source code to the engine side. Postadress: This thesis studies the interaction between the script engine and its host browser. Box 536 751 21 Uppsala The shell where the engine address to make calls towards outside is called hosting layer. This report mainly discussed what operations could appear in this layer and Telefon: designed testing cases to validate if the browser is robust and reliable regarding 018 – 471 30 03 hosting operations. Telefax: 018 – 471 30 00 Hemsida: http://www.teknat.uu.se/student Handledare: Elena Boris Ämnesgranskare: Justin Pearson Examinator: Lisa Kaati IT 12 058 Tryckt av: Reprocentralen ITC Contents 1. Introduction................................................................................................................................
    [Show full text]
  • THINC: a Virtual and Remote Display Architecture for Desktop Computing and Mobile Devices
    THINC: A Virtual and Remote Display Architecture for Desktop Computing and Mobile Devices Ricardo A. Baratto Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in the Graduate School of Arts and Sciences COLUMBIA UNIVERSITY 2011 c 2011 Ricardo A. Baratto This work may be used in accordance with Creative Commons, Attribution-NonCommercial-NoDerivs License. For more information about that license, see http://creativecommons.org/licenses/by-nc-nd/3.0/. For other uses, please contact the author. ABSTRACT THINC: A Virtual and Remote Display Architecture for Desktop Computing and Mobile Devices Ricardo A. Baratto THINC is a new virtual and remote display architecture for desktop computing. It has been designed to address the limitations and performance shortcomings of existing remote display technology, and to provide a building block around which novel desktop architectures can be built. THINC is architected around the notion of a virtual display device driver, a software-only component that behaves like a traditional device driver, but instead of managing specific hardware, enables desktop input and output to be intercepted, manipulated, and redirected at will. On top of this architecture, THINC introduces a simple, low-level, device-independent representation of display changes, and a number of novel optimizations and techniques to perform efficient interception and redirection of display output. This dissertation presents the design and implementation of THINC. It also intro- duces a number of novel systems which build upon THINC's architecture to provide new and improved desktop computing services. The contributions of this dissertation are as follows: • A high performance remote display system for LAN and WAN environments.
    [Show full text]
  • Using the Component Object Model Interface
    MQSeries for Windows NT V5R1 IBM Using the Component Object Model Interface SC34-5387-01 MQSeries for Windows NT V5R1 IBM Using the Component Object Model Interface SC34-5387-01 Note! Before using this information and the product it supports, be sure to read the general information under Appendix B, “Notices” on page 151. Second edition (April 1999) This edition applies to MQSeries for Windows NT V5.1 and to any subsequent releases and modifications until otherwise indicated in new editions. Copyright International Business Machines Corporation 1997,1999. All rights reserved. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Contents About this book ..................................... v Who this book is for ................................... v MQSeries publications . vi MQSeries cross-platform publications ....................... vi MQSeries platform-specific publications ...................... ix MQSeries Level 1 product publications ....................... x Softcopy books . x MQSeries information available on the Internet .................. xii Where to find more information about ActiveX ................... xii Summary of changes ................................. xiii Changes for this edition ................................ xiii Chapter 1. Introduction . 1 MQSeries Automation Classes for ActiveX overview ................ 1 Chapter 2. Designing and programming using MQSeries Automation Classes for ActiveX .................................. 3 Designing
    [Show full text]
  • Microsoft Patches Were Evaluated up to and Including CVE-2020-1587
    Honeywell Commercial Security 2700 Blankenbaker Pkwy, Suite 150 Louisville, KY 40299 Phone: 1-502-297-5700 Phone: 1-800-323-4576 Fax: 1-502-666-7021 https://www.security.honeywell.com The purpose of this document is to identify the patches that have been delivered by Microsoft® which have been tested against Pro-Watch. All the below listed patches have been tested against the current shipping version of Pro-Watch with no adverse effects being observed. Microsoft Patches were evaluated up to and including CVE-2020-1587. Patches not listed below are not applicable to a Pro-Watch system. 2020 – Microsoft® Patches Tested with Pro-Watch CVE-2020-1587 Windows Ancillary Function Driver for WinSock Elevation of Privilege Vulnerability CVE-2020-1584 Windows dnsrslvr.dll Elevation of Privilege Vulnerability CVE-2020-1579 Windows Function Discovery SSDP Provider Elevation of Privilege Vulnerability CVE-2020-1578 Windows Kernel Information Disclosure Vulnerability CVE-2020-1577 DirectWrite Information Disclosure Vulnerability CVE-2020-1570 Scripting Engine Memory Corruption Vulnerability CVE-2020-1569 Microsoft Edge Memory Corruption Vulnerability CVE-2020-1568 Microsoft Edge PDF Remote Code Execution Vulnerability CVE-2020-1567 MSHTML Engine Remote Code Execution Vulnerability CVE-2020-1566 Windows Kernel Elevation of Privilege Vulnerability CVE-2020-1565 Windows Elevation of Privilege Vulnerability CVE-2020-1564 Jet Database Engine Remote Code Execution Vulnerability CVE-2020-1562 Microsoft Graphics Components Remote Code Execution Vulnerability
    [Show full text]
  • 1TR6 D-Kanal-Protokoll Im ISDN
    Universität Rostock Fachbereich Elektrotechnik und Informationstechnik Abkürzungen zum Fach Kommunikationssysteme nur für den internen Gebrauch 03/99 Dr. Melzer, Kessler, Mali, Weiß http://www.comlab.uni-rostock.de/ 3 1TR6 D-Kanal-Protokoll im ISDN AIX Advanced Interactive Execute AL Application Layer AL Alignment A ALS Application Layer Structure AMI Alternate Mark Inversion AMIS Audio Message Interchange AA Administrative Authority Specification AAA Authentication, Authorization and AML ACPI Machine Language Accounting AMP Active Monitor Present AAL ATM Adaptation Layer AMT Agent Management Task AAPI ATM-API ANS Advanced Network and Services ABM Asynchronous Balanced Mode ANSI American National Standards ABR Available Bit Rate Institute ACATS Advisory Committee for AOAC Always On/Always Connected Advanced Television Systems AOC ADSL Overhead Control Channel ACD Automatic Call Distribution AOL America Online ACE Access Control Entry AP Access Point ACE Access Control Encryption APC Asynchronous Procedure Call ACF Access Control Field API Application Programming ACK Acknowledgement Interface ACL Access Control List APM Advanced Power Management ACM Association for Computer APPN Advanced Peer to Peer Machinery Networking ACM Adaptive Clock Methode APS Auxiliary Power Supply ACPI Advanced Configuration and ARA AppleTalk Remote Access Power Interface ARC Advanced RISC Computing ACR Attenuation to Crosstalk Ratio ARM Asynchronous Response Mode ACR Allowed Cell Rate ARP Address Resolution Protocol ACS Access Control Store ARPA Advanced Research
    [Show full text]
  • Microsoft Directshow: a New Media Architecture
    TECHNICAL PAPER Microsoft Directshow: A New Media Architecture By Amit Chatterjee and Andrew Maltz The desktop revolution in production and post-production has dramatical- streaming. Other motivating factors are ly changed the way film and television programs are made, simultaneously the new hardware buses such as the reducing equipment costs and increasing operator eficiency. The enabling IEEE 1394 serial bus and Universal digital innovations by individual companies using standard computing serial bus (USB), which are designed with multimedia devices in mind and platforms has come at a price-these custom implementations and closed promise to enable broad new classes of solutions make sharing of media and hardware between applications difi- audio and video application programs. cult if not impossible. Microsoft s DirectShowTMStreaming Media To address these and other require- Architecture and Windows Driver Model provide the infrastructure for ments, Microsoft introduced Direct- today’s post-production applications and hardware to truly become inter- ShowTM, a next-generation media- operable. This paper describes the architecture, supporting technologies, streaming architecture for the and their application in post-production scenarios. Windows and Macintosh platforms. In development for two and a half years, Directshow was released in August he year 1989 marked a turning Additionally, every implementation 1996, primarily as an MPEG-1 play- Tpoint in post-production equip- had to fight with operating system back vehicle for Internet applications, ment design with the introduction of constraints and surprises, particularly although the infrastructure was desktop digital nonlinear editing sys- in the areas of internal stream synchro- designed with a wide range of applica- tems.
    [Show full text]
  • Security Policy Page 1 of 20
    Security Policy Page 1 of 20 Security Policy This security policy contains data to configure services and network security based on the server’s role, as well as data to configure registry and auditing settings. Server: VENGWIN207 Services Service Name Startup Mode Description Issues, manages, and removes X.509 certificates for such applications such as Active Directory Certificate S/MIME and SSL. If the service is stopped, Disabled Services certificates will not be issued. If this service is disabled, any services that explicitly depend on it will fail to start. AD DS Domain Controller service. If this service is stopped, users will be unable to log Active Directory Domain Services Disabled on to the network. If this service is disabled, any services that explicitly depend on it will fail to start. AD FS Web Agent Authentication The AD FS Web Agent Authentication Service Disabled Service validates incoming tokens and cookies. Adobe Acrobat Updater keeps your Adobe Adobe Acrobat Update Service Automatic software up to date. Sends logging messages to the logging database when logging is enabled for the Active Directory Rights Management Services role. If this service is disabled or stopped AdRmsLoggingService Disabled when logging is enabled, logging messages will be stored in local message queues and sent to the logging database when the service is started. Processes application compatibility cache Application Experience Disabled requests for applications as they are launched Provides administrative services for IIS, for example configuration history and Application Pool account mapping. If this Application Host Helper Service Disabled service is stopped, configuration history and locking down files or directories with Application Pool specific Access Control Entries will not work.
    [Show full text]
  • 5.1-Channel PCI Sound Card
    PSCPSC705705 5.1-Channel PCI Sound Card • Play all games in 5.1-channel surround sound, including EAX™ 2.0, A3D™ 1.0 and even ordinary stereo games! • Full compatablility with EAX™ 1.0, EAX™ 2.0 and A3D™ 1.0 games • Hear high-impact 3D sound from games, movies, music, and external sources using two, four, or six speakers. • 96 distinct 3D voices, 256 distinct DirectSound voices & 576 distinct synthesized Wavetable voices. • Included software: Sonic Foundry® SIREN Xpress™, Acid XPress™, QSound AudioPix™. 5.1-Channel PCI Sound Card PSCPSC705705 Arouse your senses. Make your games come to life with the excite- Technical Specifications ment of full-blown home cinema. Seismic Edge supports the latest multi-channel audio games and DVD movies, and can transform stereo Digital Acceleration sources into deep-immersion 5.1-channel surround sound. (5.1 refers • 96 streams of 3D audio acceleration including reverb, obstruction, and occlusion to five main speakers – front left, right and center, and rear left and • 256 streams of DirectSound accelerations and digital mixing right – and one bass subwoofer.) All this without straining your com- • Full-duplex, 48khz digital recording and playback puter’s resources, because complex audio demands are handled on- • 64 hardware sample rate conversion channels up to 48khz board by Seismic Edge’s powerful computing chip.You’ve never experi- • Wavetable and FM Synthesis enced games like this before! • DirectInput devices Experience state-of-the-art 360º Surround Sound. An embed- Comprehensive Connectivity ded, patented QSound algorithm extracts complex and distinct 5.1- • 5.1-channel (6 channel) analog output channel information from stereo or ProLogic sources.
    [Show full text]
  • The Component Object Model Specification Version 0.9 October 24, 1995
    http://scottge.wordpress.com The Component Object Model Specification Version 0.9 October 24, 1995 This document contains the specification to the Component Object Model (COM), an architecture and supporting infrastructure for building, using, and evolving component software in a robust manner. This specification contains the standard APIs supported by the COM Library, the standard suites of interfaces supported or used by software written in a COM environment, along with the network protocols used by COM in support of distributed computing. This specification is still in draft form, and thus subject to change. Note: This document is an early release of the final specification. It is meant to specify and accompany software that is still in development. Some of the information in this documentation may be inaccurate or may not be an accurate representation of the functionality of the final specification or software. Microsoft assumes no responsibility for any damages that might occur either directly or indirectly from these inaccuracies. Microsoft may have trademarks, copyrights, patents or pending patent applications, or other intellectual property rights covering subject matter in this document. The furnishing of this document does not give you a license to these trademarks, copyrights, patents, or other intellectual property rights. Copyright ? 1992-95 Microsoft Corporation. All Rights Reserved The Component Object Model Specification The Component Object Model The Component Object Model Specification Draft Version 0.9, October 24, 1995 Microsoft Corporation and Digital Equipment Corporation Copyright ? 1992-95 Microsoft Corporation. Microsoft does not make any representation or warranty regarding the Specification or any product or item developed based on the Specification.
    [Show full text]
  • MM Essentials for Windows
    Multimedia Essentials for Windows Welcome to the world of Windows multimedia! Macromedia is pleased to provide you with tips, techniques, and direction for using a Windows–based environment to author and deliver successful multimedia productions. This guide is based upon inquiries from our end users, resellers, and developers and includes answers to questions frequently asked of our technical support group. We hope that it will help you navigate through many of the important choices you will face in cross-platform multimedia development. If you have previously used the Macintosh as an authoring platform, you will find this a useful guide to understanding the differences between Macintosh and Windows– based computers in order to take advantage of cross–platform authoring and delivery opportunities. Useful topics include working with different file formats and converting applications from Macintosh to Windows. If you are new to developing interactive multimedia productions on Windows—even if you are already familiar with the Windows environment—you will find this a beneficial overview of multimedia authoring on the Windows platform. This document offers guidelines for configuring your Windows environment for multimedia, tips for optimizing performance, and suggestions for effectively testing and distributing your productions. A multimedia glossary provides definitions for some of the most commonly used Windows, DOS, and multimedia terms and acronyms to help you become familiar with the talk of the trade. Even veteran Windows multimedia developers interested in becoming acquainted with Macromedia products and cross-platform delivery issues will find this guide informative. It will provide you with insights on how Macromedia tools can empower your multimedia development efforts.
    [Show full text]
  • *Final New V2 PCI Super
    SuperQuad Digital PCI A3DTM PCI Audio Accelerator Card Powered by the Aureal Vortex2 AU8830 Key Features The Cutting Edge in Audio: Vortex2 SuperQuad • Hardware accelerated A3D 2.0 positional 3D audio with Digital PCI Aureal Wavetracing Aureal, the company that created magic with A3D positional audio • DirectSound3D and DirectSound hardware acceleration and the Vortex line of audio processor chips, introduces Vortex2 • 320-voice wavetable synthesizer with DLS 1.0 and SuperQuad Digital PCI, the ultimate PC sound card. DirectMusic support Powered by Aureal’s Vortex2 AU8830 audio processor chip, the • 10-band graphic equalizer Vortex2 SuperQuad PCI features a 3D audio engine, professional • Quad enhanced 3D sound wavetable synthesizer, and 10-band equalizer. In addition, Vortex2 • S/PDIF optical digital output SuperQuad features quad speaker support, which further enhances • High-performance PCI 2.1 interface A3D effects by providing front and back speaker pairs. For true • Superior audio quality (exceeds PC98/99 specifications) audiophiles, a TOSLINK S/PDIF optical digital output is provided • 4-speaker, 2-speaker and headphone support for pristine digital connections to modern digital audio devices • Accelerated DirectInput game port such as Dolby Digital receivers, DAT, CDR recorders, and MiniDisc. Connections Bracket connectors Aureal—The PC Audio Experts • Headphone/Line output— Aureal’s expertise in PC audio is unequalled by any front speakers other company. Aureal’s Vortex line of audio • Line output—rear speakers processor chips has set the standard for • Line input performance and sound quality on the • Microphone input PC, delivering superior audio to • Game/MIDI port top-tier computer companies • S/PDIF optical and leading sound card man- digital output ufacturers.
    [Show full text]
  • Windows Multimedia
    Windows Multimedia Some Multimedia Devices • Some multimedia devices: – Waveform audio device (sound card) • converts microphone & other analog audio to digitized samples (ADC) • can be stored as .WAV files • can be played back (DAC) • Also usually has a MIDI device – Musical Instrument Digital Interface – Plays/stores musical notes in response to short binary messages (MIDI codes) – can be attached to a MIDI input device (music keyboard) » And an output device such as a MIDI music synthesizer – CD Audio through the CD-ROM drive – Video for Windows device (AVI video device) • plays movie/animation files (.AVI) – QuickTime and MPEG movies – Video capture boards (different compression schemes) – Laserdisc players & video cassette recorders – Others (DVD) Win32 MM Support & Documentation • Extensive Win32 API support for multimedia devices – Low-level support – High-level support • MSDN online documentation: – http://msdn.microsoft.com/en-us/library/default.aspx • Win32 and COM Development / Graphics and Multimedia / Audio and Video / Windows Multimedia • Visual Studio Help on “MCI Command Strings” Media Control Interface • MCI (Media Control Interface) – High level multimedia control functions – Has commands common to all multimedia hardware • Possible since most use record/play metaphor – Open a device for input or output – If input, record; If output, play • When done, close the device – Some MCI Device Names: • cdaudio, waveaudio, sequencer (MIDI), videodisc, vcr, overlay (analog video in a window), dat (digital audio tape), AVIVideo
    [Show full text]