Skip to main content

All Questions

Tagged with
6 votes
3 answers
281 views

Intersecting rectangles on a torus

Description Imagine a space like the arcade game Asteroids where everything wraps around right to left and bottom to top - effectively coordinates on a flat torus. The diagram shows an example of two ...
FreddyFlares's user avatar
5 votes
1 answer
421 views

Simple Ellipse Collision Mini Game

I am doing an exercise to help me understand C#and OOP. The exercise is supposed to teach me about ...
Darke's user avatar
  • 163
4 votes
2 answers
289 views

Revised Top-Down Dungeon RPG

Introduction: So far, the game works well, and my only major concerns, are a bullet system (including a function where you click the mouse to shoot the bullets), and a collision system between the ...
Zelda's user avatar
  • 123
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 ...
Ty Miles's user avatar
  • 185
11 votes
1 answer
539 views

Battle City (Tank) replica

I'm learning JS and Canvas. A friend of mine gave me the task to create a Battle City replica. I've already managed to make the map and the player to move. Nothing fancy just some squares with a color,...
Frakcool's user avatar
  • 181
4 votes
1 answer
190 views

Creating a maze game where the game resets if you hit traps/walls and finishes when you hit a different color

Here’s my code, the traps are the slightly visible squares. The user controls a red square (with arrow keys) and cannot touch the walls or traps or else the game resets. Additionally, if the user ...
Nicocav6's user avatar
0 votes
1 answer
76 views

Self Updtating QuadTree

I'm making a simple 2D game engine, and to make collision detection more effective I tried making a QuadTree class. I don't know if this will work, but that's not that important. You don't have to ...
Kristóf Bácskai's user avatar
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), ...
Marko Petričević's user avatar
5 votes
2 answers
10k views

Python Turtle based Pong game

I'm new to Python but I've coded in other languages mainly for hardware. I made Pong in Python using turtle but it's a little glitchy. I was wondering if any of you guys could check it out and give ...
Remington Nachshin's user avatar
3 votes
2 answers
307 views

Platformer Game: Arrow Key Player Movement and Collision Detection

I am in the middle of working on this game and I still need to add some things (e.g. score, coin counters, etc.) but I really feel like there is way too much unneeded code. Could you help me simplify ...
Josh Berger's user avatar
6 votes
2 answers
962 views

Collision Detection in a 2D shooter game

I have the following code that works just fine for collision detection. The only problem is its size and its performance. I'm trying to do it and many other things 60 times per second, which doesn't ...
Plqsmic's user avatar
  • 197
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 ...
Carlos Hdez Barbera's user avatar
4 votes
1 answer
598 views

Octree Implementation

The fn_AABB struct represents an axis aligned bounding box, by a center(position) and half lengths(hwidth). They also contain a set of planes for use in collision but that is not important to the ...
J. H's user avatar
  • 199
6 votes
1 answer
404 views

Handling collision on a turn-based 2D game

I have implemented a collision check algorithm that I have created for my game, and the algorithm uses recursion. Now it all works fine, and I thought to myself, what if there was a way to solve this ...
Ben Beri's user avatar
4 votes
1 answer
378 views

Spatial Hash for optimizing AABB collisions

grid.h ...
J. H's user avatar
  • 199

15 30 50 per page