Need LOTS of help making a game in C++

Hi all,

I am a complete beginner at C++, and need to make a game with the theme rolling. I have to do this because im aplying for a study. (cant believe they ask complete beginners with no or very little knowledge of making a game, let alone c++) But i cant seem to find the tutorials that i need.

Explaination of what i want to make.

Maybe you know the flash game pixel jump, but that's bassically it.

You have a ball that is moving right constantly and you can jump. The platforms are made out of tiles and when you passed them they will dissapear. The ball can also fall off the platform which makes the game reset. you can finnish the level by touching a point (for instance a simple green square)

Now i get that this is like asking someone if he/she wants to give me all the code needed. But that is not my intention. I do want to learn from it.

reason why im not reading a book about c++ is, well, i simply dont have the time for it. because there is a deadline. Also i read 4 chapters and done the exercises, but it's not focussed on making a game. Ok enough jibber jabber!

Again what i want to know is:

- How to make the ball (aka the player/character)

- How to make a platform consisting out of tiles that will disapear when the
ball went over it.

- How to make the ball move right continuesly.

- How to let the game reset if the ball falls of the platform (off screen)

- How to make the ball jump when pressing a key.

- Make a point that finishes the game.
Are you intending to make this game in the console? To make any object move right continuously, you need x and y coordinates that dictate where it is outputted. If we increment x the object moves to the right, so we need to clear where it was and output to the new position, and then repeat. However, the level of complexity and methods used to achieve this could differ depending on whether you want a windowed application or simple console program.
Well the assignment didnt say anything about how or what to use. except that it must be in c++ and the theme is rolling. I want to keep this as simple as possible. graphics do not mather unless they are made in c++ (i guess by drawing shapes)
This is what i got from the school:



PROGRAMMING ASSIGNMENT

Write a small 2D single‐player game based on the following theme: 'Rolling'

Observe the following requirements:

 The game should be your own work.

 If you use source‐code, tutorials and/or art from others then state this clearly (reference these)

 Graphics are completely irrelevant, unless produced by your code (e.g. a particle effect)

 Feel free to use third‐party art or use

simple lines and boxes (again reference where everything comes from)

 The fact that the theme can be interpreted in several ways is intentional. You must however stick to the theme

 Must be done in C++ and makes use of functions and optionally classes

 You can make use of external C++ libraries

 Game can be compiled with a C++ compiler (Visual Studio Pro or Express)

 The game has graphical game‐play and runs without error

 Your code is well structured and commented
It does sound like you can get away with programming in the console, which should be a bit easier. While I haven't taken on an entire game in this manner, other than tic-tac-toe, or Connect Four, when I get home I can give you an example of simple console animation.
It sounds like you don't meet the prerequisites for the class you're applying to, this is a goal to be obtained not something to be ashamed of so why cheat? Even if we did help you and you some how passed it off as your own work, you would only be setting yourself up for the exact same scenario with every project that came along; not to mention potentially cheating someone who might actually learn something from this class out of a seat. It looks like your hundreds of hours of study behind what you're expected to know the on very first day and that's only going to compound itself once the instructor starts handing out assignments and tests. You'll only serve as a time sink for the teachers aids who have to stop everything to explain the most basic principles to you and you're guaranteed to drag down anyone who is unlucky enough to get stuck with you as a partner. That's all assuming you don't just get thrown out of the class after your first evaluation which is also a very real possibility depending on what kind of institution it is. Why not just start learning this stuff at a reasonable pace and apply again next time?
Last edited on
While it may not be quite as dire as Computergeek01 makes out, he certainly has a valid point. We won't do your work for you, but we can help point you in the right direction when you run into problems. As far as simple animation goes, you can take a look at the code at this link here, which runs until the user hits enter, and allows speed and color to be controlled.
http://www.cplusplus.com/forum/beginner/120444/

As it is currently coded, there is some lag before the console responds to input, but I've already solved this problem and can show you the solution.
Last edited on
Although he worded it a bit brutally, I agree with Computergeek01.

This is clearly not an introductory course. if you don't have previous programming experience, you probably signed up for the wrong class.
closed account (iAk3T05o)
If you are not to submit it any time soon, start learning c++ (faster than i would)
It is kind of a brutal truth from those of us who have seen it happen. I'm sure the course description makes it sound like a theme park full of candy, fun and games. In reality OP is not likely to make many friends or establish any networking contacts with his peers by being "that guy" in the class and he's only going to damage his reputation with any instructors that are involved in the program. I can't bring myself to encourage him to go through with this plan on any level.

@ CplusplusAcolyte: This would be so much easier to do with SFML, SDL or Allegro that you would kick yourself for suggesting the console if you knew. This is probably an hour of work with any one of those libraries and that's in what is called "Programmer's Time" by the way. If you can understand variable scope and can at least fake your way with pointers then now might be the time to start looking at some source code from any one of them. You may not decide to pick any of them up just yet but it will give you and idea of what you have to look forward to.
I get that you say this. But i have to say the school made the decision this year to do it this way. And they do accept people who have almost no knowledge of it. Now im not asking you people to write the code and let me pass it trough as if it was my own work. Im looking for the right tutorials wich handle the things i described. Its not like i do not understand them it just that i cant write it from the top of my head or know what to write to get a certain result. You ask why not wait? This is purely a financial mather. There is no other year i can do this. I get that you see me as someone who's looking for an easy way ou( or in in this matter). Im just looking for directions in the right way.
@ CplusplusAcolyte: This would be so much easier to do with SFML, SDL or Allegro that you would kick yourself for suggesting the console if you knew.


Now I'm really curious to try and rewrite his program in SFML to see the difference. =P Maybe I'll do that if I can find the time tonight.
I will have to look into SFML. It was just that I had recently tackled simple console based animations while accepting user input, so I offered it as an option.

PamperBoy- I don't know that we see you as seeking the easy way out, or cheating, but possibly not experienced enough for the class. Still, if others with no previous programming knowledge are also signed up, then it's a decision that the school made, and I suppose you make the best of it.
Last edited on
Topic archived. No new replies allowed.