All Questions
18
questions
0
votes
1
answer
139
views
Object Collision in Breakout game using SDL library [closed]
Im trying to make a retro game of Breakout using an SDL library. Im still trying to learn developing and OOP. I got to the part where i want to check for collision between paddle and the ball, and ...
4
votes
1
answer
215
views
A library of 2D Shapes with functions for their intersections
The goal was as much code reuse as I could get. Shooting for a pure-function-y style.
Would love any feedback on general architecture, adherence to standard practice and usability - as well as ideas ...
16
votes
3
answers
7k
views
2D Collision Detection in C++
I'm attempting to rewrite the classic snake game in c++. What I am inquiring about is my implementation for a 2D collision detection function. I am utilizing ...
4
votes
1
answer
1k
views
Bounding volume hierarchy C++
Here is a C++ implementation of a bounding volume hierarchy, aimed for fast collision detection (view frustum, rays, other bounding volumes). It is based on the ideas from the book "Real-Time ...
2
votes
1
answer
602
views
C++ Breakout game using SDL
I did a big mistake to create procedural C++ breakout game on start and now im having trouble converting it into OOP.
As far as I can see I need classes: Loptica (eng. Ball), Splav (eng. Paddle), ...
3
votes
1
answer
272
views
Flood Fill using unordered_map which has user-defined type as key
I have an implementation of the flood fill algorithm. Assume that an image is provided as a vector of ...
5
votes
2
answers
499
views
OBBs intersection improvement for AABBs-OBBs
I'm trying to code some intersection codes for Oriented Bounding Boxes (OBBs) and axis-aligned bounding boxes (AABBs). I have the OBB-OBB intersection using the Separating Axis Theorem (SAT) and I'm ...
4
votes
1
answer
901
views
Simple class game hierarchy with collision detection
I'm trying to make the transition from the 'understand how standalone features work' phase to writing.. more 'complex' code that could actually see use in real life, so I've been trying find some neat,...
-2
votes
1
answer
6k
views
C++ Erasing an object from vector of pointers
I am making this simple game in SFML and I have this vector of pointers std::vector<Brick*> bricks; which stores objects of class ...
7
votes
1
answer
186
views
Kattis "Hitting the Targets" utilizing a polymorphic relashionship
In order to learn C++ I have written a solution to this Kattis "Hitting the Targets" problem
Basically the program is to accept some shapes (circles and rectangles) on std in and a set of points and ...
6
votes
2
answers
1k
views
Rectangle-segment collision detection
I am working with C++ and SDL, hoping to create a game later. I am implementing the collision detection between rectangles and segments.
I found this (NateS user's solution) about line-rectangle ...
2
votes
1
answer
83
views
Find cells crossed by a line
This method find cells that are crossed by line A-B and adds them to one vector.
I have got some duplicates here and some lines of code are very similiar but they differ in one variable. Should this ...
5
votes
2
answers
2k
views
QuadTree for collision detection
I was recently working on a game using the SFML library, Later on, I experienced performance issues due to collision detection. I have been told to use a QuadTree ...
3
votes
1
answer
180
views
Weeding out triangles for triangle-triangle collision detection using a spatial hash
I am implementing a multi-phase collision detection system whose final collision check is checking the triangles of one shape against those of another. As the number of triangle-triangle comparisons ...
8
votes
1
answer
9k
views
Collision-detection for an SDL game
I am working on a simple SDL game in C++. I want to make my collision detection implementation better.
Here's the complete project:
...