Results 1 to 4 of 4
- 10-25-2011, 04:01 PM #1
Member
- Join Date
- Jun 2011
- Location
- Jakarta
- Posts
- 5
- Rep Power
- 0
[Help]Make a Breakout Game - CS106A
Hello, programmers!
I take the free stanford CS106A course, however I take 1 month break and as a result I have a little remembrance on what I learn.
So I'm on breakout assignment right now, previously I just want to skip over due to its complexity but somewhat I'm just feel guilty to do it and I also do not want to copy other people's code.
I need your guide on how to decompose this problem. From the handout, I was told to build the brick first but sadly I don't know how to start. Indeed I'd build several programs from CS106A but it's still quite hard in this assignment on how to figure out the decomposition.
Could you give me a clue/hints?
Your help would greatly appreciated. Thanks :)
Java Code:/* * File: Breakout.java * ------------------- * Name: * Section Leader: * * This file will eventually implement the game of Breakout. */ import acm.graphics.*; import acm.program.*; import acm.util.*; import java.applet.*; import java.awt.*; import java.awt.event.*; public class Breakout extends GraphicsProgram { /** Width and height of application window in pixels */ public static final int APPLICATION_WIDTH = 400; public static final int APPLICATION_HEIGHT = 600; /** Dimensions of game board (usually the same) */ private static final int WIDTH = APPLICATION_WIDTH; private static final int HEIGHT = APPLICATION_HEIGHT; /** Dimensions of the paddle */ private static final int PADDLE_WIDTH = 60; private static final int PADDLE_HEIGHT = 10; /** Offset of the paddle up from the bottom */ private static final int PADDLE_Y_OFFSET = 30; /** Number of bricks per row */ private static final int NBRICKS_PER_ROW = 10; /** Number of rows of bricks */ private static final int NBRICK_ROWS = 10; /** Separation between bricks */ private static final int BRICK_SEP = 4; /** Width of a brick */ private static final int BRICK_WIDTH = (WIDTH - (NBRICKS_PER_ROW - 1) * BRICK_SEP) / NBRICKS_PER_ROW; /** Height of a brick */ private static final int BRICK_HEIGHT = 8; /** Radius of the ball in pixels */ private static final int BALL_RADIUS = 10; /** Offset of the top brick row from the top */ private static final int BRICK_Y_OFFSET = 70; /** Number of turns */ private static final int NTURNS = 3; /* Method: run() */ /** Runs the Breakout program. */ public void run() { GLabel welcome = new GLabel("Welcome to Breakout, Dude"); } public void gameSetup() { createBricks(); } private void createBricks() { } }Last edited by YLTO; 10-25-2011 at 04:06 PM.
- 10-25-2011, 04:13 PM #2
Re: [Help]Make a Breakout Game - CS106A
Sounds like you need to go back to the basics and play catch up. You can't just miss a month of your curriculum and expect to hit the ground running.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 10-25-2011, 04:33 PM #3
Member
- Join Date
- Jun 2011
- Location
- Jakarta
- Posts
- 5
- Rep Power
- 0
- 10-25-2011, 04:45 PM #4
Re: [Help]Make a Breakout Game - CS106A
Start from wherever you feel comfortable. If that's the beginning, then yes.
Think about it- if somebody is trying to learn calculus, they can't just skip algebra. If you're trying to learn how to program, you can't skip sections, or you'll have no idea what's going on. Even if we got this code to work for you, you wouldn't actually be learning anything.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Similar Threads
-
Breakout Assignment from CS106a
By tech8462 in forum New To JavaReplies: 13Last Post: 10-09-2011, 03:38 AM -
Breakout game in the assignment 3 cs106
By dage in forum New To JavaReplies: 5Last Post: 03-16-2011, 05:07 PM -
Making a breakout Game
By JavaIsSoEasy?? in forum Java GamingReplies: 0Last Post: 03-05-2011, 10:52 AM -
Need help with Breakout game
By tfitz666 in forum New To JavaReplies: 9Last Post: 03-22-2010, 05:26 AM -
Breakout Game code help.
By Ceasar in forum New To JavaReplies: 6Last Post: 10-10-2009, 01:30 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks