29 Topics

Member Avatar for
Member Avatar for scheppy

Hi Guys, Im currantly having a problem with simulating balls bouncing of each other in a 2d space, everything is working and all, but it just doesant seem natural for me... If we had any math wizzes here now is your time please:) my circles are painted inside of rectangles..... …

Member Avatar for scheppy
0
3K
Member Avatar for ben.juarez.773

Hello! I am looking for some help, and have provided the code. I'm just trying to do some simple stuff. I'm trying to create a simple game without using classes (but using lists). What I'm trying to do is create collision detection among list objects ("bullets" and "baddies"), as you'll …

Member Avatar for a_9
0
708
Member Avatar for mike_2000_17

This tutorial is the first time I write about coding techniques for improving the performance of software. This is going to be a step-by-step journey through a real example, with real benchmark results at every step so that you can see the effect of the different optimization techniques. And as …

Member Avatar for NathanOliver
7
2K
Member Avatar for lea_1

Hey, all! I'm trying to figure out how to add collision detection to the following code but I'm having trouble trying to figure out how to pull in the x and y coordinates of the different eggs that are falling randomly. Would you be able to tell me what I'm …

Member Avatar for janissantony
0
857
Member Avatar for NightOwl19

Heya guys, i have been trying to make this very famous ball game using java swing. although the primary code ihave used is from this link [[Click Here](http://www.edu4java.com/en/game/game6.html)](null)but been trying to modify it to make it look less complex..But everytime i run it it gives me following error: Exception in …

Member Avatar for NightOwl19
0
511
Member Avatar for Doogledude123

I am trying to determine collision in a 2D Side Scroller environment using Rectangles. However, the way most people do it is to get the bounds of the Tile. I do not use Tile's in this case, I am just drawing Simple Full Colored Rectangles using Graphics2D. `g.drawRect(int x, int …

Member Avatar for jwenting
0
481
Member Avatar for CJMW

So im making an RPG. For collision detection, I thought I would do it like this: 1. Read text file containing collision data. 2. Iterate through the list using nested for loops. 3. When a value of 1 occurs (denoting an inpassable tile) add a rectangle to list 'badTiles', where …

Member Avatar for CJMW
0
411
Member Avatar for CJMW

So im making a simple RPG using c# and xna. For collision, i am using a text file that contains data about whether a tile is passable or not. I iterate through them and create rectangles based on the position of the 'bad' tile in the text file. I then …

Member Avatar for CJMW
0
337
Member Avatar for CJMW

So im posting this here and not under game development because this is more of a problem solving question, not directly game related. Im making a simple RPG using xna. Im currently working on collision detection, however running into difficulty. I can successfully check for a collision between the player …

Member Avatar for CJMW
0
321
Member Avatar for kal_crazy

I am doing a school project which is an airplane collision detection system. Can anyone show me a few examples or pseudocode of implementation of closest pair algorithm O(n^2), O(n log^2 n), O(n log n)?

Member Avatar for DawnofanewEra
0
505
Member Avatar for alan.davidson.566

hey hey folks. I am making a tetris clone for my class project in college. langauge is XNA and I have run into a minor issue. When my bricks get to the bottom, rather than stack, they simply reset back up to the top. I have tried everything I can …

Member Avatar for alan.davidson.566
0
429
Member Avatar for Necrozze

Im making a 2D platformer-ish shooter its really simple and not much effort put in it, it is my first game Im making in python and its for a school project and needs to be finnised really soon. Everything is working just fine but Im having problem with some collision …

Member Avatar for Lucaci Andrew
0
550
Member Avatar for TempoGnome

Hi! I've been making this game for fun and have run into a few problems, a friend recommended me to ask you guys for help. I have three problems: 1. The player doesn't recongnize when it's not on a platform and because of this it won't fall down. I've narrowed …

Member Avatar for zjtpjs4
0
338
Member Avatar for Dum_Bass

I am trying to create a simple scoring function using sprite collision. I have my sprite ids defined under a seperate header and my class is in order. LEFT_SCORE is animated using a sprite sheet (obviously). int Ball::leftGoal( ) { int leftScore = 1; if (dbSpriteCollision (BALL, 12)) {++leftScore;} dbSetSpriteFrame …

Member Avatar for Dum_Bass
0
163
Member Avatar for Chuckleluck

Hello, I've been having a lot of trouble with collision detection recently. I'm attempting to make a 2D platformer. All I need is rectangle-on-rectangle collision detection, and then to respond on collision by moving the two rectangles involved in opposite directions. Thanks in advance.

Member Avatar for bguild
0
353
Member Avatar for luck12

I am trying to add collision detection to this simple game, but I am a little lost on where to begin. I know I need to use rects to do this but I am struggling to find out what I need to code to make this work. Any pseudocode or …

Member Avatar for luck12
0
1K
Member Avatar for Fedhell

IM A COMPLETE TOOL PLEASE IGNORE / DELETE THIS POST Hello everybody, im currently trying to learn 3d game development (ive developed 2d games in the past, nothing this complex, i am a third year programming student). Ive been working on this project in my spare time for the past …

0
128
Member Avatar for Labdabeta

I have two bounding boxes defined by the following values: m1.min.x;//the min x value of model 1 m1.min.y;// " " y " " " " m1.min.z;// " " z " " " " m1.max.x;// " max x " " " " m1.max.y;// " " y " " " " m1.max.z;// …

Member Avatar for Labdabeta
0
654
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 noobies

Hye all, I had a difficulty in codes a ball collision in java. Is there anyone could help me to code it. Here the requirement: 1) There will be two balls in the same size. 2) They move randomly at constant speed until they meet each other. 3) Once collided, …

Member Avatar for NormR1
0
191
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
Member Avatar for vaucro

I've created a game , somewhat like space invaders, and it looks pretty cool , very proud of what ive done. But I'm stuck on finding a way of unit testing the collision of 2 sprites and the collision between the borders and a sprite. If anyone could point me …

Member Avatar for vaucro
0
230
Member Avatar for tKc

Hey y'all, so I've created a 2D billiard program that basically just collides 2 balls together and determines their new direction and velocity however I now want to be able to change the colors of the balls after collision by using [CODE]Color.FromArgb(int r, int g, int b)[/CODE]. I would use …

Member Avatar for tKc
0
423
Member Avatar for Labdabeta

I have this problem: [CODE]struct Position { float x; float y; float z; }; bool CheckCollision(Position *vertices, int numvertices, Position start, Position end) { //return true if there was NOT a collision with the polygon defined by the vertices and the vector defined by the two positions. }[/CODE] I dont …

Member Avatar for Labdabeta
0
210
Member Avatar for corby

Hey I am making a game and i can make the character jump, but i am trying to make the character land on an object. I am trying to do this with object collision but im not sure how. My code for jumping for an image with a certain height …

Member Avatar for NormR1
0
190
Member Avatar for jamesl22

Hi, I am writing a game in C++ and OpenGL. My whole environment is based on cubes so I guessed bounding box collisions were best. I can currently move around and my program is detecting collisions (I used this tutorial: [url]http://www.3dcodingtutorial.com/Collision-Detection/Collision-Boxes.html[/url]). Now I want to make it so that when …

Member Avatar for jamesl22
0
963
Member Avatar for yancouto

EDIT: My problem was solved. :) But I have a doubt, what is the most effective way to wait for something to happen in java? for example, if I want to wait for a boolean b to be true, does this below work? [CODE=java]while(!b) {} //stuff to do after wait …

Member Avatar for yancouto
0
127
Member Avatar for jd_davis

Greetings, I've been given a challenge to build a simple game for my daughter. The idea is that you smash the spacebar, and a ball drops into the game, goes down some ramps, and lands at the bottom. Being a newbie programmer, this is becoming a challenge. I decided to …

Member Avatar for ddanbe
0
206
Member Avatar for RejectKid

ok so i need my code to be able to have the balls on the screen detect collision and remove a ball when they collide but for some reason every time i hit the add a ball button they disappear on me. and they dont detect collision in the first …

Member Avatar for quuba
0
230

The End.