The Wild Ride on a Cut Loose Train

So its been awhile, I could go into excuses and the like but when it comes down to it, its just a lot harder to get things done when not at school in an efficient manner. But anyway onto what I’ve been working on.

 

In class last week, Professor Pankratz said he wanted to see some in progress shots of the pathing, as well as some files and explanations, so without further ado, I’ll be explaining whats going on.

Above is essentially the work in progress shot of the map. As I was working on it, I decided at least for the testing purposes, I’d color in the grids for the roads as well as the walls. I have yet to decide if I want to leave the roads colored in for clarity’s sake, any input with that decision would be appreciated.

 

Below is the “code” that generates the walls, where I meticulously edit the 1’s for walls, the R’s for Roads, the C’s for what will be coins (they’ll replace the R’s, I just have R’s for testing purposes) and P for player. I go through, matching each and every cell to its appropriate value to make it look “good.”

The next below is the actual code for the generation of the walls and basic stuff. The load function gather’s and parse’s all of the data, while the draw_grid function is what does the heavy lifting, and since I put it in a function, I can comment it out when I’m done testing if I want.

Below is the final edited version, with everything overlayed, Pacman is still a little confused and doesn’t function properly on this new map quite yet, but he appears to be walking and I just need to handle some of the new collision detection and he should be all good to go for this version of the map. 

And finally, below is the “code” yet again of the current map version. As you can tell I removed the R’s and replaced them with C’s for coins. The only thing left to do here other than fixing the aforementioned collision detection, is adding a box for the ghost’s to spawn, but I think that’s easily handled. 

Leave a Reply

Your email address will not be published. Required fields are marked *