Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Board and Card Games > Ogre and G.E.V.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 10-10-2013, 01:41 AM   #1
HeatDeath
 
Join Date: May 2012
Default Announcement: New Map Bashing Tool - ScreenshotGrid

In the course of my long running personal projects to create Ogre maps of Salt Lake City and Montreal, I developed a need to be able to lay a grid over a map. I messed around with a few graphics programs, but found them either fiddly and awkward to use or massive overkill. And getting the map images out of Google Earth to even start with was a pain in the rear. So I wrote something that worked the way I wanted it to.

ScreenshotGrid allows you to take any graphic that will fit on your screen, lay almost any kind of grid over it, and save the result. The resulting file can be a very useful reference to use to start creating your map in a program like Ogre Map Editor, which I found very helpful.

To start, get the map you want to use positioned on your screen, displaying the region you want at the resolution you want, in any application you want. I use this primarily with a web browser displaying a map, but it will work with any program - that's part of the beauty of it.

Then run ScreenshotGrid, and maximize it.

Click the "Capture Screenshot" menu item. ScreenshotGrid will minimize itself to get itself out of the way, take a screenshot, and then remaximize itself. A picture of the window or windows that were underneath ScreenshotGrid will now be displayed in the ScreenshotGrid window, with a hex grid overlaid upon them.

Now the fun part begins. Use the menu options to change the type of the grid (rectangular, horizontal or vertical grain hexes, etc), color of the gridlines, etc. Use the plus/minus keys to make the grid squares or hexes the right scale. Use the arrow keys to align the grid horizontally and vertically (for example to ensure that major roads go through the middle of hexes instead of along hexsides, or to ensure that streams or small rivers run along hexsides instead of through the middles of hexes).

Once you have the grid sized, colored, and aligned the way you wat, use the Save Image As.. menu option to save the underlying image with the superimposed grid as a PNG file you can use as a reference for map bashing.

I've attached a screenshot showing a typical session.

I'm open to suggestions of how to distribute this. I don't have a webpage of my own at the moment, but for now I'll email the zipped executable to anyone who requests it here or in PM. and if anyone wants to volunteer to host it, that'd be awesome.

I made this as a tool to make my life easier, and I'm hoping it simplifies other people's lives too.

P.S. It's written in Visual Studio Express 2008, using the .Net 3.5 framework, which should work in any version of Windows released since Bush's first term. If anybody is interested in how I wrote any of it, just ask! The screenshot code and self-minimizing code are neat little tricks, and the Hexagon grid code may be fairly educational.

[Yes, I know the hex grids look a little wonky at certain zoom levels. That has to do with rounding errors creeping in as you convert Sines and Cosines to integer pixel coordinates. But you can always find a zoom level that renders cleanly within 2-3 pixels of the current hex size. If I can figure out the mathematical properties that the clean rendering zoom levels have in common, I may make the plus and minus keys zoom directly to those instead of stepping up and down one pixel at a time, but for now I'm just happy the whole thing actually works.]
Attached Images
File Type: jpg Parallels Picture.jpg (108.0 KB, 249 views)

Last edited by HeatDeath; 10-10-2013 at 01:53 AM.
HeatDeath is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:12 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.