Friday, December 19, 2008

Merry Christmas

MERRY CHRISTMAS !!!


.

Monday, December 15, 2008

I'm not here...

I'm ill today.

You guys should keep working on your menus today.

If your sub catches you on youtube, she'll tell me and you'll lose the computer until next year.


.

Thursday, December 11, 2008

Monday, December 8, 2008

Fish Menu

You have the entire class period to work with your group on your menu design.

I will be checking the progress of each group on Wednesday. I want evidence that you were working for an hour.

Each of you should know exactly what you're doing before trying to actually code anything.

You should know where the code goes in the program, variables affected, pixel positions, box dimensions, mouse-over boundaries, colors, locations, text, everything.

I will ask each of you what grade you feel your group-mates deserve.


.

Fishy - Contd.

I hope your weekend was a gooooooood one. Only 2 weeks left before break. Woot!

Here's a working copy
of the current game code.

It assumes:
  • Player = (120 x 130)
  • Fish = (80 x 80)
  • Enemy = (120 x 130)
  • Beast = (120 x 80)

.

Thursday, December 4, 2008

Super New Ultra Evil Enemy

Take the first 20 minutes of class to add an additional enemy to your fish tank/ john stamos tank/ evil monkey [evil howard] tank/ hitler tank/ chuck norris tank/ etc. etc. etc.

Your new enemy should have:
  • 2 bitmaps
  • Motion/ action/ behavior that's somewhat different than the other enemies
  • Awesomeness

.

Wednesday, December 3, 2008

here micah

Mouse Controls

Today, we're going to add mouse controls to the current game.



.

Tuesday, December 2, 2008

here

Fish Main

Here's a working copy of the Fish code from last week.

We're going to be adding to it so take a minute or two to make sure that your code is working.


Wednesday, November 26, 2008

HAPPY THANKSGIVING!

Happy Turkey Day!

Have a great break!

Stay out of trouble. Stay warm. Be safe. Have fun. Get stuffed.


.

Monday, November 24, 2008

Fishy

Using THIS CODE, add detailed and appropriate comments.

Upload when you're done.


.

Friday, November 21, 2008

Allegro @ Home

To get allegro cooking @ home, first you'll need MS Visual C++ Express 2008

Allegro Installation


0) Copy the files:
  • Copy the contents of the include folder to C:\Program Files\Microsoft Visual Studio 8\VC\include
  • Copy the contents of the lib folder to to C:\Program Files\Microsoft Visual Studio 8\VC\lib

2) Extract all files into c:\

3) Run c:\allegro\build\pre-build-msvc.bat

4) Open c:\allegro\build\msvc8\Allegro.sln. Finish conversion. Click Build / Batch Build. Check all versions. Wait for build to finish.

5) Copy the files:
  • Copy the contents of C:\allegro\include to C:\Program Files\Microsoft Visual Studio 8\VC\include
  • Copy the .lib files from C:\allegro\lib\msvc to C:\Program Files\Microsoft Visual Studio 8\VC\lib
  • Copy the .dll files from C:\allegro\lib\msvc to C:\Windows\System32
6) Start a new *empty* c++ project then add a main source file.

7) Click Project / Properties. Click Configuration Properties / Linker / Input. Add alleg.lib to Additional Dependancies.

8) Now we're ready to program using Allegro.

9) We're going to start with a few tutorials.

10) Finally, we master the universe.


.

Wednesday, November 19, 2008

The Goulish Goldfish

We're going to need this code...

(thanks Micah)
.

Pong V2.0

Your Pong game is due at the start of class tomorrow. When you're done, I want your program files uploaded in a compressed (zipped) archive; I ONLY want your .cpp, .bmp, & .wav files. Also, you must make sure that the zipped archive is smaller than 2Mb.

Your Pong code should have the following:

  • Keep track of the current score.
  • Keep track of the current number of times the ball has hit the paddle; reset this number when somebody wins.
  • There should be a sound played when the ball strikes a paddle.
  • There should be a different sound played when the ball strikes a wall.
  • There should be a sound played when a player wins.
  • There should be a background image.
  • The paddles should be replaced by similarly sized bitmap images.
  • The ball should be replaced with a similarly sized bitmap image.
  • The rest time in the main logic loop should get shorter as the number of hits increases.
  • Add something *else* to make your Pong game unique.

  • .

    Friday, November 14, 2008

    Hong Pong Phewey

    Answer the following in a comment to this blog:
    1. What are the 4 parameters for the function draw_sprite()?
    2. What are the 5 parameters for the function play_sample()?
    3. What are the x and y coordinates of the upper-left corner of any bitmap?
    4. What code would you use to randomly generate a number between 1 and 480?

    You'll need THIS IMAGE FILE later in class.


    .

    Wednesday, November 12, 2008

    ? Pong ?

    Answer the following questions concerning the pong code in a comment to this blog.

    1. What is the screen resolution?
    2. How large are the paddles? (length & width)
    3. How many functions are we using?
    4. If dir = 4, is ball_x getting larger or smaller? What about ball_y?
    5. How do you generate a random number between 2 and 4?
    6. Explain why we use a screen buffer.

    .

    Tuesday, November 11, 2008

    Pong v2.0

    We'll be making the following additions to the PONG CODE we began yesterday. We'll be spending a few days on this.
    1. Keep track of the current score.
    2. Keep track of the current number of times the ball has hit the paddle; reset this number when somebody wins.
    3. There should be a sound played when the ball strikes a paddle.
    4. There should be a different sound played when the ball strikes a wall.
    5. The paddles should be replaced by similarly sized bitmap images.
    6. The ball should be replaced with a similarly sized bitmap image.
    7. The rest time in the main logic loop should get shorter as the number of hits increases.

    .

    Monday, November 10, 2008

    Pong

    Pong - parft deux


    .

    Tuesday, November 4, 2008

    Pong

    We're going to start pong today.


    .

    Monday, November 3, 2008

    Color Test

    Get your Allegro notes opened.

    Get your Color Test code opened.

    We're going to finish the program today.


    .

    Friday, October 31, 2008

    Friday

    I'm out of the building today.

    Your day has 3 assignments:

    1)  Complete the worksheet plotting points (A-L) on the page, assume a resolution of 1024 x 768.

    2)  Complete the worksheet on loops.

    3)  Finish your color test program, upto and including the reset button, you do not need to worry about the random button's functionality, just make sure that it's there.


    .

    Thursday, October 30, 2008

    Mouseplay

    Answer the following questions in a comment to this blog:
    1. What reserved variables describe the location of the mouse cursor?
    2. What reserved variable describes the state of mouse buttons?
    3. What function describes the speed of the mouse cursor? 

    Take 10 minutes to get your program from yesterday working.


    .

    Wednesday, October 29, 2008

    Allegro - Mouse

    We're going to be continuing with Allegro mouse controls.


    .

    Tuesday, October 28, 2008

    Allegro

    Today, we're going to be adding to our Allegro notes page.

    At the end of class, UPLOAD your amended notes.


    .

    Friday, October 24, 2008

    Test

    You have the entire class period to complete your 9wks test.


    .

    Wednesday, October 22, 2008

    Review

    Today, we're reviewing for Friday's test.


    .

    Monday, October 20, 2008

    Allegro Notes

    Today, you're responsible for turning in notes over Allegro basics.

    Create a text (or Word) document and save it as "Allegro Notes". 

    You will be uplaoding this file at the end of the day today.


    Wednesday, October 15, 2008

    Allegro Assignment

    Using the resources linked previously, Your assignment is to write a program using Allegro which contains the following:
    • 3 circles
    • 3 rectangles
    • 1 triangle
    • 1 line of text

    Upload your main.cpp using a description "allegro shapes".


    .

    Tuesday, October 14, 2008

    Allegro

    We're going to review The Allegro lessons from yesterday.


    .

    Monday, October 13, 2008

    Allegro

    You’re assignment today is to begin reading and working through these Allegro C++ tutorials:Allegro Basics 
    You can access each tutorial by using the menu in the upper left hand corner; under "Allegro Lessons". 

    When you begin an Allegro Project, after you start a new project, and add a piece of source code, you must link the allegro library.
    To do this, you must go to the menu bar and click "Project", "... Properties", then add "alleg.lib" to the "Additional Dependancies" field under "Input" under "Linker" under "Configuration Properties". Check out the following screenshot.
     

    For each section, you must upload your main.cpp file; make sure that you include the tutorial section (Allegro Basics, I/O, Drawing Primitives, Drawing Graphics From Files, Animation, Backgrounds, Mouse, Animation II) in the description field when you upload. I expect you to actually READ these. 

    Be prepared to answer questions about Allegro tomorrow. I expect you to get all of these read, compiled, and uploaded.


    .

    Thursday, October 9, 2008

    Loop 2


    What is output to the console screen after running the following program? Post a comment to this blog with your answer.

    Loop ?

    What is output to the console screen after running the following program? Post a comment to this blog with your answer.




    .

    Tuesday, October 7, 2008

    Brake Check

    I know that I've been teaching kind of fast with this C++ business. I'm going to slow up a bit and spend a few days reviewing what we've covered so far.


    .

    Monday, October 6, 2008

    Here's PI

    Here's PI

    Fibonacci Solution

    To start off the week, I'm going to write the code from last week's assignment.

    I'll then write a similar program for calculating Pi. We'll need this info...


    .

    Wednesday, October 1, 2008

    The golden function

    Your assignment today involves the mystic Golden Ratio. Here's you assignment for today. Once you're finished, upload your main.cpp file.


    I'm feeling cheritable this morning, so here's the function that you should use:



    Ultimately, your program output should look like this:



    .

    Loops




    Submit your responses in a comment to this blog.

    .

    Tuesday, September 30, 2008

    Quizlet

    Do not compile this code. What is output by the program? Submit your answer in a comment to this blog.

    int n=2;

    for(int i=0; i<=5; i++)
    {
        n = (n * 2) - n + i;
    }  
    cout << n;

    .

    Monday, September 29, 2008

    Functions & Top-Down

    We're going to start off the week with an excercise over functions.

    Then, we're going to practice a little top-down programming. I'll demonstrate the process first then I'll let you guys try it your selves.


    .

    Friday, September 26, 2008

    BPA Duties

    For each of your BPA events, write a detailed paragraph containing the following in a comment to this blog:
    • What is the event?
    • What are your specific responsibilities for this event?
    • What are you currently doing to prepare for this event?
    • What will you need to do to prepare for this event?
    • What do you need/ want from me to better prepare for your event?
    • On a scale of 1 - 10, how seriously are you taking this event?

    .

    Thursday, September 25, 2008

    ?Estoy no aqui?

    I'm not here today.

    Your assignment is to write a program named math which inputs 2 integer numbers (a and b), then outputs the sum (a+b) of those numbers, the difference (a-b) of those numbers, the product (a*b) of those numbers, and the ratio (a/b) of those numbers.

    Each of the mathematical operations should take place in a function of its own. The return value should be the result of the mathematical operation.

    Upload your main.cpp file by the end of class, whether you're done or not.

    Refer to the online tutorial located at http://www.cplusplus.com/doc/tutorial/functions.html


    .

    Wednesday, September 24, 2008

    Conjnction Function, What's Your Gumpsion

    Today we're going to go over the solution for the 2 programs then we're going to introduce functions in c++.

    Tuesday, September 23, 2008

    Countdown & Countskip - Seriously

    I need the main.cpp files for the countdown and countskip.

    Upload your main.cpp file, uncluding the program name (countdown or countskip) in the description field.

    You need to reupload both main.cpp files because I cleared out the HW dropbox.


    .

    Monday, September 22, 2008

    Guuten Taag

    Today, we're finishing countdown & countskip.

    Upload your main.cpp file, uncluding the program name (countdown or countskip) in the description field.



    Friday, September 19, 2008

    Loops 3 & 4

    You have to complete Loops 3 & Loops 4 today. You must also complete countdown & countskip.


    .

    Thursday, September 18, 2008

    Loops!!!

    I need to check your progress on the Loop assignments...



    .

    Sunday, September 14, 2008

    The next 2 days...

    I'll be out of the building Tuesday & Wednesday. So here's what we're doing the next few days:
    Tuesday:

    Wednesday:


    .

    Friday, September 12, 2008

    Quiz

    Click here to download your quiz.

    After you're done, save a copy of your quiz onto your flash drive (don't change the name) then upload your quiz.

    For the rest of class, work on your programs.


    .

    Wednesday, September 10, 2008

    Back to our assignment...

    Just a reminder, we have a quiz tomorrow!!!

    Here's the link to a zip containing some MSVS settings. 

    Today you guys are going to work on the 4 programs assigned a few day ago.

    I'm expecting you guys to stay on task!!!

    No music, no chatting, no games, no joke.

    I'm not above pulling your internet cables if this remains a problem. First work, then play.


    .

    Tuesday, September 9, 2008

    Slow My Roll...

    OK... I think it would be helpful to everybody if I slowed things up a bit and presented a couple loop demos...

    Put those 4 programs on hold and just pay attention for a bit.

    Here are the programs I'm writing:
    • Loops-1
    • Loops-2
    They're located at howardm.com, under docs.


    Control Structure Programs

    You have until the end of class to finish up the 4 short programs assigned yesterday.

    When you're done with each program, go ahead and upload each individually. Make sure that in the uplad description, you include what program number the file pertains to (1, 2, 3, 4).


    .

    Monday, September 8, 2008

    Programs...

    1) Write a program named for_you which displays "Loops are awesome" 100 times. You must use a for loop.

    2) Write a program while_you which displays "Loops are awesome" then waits for the user to strike a key. If the 'q', 'Q', 'w', or 'W' key is entered, repeat the display, "Loops are awesome". You must use a while loop.

    3) Write a program named for_me which displays "Loops are awesome" 100 times. You must use a while or do-while loop.

    4) Write a program while_me which displays "Loops are awesome" then waits for the user to strike a key. If the 'q', 'Q', 'w', or 'W' key is entered, repeat the display, "Loops are awesome". You must use a do-while loop.

    These programs are due at the end of class tomorrow.
    .

    Control Structures

    After a brief presentation using the online tutorial, answer the following questions.

    1) What are the 3 main methods for looping in c++?

    2) How are while, and do-while loops different?

    3) What are the 3 main parts of a for loop?


    .

    Thursday, September 4, 2008

    Honestly, Basics Review

    Like I was saying, to startoff, we're going to review what we've covered thus far.

    We'll be kinda following the tutorial linked in yesterday's blog.

    With any luck, we'll be through control structures before your test next week.


    .  

    Wednesday, September 3, 2008

    Basics Review

    We're going to spend some time today reviewing what we've learned so far...

    I'm going to use an online tutorial to do this...

    Check the Links section for more tutorials.



    .

    Age Program

    We're continuing on with the program from yesterday. The pseudocode is up on the board still. You shouldn't have any problems getting finished by the end of class.

    Make your program as complete and neat as possible. Make your actual code as clean and neat as possible. Make yourself as clean and neato as possible. Make me a sandwich.

    Upload your CPP file when you're done. Make sure that you provide a description for your file; otherwise, I end up with a zillion files named main.cpp.


    .

    Monday, September 1, 2008

    Data...

    Answer the following in a comment to this blog:

    What variable type should be used to store the following:
    1. The number 3
    2. The letter 'p'
    3. The number 5.775
    4. The word 'fajita'
    When a user is 'prompted' for information, what 2 c++ commands are used?

    Why is a rabbit as it spins?


    .

    Thursday, August 28, 2008

    TGI Today

    After I take attendance, I'll answer any questions you have about operators. I'll then post the quiz, as promised.

    After you finish the quiz, you'll have the rest of the class to work on the coin program.

    After your program is complete, be sure to upload main.cpp from the coin project using both your and your partner's last name.


    .

    Operator Quizlet

    Post a comment to this blog answering the following questions (copy & paste the questions):
    1. State the purpose of ++
    2. State the difference between = and ==
    3. State the result of 14 % 3
    4. State the operator which expresses not equal to

    .

    Operator, are you there?

    We're going to learn about operators today.

    Copy and paste the following into a comment to this blog. After each operator, provide a definition for it. Submit the comment after today's lecture.

    Mathematical:
    +
    -
    /
    *
    %
    ++
    --

    Assignment:
    =

    Comparison:
    <
    >
    <=
    >=
    !=

    Boolean:
    &&
    ||

    Wednesday, August 27, 2008

    program from yesterday

    /* Mr. Howard
    pizza program
    program to be used at a pizza joint cash register */

    #include
    using namespace std;

    int main()
    {
    int menu_choice;
    float cost;
    char answer;

    do
    {
    do
    {
    cout << "******** MENU ********\n"; cout << "1) Small Pizza\n"; cout << "2) Large Pizza\n"; cout << "3) Breadsticks\n"; cout << "4) Dozen Wings\n"; cout << "5) Jojo's\n"; cout << "6) Calzone\n"; cout << "7) Soda 2litre\n\n"; cout << "Please choose your item: "; cin >> menu_choice;

    if (menu_choice == 1)
    {
    cost = cost + 8.75;
    }
    else if (menu_choice == 2)
    {
    cost = cost + 11.25;
    }
    else if (menu_choice == 3)
    {
    cost = cost + 3.50;
    }
    else if (menu_choice == 4)
    {
    cost = cost + 7;
    }
    else if (menu_choice == 5)
    {
    cost = cost + 4.5;
    }
    else if (menu_choice == 6)
    {
    cost = cost + 9;
    }
    else if (menu_choice == 7)
    {
    cost = cost + 2.25;
    }
    else
    {
    cout << "Invalid choice. Try Again.\n"; } cout << "Would you like to add more items? (y/n) "; cin >> answer;
    } while(answer == 'y');

    Tuesday, August 26, 2008

    Pizza Continued. DunDunDuuuun...

    First, we're going to be finishing the program from yesterday. Good fun.

    Then we're going to learn about operators. [note- no at&t employees will be harmed during this lesson]


    .

    Pepperoni Pie in Your Eye

    Goal #1: I want you to transfer all your msvc++ projects to your flashdisk. That means remove them from "My Documents" and onto your flashdisk. Subsequent projects will all be saved there.

    Goal #2: Learn the super-useful "if" statement.

    Goal #3: We're going to write a program which could be used by a pizza joint to total up a customer's order. The program must have at least 7 menu items with prices. The user must be able to add multiple items to the customer's order. At the end of the order, the program should show the total cost (with the associated 5.5% sales tax [dine-in obviously]). After that customer's order is totaled, the program should repeat so that more orders can be taken for new customers. We'll write the pseudocode for this program together. This is due at the end of class tomorrow.


    .

    Monday, August 25, 2008

    if (Good Day == Guten Tag) {you = german;}

    Last week, we wrote our first program, hello world.

    We're going to pick up right where we left off. Go ahead and get msvc++ fired up and start a new project.

    Today's task is to write a program which prompts the user for a radius and calculates circumference, area, and volume for circular shapes.


    .

    Friday, August 22, 2008

    Microsoft Freebies

    We're starting off the day by installing Microsoft Visual C++ Express Edition and the Microsoft DirectX Software Developers Kit.

    Links to these 2 items can be found @ my links page.

    Go ahead and install these.

    We're going to spend the rest of the day writing the infamous "Hello World" program.

    Muhuhahaha!!!


    .

    Wednesday, August 20, 2008

    G'ed up from the feet up...

    Your first assignment:

    Get an account through Google; this account must have your real name associated with it. If you already have a Google account, just make sure that your real name is associated with it.

    After signing up with Google, use your login and password to post a comment to this blog entry with the following information:

    1) Your name
    2) Your parent's name(s)
    3) Your home phone number
    4) Your mailing address address
    5) Your email address
    6) Whether or not you have computer and internet access at home
    7) Your hobbies (please dont shock me!)

    This assignment should be an easy 'A'


    .

    Tuesday, August 19, 2008

    Welcome Back

    This is the blog page for Video Game Design 1 (VGD1) for the 08-09 school year.

    Check this page daily for assignments, resources, and whatever insanity I my post here on a daily basis.

    Bookmark this page!!!

    We're going to be going here: howardm.com


    .