Announcement: New Map Bashing Tool - ScreenshotGrid
1 Attachment(s)
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.] |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
This looks quite interesting, I would love a copy.
admerritt@gmail<dot>com |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
very cool, I can almost see the Ogre crushing things :-)
|
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
I'd love a copy as well. You should consider www.dropbox.com for hosting it, easy and free.
My email is jfleisher (at) columbus (dot) rr (dot) com |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
I would take as copy as well. It looks awesome!!! shawnhantke@rushmore.com
|
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Ok, if you gave me your email here you should have a zipped copy of the executable in your Inbox. No installation necessary, just unzip it to wherever and run it.
I virus scanned it but you should probably do that yourselves as well. Adm, Gmail has just informed me that they auto-block zipped executables for security purposes. Let me know another email address if you can. In the meantime I'll try to get Dropbox set up. Thanks for the interest, everybody! |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Ok gang, Screenshot Grid should be accessible on this link:
https://www.dropbox.com/sh/gwiaixxbnuvr9px/5aC5UxZ_Fh |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
How brilliant - I am downloading it now :)
|
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Some instant thoughts:
1) Would be great if you could load an image from file. 2) For your hex line up problem, two suggestions: a) Pre-calculate the sin/cos values and hold them in an array for speed b) You only need to calculate the top part of each hex, then the bottom lines are made by the next hex down. That should fix your line up problems. c) Instead of (a), you could just calculate the points for a large hex, then scale them or create a PNG image of a hex and overlay it many times. 3) The lines are a little jaggy - could they be anti-aliased to clean them up? Or is the jagginess a function of the calculations? Nice tool though, and very fast. |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Quote:
To work around this I changed the size of ScreenshotGrid to be just the toolbar showing and positioned it in front of the browser toolbar, then when you hit capture it still shows up but not in the part of the browser showing the map. Also, I am not seeing any underlying image when using the tool maximized. I see the grid but it is on a white background. Once I've done a capture I then double click the title bar to maximize the window and see how things turned out. I suspect it must be working differently in XP, which is what it looks like it is running in from the first post screenshot. Quote:
Overall, a neat tool for anyone wanting to make custom hex maps! |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
I may have misspoke myself there. The screenshot it grabs is the whole screen, so maximizing ScreenshotGrid should be unnecessary.
It wouldn't surprise me if Windows 7 or 8 behave slightly differently - XP is all I've got to test on. Edit: It occurrs to me that what might be causing this is Screenshot grid not staying minimized for long enough. Right now it only stays down for a quarter of a second or so. If the Screenshot API in Win7 and 8 takes significantly longer, that could be an issue. If you want, I can trivially increase that interval up to a second or so and upload the new version tonight. I can sort of see one use case for loading a background image - if you want to lay two or more grids onto the same background. But yeah, the workaround at this point would be to just load the output image into an image editor and then use the ScreenshotGrid again on that. Remember, this is intended to be just one tool in a long toolchain to end up with a playable map. It's output is more to use as a reference when using (e.g.) Ogre Map Editor than to be a base for the final product. I can look at the rounding math, it might look better if I consistently use Floor instead of Round wherever rounding is occurring - I'll have to experiment. I don't know about making the grid lines antialiased. This is just using the GDI line drawing functions to draw the lines on an underlying bitmap, and I don't know if GDI supports antialiased lines without implementing it myself, which sounds like work :) The feedback is all very gratifying, thank you. [You like me! You really really like me! :) ] |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Thank you, I am using Win 8, I just minimised screenshot grid down to where only the capture button was showing and got a quick usable image that way.
|
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
I have just uploaded ScreenshotGrid 1.01 to the same DropBox link.
There are two changes: The first is that during screenshot capture, it now stays minimized for half a second, instead of 64 milliseconds. This may be enough time for it to still be minimized when the screenshot is taken in Windows 7 and 8. Please let me know if that problem persists. Windows 7 and Windows 8 may treat minimizing and maximizing differently. As it is completely unnecessary to maximize the ScreenshotGrid window for it to work, try leaving the window in its normal state and see if that works better. The other change is that by changing where the hex grid code rounds sines and cosines to taking the ceiling of the decimal numbers, the hex grids look much more consistent and correct at a lot more zoom levles. The tradeoff is some increased line doubling. I can have it either way, so let me knwo if you have any kind of strong preference either way. Thank you for your support! |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Cool, I'll give it another go over the weekend.
|
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Bumping, so people can know about this if they didn't see it two years ago.
I probably oughta make sure this is in the Ogre tools sticky thread. Download at https://www.dropbox.com/sh/gwiaixxbnuvr9px/5aC5UxZ_Fh |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Quote:
Proof |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Thank you. Could you add a pointer to the thread maybe? The app is a little specialized and it may not be entirely clear what it's for and how you use it without the explanatory text in the announcement thread.
Thanks again! Merry Chrismahanukwanzakah |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Quote:
|
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Quote:
|
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
Not that it really matters, seeing as it's posted with its own sticky, but this really should be within the Ogre Tools thread…
Looks good! D. |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
This thread isn't a sticky - I just bumped the two-year-old original thread.
And Buzzardo just did add a link to the download, and another to this thread, in the Ogre Tools sticky. Thanks. I appreciate the input. |
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
So have you done any more updating on the things you had indicated you'd be working on? I saw only the two files at the dropbox link.
|
Re: Announcement: New Map Bashing Tool - ScreenshotGrid
The changes detailed in post 13 are done. The only other feature that was even discussed was loading a background file, and I never got around to it.
You can accomplish the same effect anyways by loading the desired background in any other application, fullscreening it, then running ScreenshotGrid. |
| All times are GMT -6. The time now is 10:17 AM. |
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.