How the rating system works is that people vote questions up if
- they are well written and clearly answerable
- they are a "good question" that others might want an answer to
People vote questions down if
- they are vague and unanswerable
- they are poorly written: spelling, grammar, tone, length (both too short and too long get downvoted), amount of code and so on
- they show little or no preparation or effort
- they aren't a good "fit" for the site
- the voter is just having a grumpy day
For each downvote your question receives, you lose two points of rep.
If you are wondering why your question was downvoted, it's probably because it was written as though you expected answers to be complete solutions beginning to end. My bet is that you just wanted hints or tips about where to start. Those are the kinds of questions that do poorly here. In fact your question will likely be closed (put on hold) as well as downvoted.
It is a rare downvoter indeed who pauses over the button and thinks "well, the OP did say Thanks in Advance" or "hm, this question is way too broad and shows no effort, but I see someone else has good guessing skills and the OP praised the answer, so never mind". They downvote based on the content of your question, not whether you are nice or not. (That's good news: though downvotes sting, they aren't about you, they're about your question, which makes them easier to put behind you.)
Did you get started? Do you have some code that kinda works but that doesn't do all you want, or gets an error? If so, excellent. Edit the question (don't ask a new one) and show what you have and what your problem is with what you have. That's a question people can answer.