Wednesday, October 29, 2014

Updates!

Wow!  It's been a busy few months! I've had to scrap a few projects, but have started on a lot of new, more practical ones.

The first major announcement is that I'm back in school as a Computer Science major.  I started in a program that similar, but it just didn't cover what I wanted it to, so I changed my major, and I'm glad I did.  I took Computer Science I this semester.  I knew it would cover a lot of stuff that I knew but I was hoping I'd get something out of it.  To GameInstitute's credit, so far in class I've only learned a few things about C++ that I didn't know already.  I probably should have inquired about a placement test.

One project permanently scrapped is the game I had decided to write on my own.  With what I've learned, I should be able to make a graphical version of it that would be a lot more interesting.  It may take a while, because there's still a lot to learn, but it will come.  I've also decided to put off the 3D modeling for a while.  I've learned some stuff I'll get into shortly, but I've decided that 3D is going to wait while I work on what I'm doing now and become more proficient.

I am still chugging along on GameInstitute's courses, and I've learned a TON!  I've learned some Windows API stuff, so I can now write programs in Windows!  That's extremely fun, because I'm no longer limited to text-only programs.  It surprised me how much code goes into making a simple window that doesn't even do anything except show up, but there are a lot of options that a window can have that you don't really notice when you're using Windows unless you're looking for it.

I've also started to learn how to draw things to a window, and even move them across the screen in animation!  It's pretty cool the way things are coming together.  I've learned how to draw some primitive objects like rectangles, ellipses, and lines by using the Windows API code, but what's even more exiting is that I've learned to draw sprites.  In other words, I can take an image of something and integrate it into my program.  That means I can use custom images to represent objects in the program, rather than relying on basic objects that can be drawn by the API I'm using.  I'll be writing a post on sprites in the near future, because I think the concept behind them is fascinating.

So, using all the stuff that I've learned about Windows and graphics, this last chapter has been really cool.  The homework is challenging, but I'm making a lot of progress and learning a lot on the way.  The one program I've finished is where I had to make a ball travel across the screen and bounce when it hits the edge of the window.  It reminds me of something that would have been an early screensaver.  I decided to take it a step further and use random numbers to give the ball a new direction and speed every time you hit the space bar.

The latest project I'm working on is a version of Pong.  This is more difficult because I really haven't learned anything about collision yet.  I've got the graphics displaying, and some of the game working.  At the moment, the ball will be served from the center of the screen at a random angle when you hit the space bar, and the play stops when the ball hits one of the sides of the window.  The ball bounces if it hits the top or bottom.  Also, depending on which side the ball hits, the other player gets the ball served to them next time the space bar is pressed.  The player's paddle moves, but there is no code yet to handle the ball hitting the paddles.

Here's the list of things I still need or want to implement. Please comment if you have any other ideas! :)

/*

    To do list:



    Work on collision system

        -Paddle collision

        -Paddle position affects ball velocity

        -Paddle collision for top and bottom of window

        -Finalize ball speed

        

    Mouse support

        -Set paddle to use mouse for movement

        -Make sure the game continues to use mouse 

            input even when mouse is outside window



    AI

        -Set the AI paddle to try to move up when ball is above it

            and down when below.



    Score system

        -Display score for player and AI on screen

        -Set game to end and restart when one side

            reaches 10 points



    Themes

        -Have menu selections load new sprites into

            the global objects

*/

No comments:

Post a Comment