Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Collision with Arrays...help?
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
draykian




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
draykian




PostPosted: 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?
Hikaru79




PostPosted: 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
Martin




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: