Deadlines

Warning: There are 3 deadlines for this project, and some deadlines require you to submit multiple deliverables. Please double-check that you submitted everything!
Assignment Tasks Deliverable Points Due Date
Project 5A - Partnerships
- Setup
- Design Document
Partnership formation 50 Tues, Nov 10
11:59pm PT
Lab 12 Fri, Nov 13
11:59pm PT
Re-pairing requests (if needed) — Mon, Nov 16
11:59pm PT
Dissolution requests (if needed) — Wed, Nov 18
11:59pm PT
Design Document 50 Wed, Nov 18
11:59pm PT
Project 5B - World Generation
- Light Sources (groups of 3 only)
Code and World Screenshots on Gradescope
(optional regrade/clobber at your checkoff)
200 Tues, Nov 24
11:59pm PT
Project 5C
No Extensions
- Task 1: Main Menu
- Task 2: Interactivity
- Task 3: HUD
- Task 4: Saving and Loading
- Task 5: Toggleable Light Sources (groups of 3 only)
- Task 6: Pathfinding
- Task 7: Ambition Features
Code on Gradescope and Live Checkoff with TA
(Checkoffs will happen Mon Nov 30 – Fri Dec 4; Nov 30 and Dec 1 are optional early slots)
500 Tues, Dec 1
11:59pm PT
To request extensions on Project 5, all group members need to submit separate extension requests on Beacon.

Project 5A: BYOW (Design)

Welcome and Overview

In this project, you will create an engine for generating explorable worlds. This is a large design project that will require you and one partner to work through every stage of development from ideation to presentation.

In accordance with this, the grading of this project will be different from other projects. Since there is no notion of “the correct answer” when it comes to world design and implementation, you will be assessed much like a performance review you might receive at an internship or job. While this means you will be graded slightly subjectively, we promise to be pretty nice bosses and will respect you as any boss should respect their hardworking employees. You will have the opportunity to dispute if the grading scheme feels unfair.

This project is about software engineering, and will achieve several goals that come with large design projects

  1. Emulating a real product development cycle. This comes from handling a larger pieces of code with little starter code
  2. Recognize and mitigate code complexity. Inevitably, whenever a team builds a large software system, they’ll make some bad design decisions and cut corners, resulting in “technical debt”. Your code becomes complicated to understand and modify, which in the real world translates to software that becomes stale and expensive to maintain. It is very likely that your code will feel sort of hacked together by the end of this project. As you grow as a programmer over the course of your career, arguably the main skill you’ll be building is to avoid such hacks. However, the only way to know and defeat this is to suffer from it.
  3. Exploring and experimenting with resources. Know that there are no right and wrong answers, as this is a very open-ended project. In fact, it is not required to use any of the data structures from class, but it will likely make your solution significantly simpler and more efficient. You will likely go through several iterations before settling on your final implementation

A video playlist (from Spring 2018) discussing tips for working on this project can be found at this link Note: The tour through the skeleton code is a bit out of date, for example, the playWithKeyboard and playWithInputString methods are gone.

Your task for the next few weeks is to design and implement a 2D tile-based world exploration engine. As an example of a much more sophisticated system than you will build, the NES game “Zelda II” is (sometimes) a tile based world exploration engine that happens to be a video game:

Screenshot of Zelda II.

The system you build can either use graphical tiles (as shown above), or it can use text based tiles, like the game shown below:

Screenshot of Brogue.

We will provide a tile renderer and a small set of starter tiles for you to use. This will be the same tile renderer you used in Project 0 and 3.

Project Roadmap

  1. Implement code to generate random worlds (Project 5B).
  2. Add a main menu for the user to start the game from (Project 5C).
  3. Add support for saving a game and loading it back (Project 5C).
  4. Add several game mechanics/features to your project (Project 5C).

Task 0: Setup

If you have done any of these steps for Lab 12 feel free to skip to step 5

Follow the steps below to set up your group repository

  1. Go to your email associated with beacon and accept the invite to your group repository
  2. Clone your repository with SSH inside your 61b folder. Note: if you are a solo 47B student, skip this step and work in your student repository.
    git clone git@github.com:Berkeley-CS61B-Student/fa26-proj5-g***.git
    
  3. cd into the fa26-proj5-g** repo, where ** is your group number (or your student repo if 47B solo)
    cd fa26-proj5-g***
    
  4. Add the project 5 skeleton
    git remote add skeleton git@github.com:Berkeley-CS61B-Student/proj5-skeleton-fa26.git
    

    or if you are a 47B solo student

    git remote add proj5-skeleton git@github.com:Berkeley-CS61B-Student/proj5-skeleton-fa26.git
    
  5. Pull from the project 5 skeleton
    git pull skeleton main --allow-unrelated-histories
    

    or if you are a 47B solo student

    git pull proj5-skeleton main --allow-unrelated-histories
    

Task 1: Writing Your TDD

We have provided a template for you to use if you’d like. See the Project 5A: BYOW Design Template, which is also linked in the assignment below.

Check the Technical Design Document tab for a refresher and an example of a design document

As mentioned earlier, design docs are living documents. You (the designer) might not understand the entire project scope while drafting, and that’s fine. Including a section for questions can help track your thoughts for future iterations.

A “Questions” section is useful for collaboration. Your collaborators may want to understand which assumptions you made or questions you had when designing.

Write a TDD for BYOW and submit it to the Project 5A: BYOW Design assignment.

For BYOW, the complexity of your program is not as important.

On the other hand, the data of your program is. What type of data do you expect to save and load?

If you expect to work on this project during office hours, we may ask to see your design document to help understand your approach. As such, please put effort into this assignment! Grasping project requirements in the design phase will help immensely during the later implementation phases.

Design Tips

We’ve included below a few questions for you to consider while brainstorming your design:

General Questions

  • Look through the provided code:
    • Notice what’s already built for you. What may be useful for your implementation?
    • Notice what isn’t. What gaps does your implementation need to fill?
  • Where do tasks overlap? Are there opportunities to reuse methods across different cases? Think about opportunities for helper methods.
  • Can you find groups of data structures and methods that serve a similar, clearly defined purpose? If so, consider moving them to a separate class. Building abstraction barriers may be helpful for managing code complexity.

World Generation

  • What are the core components of each world? Does it makes sense to have a separate class for each component?
  • How will you ensure that every generated world is valid?
    • Will you decide on a layout first, validate it, then build the world after?
    • Or, will you gradually generate the world, ensuring that only valid components are built as you go?
  • Ultimately, each world is a 2D grid of values, each representing a Tile. What data structures would be helpful for tracking the state of the world on top of this grid? Representing specific aspects of your world with data structures may be helpful for building ambition features later.

Interactivity

  • Read through the StdDraw library documentation. This library acts as the bridge between your implementation and what is outputted on screen (e.g. the /tileengine implementation uses library methods to draw to the screen).
    • Can you find methods for drawing on the screen, not specifically for tile drawing?
    • Can you find methods for soliticiting user inputs?
  • Rendering video is much like a classic film projector, in that by rapidly rendering images, we can create the illusion of motion. Video games are essentially the same, except that user inputs can alter what’s displayed in the next frame. (Read about common paradigms for implementing video games and graphics engines here)
    • Does your implementation clearly separate the steps of collecting, processing, and displaying the result of user inputs?
  • Consider that your computer can compute thousands of instructions each second. If your implementation has real-time elements (i.e. timers, slow-motion movement, NPCs moving at user-like speed, etc.), how can you adjust the speed of your event loop to match real-time?

Ambition Features

  • Most importantly, which ambition features are you most excited about building?
  • For each feature, determine where it fits within your current abstraction barriers:
    • Does it require fundamental changes to the process of generating and representing worlds?
    • Does it alter the process for collecting user input?
    • Does it change the process for rendering the world state?
  • Do any features span multiple domains of this project? If so, consider creating separate classes to contain their complexity.
  • How could you structure your core project implementation (world generation and interactivity) to make feature integration seamless?

You aren’t bound to the ambition features you choose to write about within your design doc. That said, certain features (especially primary ones) are better aligned with certain implementation choices in the world generation and interactivity tasks. It’s important to think about this early!

Submission

Submit your design document on gradescope: Project 5A: BYOW Design (50 points)

Don’t forget to add your partner to the submission!

The score you receive on Gradescope is your final score for this assignment (assuming you followed the collaboration policy).

While we’re unable to give detailed individual feedback for each TDD, we’ll agregate common mistakes we notice and showcase them (as well as implementation hints…) in assignment section during Week 13 (11/16-11/20). As always, come to office hours if you want specific feedback from 61B staff!

A note on grading, we are looking for thoughtfulness and effort. In other words, you do not have to be correct in your design or your complexity analysis, but we expect you to have put in considerable time into designing your approach. As long as you attempt to describe your approach for the components in the rubric, you’ll receive full credit.

For the TDD, we have provided the rubric we’ll be grading submissions on below for your reference.

  1. Overview (5%): Describes what you are building and lists the ambition features you are planning.
  2. Data Structures (30%): Describes what data structures will keep track of the state of your world and game, and why you chose them.
  3. Algorithms (40%): Describes your approach for each part of the project: world generation, main menu, interactivity, HUD, saving and loading, pathfinding, and ambition features (plus light sources for groups of 3).
  4. Diagram (20%): Summarizes your design, such as the screens of your game and how your game loop updates and displays its state.
  5. Complexity (5%): Describes the expected runtime of world generation and pathfinding.

The Open Questions section of the template is optional and ungraded.

This spec was written by Daniel Wang and Ronnie Beggs as a new assignment in Fall 2025, and edited by Marcus Koh and Reina Kushihashi in Fall 2026. The provided template was created by Kanav Mittal and Stella Kaval in Spring 2025 and edited by Daniel Wang. The template was updated by Andrew Xu in Fall 2026.