Programming Language Support for Collaborative
Virtual Environments
Programming Language Support for Collaborative
Virtual EnvironmentsClint Jeffery
University of Idaho
Clint Jeffery
University of Idaho
Why study games?Why study games?
Fun!! Computer game industry is big
Larger than the film industry Shortly to eclipse the music industry
Games drive technological advances Games have many “serious” applications
Simulation, film, education/training Both “software problems” (e.g. AI) and
“engineering problems” (e.g. cost, time)
Fun!! Computer game industry is big
Larger than the film industry Shortly to eclipse the music industry
Games drive technological advances Games have many “serious” applications
Simulation, film, education/training Both “software problems” (e.g. AI) and
“engineering problems” (e.g. cost, time)
Game TechnologiesGame Technologies
Game development is a specialized form of software engineering
Lots of graphics, Lots++ of art A/I, Physics Networking Usually a simulation of some kind How to engineer “fun”? How to reduce the cost of development?
Game development is a specialized form of software engineering
Lots of graphics, Lots++ of art A/I, Physics Networking Usually a simulation of some kind How to engineer “fun”? How to reduce the cost of development?
What is a Virtual Environment?My definition for purposes of this talk
What is a Virtual Environment?My definition for purposes of this talk
3D, video game-like Multi-user, collaborative environment Persistent “virtual world” I am interested in building them…
For both games and serious purposes
3D, video game-like Multi-user, collaborative environment Persistent “virtual world” I am interested in building them…
For both games and serious purposes
WoWWoW
What do we knowabout WoW’s internals?
What do we knowabout WoW’s internals?
Rumored to cost $60M to develop initially Uses Lua as its interface customization
extension scripting language … ? I suppose we could try to hack it, but I am
not willing to risk losing my level 58 undead warrior…
Could imitate their dev model, just need $60M and more expertise than I’ve got.
Rumored to cost $60M to develop initially Uses Lua as its interface customization
extension scripting language … ? I suppose we could try to hack it, but I am
not willing to risk losing my level 58 undead warrior…
Could imitate their dev model, just need $60M and more expertise than I’ve got.
ChallengesChallenges
Given $0, how do I… Create a 3D world that is cool enough
“make or buy” ? (“make” sounds hard) Collect lots of textures Build a detailed 3d model of my world
With enough stuff to do to be interesting Stuff that is education-relevant Implies edu domain-specific tools What you can “buy” won’t have these
Given $0, how do I… Create a 3D world that is cool enough
“make or buy” ? (“make” sounds hard) Collect lots of textures Build a detailed 3d model of my world
With enough stuff to do to be interesting Stuff that is education-relevant Implies edu domain-specific tools What you can “buy” won’t have these
Research Avenueswhere you see ‘state of art’ substitute ‘WoW’
Research Avenueswhere you see ‘state of art’ substitute ‘WoW’
Difficult to advance state of art in: graphics networking
Moderately easy to advance state of art in: if you can even get in the game... AI & gameplay Educational uses
Necessary to advance state of art in: Cost of coding Cost of art, modeling, content creation
Difficult to advance state of art in: graphics networking
Moderately easy to advance state of art in: if you can even get in the game... AI & gameplay Educational uses
Necessary to advance state of art in: Cost of coding Cost of art, modeling, content creation
HypothesisHypothesis
If I build the right language and tools, the cost of developing custom MMOs will become tractable.
So far: graphics and networking Future: AI, physics, 3D modeling, art…
If I build the right language and tools, the cost of developing custom MMOs will become tractable.
So far: graphics and networking Future: AI, physics, 3D modeling, art…
What does “Language Support” Really Mean?
What does “Language Support” Really Mean?
Functions, operators, keywords, and/or Control Structures syntax! ouch! Justifiable bug avoidance, e.g.
matrix stacks, named render sections… Simplifying OpenGL and sockets Built-in smart behavior, but flexible Generalizing things like input handling
(select() and non-blocking read()) Deciding what to do in C, and what not
Functions, operators, keywords, and/or Control Structures syntax! ouch! Justifiable bug avoidance, e.g.
matrix stacks, named render sections… Simplifying OpenGL and sockets Built-in smart behavior, but flexible Generalizing things like input handling
(select() and non-blocking read()) Deciding what to do in C, and what not
TexturesTextures
2D image, to be drawn on a 3D surface Harder than I thought it would be Start with digital photos of everything…
each room needs 3-300 photos Tedious manual editing process!
crop dimensions to power of 2 remove irregularities scale them down to fit more in most textures need to be tileable may need GIMP or Photoshop
2D image, to be drawn on a 3D surface Harder than I thought it would be Start with digital photos of everything…
each room needs 3-300 photos Tedious manual editing process!
crop dimensions to power of 2 remove irregularities scale them down to fit more in most textures need to be tileable may need GIMP or Photoshop
Texture ExampleTexture Example
3D Model3D Model
If CAD/blueprint data is available, use it… if you can read/understand/convert it
Otherwise, start from floor plans Give (x,z) coordinates; add your y’s
Decide on a coordinate system Where is 0,0,0? Feet or meters?
If CAD/blueprint data is available, use it… if you can read/understand/convert it
Otherwise, start from floor plans Give (x,z) coordinates; add your y’s
Decide on a coordinate system Where is 0,0,0? Feet or meters?
ModviewModview
Scripting Example (SecondLife)Scripting Example (SecondLife)
User-defined ContentUser-defined Content
SecondLife lets users create the world We are going to let users create the
quests Quests will be dual-peer rated for (fun,xp)
where completers rate the fun, domain experts rate the xp.
SecondLife lets users create the world We are going to let users create the
quests Quests will be dual-peer rated for (fun,xp)
where completers rate the fun, domain experts rate the xp.
CVECVE
CS educational virtual environment Initial funding from NSF ATE program Lives at cve.sourceforge.net Runs on X11 and on Windows
(OpenGL; so far it stinks on Vista) SIMPLE 3d worlds, needs more tools Collaborative IDE Under construction Departments so far: UI and NMSU CS
CS educational virtual environment Initial funding from NSF ATE program Lives at cve.sourceforge.net Runs on X11 and on Windows
(OpenGL; so far it stinks on Vista) SIMPLE 3d worlds, needs more tools Collaborative IDE Under construction Departments so far: UI and NMSU CS
Static and Dynamic Model DataStatic and Dynamic Model Data
# static properties of a doorDoor {x 33y 0z 3.9height 2.3plane 3rooms [SH 167, corridor 167]}
#dynamic state of a doorlink {name link1openness 1.0delta 0direction 1}
#static properties of a roomRoom {name SH 167x 29.2y 0z 0.2w 6h 3.05l 3.7floor Rect { texture floor2.gif }obstacles [ Box { # window sill Rect {coords [29.2,0,.22,29.2,1,.22, 35.2,1,.22,35.2,0,.22]} }]}
Under ConstructionUnder Construction
High-level object selection 3D model imports
better avatars, more virtual objects NPCs and quests
CS/library tutorial content a recruiting tool, will reach grades 4+
Collaborative debugger (pty API) Collaborative design (UML--) tool Augmented reality and virtuality
High-level object selection 3D model imports
better avatars, more virtual objects NPCs and quests
CS/library tutorial content a recruiting tool, will reach grades 4+
Collaborative debugger (pty API) Collaborative design (UML--) tool Augmented reality and virtuality
S3D FilesS3D Files
// version
103
// nTextures,nTris,nVerts,nParts,nFrames,nLights,nCameras
1,892,445,1,24,0,0
// partList: firstVert,numVerts,firstTri,numTris,"name"
0,445,0,892,"pCube1"
// texture list: name
uvmap.tga
// triList: materialIndex,vertices(index, texX, texY)
0, 8,33.7125,75.1163, 42,32.1658,78.5249, 9,31.0493,70.0337
0, 30,93.7656,9.30429, 5,96.9879,15.1088, 2,94.4741,16.4074
0, 103,209.125,250.495, 106,211.483,238.497, 85,212.028,244.752
0, 30,93.7656,9.30429, 39,97.957,10.0346, 5,96.9879,15.1088
// version
103
// nTextures,nTris,nVerts,nParts,nFrames,nLights,nCameras
1,892,445,1,24,0,0
// partList: firstVert,numVerts,firstTri,numTris,"name"
0,445,0,892,"pCube1"
// texture list: name
uvmap.tga
// triList: materialIndex,vertices(index, texX, texY)
0, 8,33.7125,75.1163, 42,32.1658,78.5249, 9,31.0493,70.0337
0, 30,93.7656,9.30429, 5,96.9879,15.1088, 2,94.4741,16.4074
0, 103,209.125,250.495, 106,211.483,238.497, 85,212.028,244.752
0, 30,93.7656,9.30429, 39,97.957,10.0346, 5,96.9879,15.1088
New This SpringNew This Spring
NASA MMO Planning stages: K-12 edutainment &
recruiting Direct3D port
maybe shaders, while we are at it Mac/Cocoa port
duelling infinite loops
NASA MMO Planning stages: K-12 edutainment &
recruiting Direct3D port
maybe shaders, while we are at it Mac/Cocoa port
duelling infinite loops
I Need HelpI Need Help
Want to build more of uidaho? I’d love to work with you
Want to help? projects for students and new friends standalone tools, or core system elements NPCs Both game and educational stuff to do Instructional activities (quests/skills),
experience points and peer ratings system
Want to build more of uidaho? I’d love to work with you
Want to help? projects for students and new friends standalone tools, or core system elements NPCs Both game and educational stuff to do Instructional activities (quests/skills),
experience points and peer ratings system