Space Invaders 3D

Total Page:16

File Type:pdf, Size:1020Kb

Space Invaders 3D University of British Columbia Department of Electrical and Computer Engineering Final Project Report: Space Invaders 3D In Partial Fulfillment of the Requirements for: EECE 478 Computer Graphics Submitted by: James Luo (63544043) Sihanook Fernando (10891034) Jason Kuo (21006036) Johnty Wang (16234031) TABLE OF CONTENTS 1.0 INTRODUCTION................................................................................ 1 2.0 GAME DESCRIPTION....................................................................... 2 2.1 What is the game? .................................................................................................2 2.2 Objective of the game............................................................................................3 2.3 How is this implementation different from others out there? ..................................3 3.0 GAME PLAY & USER INTERFACE................................................ 4 3.1 User Interface ........................................................................................................4 3.1.1 Audio..............................................................................................................4 3.1.2 User Input.......................................................................................................4 3.1.3 Menu System ..................................................................................................5 4.0 SOFTWARE ARCHITECTURE........................................................ 9 4.1 Class Diagram .......................................................................................................9 4.2 Class Description...................................................................................................9 4.3 External Libraries ................................................................................................16 4.4 3D Models...........................................................................................................18 4.5 Audio Triggered Firing by Player ........................................................................19 4.6 Enemy Firing.......................................................................................................20 4.7 Handling Menu Interface .....................................................................................22 4.8 Collision Detection..............................................................................................24 4.9 Optimization Techniques Used ............................................................................26 5.0 Recommendations.............................................................................. 27 6.0 Conclusion.......................................................................................... 29 Appendix A: System Flowchart .............................................................. 30 ii List of Figure Figure 1: Screenshot of a 2D version of Space Invaders............................................. 2 Figure 2: Screenshot of Hall of Fame screen.............................................................. 6 Figure 3: Screenshot of Main Menu shown at the start of the game............................ 7 Figure 4: Screenshot of Game over Menu.................................................................. 8 Figure 5: A screenshot of the High Score Menu......................................................... 8 Figure 6: Diagram illustrating the different classes within the code ........................... 9 Figure 7: Screen of Explosions when enemy ships are hit........................................ 14 Figure 8: Initial Enemy Model................................................................................. 18 Figure 9: Final enemy model................................................................................... 19 Figure 10: Flow-chart showing enemy fire sequence ............................................... 21 Figure 11: Flow-chart Showing Overall Game Design............................................. 30 iii 1.0 INTRODUCTION The purpose of this report is to explain the game that was developed as a part of EECE 478 course requirements. The game application tries to encapsulate many 3D rendering and modelling concepts that were taught in class. SDL (Simple DirectMedia Layer) libraries were used along with OpenGL for the implementation. The report will start off with a description of the game itself, followed by details on game play. The discussion will then move on to the technical aspects of the game which include the software architecture. Various features such as collision detection, audio and procedural modelling that were implemented will also be discussed. Optimization techniques were used in the game development to improve the efficiency in rendering the models. These will also be highlighted. The report will conclude with possible improvements that could be made to the game in the future. 1 2.0 GAME DESCRIPTION 2.1 What is the game? The game is based on the popular 2D arcade game, Space Invaders , developed in the 70’s by Tomohiro Nishikado. There have been several implementations of different version of the game over time. However, there have been few 3D implementations of this game. The implementation discussed in this report aims to produce a 3D version of the game, with a novel user interface that brings more realism to the player. The figure below is a screenshot of one of the 2D versions of the game. Figure 1: Screenshot of a 2D version of Space Invaders 2 2.2 Objective of the game The objective of the game is simply to destroy a formation of advancing enemy spaceships. The player moves on to the next level upon destroying all enemy ships. Each consecutive level gets tougher and tougher with enemies shooting at the player more frequently. The number of points obtained per enemy destroyed increases with every level. The player should aim to maximize his or her score. 2.3 How is this implementation different from others out there? The versions of Space Invaders out there are mostly designed the way shown in Figure 1. Our version of the game has three significant differences compared to the rest: 1. All the models are rendered in 3D space. 2. The game play is from the perspective of the player, rather than from a 3 rd person perspective. 3. The game makes use of an infrared head-tracker and audio as input. We believe that changing the perspective and adding another dimension to the game would improve the realism of the game. By tracking the player’s real position adds a new level of involvement to the game play experience. 3 3.0 GAME PLAY & USER INTERFACE We will now discuss details on the game play and how exactly the player interacts with the game. 3.1 User Interface 3.1.1 Audio There are two types of audio used in the game. MP3 tracks for music, and WAVE files for sound effects such as shooting and explosions. The WAVE files are found on www.findsounds.com , an online audio search engine of publicly available sounds. The music was performed and recorded on a synthesizer keyboard by one of the team members. 3.1.2 User Input One of the novelties of the game is the use of non-standard input methods. While mouse and keyboard input exist, they are used for debugging during development, and only serve as auxiliary forms of input in the final game. The main inputs required for game play consists of controls for player movement, and shooting. Given the parameters of the game, the movement is simply along a single dimension, and a single trigger for shooting is required. Player Movement An infra-red head tracking scheme was used to move the player to create an interesting effect: Since the game has a first-person point of view, as the player moves from side to side, the computer screen becomes a window into a virtual world with a perspective that depends on the real physical location of the player. As the player moves in the real world, the head tracker relates the physical movement to the virtual position of the player in the game. To implement the head tracker, a Nintendo Wii-mote was used. The Wii-mote contains an infra-red camera, and is used in conjunction with the IR sensor bar for aiming at objects on screen. If the Wii-mote is placed at the screen, pointing towards a player equipped with an infra-red source, it is possible for the position of the player to be tracked. After some issues using an open source Wii-mote driver, the GlovePIE 4 scripting environment was used in conjunction with a custom DLL to capture infra-red position data from the Wii-mote. GlovePIE is a scripting program that can access most of the Wii-mote's useful features. However, there is no straight forward way of exposing the captured Wii-mote data with another program. GlovePIE does however have the ability to call an external dynamic link library (DLL). Therefore, a simple DLL with a shared memory section was used to expose the values acquired by GlovePIE, and the game simply has to link to this DLL and access the functions to retrieve the values. This allows simple two-way communication between the Wii-mote and the game application. In the main game loop, the player's position given by the IR data is queried, and the value is read by the game and interpreted accordingly. Firing Mechanism In most games, the trigger for firing is usually a key (such as space bar) or a mouse click. However, an audio triggered input was developed for this game. Initially it was intended for the firing to be triggered with a certain phrase such as “fire!”, but such analysis of the audio input
Recommended publications
  • Video Game Developer Pdf, Epub, Ebook
    VIDEO GAME DEVELOPER PDF, EPUB, EBOOK Chris Jozefowicz | 32 pages | 15 Aug 2009 | Gareth Stevens Publishing | 9781433919589 | English | none Video Game Developer PDF Book Photo Courtesy: InnerSloth. Upon its launch, Will of the Wisps made waves for frame-rate issues and bugs, but after those were quickly patched, it was easy to fall in love with every aspect of the game. Video game designers need to have analytical knowledge as well as strong creative skills. First, make sure you have a good computer with some processing power and the right software. It takes cues from choose-your-own-adventure novels as well as some of the earliest narrative-driven video games from the '70s and '80s, including the first-known work of interactive fiction, Colossal Cave Adventure. Check out the story of the whirlwind visit and hear about our first peek at the game. From its dances to its massive tournaments, Fortnite has won over gamers around the world. Are there video games designed for moms? This phase can take as many hours as the original creation of the game. In Animal Crossing , you play as a human character who moves to a new town — in the case of New Horizons , your character moves to a deserted island at the invitation of series regular Tom Nook, a raccoon "entrepreneur. One standout aspect of the game was its music. If you've ever gotten immersed in your game character's story and movements, you've probably wondered how these creations can move so fluidly. How MotionScan Technology Works Animation just keeps getting more and more realistic, as emerging technology MotionScan demonstrates quite nicely.
    [Show full text]
  • Vintage Game Consoles: an INSIDE LOOK at APPLE, ATARI
    Vintage Game Consoles Bound to Create You are a creator. Whatever your form of expression — photography, filmmaking, animation, games, audio, media communication, web design, or theatre — you simply want to create without limitation. Bound by nothing except your own creativity and determination. Focal Press can help. For over 75 years Focal has published books that support your creative goals. Our founder, Andor Kraszna-Krausz, established Focal in 1938 so you could have access to leading-edge expert knowledge, techniques, and tools that allow you to create without constraint. We strive to create exceptional, engaging, and practical content that helps you master your passion. Focal Press and you. Bound to create. We’d love to hear how we’ve helped you create. Share your experience: www.focalpress.com/boundtocreate Vintage Game Consoles AN INSIDE LOOK AT APPLE, ATARI, COMMODORE, NINTENDO, AND THE GREATEST GAMING PLATFORMS OF ALL TIME Bill Loguidice and Matt Barton First published 2014 by Focal Press 70 Blanchard Road, Suite 402, Burlington, MA 01803 and by Focal Press 2 Park Square, Milton Park, Abingdon, Oxon OX14 4RN Focal Press is an imprint of the Taylor & Francis Group, an informa business © 2014 Taylor & Francis The right of Bill Loguidice and Matt Barton to be identified as the authors of this work has been asserted by them in accordance with sections 77 and 78 of the Copyright, Designs and Patents Act 1988. All rights reserved. No part of this book may be reprinted or reproduced or utilised in any form or by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying and recording, or in any information storage or retrieval system, without permission in writing from the publishers.
    [Show full text]
  • Videogames and Isolation the Galapagos Effect on the Videogame Market
    Single Cycle Degree programme in Lingue culture e società dell’Asia e dell’Africa mediterranea (LICAAM) ordinamento ex DM 270/2004 Final Thesis Videogames and isolation The Galapagos effect on the videogame market Supervisor Ch. Prof. Patrick Heinrich Assistant supervisor Ch. Prof. Pierantonio Zanotti Graduand Luca D’Angelo Matriculation Number 855677 Academic Year 2017 / 2018 Index Index..................................................................................................................................................... 3 要旨 ...................................................................................................................................................... 4 Introduction .......................................................................................................................................... 6 CHAPTER 1: The world of gaming..................................................................................................... 8 1.1 Origin ......................................................................................................................................... 8 1.2 Golden Age of West and East ................................................................................................... 11 1.3 Old “console wars” ................................................................................................................. 17 1.4 The 1990s ................................................................................................................................. 20
    [Show full text]
  • PLAYING with FEELINGS: VIDEO GAMES and AFFECT1
    pression that video game history is all about men. Furthermore within Kentucky Route Zero, she wanders into the topic of disorientation, humor and the term cybernetic fold PLAYING WITH FEELINGS: (introduced by Eve Kostofsky Sedgwick and Adam Frank describing a historical period VIDEO GAMES and AFFECT1 when “…scientists’ understanding of the brain and other life processes is marked by the concept, the possibility, the imminence, of powerful computers, but the actual compu- 4 ANABLE, A.: Playing with feelings: video games and afect. tational muscle of the new computers isn’t available“. Minneapolis : University of Minnesota Press, 2018. 152 p. In the second chapter with a double meaning title Touching games author exam- ISBN 978-1-517-90024-3. ines how physical touch (e.g. swiping) can „touch” our feelings within a game and how body, screen and code are forming an afective circuit. The example of the game Su- perbrothers: Sword and Sworcery EP5 illustrates the suppression of visual perception Magdaléna Balážiková (a game with poor graphics) and pronounces a relevance of listening and touching that augment gaming experience. Hereby, the screen acts as a sensual surface functioning Author Aubrey Anable is an assistant professor in the flm studies department at within a larger afective system, but the ability to feel and represent emotions is still Carleton University in Canada. She received a Ph.D. in Visual and Cultural Studies from tied to the interface. She notes that gestural manipulation on screen is considered as the University of Rochester and her academic interests include digital culture with the more intuitive than other types of digital interfaces.
    [Show full text]
  • History of Video Games-Wikipedia
    History of video games From Wikipedia, the free encyclopedia The Atari VCS was a popular home video game console in the late 1970s and early 1980s. Pictured is the four-switch model from 1980–1982. An Atari CX40 joystick controller, with a single button The history of video games goes as far back as the early 1950s, when academic computer scientists began designing simple games and simulations as part of their research or just for fun. At M.I.T. in the 1960s, professors and students played games such as 3D tic-tac-toe and Moon Landing. These games were played on computer such as the IBM 1560, and moves were made by means of punch cards. Video gaming did not reach mainstream popularity until the 1970s and 1980s, when video arcade games and gaming consoles using joysticks, buttons, and other controllers, along with graphics on computer screens and home computer games were introduced to the general public. Since the 1980s, video gaming has become a popular form of entertainment and a part of modern popular culture in most parts of the world. One of the early games was Spacewar!, which was developed by computer scientists. Early arcade video games developed from 1972 to 1978. During the 1970s, the first generation of home consoles emerged, including the popular game Pong and various "clones". The 1970s was also the era of mainframe computer games. The golden age of arcade video games was from 1978 to 1982. Video arcades with large, graphics- decorated coin-operated machines were common at malls and popular, affordable home consoles such as the Atari 2600 and Intellivision enabled people to play games on their home TVs.
    [Show full text]
  • A Brief History of Arcade Video Game Display Technologies - from CRT Displays to Real Time Graphics
    Research paper A brief history of arcade video game display technologies - From CRT displays to real time graphics- Yukiharu SAMBE [Translation from Synthesiology, Vol.6, No.2, p.93-102 (2013)] Since the rise of the market in the 1970s, arcade video games have evolved via the adoption of various display technologies. Initially transistor-to-transistor logic (TTL) was used, then bitmapped display—as seen in the smash hit Space Invaders—was adopted. Later display technologies include sprite display technology, an arcade industry innovation that played an important role in expanding the market, and real time polygon displays incorporating very fast numerical operations such as DSP. The arcade business has been an early adopter, introducing, developing, and utilizing new display technologies years before they appear in other industries. These arcade game technologies led to the development of many other new entertainment systems, such as home console games, mobile phone contents, and even network (downloadable) karaoke. This paper describes the evolution of arcade game display hardware technologies and its background. Keywords : Video game hardware, arcade game, sprite display, real-time polygon display 1 Introduction until the early 1970s release of the arcade PONG by Nolan Bushnell’s Atari, Inc. Gaining inspiration from this game, The world video game market is about 5 trillion yen in size.[1][2] Japanese arcade game engineers engaged in their own original Japan’s share is 20 % of this figure, with the Japanese domestic research and development. Worldwide hit Space Invaders market divided into home console games and arcade games (1978, Taito Corporation, developed by Tomohiro Nishikado) (also called “game center” games or commercial games).
    [Show full text]
  • Games of Empire Electronic Mediations Katherine Hayles, Mark Poster, and Samuel Weber, Series Editors
    Games of Empire Electronic Mediations Katherine Hayles, Mark Poster, and Samuel Weber, Series Editors 29 Games of Empire: Global Capitalism and Video Games Nick Dyer- Witheford and Greig de Peuter 28 Tactical Media Rita Raley 27 Reticulations: Jean-Luc Nancy and the Networks of the Political Philip Armstrong 26 Digital Baroque: New Media Art and Cinematic Folds Timothy Murray 25 Ex- foliations: Reading Machines and the Upgrade Path Terry Harpold 24 Digitize This Book! The Politics of New Media, or Why We Need Open Access Now Gary Hall 23 Digitizing Race: Visual Cultures of the Internet Lisa Nakamura 22 Small Tech: The Culture of Digital Tools Byron Hawk, David M. Rieder, and Ollie Oviedo, Editors 21 The Exploit: A Theory of Networks Alexander R. Galloway and Eugene Thacker 20 Database Aesthetics: Art in the Age of Information Overfl ow Victoria Vesna, Editor 19 Cyberspaces of Everyday Life Mark Nunes 18 Gaming: Essays on Algorithmic Culture Alexander R. Galloway 17 Avatars of Story Marie-Laure Ryan 16 Wireless Writing in the Age of Marconi Timothy C. Campbell 15 Electronic Monuments Gregory L. Ulmer 14 Lara Croft: Cyber Heroine Astrid Deuber- Mankowsky 13 The Souls of Cyberfolk: Posthumanism as Vernacular Theory Thomas Foster 12 Déjà Vu: Aberrations of Cultural Memory Peter Krapp 11 Biomedia Eugene Thacker 10 Avatar Bodies: A Tantra for Posthumanism Ann Weinstone 9 Connected, or What It Means to Live in the Network Society Steven Shaviro 8 Cognitive Fictions Joseph Tabbi 7 Cybering Democracy: Public Space and the Internet Diana Saco 6 Writings Vilém Flusser 5 Bodies in Technology Don Ihde 4 Cyberculture Pierre Lévy 3 What’s the Matter with the Internet? Mark Poster 2 High Techne¯: Art and Technology from the Machine Aesthetic to the Posthuman R.
    [Show full text]
  • Synthesiology, Vol.6, No.2, P.93-102 (2013)]
    Research paper A brief history of arcade video game display technologies - From CRT displays to real time graphics- Yukiharu SAMBE [Translation from Synthesiology, Vol.6, No.2, p.93-102 (2013)] Since the rise of the market in the 1970s, arcade video games have evolved via the adoption of various display technologies. Initially transistor-to-transistor logic (TTL) was used, then bitmapped display—as seen in the smash hit Space Invaders—was adopted. Later display technologies include sprite display technology, an arcade industry innovation that played an important role in expanding the market, and real time polygon displays incorporating very fast numerical operations such as DSP. The arcade business has been an early adopter, introducing, developing, and utilizing new display technologies years before they appear in other industries. These arcade game technologies led to the development of many other new entertainment systems, such as home console games, mobile phone contents, and even network (downloadable) karaoke. This paper describes the evolution of arcade game display hardware technologies and its background. Keywords : Video game hardware, arcade game, sprite display, real-time polygon display 1 Introduction until the early 1970s release of the arcade PONG by Nolan Bushnell’s Atari, Inc. Gaining inspiration from this game, The world video game market is about 5 trillion yen in size.[1][2] Japanese arcade game engineers engaged in their own original Japan’s share is 20 % of this figure, with the Japanese domestic research and development. Worldwide hit Space Invaders market divided into home console games and arcade games (1978, Taito Corporation, developed by Tomohiro Nishikado) (also called “game center” games or commercial games).
    [Show full text]
  • Enseignement / Apprentissage Du Fle Avec Les Jeux Vidéo
    UNIVERSITÉ D’ULUDAĞ INSTITUT DES SCIENCES DE L’EDUCATION DÉPARTEMENT DES LANGUES ÉTRANGÈRES ENSEIGNEMENT / APPRENTISSAGE DU FLE AVEC LES JEUX VIDÉO THÈSE DE MAITRISE Présentée Par Sercan ALABAY BURSA Août, 2014 UNIVERSITÉ D’ULUDAĞ INSTITUT DES SCIENCES DE L’EDUCATION DÉPARTEMENT DES LANGUES ÉTRANGERÈS ENSEIGNEMENT / APPRENTISSAGE DU FLE AVEC LES JEUX VIDÉO Présentée Par Sercan ALABAY Thèse présentée à l’Institut des Sciences de l’Education en vue de l’obtention de grade de Maitrise ès Sciences (M.Sc.) en didactique du FLE Sous la direction de Prof. Dr. Şeref KARA BURSA Août, 2014 BİLİMSEL ETİĞE UYGUNLUK Bu çalışmadaki tüm bilgilerin akademik ve etik kurallara uygun bir şekilde elde edildiğini beyan ederim. Sercan ALABAY 22/07/2014 REMERCIEMENTS Je tiens à exprimer ma profonde gratitude à M. Le Professeur Dr. Şeref KARA pour ses constants encouragements, son aide compétente, sa patience et ses conseils éclairés dispensés pendant la direction de cette thèse. Nous remercions les membres du jury pour nous avoir fait l’honneur de juger ce travail et pour l’intérêt qu’ils lui ont porté. J’exprime ma gratitude aux étudiants ayant accepté de répondre à mes questionnaires et pour l’intérêt montré envers mon enquête préliminaire, de même qu’aux personnes qui ont collaboré avec moi pour les contacter. Ces remerciements ne seraient pas complets sans mentionner les amis, les collègues et les anciens professeurs qui m’ont constamment encouragé pendant mes études. J’adresse un souvenir à la mémoire de quelques personnes chères qui m’ont quittées et j’exprime ma gratitude infinie à ceux qui m’ont particulièrement et patiemment soutenu dans la joie et dans le chagrin, très proches dans l’esprit même si physiquement lointains, pendant la durée consacrée à mon travail.
    [Show full text]
  • AQA Aos3: Music for Media Part 2 – Michael Giacchino and Nobuo Uematsu
    KSKS55 AQA AoS3: Music for Media part 2 – Michael Giacchino and Nobuo Uematsu Simon Rushby is a by Simon Rushby freelance teacher, writer and musician, and was a director of music and senior leader in secondary schools for many INTRODUCTION years. He is the author of a number In the first part of this resource Music( Teacher, August 2018) we looked at music by three of the five composers of books and named by AQA in Area of Study 3: Music for Media – Bernard Herrmann, Hans Zimmer and Thomas Newman. resources for music education, including In this second part, we’ll be looking at the other two names on AQA’s list. For both Michael Giacchino and two books of Nobuo Uematsu, we’ll look at their careers and focus on some key music composed by them, mostly in the listening tests for the realms of video game music, though Giacchino is now very prolific in the film genre. current GCSE music specifications. He is an ABRSM examiner and a songwriter, composer and performer, and AQA’S APPRAISING EXAM has also been a principal examiner AQA’s Appraising component is worth 40% of the total marks available at both AS and A level, and is assessed for A level music. in the form of an exam paper with three sections: listening, analysis and essay. It would be a good idea to look back at past Music Teacher AQA resources if a reminder is needed as to how the exam is set out. There are six Areas of Study (AoS) at AS Level, and seven at A level.
    [Show full text]
  • TOEJAMANDEARL - Round 7
    TOEJAMANDEARL - Round 7 1. In Jazz Jackrabbit 2, the unfortunately named Spaz will occasionally eat a bird in response to this type of action. One response to this type of action involves a yellow Game Boy Color quiety playing the Killer Instinct soundtrack. The only redeemable thing about Bubsy 3D may be a series of cutscenes in which Bubsy does a handful of weird gags whenever the player does this. An excessive amount of this action will cause Banjo to choke Kazooie. In Rayman 2, this action will prompt Rayman to dribble his own torso. Earthworm Jim plays jump rope with his own body in response to, for 10 points, what type of action that might cause a character to sit down or impatiently tap their feet? ANSWER: doing nothing (accept reasonable equivalents such as idling or inaction) 2. The developers of this game hired infamous publicist Max Clifford to take out fake tabloid ads to promote it. Samuel Deever and Uncle Fu assign missions in this game, whose cover is largely comprised of a street-level shot of Trump Tower. Four playable female characters are missing from the PlayStation version of this game, which began development as the Amiga title Race’N’Chase. Two mission packs released for this game were both set in the 1960s in London. A studio then called DMA Design developed this game, which introduced three cities based on New York, Miami, and Los Angeles. For 10 points, name this top-down action game which has produced numerous high profile and controversial sequels. ANSWER: Grand Theft Auto (accept GTA or Grand Theft Auto 1 or similar) 3.
    [Show full text]
  • Retro Game Programming Copyright © 2011 by Brainycode.Com
    Retro Game Programming Copyright © 2011 by brainycode.com Retro Game Programming How this book got started? ................................................................................................. 4 Introduction ......................................................................................................................... 5 What is a retro game? ..................................................................................................... 6 What are we trying to do? ............................................................................................... 7 What do you need?.......................................................................................................... 8 What should you know?.................................................................................................. 9 What‘s the plan? ............................................................................................................. 9 Chapter 1: The Early History of Video Games ................................................................. 11 Just Having Fun ............................................................................................................ 12 A germ of an idea ...................................................................................................... 12 The First Pong Game ................................................................................................ 12 Spacewar! .................................................................................................................
    [Show full text]