All work

04 · Java game · Spring 2024

The Adventures of Edgeworth

A Mario-style platformer in Java starring Ace Attorney’s Miles Edgeworth: six hand-designed levels, three kinds of enemy, a hidden block and an ending. Play it right here in the browser.

Role
Solo: game design, level design, sprites and code (2024). The 2026 browser port and Java update were built with AI coding tools.
Timeline
Apr 26 – May 12, 2024
Context
CPS 2231 course project, Wenzhou-Kean University
Built with
Java 8, Swing, Java Sound · Eclipse, Aseprite, Excel
Arrow keys move and jump; P pauses; M mutes. On a phone it opens full screen with touch buttons.

The idea

Xinyue (Lily) Feng built the game around two things she loved: the little monster-adventure games she played on the 4399 web-game site as a child, and Capcom’s Ace Attorney series, which she was playing at the time. So the hero is the prosecutor Miles Edgeworth, the enemies are courtroom regulars, and the blocks are the series’ famous “Hold it!” and “Objection!” speech bubbles.

  • Miles EdgeworthThe player. Walks, jumps, stomps.
  • Winston PaynePaces back and forth. Land on his head for 10 points.
  • Manfred von KarmaCan’t be stomped. Jump over him.
  • Wendy OldbagRises out of pipes and floats away.
  • Dick GumshoePoints at an invisible block.
  • Phoenix blockHit it from below for 10 points.

Level design

Every scene is a 15 × 10 grid of 60-pixel tiles, planned in a spreadsheet, one colored cell per block. Scene 3 is a face made of breakable blocks, scene 5 a heart, and every floor tile is a heart too.

A hint instead of a tutorial

Scene 4 can’t be finished by jumping alone: the pillars are too tall. Detective Gumshoe stands at the exact spot where an invisible block hangs. Jump under it and an “Objection!” block appears, giving you the extra height to climb.

How it works

Nine classes, about 1,400 lines, no game engine: a double-buffered 900 × 600 window, and the player, every enemy and the end-of-level flag each on its own thread.

Collision works on the tile grid. Before each step, Edgeworth checks the blocks next to him:

//Cannot move to the right
if(ob.getX()==this.x+60 && (ob.getY()+50>this.y && ob.getY()-50<this.y)){
    if(ob.getType() != 3){
        canRight = false;
    }
}

From Edgeworth.java. Type 3 is the hidden block: you can walk through it until it’s revealed.

Landing, bumping a block from below and stomping an enemy are the same kind of check one tile up or down.

Credits

Game, level design, sprites and original code: Xinyue (Lily) Feng.
2026 browser port and Java update: built with AI coding tools.
Characters and title-screen art: Ace Attorney © Capcom, in a non-commercial fan game.
Forest animation: pixel art by Anas Abdin (@anasabdin).
Music and sound effects: third-party, © their owners.