Special Characters and Numerics A
Total Page:16
File Type:pdf, Size:1020Kb
Index Special Characters and supported, detecting presence of, 154–156 supporting devices with no accelerometer, Numerics 156 + (plus) button, 66 access denied error, 22 .0bj file format, importing geometry using, 357– Activate button, 17 359 Activated event, 34, 104, 105 2D games. See OpenGL, creating 2D games with ActiveSync application, 21 3D, 311–351. See also lighting ActiveSync operation, 124 creating 3D objects in SketchUp Add button, 91 application, 354–356 Add Cube menu item, 323 depth buffer Add New Project window, 392 enabling, 316–318 Add New Smart Device Project window, 12 rendering transparent objects with, 318 Add Project Output Group window, 394 exporting 3D geometry (SketchUp application), 356–357 Add Score button, 235 perspective projection, 311–315 Add Special Folder, 395 rendering in, 247–248 AddEntry method, 236 defining 3D object, 318–323 AddItem method, 239 overview, 318 additive blend, 284 removing hidden surfaces, 324–325 additive colors, 54 using indexed triangles, 326–329 Add/Remove Programs feature, Control Panel, 11 .3ds file, 360 AddScoreObject function, 218 3ds Max application, Autodesk, 360 Advance function, 84, 85, 90, 91, 96, 104, 124, 125, 366, 367 A Advanced Visualizer application, 356 A component, 55 algorithms, recursive, 272 AboutBox project, 241 Allow connections to use one of the following: abstract coordinate system, 247 DMA option, 21 accelerometer Allow unsafe code check box, 250, 251 initializing, 151–152 Allow unsafe code option, 251, 392 overview, 151 alpha blending, 245–247, 283–288 reading data from, 152–154 knowing available blending factors, 285 411 INDEX with textures, 284–285 sound file types, 157–158 alpha channel, 246, 303 AutoScaleMode property, 31, 32, 53 alpha component, 293 autosize function, 35 alpha parameter, 255 AutoSize property, 35 alpha value, 282 axis, 338 AlphaBlending project, 284, 285 AygShell sound functions, 159, 160, 167–169 alphanumeric characters, 398 Alt-Tab keyboard combination, 19 B ambient light, 330, 344–345 back buffer, 75, 76, 90, 101, 102, 126, 260, 261 Ambient Light option, 347 BackColor property, 230, 232, 239 ambient material, 332 background, clearing, 63 animation, smooth, 72–76 BackgroundColor property, 90 antipiracy measures, 402 Ball bitmap, 94 API (application programming interface), 7 Balloon.png file, 298 Application Folder directory, 396 Balloons class, 299 application programming interface (API), 7 Balloons game, 300 Application Submission Requirements Balloons project, 298, 305 document, 401 Ball.png resource, 92 Application tab, 14, 385 base.Advance method, 194 Application.DoEvents class, 96 BASS API, 160 applications, executable, 14 Bass.BASS_MusicLoad function, 172 ArgumentOutOfRange exception, 54 BASS.dll aspect ratio, 313 overview, 169 Assembly Information button, 385 using BASS and BASS.NET in projects, 176 Assembly Information window, 385, 386, 387 wrapping BASS.NET, 170–175 assembly properties, setting, 385–387 bass.dll file, 395 Assembly Properties window, 392 BASS.NET wrapper, 169 Assembly Version field, Assembly Information BassNet.Registration function, 170 window, 387 billboards Assembly.GetManifestResourceStream function, 67, 277 adding billboard support to game engine, 379–381 AssemblyInfo file, 387 overview, 377 {AssemblyName} string, 239 rendering, 377–381 {AssemblyVersion} string, 239 BindTexture function, 278 asynchronous playback, AygShell sound functions, 167 bit rate, 157 audio, 157–177 Bitmap class, 60 adding support for sounds to game engine, Bitmap objects, 56, 64, 65, 67, 68, 291 176 bitmap pixels, 72 sound APIs. See also BASS.dll bitmaps AygShell sound functions, 167–169 creating from predrawn graphics choosing, 177 embedding graphic resources, 66–68 overview, 158–159 graphic file formats, 68–69 PlaySound, 160–163 overview, 65 System.Media.SoundPlayer, 164–167 reading graphics from files, 68 412 INDEX creating using graphics primitives, 64–65 Build tab, 250 overview, 64 busy indicator, 46 painting to screen button and keyboard input color keys, 71–72 button and keyboard events, 147–149 overview, 69 choosing keyboard input method, 150–151 partial bitmap copying, 69–70 input from SIP, 150 scaling, 71 overview, 147 blending. See alpha blending reading keyboard state, 149–150 blue parameter, 54, 255 button click handler, 23 BMP. See bitmaps Button controls, 14, 15, 20, 29 BOARD_GEMS_ACROSS constant, 187, 224 button1_Click procedure, 16 BOARD_GEMS_DOWN constant, 187, 224 buttons, 35–36 _boardLeft coordinate, 187 BoardLeft value, 190 C _boardTop coordinate, 187 CAB (cabinet) files, 391, 397 BoardTop value, 190 CAB setup projects, adding obfuscated files to, BoardXPos property, 201 407 BoardXPos value, 209 cabinet (CAB) files, 391, 397 _boardXPos variable, 195, 221 CAboutBox class, 239, 241 BoardYPos property, 201, 203, 206 CAboutBox.AddItem functions, 241 _boardYPos value, 196 CAboutBox.CalculatePositions function, 241 _boardYPos variable, 195, 196, 221 CAboutBox.CreateAboutItems function, 241 Bold font style, 62 CAboutBox.LayoutControls function, 241 bool parameter, 380 CAboutBox.ShowDialog method, 241 bool property, 212 CAboutItem class, 239 bool value, 30 CAboutItem objects, 239, 241 Boolean parameter, 370 CAccelerometerGame.Update function, 153 bounce example game CachedCameraMatrix, 371 CBounceGame class, 92–93 calculations CObjBall class, 93–95 2D, 339 getting game running, 95–97 cross product, 338 overview, 91 frames-per-second, 124 Bounce project, 101, 103, 113 normal, 338 Bounds property, 43 call stack command, 23 breakpoints, Visual Studio, 6 camera Browse and add assembly to list option, 403 capturing images from, 45–46 Browse item, 390 moving Browse tab, 91 adding camera objects to game engine, Brush class, 63 365–369 Brush object, 55 optimizing camera calculation, 371–374 brushes, 56, 58 overview, 364 buffers, 74, 75 positioning camera, 364–365 Build Action property, 67 projection matrix, 374 Build from the main application menu, 403 in scene using lighting, 370–371 413 INDEX CameraCaptureDialog control, 45, 46 CGameEngineGDIBase.Render, 101 CameraControl project, 369, 370 CGameEngineOpenGL class, 367 capabilities enumeration, 107, 294 CGameEngineOpenGLBase class, 289, 290, 291, Capabilities parameter, 108 306, 317, 342, 344, 366, 375, 380 Cascading Style Sheets (CSS), 53 CGameEngineOpenGLBase.InitGLViewport case sensitivity, 400 function, 315, 374 casual piracy, 402 CGameEngineOpenGLBase.InitializeOpenGL function, 317 CBalloonsGame class, 298, 300 CGameEngineOpenGLBase.LoadCameraMatrix CBalloonsGame.Update function, 305 function, 372 CBounceGame class, 92–93, 97 CGameEngineOpenGLBase.RenderIndexedTria CBounceGame type, 93 ngles function, 327 CEncryption class, 237 CGameFunctions class, 90–91 CEncryption.Encrypt method, 400 CGameObjectBase class, 78, 82, 126–127, 289, CenterObject function, 361, 362 303 Central Processing Units (CPUs), 111 object mechanics, 87 CFogGame.InitFog function, 377 overview, 85 CGameEngineBase class, 124–126 positioning objects, 86 adding other functions, 85 storing object states, 87 advancing game, 84–85 CGameObjectGDIBase class, 78, 79, 91, 93, 102, game mechanics, 82 127, 128, 289 initializing start-up, 83 object movement, 88 managing game objects, 82 overview, 87 overview, 79 setting object state for GDI, 88 rendering, 83 CGameObjectGDIBase.GetRenderRectangle resetting game, 83 function, 126 updating game state, 84 CGameObjectOpenGL class, 305 CGameEngineBase constructor, 228, 231, 235, CGameObjectOpenGLBase class, 289, 290, 301, 241 304, 320, 348, 366 CGameEngineBase function, 294 rendering quadrilaterals, 293–294 CGameEngineBase.AboutBox property, 239 setting object state for OpenGL, 292–293 CGameEngineBase.Advance function, 124 CGameObjectOpenGLCameraBase class, 366, 367, 368, 371 CGameEngineBase.MessageBox property, 230 CGemDropsGame class, 184, 185, 197 CGameEngineGDIBase class, 78, 79, 91, 92, 98, 126, 289, 291 CGemDropsGame object, 188, 190 advancing game, 90 CGemDropsGame.Prepare function, 186, 190 overview, 88 CGemDropsGame.Update function, 201 rendering, 89–90 CGeomLoaderBase class, 359 CGameEngineGDIBase constructor, 104, 105 CGeomLoaderObj class, 362 CGameEngineGDIBase type, 93 CGeomLoaderObj object, 363 CGameEngineGDIBase.Advance function, 103, Change Target Platform window, 19 104 channels CGameEngineGDIBase.ForceRepaint method, BASS, 170 102 checking if sound is playing on, 175 CGameEngineGDIBase.Present method, 90 character keys, KeyDown event and, 148 characters, alphanumeric, 398 414 INDEX CheckCapabilities function, 107, 295 CMessageBox class, 230–231 CheckCapabilities_CheckForAccelerometer CMessageBoxControl, 231 function, 155 CMessageBox.ShowDialog method, 230, 231 CheckCapabilities_CheckForOpenGL function, CMYK (Cyan, Magenta, Yellow, and Key-black) 295 model, 54 Checked property, 38 CObjBall class, 93–95, 136 CheckForUpdate function, 407, 408 CObjBalloon class, 301, 304 CheckGameOver function, 200 CObjBalloon.TestHit function, 309 CheckIfMoved function, 88, 102 CObjBox class, 136 CHighScoreControl, 236 CObjCamera class, 370, 371 CHighScoreEntry objects, 235, 236 CObjCube class, 347, 351 CHighScores class CObjCube.Render function, 320 accessing HighScores objects, 235 CObjCylinder class, 347, 351 overview, 232 CObjGem class, 184, 188, 190, 194–196, 205, presenting high scores, 236 206, 212, 221 storing data, 236–238 CObjGem.IsDroppingQuickly property, 212 understanding data structure, 235–236 CObjScore class, 221 CHighScores._highscoreTables collection, 235 CObjSelectableBase abstract object class, 136 CHighScores.Clear method, 235