Skip to Main Content
Killer Game Programming in Java
book

Killer Game Programming in Java

by Andrew Davison
May 2005
Intermediate to advanced content levelIntermediate to advanced
998 pages
26h
English
O'Reilly Media, Inc.
Content preview from Killer Game Programming in Java

The User Interface

Maze3D invokes MazeManager, BirdsEye, SecondViewPanel, and WrapMaze3D objects. The latter three are subclasses of JPanel, which Maze3D organizes using the layout shown in Figure 25-6.

Maze3D GUI layout

Figure 25-6. Maze3D GUI layout

The fragment of code below contains the invocation of these four objects and shows that MazeManager is required by all the JPanel objects:

    MazeManager mm = new MazeManager(fnm);   // fnm holds maze plan
    BirdsEye be = new BirdsEye(mm);
    SecondViewPanel secondVP = new SecondViewPanel(mm);
    WrapMaze3D w3d = new WrapMaze3D(mm, be, secondVP.getCamera2TG() );

The GUI is made with the BirdsEye object (the bottom-right panel in Figure 25-6), the SecondViewPanel object (the top-right panel in Figure 25-6), and the WrapMaze3D object (the lefthand panel).

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Game Development with LibGDX: From Beginner to Professional

Java Game Development with LibGDX: From Beginner to Professional

Lee Stemkoski

Publisher Resources

ISBN: 0596007302Supplemental ContentErrata Page