Taking Tiger Woods Java Golf Online Phil Sorger Robert Burnett GAME Developers   Conference   2000
What We’ll Cover <ul><li>EA San Diego </li></ul><ul><li>Java Perceptions and Realities </li></ul><ul><li>CyberViewer </li>...
It takes an Internet … the new platform!
It takes an Internet … the new platform! <ul><li>Old Audience – Gamers Quake, Wing Commander, Command & Conquer, Ultima,  ...
It takes an Internet … the new platform! <ul><li>The client machine wide variety of architectures - Macintosh - PC - Unix ...
Java as a Platform <ul><li>Perceptions </li></ul><ul><li>Surprises  </li></ul><ul><li>Problems </li></ul><ul><li>Realities...
Java Perceptions <ul><li>Multi-platform – PC, Mac, Unix … </li></ul><ul><li>Portable </li></ul><ul><li>Easy to Code and Po...
Java Surprises <ul><li>Builds even a big project *very* fast </li></ul><ul><li>Easy to publish patches </li></ul><ul><li>G...
Java Problems <ul><li>Slow execution speed </li></ul><ul><li>No hardware access (acceleration) </li></ul><ul><ul><li>2D/3D...
Java – Perceptions vs. Reality <ul><li>Multi-platform not even Multi-Browser </li></ul><ul><li>Portable  VJ++ vs VisualCaf...
The Challenge <ul><li>Objective:  allow users to follow (view) golfers in official  EA Golf tournaments. </li></ul><ul><li...
The Solution - CyberViewer <ul><li>Showcase EA SPORTS Tiger Woods 99 PGA TOUR Golf </li></ul><ul><li>Anyone with the  reta...
CyberViewer Components <ul><li>ShotHunter and ShotServer Servers </li></ul><ul><li>Java Shotlist Replay Engine  </li></ul>...
ShotHunter and ShotServer <ul><li>Responsible for creating shot assets </li></ul><ul><li>Hunter waits for new shots </li><...
Java Engine Components <ul><li>DASH Library/API </li></ul><ul><ul><li>D isplay  A nimation  S prite  H andler </li></ul></...
DASH and DART <ul><li>DART Animation Editor </li></ul><ul><ul><li>D ASH  A nimation  R ender  T ool </li></ul></ul><ul><li...
Ported EA Code <ul><li>Golfer </li></ul><ul><li>GolfBall and GOLF_BALL_STATE </li></ul><ul><li>TGame, TPlayer, and Shot </...
Sneak Preview  PGA TOUR Online <ul><li>Fully interactive  </li></ul><ul><li>Multi-player </li></ul><ul><li>Golfers </li></...
Porting C++ to Java <ul><li>I.  Array of Objects or References? </li></ul><ul><li>II. Stack Object or just a Reference? </...
Array of Objects or References? <ul><li>class BrainCell extends Point { } </li></ul><ul><li>class Brain { </li></ul><ul><u...
Stack Object or just a Reference? <ul><li>Point WorldToScreen(Vector3 ballV) </li></ul><ul><li>{ </li></ul><ul><li>Point s...
The stdio class <ul><li>public static char[] strcpy(char[] dest, char[] src){ </li></ul><ul><li>System.arraycopy(src, 0, d...
The WINAPI class <ul><li>public static long time() { </li></ul><ul><li>return new Date().getTime(); </li></ul><ul><li>} </...
Callbacks <ul><li>interface AcceptorCallback { </li></ul><ul><li>public void OnAccept(Socket s); </li></ul><ul><li>} </li>...
Globals <ul><li>class Game </li></ul><ul><li>{ </li></ul><ul><li>public static int gNumPlayers;  // global </li></ul><ul><...
Recommendations <ul><li>Design the experience appropriately  </li></ul><ul><li>Limit real-time requirements </li></ul><ul>...
Alternatives & Considerations <ul><li>ActiveX   Execution Speed </li></ul><ul><li>Netscape Plug-In   Support </li></ul><ul...
Design Issues <ul><li>Pacing of the experience - K eep the user occupied reading playing watching chatting - Keep the user...
Design Issues <ul><li>Single or Multiplayer Manage wait - Turn based multi-player can get very slow </li></ul><ul><li>Grou...
Information on Java <ul><li>Presentation materials available at  www.easandiego.com </li></ul><ul><li>CyberViewer at tiger...
Questions
Upcoming SlideShare
Loading in …5
×

Download PowerPoint Presentation

442 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
442
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Download PowerPoint Presentation

  1. 1. Taking Tiger Woods Java Golf Online Phil Sorger Robert Burnett GAME Developers Conference 2000
  2. 2. What We’ll Cover <ul><li>EA San Diego </li></ul><ul><li>Java Perceptions and Realities </li></ul><ul><li>CyberViewer </li></ul><ul><li>PGA TOUR Golf Online </li></ul><ul><li>Porting C++ to Java </li></ul>
  3. 3. It takes an Internet … the new platform!
  4. 4. It takes an Internet … the new platform! <ul><li>Old Audience – Gamers Quake, Wing Commander, Command & Conquer, Ultima, Madden Football, MS Flight Simulator </li></ul><ul><li>New Audience – Everyone Bass Fishing, Barbie, Bargain Product, Millionaire </li></ul><ul><li>The Browser Explorer 3, 4, 5 Netscape 3, 4, 5 AOL 4, 5 </li></ul><ul><li>The Language Java – Sun Java - Microsoft </li></ul>
  5. 5. It takes an Internet … the new platform! <ul><li>The client machine wide variety of architectures - Macintosh - PC - Unix ... 200 to 1000 megahertz video acceleration connection speed - AOL users - 28.8 (56k connected at 14.4) - Cable, DSL - heavy users, influencers </li></ul><ul><li>Our Audience &quot;Golf Fans“ Men and Women Multiplayer, chat oriented lots of disposable income, well educated </li></ul>
  6. 6. Java as a Platform <ul><li>Perceptions </li></ul><ul><li>Surprises </li></ul><ul><li>Problems </li></ul><ul><li>Realities </li></ul><ul><li>Porting </li></ul><ul><li>Recommendations & Alternatives </li></ul>
  7. 7. Java Perceptions <ul><li>Multi-platform – PC, Mac, Unix … </li></ul><ul><li>Portable </li></ul><ul><li>Easy to Code and Port from C++ </li></ul><ul><li>Secure </li></ul><ul><li>Supported </li></ul><ul><li>Efficient </li></ul>
  8. 8. Java Surprises <ul><li>Builds even a big project *very* fast </li></ul><ul><li>Easy to publish patches </li></ul><ul><li>Generates reasonably small code </li></ul><ul><li>Hard to crash a machine, leak memory or scribble on the screen </li></ul><ul><li>Hugely scaleable </li></ul><ul><li>Language very flexible </li></ul>
  9. 9. Java Problems <ul><li>Slow execution speed </li></ul><ul><li>No hardware access (acceleration) </li></ul><ul><ul><li>2D/3D video, audio, input </li></ul></ul><ul><li>Limited Multimedia APIs </li></ul><ul><li>Built-in support stops at 1.1.x </li></ul><ul><li>Memory Management and Garbage Collection </li></ul>
  10. 10. Java – Perceptions vs. Reality <ul><li>Multi-platform not even Multi-Browser </li></ul><ul><li>Portable VJ++ vs VisualCafe vs Sun </li></ul><ul><li>Easy to port from C++ No enum no primitive pointers no implicit construction no right click </li></ul><ul><li>Secure Code validation causes slow startup </li></ul><ul><li>Supported Microsoft vs Sun </li></ul><ul><li>Efficient The Internet Sucks </li></ul>
  11. 11. The Challenge <ul><li>Objective: allow users to follow (view) golfers in official EA Golf tournaments. </li></ul><ul><li>Maximize audience Browser based </li></ul><ul><li>Simplify development 100% Pure Java </li></ul>
  12. 12. The Solution - CyberViewer <ul><li>Showcase EA SPORTS Tiger Woods 99 PGA TOUR Golf </li></ul><ul><li>Anyone with the retail game can compete </li></ul><ul><li>Multi-round professional format </li></ul><ul><li>Cash prizes “$65,000 purse” </li></ul><ul><li>Archive winning performances </li></ul>
  13. 13. CyberViewer Components <ul><li>ShotHunter and ShotServer Servers </li></ul><ul><li>Java Shotlist Replay Engine </li></ul><ul><li>Website (previous screen) </li></ul>
  14. 14. ShotHunter and ShotServer <ul><li>Responsible for creating shot assets </li></ul><ul><li>Hunter waits for new shots </li></ul><ul><li>Server replays shot and posts: </li></ul><ul><ul><li>Tee and Snap background jpegs </li></ul></ul><ul><ul><li>ReplayBuffer </li></ul></ul><ul><ul><li>Z Buffer </li></ul></ul><ul><ul><li>Shotlists </li></ul></ul>
  15. 15. Java Engine Components <ul><li>DASH Library/API </li></ul><ul><ul><li>D isplay A nimation S prite H andler </li></ul></ul><ul><li>Ported EA Code </li></ul><ul><ul><li>Golf specific classes and routines </li></ul></ul><ul><li>Main Game Control </li></ul><ul><ul><li>User Interface </li></ul></ul>
  16. 16. DASH and DART <ul><li>DART Animation Editor </li></ul><ul><ul><li>D ASH A nimation R ender T ool </li></ul></ul><ul><li>Double-buffered Display </li></ul><ul><ul><li>built-in Restore(), Blit() and Flip() </li></ul></ul><ul><li>Generic Handlers </li></ul><ul><ul><li>File I/O, Audio, Security, Version Management, Animation, Debugging, Network I/O, 3D Cameras, etc. </li></ul></ul>
  17. 17. Ported EA Code <ul><li>Golfer </li></ul><ul><li>GolfBall and GOLF_BALL_STATE </li></ul><ul><li>TGame, TPlayer, and Shot </li></ul><ul><li>Overhead, Scoreboard, Liemeter </li></ul><ul><li>Replay and ReplayBuffer </li></ul><ul><li>ZBuffer, Camera and TGolfView </li></ul>
  18. 18. Sneak Preview PGA TOUR Online <ul><li>Fully interactive </li></ul><ul><li>Multi-player </li></ul><ul><li>Golfers </li></ul><ul><li>Courses </li></ul><ul><li>Physics </li></ul><ul><li>Web / Chat </li></ul>
  19. 19. Porting C++ to Java <ul><li>I. Array of Objects or References? </li></ul><ul><li>II. Stack Object or just a Reference? </li></ul><ul><ul><li>… watch out for “=“ </li></ul></ul><ul><li>III. The stdio and WINAPI Class </li></ul><ul><li>IV. Callbacks </li></ul><ul><li>V. Globals </li></ul>
  20. 20. Array of Objects or References? <ul><li>class BrainCell extends Point { } </li></ul><ul><li>class Brain { </li></ul><ul><ul><li>public static final int kBrainCells = 100; </li></ul></ul><ul><ul><li>private BrainCell[] brainCells; </li></ul></ul><ul><ul><li>public Brain(){ </li></ul></ul><ul><ul><ul><li>brainCells = new BrainCell[kBrainCells]; </li></ul></ul></ul><ul><ul><ul><li>brainCells[0].x = 0; // !NULL POINTER EXCEPTION! </li></ul></ul></ul><ul><ul><ul><li>brainCells[0] = new BrainCell(); </li></ul></ul></ul><ul><ul><ul><li>brainCells[0].x = 0; // now it’s ok! </li></ul></ul></ul><ul><ul><ul><li>boolean[] bInUse = new boolean[kBrainCells]; </li></ul></ul></ul><ul><ul><ul><li>bInUse[0] = true; // OK, primitive type! </li></ul></ul></ul><ul><li>} </li></ul>
  21. 21. Stack Object or just a Reference? <ul><li>Point WorldToScreen(Vector3 ballV) </li></ul><ul><li>{ </li></ul><ul><li>Point screenPt; //! Just makes a pointer (ref) </li></ul><ul><li>Vector3 v; //! same thing, just a pointer! </li></ul><ul><li>v.x = ballV.x; //!NULL POINTER! </li></ul><ul><li>v = new Vector3(); </li></ul><ul><li>v.x = ballV.x // now it’s ok! </li></ul><ul><li>v = ballV; // not a Copy constructor! </li></ul><ul><li> // what happened to old v.x??? </li></ul><ul><li>} </li></ul>
  22. 22. The stdio class <ul><li>public static char[] strcpy(char[] dest, char[] src){ </li></ul><ul><li>System.arraycopy(src, 0, dest, 0, src.length); </li></ul><ul><li>return dest; </li></ul><ul><li>} </li></ul><ul><li>public static String strcpy(char[] dest, String src){ </li></ul><ul><li>src.getChars(0, src.length(), dest, 0); </li></ul><ul><li>return src; </li></ul><ul><li>} </li></ul><ul><li>public static String strcpy(String dest, char[] src){ </li></ul><ul><li>dest = new String(src); </li></ul><ul><li>return dest; </li></ul><ul><li>} </li></ul><ul><li>//etc, etc, etc… </li></ul>
  23. 23. The WINAPI class <ul><li>public static long time() { </li></ul><ul><li>return new Date().getTime(); </li></ul><ul><li>} </li></ul><ul><li>public static MSG PeekMessage(int wRemoveMsg) { </li></ul><ul><li>if(messageQ.size()==0) return null; </li></ul><ul><li>MSG lpMsg = (MSG)messageQ.firstElement(); </li></ul><ul><li>if(wRemoveMsg==PM_REMOVE) </li></ul><ul><li>messageQ.removeElement(lpMsg); </li></ul><ul><li>return lpMsg; </li></ul><ul><li>} </li></ul><ul><li>// etc, etc, etc... </li></ul>
  24. 24. Callbacks <ul><li>interface AcceptorCallback { </li></ul><ul><li>public void OnAccept(Socket s); </li></ul><ul><li>} </li></ul><ul><li>class CSock extends Socket implements AcceptorCallback{ </li></ul><ul><li>void OnAccept (Socket s) { } </li></ul><ul><li>} </li></ul><ul><li>CSock cs = new CSock(); </li></ul><ul><li>ServerSocket ss = new ServerSocket(); </li></ul><ul><li>Socket acceptSocket = ss.accept(); </li></ul><ul><li>((AcceptorCallback)cs).OnAccept(acceptSocket); </li></ul>
  25. 25. Globals <ul><li>class Game </li></ul><ul><li>{ </li></ul><ul><li>public static int gNumPlayers; // global </li></ul><ul><li>public static final int MAX_PLAYERS=4; // const </li></ul><ul><li>public static void PrintNumPlayers() { // method </li></ul><ul><li>System.out.println(“players=“ + gNumPlayers); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>if(Game.gNumPlayers <= Game.MAX_PLAYERS) </li></ul><ul><li>Game.PrintNumPlayers(); </li></ul><ul><li>// ALL GLOBALS BELONG IN THEIR OBJECT’S CLASS!! </li></ul>
  26. 26. Recommendations <ul><li>Design the experience appropriately </li></ul><ul><li>Limit real-time requirements </li></ul><ul><li>Maintain focus on main applet </li></ul><ul><li>Port standard C++ routines </li></ul><ul><ul><li>strcpy, memcpy, WININET, Peek/PostMessage, rand, fopen </li></ul></ul><ul><li>Consider “dirty” Java </li></ul><ul><ul><li>Blend pure and DirectX </li></ul></ul>
  27. 27. Alternatives & Considerations <ul><li>ActiveX Execution Speed </li></ul><ul><li>Netscape Plug-In Support </li></ul><ul><li>Flash vs. Ease of development </li></ul><ul><li>C++ Application Size Requirements </li></ul><ul><li>Java Script “Time to Play” </li></ul><ul><li>HTML / ASP Asset conversion </li></ul>
  28. 28. Design Issues <ul><li>Pacing of the experience - K eep the user occupied reading playing watching chatting - Keep the user informed load times walk away time (advertising) </li></ul>
  29. 29. Design Issues <ul><li>Single or Multiplayer Manage wait - Turn based multi-player can get very slow </li></ul><ul><li>Group players based on … experience interest performance region </li></ul><ul><li>Audience </li></ul><ul><li>Simplicity of operation </li></ul>
  30. 30. Information on Java <ul><li>Presentation materials available at www.easandiego.com </li></ul><ul><li>CyberViewer at tiger99.easports.net/viewer </li></ul><ul><li>Java information from Sun java.sun.com </li></ul><ul><li>Sun - JavaOne Moscone Center, SF. June 6-9, 2000. </li></ul><ul><li>Java programming tech shops developer.com </li></ul>
  31. 31. Questions

×