Public Group

# How much have I really learned?

This topic is 3488 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

So I've been programming basic console programs for about a year now in C++. I've been using C++ for game developers module 1 by Frank Luna. And studying basic console programming from tutorials, video tutorials, even different books. Just to kinda get a different explanation on something I don't fully understand. Like I said I've been going at it for a year now and it feels like it's been an eternity. But my point is that before I seriously dive into actual Win32 API programming or even Direct3D. My main concern is that am I jumping the gun to fast? So I thought to determine that I would like someone to give me a task / program to write not something like an RPG that would take a whole day or even days to write. Something simple and a little trivial (I SAID A LITTLE, my brain cannot take too much). Then I will post the code up in a reply (or maybe I'll put it on pastebin, or send the files on a file hosting website and let you download it, whatever is the easiest for you cause I actually want you to help me :P). And then by looking at that code and seeing if I can actually complete the program determine just by one little program if I'm ready to move on. And you don't have to sit there for an hour looking over the code..... just off the top of your head see if I know my stuff. P.S. this can't be anything related to graphics only console programming. Thanks in advance to anyone that is willing to help!

##### Share on other sites
I think part of programming (and more generally any skill) is knowing what you know, what general directions exist that you don't understand and might be interested in, and what steps you can take to improve in a certain direction. It seems to me very hard for someone else to aid very much in that process unless they're really involved in working with you over a longer period or unless your request is very specific (eg, "What's a good tutorial for basic windows programming?"). Moreover, it's not particularly important what other people think of your skill level or your pace. If you try to do something too hard for you, you'll know really quick. The one thing I would avoid is doing something that's a great deal of effort (like building a huge RPG game with a complex story, etc) that doesn't really get at what you actually want to learn.

If you'd like to learn windows programming, grab a book about windows programming or search the web for tutorials. Start with hello world and then expand from there. If you want to learn DirectX, grab a book about DirectX. Display a rotating cube. Expand on that. Be creative in generating projects you'd like to program. =)

##### Share on other sites
it's hard to create a task that will test the spectrum of c++ programming that can be done in a day without it being very much like a university coursework ;)

have you done a tic-tac-toe game? how about using something like alegro to make a space shooting game (I believe frank d luna has an example program that draws a map of space with moving stars (full stops). you could expand this to include enemies, power ups, etc.

##### Share on other sites
Quote:
 Original post by Roberts91So I thought to determine that I would like someone to give me a task / program to write not something like an RPG that would take a whole day or even days to write.

Sorry to break it to you, but if you think a program which takes "a whole day or maybe even days" to write is excessive, then I highly doubt you have learned anything worthwhile. Programming isn't magic - it takes time. Lots of time for almost any useful program.

That said, maybe you should just "buckle-down" and make an RPG or something. You can't learn the hard parts of program by writing one-shot programs that take an hour to write and you never touch again. So go and write that program that takes long enough to write that you've forgotten what your original code intended when you next use it. Make it big enough that you get some real bugs and get that experience using your debugger. But most importantly, make it interesting to you so that you keep on working on it.

Well, that's how I see it anyway.

##### Share on other sites
just an idea but a text base game (No graphics) is a good idea. It doesn't have to RPG but a mystery or something. I have this great book and one of the final projects if a text base game with inheritance and all those higher up C++ stuff. I'm still new to C++ so I haven't got to that stuff but I think text games are great for non-graphic games. Even a card game like black jack is good.

##### Share on other sites
For text, you can try tic-tac-toe, guess the number, rock paper scissors, and hangman. Most of these could probably be made in less than a day.

##### Share on other sites
I also suggest Black jack because it used Inheritance and Polymorphisms.

##### Share on other sites
@jdinia so you think that I should go ahead and dive into C++ for game developers module 2 (module 2 starts on the win32 api and you eventually create games like pong, a hockey game, and all sorts of other stuff in that book)?

@Ezbez - no don't get me wrong as I have wrote several simple to even quite complex text RPG's just using the knowledge I have. It's just for this certain task that I didn't want to write something complex. Like let's say if your applying for a job and the hiring manager or whatever asks you to create a demo showing what you know. He wouldn't ask you to make a MMORPG. Instead he would ask for a simple demo. Not something thats going to take him forever to write. Believe it or not a huge program doesn't really show off your knowledge only that you can manage code well. IMO

##### Share on other sites
What I suggest you do is look into websites that have programming challenges. They are typically small and quick ways to see if you can break down problems and create an algorithm to solve it. Remember that programming is not all about memorizing a language, in fact it is mostly about taking problems and creating the algorithms to solve them using a language. I suggest a google search for some websites, or you could give this one a try:

If you have any trouble or want us to go over your solutions for the challenges then by all means make a post here in the beginners board and we can "critique" you.

##### Share on other sites
@mich4elp I have taken your challenge and I wrote Guess the Number here is the code:

// Guess the Number v1.0 by Roberts91#include <iostream>#include <cstdlib>#include <ctime>using namespace std;int main(){		srand( time(0) ); 	int n_random = rand() % 100;	bool quit = false;	int g_number = 0;	cout << "Welcome to Guess the Number v1.0!\n";	while(quit == false)	{		cout << "Please enter a number from 1 to 100: ";		cin >> g_number;		if(g_number == n_random)		{			cout << "Congrats you are correct!" << endl;			quit = true;		}		else if(g_number > n_random)		{			cout << "You guessed to high!" << endl;		}		else if(g_number < n_random)		{			cout << "You guessed to low!" << endl;		}	}}

It was a little simple to write so I'm gonna give a go at the Rock Paper Scissors game. I would do the Tic-Tac-Toe and hangman games as well but I think the only real way you can make a game like that is either using a graphics library or using ASCII graphics but since I don't know how to do either I'll stick with the other 2. Though I do have a good idea on how the ASCII graphics could be implemented I just wouldn't know how to keep the graphics "statically" drawn onto a console window. I'll update this post when I've completed the Rock Paper Scissors game.

Update:
Okay before I post this code I just want to say when I was thinking up on how I could determine if the computer beat the player or vice versa. Well let's just say it's a really cheap way of doing it and it was the first thing that came to my mind. There are probably a thousand better ways of doing it but atleast it works :P.

Rock Paper Scissors:
// Rock Paper Scissors v1.0 by Roberts91#include <iostream>#include <cstdlib>#include <ctime>using namespace std;int main(){	srand( time(0) );	int selection = 0;	int random = 1 + rand() % 3;	cout << "Welcome to Rock Paper Scissors v1.0!\n";	cout << "Please select one of the following 1) Rock, 2) Paper, 3) Scissors.\n";	cin >> selection;		// For when there is a tie.	if(selection == random)	{		cout << "It's a tie! No one won!" << endl;	}	// For when the computer beats the player.	else if(		(selection == 1 && random == 2) ||		(selection == 3 && random == 1) ||		(selection == 2 && random == 3))	{		cout << "Sorry you lose!" << endl;	}		// For when the player beats the computer.	else if(		(selection == 1 && random == 3) ||		(selection == 2 && random == 1) ||		(selection == 3 && random == 2))	{		cout << "Congrats you win!" << endl;	}}

P.S. tell me what you think

[Edited by - Roberts91 on December 25, 2008 11:52:59 PM]

1. 1
2. 2
Rutin
19
3. 3
JoeJ
16
4. 4
5. 5

• 36
• 23
• 13
• 13
• 17
• ### Forum Statistics

• Total Topics
631703
• Total Posts
3001816
×