OK so about a year ago I had started to learn programming on my own, but this year I signed up for 'Computer Programming 1A' at school and all I have to say is...I won't really have anything to do for the rest of the year (lol)
So anyways here's why that was important. With all the free time I've had in that class I've been messing around with C++ and making a couple of projects, two of which I called 'Space Shooter' and 'Base Converter' and I thought it would be fun to see different people's methods of making them. In this post I will explain 'Space Shooter' and provide a link to download my example.
I am not going to post my code for them because it is pretty long and messy, so I'd rather spare you guys the trouble of trying to understand my poor organization. If anyone wants to see it, though, I'd be glad to post it. Also, I'm sorry if I'm too vague...I'm reaallly introverted so I tend to assume everyone knows what I'm thinking...do not hesitate to ask me if you have any questions.
Now on to 'Space Shooter':
REQUIREMENTS:
Fundamentals of C++, at least until structs and classes I'd say. I've seen those in the videos by antiRTFM so watch them if you don't know. Also, being able to make your own custom hearer would help with organization, but it is not necessary at all.
HEADERS THAT WOULD BE USEFUL:
<iostream>
<conio.h>
// I do not know if <conio.h> has been covered in the videos...but basically all you *might* need from it is getch().
// Of course, it all depends on how you do this project so it is all up to you what to use.
GAME BOARD/ARENA SETUP:
1. The way I did it is I made a 25x80 matrix, which would be the standard dimensions for a console application.
2. HINT: You cannot visibly print out a null character ('') so making the space (' ') your default character for the matrix might help you.
MOVEMENT:
1. Space Shooter must allow the user to be able to move around the screen.
2. EXTRA: add diagonal movement (at one press of two keys)
3. ALTERNATIVE: add four extra keys for diagonal movement instead of a combination of two.
SHOOTING:
1. The player should be able to shoot 'bullets' out of his space ship (or whatever your vessel happens to be, mine was a smiley face).[/b]
2. HINT: It would help if you created two separate functions:
a) One function to set the shot.
b) One function to shoot the shot forward.
3. EXTRA: Turrets (automatic shooters) could be set up by the player. In my case they shot every time the player would shoot, but you
could make them shoot completely independent of the player.
ENEMY:
1. There should be enemies on the screen that you can shoot.
2. A score system would be ideal here.
3. EXTRA: give the enemy/enemies moving abilities.
4. EXTRA: program a 'super enemy' that has artificial intelligence and is able to dodge bullets.
5. EXTRA: give the enemy a 'search&destroy' attitude and/or the ability to shoot in special circumstances.
If you are new to C++ this will probably be an unbeatable challenge to you, unless you have a mentor that could help you every step of the way. For those that think they have an idea on how to do this, I encourage you to do so and I hope you will post it here when you are finished. For the others who are completely stumped, do not bother yourself with this and go practice a simpler project or learn more C++ until you think you are ready. I, myself, am still somewhat of a 'n00b' to C++ but I think this is a good idea for people to practice making a project larger than a simple program.
Here is the link to my example: http://rapidshare.com/files/163901238/Space_Shooter.rar
*Code not included unless requested. I'd rather you guys do this on your own though.
