View Single Post
  #6 (permalink)  
Old 02-16-2008, 10:30 PM
Bluefox815 Bluefox815 is offline
Member
 
Join Date: Feb 2008
Location: Oregon, USA
Posts: 24
Bluefox815 is on a distinguished road
Send a message via MSN to Bluefox815
Alright, well you're going to need to come up with a method that will take the cars and line them up correctly, right now you shouldn't be thinking about collisions or anything like that. You should take your pictures and split them to 50x50 pics so that you can instead display a square where you need it. An example would be this. 1 = Front car piece, 2 = back car piece (horizontal)

0 0 0
1 2 0
0 0 0

And each number is a square which can be represented by an array that holds the images, then you just select the image you want to display at each square. (You will also need a multi-dimensional array for the plotting coordinates)
Code:
image[0] = an empty square image[1] = horizontal front car piece image[2] = horizontal back car piece image[3] = horizontal mid car piece (for a 3-block car) image[4] = vertical front car piece etc.
And then you need to display the array, making sure each square is 50 pixels apart (which will display them as being right next to each other).

An example for selecting the right parts of your array to change would be
Code:
coordinate[0] = image[0] coordinate[1] = image[1] coordinate[2] = image[2] coordinate[3] = image[0]
That's a few ideas to help you.
Reply With Quote