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

Username:   Password: 
 RegisterRegister   
 please a tutorial
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
metachief




PostPosted: Thu Feb 07, 2008 5:40 pm   Post subject: please a tutorial

Her fellow programmers.
I and probably most of the not so advanced programmers have problems with collision detection for images. That is why if any of you have the time to make a basic tutorial explaining collisiond detection with "whatdotcolor" or what ever works best for it, it would help a load of us to proggress with our programs.
Sponsor
Sponsor
Sponsor
sponsor
Nick




PostPosted: Thu Feb 07, 2008 5:47 pm   Post subject: RE:please a tutorial

2 things

1. there is already a tutorial!
2. this is where you post these comments
ericfourfour




PostPosted: Thu Feb 07, 2008 5:50 pm   Post subject: RE:please a tutorial

whatdotcolour requires either solid background or solid foreground colours (or both solid). If you are using images, you have to do your collision detection differently. My suggestion would be to keep track of whatever is colliding using variables. The image would be a separate part of the objets colliding. Your main goal should be to make your program, graphics independent (separate the back-end from the front-end).
Tony




PostPosted: Thu Feb 07, 2008 7:55 pm   Post subject: RE:please a tutorial

I second ericfourfour.

The only thing whatdotcolour does is that it uses the screen as a giant 2D array. You write to the array by drawing stuff to the screen.

The same could be done, in much simpler terms, with a smaller array. Some collision approximations (such as circular) work with arrays of size 1. Increasing the array size simply increases the precision.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
CodeMonkey2000




PostPosted: Thu Feb 07, 2008 8:32 pm   Post subject: RE:please a tutorial

Or you could go old school and use 2d tile maps. 2d Tile maps are great because you can easily load and edit your maps. Here is my old game, the file is at the bottom.
http://compsci.ca/v3/viewtopic.php?t=15765&start=15
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: