Programming Language Support for Virtual Environments” Has Been Reviewed in Final Form
Total Page:16
File Type:pdf, Size:1020Kb
i Programming Language Support For Virtual Environments A Dissertation Presented in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy with a Major in Computer Science in the College of Graduate Studies University of Idaho By Jafar M. Al-Gharaibeh August 2012 Major Professor: Clinton Jeffery, Ph.D. Copyright © 2012 Jafar Al-Gharaibeh. All rights reserved. ii Authorization to Submit Dissertation This dissertation of Jafar Mohammad Al-Gharaibeh, submitted for the degree of Doctor of Philosophy with a major in Computer Science and titled “Programming Language Support for Virtual Environments” has been reviewed in final form. Permission, as indicated by the signatures and dates given below, is now granted to submit final copies to the College of Graduate Studies for approval. Major Professor: Date: Dr. Clinton Jeffery Committee member: Date: Dr. Robert Heckendorn Committee member: Date: Dr. Terence Soule Committee member: Date: Dr. Fred Barlow Department Administrator: Date: Dr. Gregory W. Donohoe Discipline’s College Dean: Date Dr. Larry A. Stauffer Final Approval and Acceptance by the College of Graduate Studies: Date: Dr. Jie Chen iii Abstract Developing 3D virtual environments requires an advanced level of programming expertise in a wide range of programming domains including 3D graphics, networking, user interfaces and audio programming. To compound the problem, virtual environments have strong real time performance requirements. The complexity of developing these kinds of applications comes from two sources: first, the requirements of the virtual environment itself, with its dynamics and size. The second is the programming language used in development, with its strengths and also the limitations it imposes. Unfortunately, most of the tools and libraries necessary for developing virtual worlds are available mainly with low level system programming languages such as C and C++. The complexity and the amount of code required in this family of languages contribute to the overall complexity of virtual world applications making the process of building such applications a challenging process. Because the gap between language and application domain is high, a language for writing virtual environments is needed. Very high level languages such as Python and Unicon, compared to languages such as C, offer very high level programming semantics, syntax, data structures, and rich APIs with built-in support covering a wide range of programming activities such as I/O. With these language characteristics, programs can be made significantly more compact and therefore less complex. However, these very high level languages lack features essential to developing virtual worlds, and more importantly, they fall short of high performance and scalability requirements of virtual environments. This dissertation presents a language/application co-design approach for software development of virtual world. Both the application and the programming language itself evolve over time to meet new requirements. This approach is used in the development of a collaborative virtual environment called CVE, and its implementation language, Unicon. The focus of the co-design is on language extensions for virtual environment development. These extensions include 3D graphics, concurrent programming and 3D interaction. The language is improved to address the complexities and requirements that arose at the application level. This dissertation answers two main questions: 1) Is it possible to utilize a very high level language with a legacy virtual machine in virtual worlds development where performance is critical? 2) How and where does such a language need to be extended and modified both at the language level and in its implementation to meet the requirements of a multi-user virtual environment? The goal is to reduce the complexity and cost of developing virtual environments, enabling less experienced programmers to participate in developing such applications. The dissertation does not create a virtual world or a new programming language; instead it uses an existing language and complements it with very high level features. The main contribution of this dissertation is the novel design and integration of new features into a very high level goal-directed language. These features not only provide very high level support for virtual environments, but also meet the language design guidelines, maintain backward compatibility, and have very little impact on the syntax. The benefits of the new features are not specific to virtual worlds. iv Curriculum Vita Jafar Al-Gharaibeh Department of Computer Science University of Idaho Moscow, ID 83844 [email protected] Education University of Idaho, Moscow, ID Pursuing Ph.D. Degree in Computer Science Yarmouk University, Irbid, Jordan Master in Computer Science - Feb 2004 Yarmouk University, Irbid, Jordan B.Sc. in Computer Science - June 2001 v Acknowledgments This dissertation is coming to a conclusion, and the work could not have been done without the assistance and support of many people. I would like to thank my advisor Dr. Clinton Jeffery for his dedication and encouragement throughout the years of this dissertation work. He set a great example for me in his level of involvement and willingness to provide help and guidance even outside work hours. Also I would like to thank the dear respected members of the committee, Dr. Robert Heckendorn, Dr. Terence Soule, and Dr. Fred Barlow, for taking the time to review this work and provide much appreciated feedback. I would like to thank the Unicon Language community, especially Kostas Oikonomou, Phillip Thomas and Steve Wampler, for providing feedback and test analysis on various language extensions added to the Unicon programming language as part of this dissertation work. Finally, I would like to thank the corporate and governmental sponsors of this work. This research was supported in part by a grant from the National Science Foundation under agreement number DUE-0402572. This work was also supported in part by AT&T Labs Research and the Specialized Information Services Division of the U.S. National Library of Medicine. vi Dedication I dedicate this work to my parents who supported my pursuit of education throughout the years. To my wife Hiba who provided comfort and support and daughter Rayanne who brought much joy and happiness. vii Table of Contents AUTHORIZATION TO SUBMIT DISSERTATION ........................................................................................... ii ABSTRACT ............................................................................................................................................... iii CURRICULUM VITA .................................................................................................................................. iv ACKNOWLEDGMENTS .............................................................................................................................. v DEDICATION ............................................................................................................................................ vi TABLE OF CONTENTS .............................................................................................................................. vii LIST OF FIGURES ...................................................................................................................................... xi LIST OF TABLES ....................................................................................................................................... xiv PART I OVERVIEW ................................................................................................................................... 1 1 INTRODUCTION ............................................................................................................................................. 3 1.1 Motivation and Goals ........................................................................................................................ 5 1.2 Research Hypothesis .......................................................................................................................... 7 1.3 Contributions ..................................................................................................................................... 8 1.4 Organization of the Dissertation ..................................................................................................... 10 2 BACKGROUND AND RELATED WORK ................................................................................................................ 13 2.1 Adaptable Collaborative Virtual Environments ............................................................................... 13 2.1.1 Second Life ................................................................................................................................................ 16 2.1.2 ActiveWorlds ............................................................................................................................................. 17 2.2 Game Engines .................................................................................................................................. 19 2.3 Language Support for Virtual Environments ................................................................................... 22 2.3.1 3D Graphics ............................................................................................................................................... 22