Friday, July 20, 2007

Grid, GUI, Cosmetics, Settings, Custom Maps

I discovered yet another problem with grid interaction. For those who don't know, I separate all nodes and route sections into a grid so that when searching for collisions, I only have to test the relevant grid squares. This, of course, improves performance. The problem comes when deciding which squares to test with a route, which passes through multiple squares. Unfortunately, though my code worked fine when the slope of the route was positive, when negative it went all over the place. However, I devoted an hour to fixing it and it's working fine now.

I did some more work on the GUI, making it even more flexible. Also, I'd previously been using a font that I'd created myself, but it didn't look too good, so for the time being, I'm using Haettenschweiler, which looks much better. I also bolded and centered the title bars of the forms.

I also changed the node spacing from thick broken lines to a thin solid line that's less distracting. All in all, the game looks pretty good (especially when fullscreen).

What I plan to do next, before I start the fog of war or map objects, is use xml to create a settings file in which I would contain the specs for the different nodes and the settings for the GUI and anything else I would need. That way I can avoid recompiling after every single tiny change (not that it takes a long time to compile). This would also allow for more flexibility. Less hardcoding.

The next step after that is to create custom map functionality. Until I get a better idea of how to implement the fog of war and the geometric map objects, I will do everything I can to create the basis of the maps. The objects and fog will extend what is already there. I think they will be easier to do once I have a better idea how things will work.

clevceo

No comments: