User Tools

Site Tools


haas:fall2023:discrete:projects:ttb1

Corning Community College

CSCS2330 Discrete Structures

PROJECT: Transition To Breakout (TTB1)

OBJECTIVE

With a functioning breakout game, implement using bitwise logic some sort of featureset (power-ups, attributes) that can impact the game during gameplay (at least 8 unique features)

Include features that are mutually exclusive (ie incompatible to be simultaneously enabled), and implement checks to prevent invalid feature conditions from occurring.

EDIT

You will want to go here to edit and fill in the various sections of the document:

TTB1

BITWISE LOGIC

BITWISE AND

Bitwise AND uses the “&” symbol. It checks if the two inputs are numbers and if so then it gives back a 1.

For example if we have an int set to 12 and an int set to 6 if we preform a bitwise & operation on them the result would be a 0100. 12 in binary is 1100 and 6 in binary is 0110.

12 6 6&12
1 0 0
1 1 1
0 1 0
0 0 0

In this example of bitwise & gives us the result as 4. You can test this out yourself in code.

    int num1 = 12;    // Binary: 1100
    int num2 = 6;     // Binary: 0110
    int result = num1 & num2;  // Perform bitwise AND operation
 
    printf("num1: %d\n", num1);
    printf("num2: %d\n", num2);
    printf("result: %d\n", result);

it prints out the result as follows:

num1: 12
num2: 6
result: 4
BITWISE OR

Bitwise OR uses the “|” symbol. It checks if the either of the two inputs are not zero and gives a 1.

12 6 6 or 12
1 0 1
1 1 1
0 1 1
0 0 0

In this example the result of 12 or 6 is 14.

BITWISE XOR

Bitwise XOR uses the “^” symbol. Returns 1 only if the 2 bits are different.

12 6 6 or 12
1 0 1
1 1 0
0 1 1
0 0 0
BITWISE NOT

Bitwise NOT uses the “~” symbol. It inverts all the bits in a single number.

12 ~12
1 0
1 0
0 1
0 1

POTENTIAL FEATURES

LARGER PADDLE

To make a larger paddle, all you'd have to so is extend your paddle collision to double the length of your paddle and draw a second paddle where the first one ends, or alternatively use a different paddle sprite

You can use the same select region to draw both paddles, like so

  select_region( Paddle );
  draw_region_at( PaddleX, PaddleY)
  draw_region_at( PaddleX + [paddle length], PaddleY)

Where [paddle length] is the length of the paddle

PADDLE MAGNET
BRICK HIT POINTS

To code in multiple hit points for bricks, your brick struct should include an integer member for HP and visibility.

Within your calculations for ball-brick collision, make a check to see if the current brick is visible (if not, do not process collision detection). If collision is detected, decrement the brick's HP. If HP is 0 after it is decremented, then toggle the brick's visibility.

INVINCIBLE BALL
 

SUBMISSION

To be successful in this project, the following criteria (or their equivalent) must be met:

  • Project must be submit on time, by the deadline.
    • Late submissions will lose 33% credit per day, with the submission window closing on the 3rd day following the deadline.
  • Executed programs must display in a manner similar to provided output
    • output formatted, where applicable, must match that of project requirements
  • Processing must be correct based on input given and output requested
  • Output, if applicable, must be correct based on values input
  • Code must be nicely and consistently indented
  • Code must be consistently written, to strive for readability from having a consistent style throughout
  • Code must be commented
    • Any “to be implemented” comments MUST be removed
      • these “to be implemented” comments, if still present at evaluation time, will result in points being deducted.
      • Sufficient comments explaining the point of provided logic MUST be present
  • No global variables (without instructor approval), no goto statements, no calling of main()!
  • Track/version the source code in your lab46 semester repository
  • Submit a copy of your source code to me using the submit tool by the deadline.

Submit Tool Usage

Let's say you have completed work on the project, and are ready to submit, you would do the following:

lab46:~/src/SEMESTER/DESIG/PROJECT$ submit DESIG PROJECT file1 file2 file3 ... fileN

You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.

RUBRIC

I'll be evaluating the project based on the following criteria:

39:ttb1:final tally of results (39/39)
*:ttb1:functional breakout game [13/13]
*:ttb1:bitwise logic transacted featureset [13/13]
*:ttb1:features integrated into game [13/13]

Pertaining to the collaborative authoring of project documentation

  • each class member is to participate in the contribution of relevant information and formatting of the documentation
    • minimal member contributions consist of:
      • near the class average edits (a value of at least four productive edits)
      • near the average class content change average (a value of at least 1024 bytes (absolute value of data content change))
      • near the class content contribution average (a value of at least 1kiB)
      • no zero-sum commits (adding in one commit then later removing in its entirety for the sake of satisfying edit requirements)
    • adding and formatting data in an organized fashion, aiming to create an informative and readable document that anyone in the class can reference
    • content contributions will be factored into a documentation coefficient, a value multiplied against your actual project submission to influence the end result:
      • no contributions, co-efficient is 0.50
      • less than minimum contributions is 0.75
      • met minimum contribution threshold is 1.00

Additionally

  • Solutions not abiding by spirit of project will be subject to a 50% overall deduction
  • Solutions not utilizing descriptive why and how comments will be subject to a 25% overall deduction
  • Solutions not utilizing indentation to promote scope and clarity or otherwise maintaining consistency in code style and presentation will be subject to a 25% overall deduction
  • Solutions not organized and easy to read (assume a terminal at least 90 characters wide, 40 characters tall) are subject to a 25% overall deduction
haas/fall2023/discrete/projects/ttb1.txt · Last modified: 2023/09/24 16:48 by 127.0.0.1