Thread: [C] 2d mouse aiming + bullets

  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    6

    [C] 2d mouse aiming + bullets

    Hi everyone

    Would someone be kind enough to show me some source C code of a 2d mouse shooter game ?
    (aiming and shooting ONLY (colisions are not nessessary))

    im a beginner whose programming with SDL too ^^

    i programmed already aiming with SDL_rotozoom (but its not following correctly the mouse...)

    thanks
    (and sorry for my broken english ^^)

  2. #2
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Did you try looking through the SDL Demos that are located at the official SDL site?
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Aug 2011
    Posts
    6
    @AndrewHunter

    yes i alredy saw all the SDL FOSS... thanks... ^^

    @Salem
    im not hiding anything...
    [C] 2d mouse aiming + bullets
    [C] 2d mouse aiming + bullets
    [C] 2d mouse aiming + bullets
    [C] 2d Mouse Aiming + Bullets - C And C++ | Dream.In.Code
    [C] 2d mouse aiming + bullets
    jeu 2d (visée 360).
    (the last one is in french but im not ^^)


    im just a little disapointed that the C language comunity is so small and dont like nOObs like me...
    Last edited by vt007; 08-14-2011 at 05:06 PM.

  5. #5
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by vt007 View Post
    im just a little disapointed that the C language comunity is so small and dont like nOObs like me...
    Small? ...what you're seeing is the intersection of the Community with the set of those who have the time to enjoy themselves.

    Nobody told you they didn't 'like' you. Like you, most of them are also disappointed that the "nOObs" you are talking about are usually a combination of lazy, dull, irritating..etc etc..
    So, you've to prove yourself if you think you are an exception.

    Also, everyone had to learn <put random topic> once upon a time, but those who did successfully do so, never referred to themselves as "nOObs" every chance they got.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Well I doubt anyone here has the patience to check SIX other forums to decide whether what they are about to say hasn't been said already somewhere else.

    I don't suppose you've updated ALL your other forums with that list have you?

    You really need to read the "ask smart questions" FAQ, because all you posted so far was "I'm new, help me", without actually getting anywhere near an actual question.
    Such open ended time-sink questions just get ignored.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #7
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Your English is fine, no problem with it.

    I know nothing about 2D mouse shooter gaming, but in our game programming forum, there are several threads that have that topic.

    I would suggest posting/reading up on it, there.

  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by vt007 View Post
    im just a little disapointed that the C language comunity is so small and dont like nOObs like me...
    We don't mind "n00bs" here... in fact we kind of specialize in them. You don't see us sitting around discussing missile guidance errors in C, do you?

    What Salem is (correctly) objecting to is your pattern of "crossposting" (putting near identical messages in multiple forums). Think about the man hours you invoke when you ask even the easiest question... on this forum alone 77 people (at the time of this writing) have agreed to share some of their time reading your messages... at say 5 minutes each, that's over 6 hours... multiply that by the 6 forums you've posted to and over 36 hours have already been devoted to your question... Now add in those who spent a few extra minutes to find a link for you and you're little question has probably already taken up over 50 hours ... More than a weeks worth of labour... and you blew it off!

    This is not how you win friends and influence people...

    You want good support... and this place is very capable of excellent support...

    1) Review other sites and information before coming here. Often what you want is already posted elsewhere.

    2) Don't ask for code handouts ... we don't do that here.

    3) Post your own code if there's a problem and ask for help

    4) Ask a specific question...

    5) LISTEN to the answers you are given and consider them all.

    This is an all volunteer service, none of us get anything out of helping you beyond the pleasure of helping a "n00b"... Don't make it upleasant or you'll get noplace.

  9. #9
    Registered User
    Join Date
    Aug 2011
    Posts
    6
    Quote Originally Posted by manasij7479 View Post
    Small? ...what you're seeing is the intersection of the Community with the set of those who have the time to enjoy themselves.

    Nobody told you they didn't 'like' you. Like you, most of them are also disappointed that the "nOObs" you are talking about are usually a combination of lazy, dull, irritating..etc etc..
    So, you've to prove yourself if you think you are an exception.

    Also, everyone had to learn <put random topic> once upon a time, but those who did successfully do so, never referred to themselves as "nOObs" every chance they got.
    well show me that comunity you are talkin about...

    I didnt talk about any other "nOObs", i was refering to myself. and for me a term nOOb = beginner. I dont see whats bad about being a beginner that doesnt even know "where to start looking"...
    And if by "irritating" you mean "ignorent", so this is not the nOObs broblem.
    (There is lot of problem like that in HighScools when teachers are starting to be all stressed out because they cant explain clearly something to their students...^^)

    Anyway i see that youre a good guy trying to help out, by sayng to me all that stuff ^^

    Anyway...

    PS: And everybody is an exeption. if youre speaking "socialy".

  10. #10
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    3 Posts in and already you're lecturing us about how to behave?

    Not very smart....

  11. #11
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by CommonTater View Post
    You don't see us sitting around discussing missile guidance errors in C, do you?
    Did you not get your invite to the Missile Guidance forum we have here Tater? Salem will have to be sure to send you an invite.


    Quzah.
    Hope is the first step on the road to disappointment.

  12. #12
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by vt007 View Post
    well show me that comunity you are talkin about...

    I didnt talk about any other "nOObs", i was refering to myself. and for me a term nOOb = beginner. I dont see whats bad about being a beginner that doesnt even know "where to start looking"...
    And if by "irritating" you mean "ignorent", so this is not the nOObs broblem.
    (There is lot of problem like that in HighScools when teachers are starting to be all stressed out because they cant explain clearly something to their students...^^)

    Anyway i see that youre a good guy trying to help out, by sayng to me all that stuff ^^

    Anyway...

    PS: And everybody is an exeption. if youre speaking "socialy".
    No; irritating isn't same as ignorant. Rear this if you haven't yet, to get a better idea about that.

    Google is always a good place to start looking. I find it very difficult to believe that you've found nothing after 'looking' for weeks.

    If teachers get stressed out to explain something to students....especially in school, there exists a problem in either or both of them.

    && How am I supposed to show you a community ?
    Last edited by manasij7479; 08-14-2011 at 04:20 PM.

  13. #13
    Registered User
    Join Date
    Aug 2011
    Posts
    6
    Quote Originally Posted by CommonTater View Post
    3 Posts in and already you're lecturing us about how to behave?

    Not very smart....
    indeed very constructive, and by contuing to post replys like that you contradict yourself by adding some more of that precious time to that week of hard labour... maybe if youd reply already with some sort of code or whatever you would save all those future generation, no? ^^

  14. #14
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by manasij7479 View Post
    Google is always a good place to start looking. I find it very difficult to believe that you've found nothing after 'looking' for weeks.
    You mean like this?

    [C] 2d mouse aiming + bullets-sdlmouse-png

  15. #15
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    I don't think cross-posting is by definition bad, but six is a little excessive. Two at a time is a good rule of thumb. If you get no replies with that, try two more.

    Also: quality is better than quantity when you are looking for help. There is at least one actual SDL forum, and this is obviously SDL specific. So maybe try cross-post #7, lol:

    SDL :: Index

    And put a bit more work into your post, because I can tell already yours raises questions and you can save some back and forth by, eg, including some code and so on...
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. mouse input/aiming FPS style using glut
    By thisismatt in forum Game Programming
    Replies: 11
    Last Post: 11-17-2007, 10:33 AM
  2. bullets [2D]
    By St0rmTroop3er in forum Game Programming
    Replies: 3
    Last Post: 10-04-2004, 11:26 PM
  3. bouncing bullets
    By dydoko in forum Game Programming
    Replies: 8
    Last Post: 09-18-2003, 08:31 PM
  4. bullets again
    By lambs4 in forum Game Programming
    Replies: 1
    Last Post: 09-12-2003, 02:39 PM
  5. bullets
    By lambs4 in forum Game Programming
    Replies: 10
    Last Post: 08-13-2003, 06:32 AM