Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / Java / JSP - Java - Collision Detection

Author
Message
Riz
17
Years of Service
User Offline
Joined: 7th Dec 2008
Location:
Posted: 2nd Nov 2009 04:14
Hi guys im currently developing a puyo puyo game in JAVA and im having a lot of trouble with the collision detection aspect. I know which method i should use but i just do not understand how to code it. Basically i have a 12 X 6 grid on which my puyos falls, when the first puyos fall and land the next puyos fall. In order to check for a collision i want check if there is a puyo in a specific location, if there is and another puyo tries to fit in that location then there is a collision. Could some please help me to understand how to code this ive tried to so many things but ive got nothing so if someone can help me id really appreciate it.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 2nd Nov 2009 05:38
Before incrementing the position of the puyo, check the grid where it will end up after the move. If it is occupied, then don't move and solidify its current position by updating your 2D array which holds the 12x6 grid data.

This "puyo" game looks like tetris, you could always look up tutorials on that for ideas.

Login to post a reply

Server time is: 2026-06-10 05:53:35
Your offset time is: 2026-06-10 05:53:35