hey guys, i did my search before i started this topic regarding collision detection for c++ as i have some project due to hand in and found that there is a LOT of stuff regarding collision detection but all of them are way off from what im intending to gather info on. so ill state my case here:
im making a dodgeball game. made my badguy class, goodguy class, they both got constructers, and cordinates for the baddies - the balls in this game that is, currently they bounce around my screen off the walls and even collide on another ball. i made this project using the sdl the teacher gave us to use that came with shapes as we load it onto visual c++. soo yeh atm they bounce around evn do a lil slow mo when a ball is about to collide on one another; cool lil matrix thing hehe. actually it's all due to an sdl delay which were told to delete out of our code but i kept it in until i felt the game was good enuff to not use it. but here is where i hit a snag as i will explain below::
the balls colide, as they should, BUT my goodguy however, the balls all go through him and he is basically; invincible hehehe. BUT i want it so that when a ball does get close to him and collide onto him, it will then go into a pause-like state and then be prompted with a text saying " you got hit." try again? yes or no."
so i would love an input from anyone here who is much proficcient in this more than i as i mainly had some help here and there but not much else. i will provide the code here only if walk me thru this hell of an ass dodgeball and hopefully i will come away with a bit of advice and pointers. thx.
when you say body u mean the main part of the code? would it be better if i sent you my work in progress code so that you can see what ive done so far?
at the moment theres like 3 or 4 balls i can have so displayed just by changing the number of balls on the top of the code where it is declared. i could have it more than 10 hehe.
which library you have used for graphics??
you can send your incomplete code to me, i will try to help you.. but no promises!!
writetonsharma@gmail.com
heya mythos just emailed a moment ago so i apologize for the delay, busy here with holidays. oh and please anyone here thats reading up on this thread please add some feedback in regard to this topic, would be appreciated :)
atm im looking up on every detail regarding collision detection and going to every forum for my search to the solution of my program soo hopefully ill get my game finished.
heya guys seeing as has been so ages ago since my last post i figure id give an update out of courtesy, I GOT COLLISION IN MY GAME yay :)
all this couldnt have happened without the help of nav so nav if youre out there, thanks heaps. and its not overly complete either, as i mite wanna add more stuff for better gameplay and presentation as well as gaining knowledge in the programming side of things. atm im working on another game and using the dodgeball stuff as a base as i figure that i already have some stuff coded and then add onto it other code as time goes by. so next thing i wanna do is make the event where if you get hit the game ends and you have a splash screen pop up saying you got hit, try again y or n. and by pressing y you start again and pressing n exits you out of the program. tricky :)
heres the code for the dodgeball ive been working on if anyone interested in programming and wants to learn how and that if anyone who wants to tinker with this code and do whatever with it. it has comments so you can see what it does and hopefully you will gain some knowledge. you will need some sdl files to run this thing so have sdl in your computer by going to www.libsdl.org/ or anywhere you can find sdl stuff from.
good luck guys.
nick.
p.s. ill mite update some stuff here now as my game progresses as well as my experience in programming improves. so any feedback here good or bad, hopefully not too bad hehehe. im here to learn.
edit::: im not able to post the code here as i would max out the no. of characters so if anyone interested in this code for learning and improving your knowledge in the skills of programming please let me know and post feedback here in this thread. thanks for reading.:)