Download PowerPoint Presentation

  • 319 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
319
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
6
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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