1
edit
Changes
map
{{GAM666/DPS901 Index | 20103}}
=Collision=
'''Sphere to Sphere Collision '''
</pre>
**that's the basic idea. Depending on the direction the sphere is moving you'll have to add or subtract the radius from the comparision, otherwise collision will only be true when half or more of the sphere is within the rectangle.
==Map==
*Will be stored as a 2D array as there is currently no plans for vertical movement.
**Each index will refer to the type of tile to be places.
***eg 1 = wall, 0 = floor, 2 = hole
**Can easily be edited in notepad
**Example, a room with a south-east entrance, a hallway, and a north exit
<pre style="display: inline-block;">
111111111111100000000000111111111111
111111111111100000000000111111111111
111111111111100000000000111111111111
111111111111100000000000111111111111
111111111111100000000000111111111111
111111111111100000000000111111111111
111111111111100000000000111111111111
111111111111100000000000111111111111
111111111000000000000000000011111111
100000000000000000000000000000000001
100000000000000000000000000000000001
100000000000000000000000000000000001
111111111111111111111100000000000001
111111111111111111111100000000000001
</pre>