6 Topics

Member Avatar for
Member Avatar for dancks

I originally asked this question at cplusplus.com but got no responses. In my program I have the main player and enemy tanks. When using the shotgun weapon it works fine for the main player but it kills the bad guy when they use the weapon. I don't understand how this …

0
142
Member Avatar for Chuckleluck

Hello, Over the past couple of days, I've been struggling with getting collision detection to work for my game, a 2D sidescrolling platformer, made with SFML 2. This is example code using my most recent method of collision detection, although it has some flaws: // main.h #ifndef MAIN_H #define MAIN_H …

Member Avatar for Chuckleluck
0
627
Member Avatar for Chuckleluck

Hello, I'm fairly new to programming, and I'm not exactly sure how to do line-rect collision detection. If it helps, I'm using SFML 2. Can someone explain to me how I would go about coding line-rect collision detection? Thanks in advance.

Member Avatar for adityatandon
0
223
Member Avatar for Chuckleluck

Hello, I would like your opinion on my collision detection & jumping code. Is it efficient enough to be used in a full-blown game? Any ideas on how I could improve the efficiency of the code? Any bugs? Please reply with (constructive) criticism, comments & suggestions. Link: http://dl.dropbox.com/u/56274235/Working%20Collision%20Detection%20%26%20Jump.zip Thank you …

0
109
Member Avatar for Chuckleluck

Can someone give me some resources (books, online tutorials, etc.) on algorithms for 2D collision detection? I've searched a little, and all the ones I can find are for 3D collision detection. Thanks in advance. EDIT: Just to clarify, I know [I]how[/I] to do collision detection, just not efficiently.

Member Avatar for raptr_dflo
0
294
Member Avatar for Chuckleluck

Hello, I'm using SFML to make a game, and, as it has no built-in collision detection function, I made up my own algorithm. Here it is: [CODE] // Collision.cpp #include "Collision.h" Side CollisionBoxTest(sf::Sprite Hitter, sf::Sprite Hittee) { sf::Rect<int> HitterBox; sf::Rect<int> HitteeBox; // Initialize parameters for Hitterbox int BoxHeight = Hitter.GetHeight(); …

Member Avatar for Eagletalon
0
211

The End.