I'm now spending most of my time developing C# applications so I haven't had much free time to work on my "Dave" game. Shown below is the latest video showing how far the game has developed. I hit a few problems with the collision detection mainly due to the diagonal movement of the "grannies". I decided to just let them move in the more normal left, right and up, down style. I had always thought that in the finished game they would probably not just stay in the current screen but actually walk around the whole map, going into the shops and houses etc. This more linear movement should work better and also allows me to get on with the rest of the game rather than hitting my head on the desk due to diagonal collision problems. The areas that Dave can walk are defined by rectangles and you will see in the video that Dave can walk up to the door. The code just checks that Dave is in (or is moving into) one of the defined rectangles. In the debug mode the rectangles are drawn on the screen which allows me to check that all is as it should be. The last thing that I have added it to allow Dave to throw bones at people (well he is a dog). This works quite nicely but has brought to my attention a small problem that I need to address. At the moment the collision detection is based on the bottom of the bones rectangle in relationship to the other sprites. It should be based on the initial position of Dave's feet (ie, it needs an off set value). It shouldn't be too hard to fix this as long as I can find some time to do it. The next job will be to enable the exits so that I can write the flip screen code. I will probably then look to add the collectable objects and maybe some street furniture and general obstacles. The movement of the sprites in the video isn't very smooth due to my capture program. in "real" life, they move very nicely, even when the screen is windowed rather than full screen.
No comments:
Post a Comment