Collision with Arrays...help?
Author |
Message |
draykian
|
Posted: Wed Jan 25, 2006 10:14 pm Post subject: Collision with Arrays...help? |
|
|
Well, since I've read how vastly inferior "whatdotcolor" would be to a Java programmer, I can't help but say it'd be the easiest for someone such as myself. I'm doing my final project, and I'm "recreating" Chrono Trigger (using sprites and maps), and for me to use collision detection, I need something that'd store and check over 100,000 points of collision for every movement. I may sound like a complete n00b in saying that, but I'm tired, and my brain has shut off for the night. All I'm asking is: any ideas? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
draykian
|
Posted: Wed Jan 25, 2006 10:17 pm Post subject: (No subject) |
|
|
Sorry for the double posting, but I meant to add in that I don't really think adding every co-ordinate into an array, and then checking them every second will be that easy. Quite a tedious and time-conuming task making a way to check them all, eh? |
|
|
|
|
![](images/spacer.gif) |
Hikaru79
|
Posted: Wed Jan 25, 2006 10:46 pm Post subject: (No subject) |
|
|
Well, of course, you wouldn't have to store every pixel; god no. Just split the level up into a grid with logical units. But anyway, if you MUST know, the only way I can think of of doing anything close to whatdotcolour in Java is the Robot class. Look it up. You'll find what you need there; but you didn't hear it from me ![Rolling Eyes Rolling Eyes](http://compsci.ca/v3/images/smiles/icon_rolleyes.gif) |
|
|
|
|
![](images/spacer.gif) |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
Posted: Wed Jan 25, 2006 10:47 pm Post subject: (No subject) |
|
|
Chrono trigger is tile based, so you only really need to check each 32x32 tile for collision, not every pixel. But yeah, pretty much the only way you can do it is with an array. Make your graphics static types and you'll be fine for memory and speed. |
|
|
|
|
![](images/spacer.gif) |
|
|