opengl question

Started by
12 comments, last by jbadams 9 years, 11 months ago

well then am I just stupid?

Way to miss the point.

Edit:

To clarify. Yes. I now see you as a stupid person.

Advertisement

thanks I really appreciate that.

In the interest of being constructive, please read the FAQ on how to ask good questions.

* Before you post, make sure you have tried every option you can with respect to figuring out the problem yourself.
* Be prepared to answer the question (as part of your question, ideally) "what have you tried to solve the problem yourself?"
* Be as descriptive as you can; state the language, platform, compiler, et cetera that you are using, as relevant.
* When posting code (which you should do if the problem is at all code-related), post it verbatim without transcribing or omitted code you believe is relevant as you can easily hide the problem that way. If your problem exists in a very large code base, try writing a smaller test application that reproduces the problem so that you can post a smaller amount of code for others to search through.
* Make your question as understandable as possible -- go easy on abbreviation and Internet slang. If you ask a clear, concise question, you are most likely to get a clear, concise answer.
* Make your subject title as relevant as possible.
* Browse and search before you ask, to see if your question has already been asked and answered.


Programmers are normally a very self-sufficient bunch. We will try things out on our own and experiment. We are generally curious to why things work or don't work, and will solve the puzzle with our own reasoning skills. When we get stuck of have an issue, first we normally try some experiments, then we will search online to see what others have done, and try to apply that knowledge with even more experiments. We will also dig through the source code of other programs that have succeeded, and use the knowledge to experiment some more.

It is fairly rare for an experienced programmer to ask online for questions, usually we will discover the answers ourselves through a combination of research and experimentation.

If you want to ask good questions in a programming environment, demonstrate that you have experimented a great deal, and researched a great deal, and that despite all your efforts you are still unable to resolve the issue. When you finally get to the point of asking, you should have enough experiments and research to know exactly the error message or problem, and know approximately where the problem lies.


In the past many of your posts have not shown that you have put in any effort, simply asking and expect the community to answer. This time seems to be similar, announcing "I have a problem, this source code doesn't work", with no real evidence that you have experimented and researched on your own.

To add one final remark to this topic, I'm going to quote some advice JWalsh gave you in the second topic you ever posted here on November 19th 2004, where funnily (or perhaps sadly) you were apparently trying to make the same game you're still trying to make now -- an Asteroids style game using OpenGL:

Phil,
No offense, but that seems less like a simple question and more like a "how do I write a game". Its going to be very tough to get anyone to answer such a broad question.
"How to shoot bullets from a space-ship" is a fairly simple task, but it's not something that can be quickly and easily explained to you. As JWalsh said to you in the above quote, instead of asking a simple question you're basically asking how to create a major feature of a game. There are literally thousands (or more!) of possible correct answers to that question, and you might expect to go through a whole chapter (or likely more) of a book to learn this; it's not the kind of thing that can be quickly explained in a short forum post.
frob's post contains some excellent advice from the faq on asking better questions.
You're probably not stupid, but you give up too easily and you don't seem to really listen to the advice you're given. You should not still be stuck on exactly the same type of problem as you were working on 10 years ago; if you stuck with it until the problem were actually solved rather than giving up for 3 months and then coming back with an almost identical question (which you then also end up giving up on) you would progress to bigger and better things.
Forget OpenGL and start from scratch (as I suggested 3 months ago) with something simpler. No offence, but you're just not getting anywhere with OpenGL -- you might be able to in future, but you need to try something simpler first. Here's a simple list of steps for you:
  1. Download SFML and follow the getting started tutorial for your development environment (from here) to install it and get set up. Get help if you have problems, and do not give up until you have it set up properly.
  2. Follow the tutorial to open a window. Get help if you have problems, and do not give up until you have a window open.
  3. Follow the tutorials on "drawing 2d stuff" and "sprites and textures" to draw a single sprite (make it a space ship if you like!) in your window. Get help if you have problems, and do not give up until you have a sprite drawn in your window.
  4. Follow the tutorial on "keyboard, mouse and joysticks" to make your sprite move in response to the arrow keys on your keyboard. Get help if you have problems, and do not give up until your sprite is moving around the screen in response to input.
  5. Referring back to the drawing tutorials (from step #3) and the input tutorial (from step #4), make a second sprite (make it a bullet if you like!) appear in your window when the space-bar is pressed. Don't worry about putting it in the right place yet (just put in in the middle of the window), and don't worry about making it move. Get help if you have problems, and do not give up until your second sprite appears in response to pressing the space-bar.
  6. Make it so that your second sprite (bullet) moves constantly until it goes off the screen. Don't worry about making it go the correct way, just make it go up for now. Get help if you have problems, and do not give up until it moves up and disappears off the top of the screen after you press the space bar.
  7. Make it so that if your bullet moves off of the screen it will be removed. Get help if you have problems, and do not give up until it's working.
  8. Make it so that instead of appearing in the middle of the screen your bullet appears in front of the space-ship. Get help if you have problems, and do not give up until it's working.
  9. If it doesn't already, make sure that you can spawn additional bullets by pressing the space bar again. Get help if you have problems, and do not give up until it's working.
  10. Continue to make very small additions to your program, and at each stage get help if you're stuck and do not give up till it works. Continue until you have a complete asteroids game including a simple menu, scores, and a proper "game over", with no obvious bugs.
  11. Make a slightly more complicated game using the same technique of breaking it down into small steps. Each time you finish a game you can make something more complicated next.
For all of the above steps (except the test program from step #1) actually type out the code, don't just copy and paste from the tutorials.
If you get stuck and need help you'll be asking a simple question: rather than making a post like
"how do I make a space ship shoot bullets"
you might be making a post more along the lines of
"I can make a bullet appear in my window when I press the space bar (see the included code), but I'm having trouble making it appear in front of my space ship instead of in the centre of the window. This is the specific part of my code where I'm making the bullet appear, what am I doing wrong."
You would of course also follow the advice from frob's post and include all of the relevant details and code samples, but do you see how that's actually a simple question that can be quickly and easily answered ("just change those couple of numbers in your code on <whichever line needs to be changed>!"), as opposed to the broad questions you have been asking?
  • You need to ask smaller, simple questions, and you need to actually listen to the answers properly. Look back through your posting history, and when you're going to ask a question you've asked before use the previous answers rather than asking again.
  • You need to stick with your problems rather than giving up when you run into problems. Do not give up.
  • You need to do your own coding (relying on help and tutorials as needed) rather than copying and modifying larger pieces of "base-code" from God-knows-where.
Hope that helps Phil. Good luck. smile.png

- Jason Astle-Adams

This topic is closed to new replies.

Advertisement