Another update - I added a set of illustrated instructions (thanks, Rob) and also fixed another little bug that happened if you clicked the left button too fast after starting the game. Also added version number to the top right corner - this is version 1.04.
Clok - happy to help however I can. I had to learn the hard way on most of this stuff since I could never seem to find exactly what I was looking for. Working out the collisions was the hardest part...Damn jeepney kept getting stuck on walls when you turned. I finally worked out to make a shadow copy of it and turn that one first to see if it hit a wall; that way I could tell the main jeepney not to turn. Then Elizabeth managed to get it stuck again! So I had to add another routine that turned you just a little bit if you got parallel right next to a wall.
There's built-in routines for changing the image angle, which is nice, but it does lead to complications. The built-in collision routines work fine for round objects, but once you get oblong stuff rotating it gets complex. The functions to get something to shoot out of a barrel instead of the center of the object are interesting -- lengthdir_x and lengthdir_y. You basically work out the angle you want using point_direction and adjust the x and y coordinates with x + lengthdir_x(length, angle), y + lengthdir_y(length,angle) where length is how much space you have from the origin or center of the object to the end of the barrel.
I imagine you could simplify things a lot if you put your barrel smack in the middle of your tank rather than on the back like I have mine. That required a lot more work.
Another update - I added a set of illustrated instructions (thanks, Rob) and also fixed another little bug that happened if you clicked the left button too fast after starting the game. Also added version number to the top right corner - this is version 1.04.
Clok - happy to help however I can. I had to learn the hard way on most of this stuff since I could never seem to find exactly what I was looking for. Working out the collisions was the hardest part...Damn jeepney kept getting stuck on walls when you turned. I finally worked out to make a shadow copy of it and turn that one first to see if it hit a wall; that way I could tell the main jeepney not to turn. Then Elizabeth managed to get it stuck again! So I had to add another routine that turned you just a little bit if you got parallel right next to a wall.
There's built-in routines for changing the image angle, which is nice, but it does lead to complications. The built-in collision routines work fine for round objects, but once you get oblong stuff rotating it gets complex. The functions to get something to shoot out of a barrel instead of the center of the object are interesting -- lengthdir_x and lengthdir_y. You basically work out the angle you want using point_direction and adjust the x and y coordinates with x + lengthdir_x(length, angle), y + lengthdir_y(length,angle) where length is how much space you have from the origin or center of the object to the end of the barrel.
I imagine you could simplify things a lot if you put your barrel smack in the middle of your tank rather than on the back like I have mine. That required a lot more work.
Matt Barton, Managing Editor
Location: St. Cloud, Minnesota, USA
Email: matt@armchairarcade.com