CS计算机代考程序代写 Java junit Main Course Info Staff Resources Exams Beacon  Ed  OH Queue 

Main Course Info Staff Resources Exams Beacon  Ed  OH Queue 
Pre-lab Introduction
Part I: Meet the Tile Rendering Engine
Part II: Use the Tile Rendering Engine
Moving on to Project 3 Submission
Lab 12: Getting Started on Project 3
When you import, make sure to import at the directory level, otherwise there will be dumb package issues. If you import properly it should look like this:
.
Pre-lab
Some steps to complete before getting started on this lab:
As usual, use . This should download the skeleton files, which include the files you need for labs 12 and 13.
Watch a previous semester’s project 3 getting started video at this link. Note the name and API have changed
git pull skeleton master
proj3
proj3

slightly, but the bigger picture still applies. Read over Phase 1 of the project 3 spec.
Understand that project 3 will be a marathon and not a sprint. Don’t wait until the last minute.
Make sure you reach out to your partner before the lab and perhaps even complete the lab together. Whether or not you submitted the Project 3 Partnership form, you should be able to see your partnership reflected on Beacon.
Note that you must keep the same partner for the entirety of project 3.
Introduction
In this lab, you will learn some basic techniques and tools that will be helpful for project 3. You should ideally work on this lab with your Project 3 partner.
Part I: Meet the Tile Rendering Engine
Boring World
Open the Project 3 skeleton in IntelliJ Make sure you select the folder called proj3! Not the folder called lab12. Your IntelliJ should look something like the following (you may need to click the right pointing arrows to expand and see the contents of the
, , packages, etc.). Note that there is some stuff in here, like , , and , that isn’t part of lab 12. That’s okay! We’ll just focus on the
byow.Core
byow.lab12
lab13
InputDemo
SaveDemo
Pre-lab Introduction
Part I: Meet the Tile Rendering Engine
Part II: Use the Tile Rendering Engine
Moving on to Project 3 Submission

package for now. Make sure you import the project from as usual.
This world consists of empty space, except for the rectangular block near the bottom middle. The code to generate this world consists of three main parts:
Initializing the tile rendering engine.
Generating a two dimensional array.
pom.xml
BoringWorldDemo
file. Try running it and you should see a window appear that looks like the following:
Open up the
TETile[][]
byow.lab12
Pre-lab Introduction
Part I: Meet the Tile Rendering Engine
Part II: Use the Tile Rendering Engine
Moving on to Project 3 Submission

Using the tile rendering engine to display the
array.
The API for the tile rendering engine is simple. After creating a object, you simply need to call the
method, specifying the width and height of your world, where the width and height are given in terms of the number of tiles. Each tile is 16 pixels by 16 pixels, so for example, if we called
, we’d end up with a world that is 10 tiles wide and 20 tiles tall, or equivalently 160 pixels wide and
320 pixels tall. For this lab, you don’t need to think about pixels, though you’ll eventually need to when you start building the user interface for Project 3 (discussed in the next lab).
objects are also quite simple. You can either build them from scratch using the constructor (see ), or you can choose from a palette of pregenerated tiles in the file
. For example, the code from
below generates a 2D array of tiles and
fills them with the pregenerated tile given by .
TETile[][] world = new TETile[WIDTH][HEIGHT]; for(intx=0;x