minimap generator program

Author Topic: minimap generator program  (Read 6457 times)

yeah i bet you never thought you'd see this project ever again. figured out yesterday there's some like nomad hermit community of good people still left and also figured out this mod was way more finished than i remember it being. this one goes out to all the Cool Dudes out there

i'll let the images speak for themselves before i force you to read the 50 pages every programmer writes about their program features

features:

q&a:
  • will you add x feature?
    • no


  • help, when i press "Create Minimap" nothing happens, even after waiting several minutes!
    • post the minimap.log, i'll try to take a look at it when i have the time

  • this program doesn't work on my ubarchebiankaliora OS, what do i do?
    • despite being a java program and in theory portable, the program relies on some .dll's that give it fast .obj loading functionality. the JVM for linux/macos doesn't like this and would much rather prefer .so's. the program might work on wine though

  • wrow, i never thought i would see your name again. are you staying for a while, or are you going to release anything else?
    • no. i cut blockland out of my life 6 months ago when i realized that interacting with this awful community was slowly killing me by giving me massive anxiety and self esteem issues. even as i write this after a 6 month break from the forums, i find myself strategically phrasing things to avoid looking weak so i don't get pounced on by 50 starfishs. looking back on it, i used to be a super irritable cunt (if i ever berated you for having poor balance in your server for 50 years, i'm really sorry. i feel ashamed i was ever like that) because of blockland and a blocklandless life has been way more fun and fruitful than i could have imagined. if you think you've escaped becoming the blockland starfish, you haven't escaped at all. i really recommend cutting this community out of your life because it really just makes you feel better. i do have nostalgia for a bunch of fun servers and their cool people, but that's the past and i want to move forwards in my life, not backwards. releasing all my add-ons would not only be a chore, but could be the catalyst for me rejoining this forgethole again due to the obligation to show people how my different add-ons work and how to set them up on their servers. i'm sorry, i just can't do that to myself. i can't exist in a place where deus ex told a rape victim it was her fault, where pear-earther gothboy raises his vaccine-less children with blockland, or where master matthew discredits all LIBBRAAL MEEEEDIA anymore.

      releasing this program is easy enough since its basically guaranteed to work on anyone's computer, since its an external program that doesn't have to worry about add-on intercompatibility issues and is reasonably well polished. also, it lets me gift something back to the small building community blockland still has, and as far as i can tell that's where all the nonsociopathic people of blockland are.

that being said, here's the downloads:
add-on: http://www.garycact.us/i/U2NlbmVyeQ/B_ILeKS2.zip
program: http://www.garycact.us/i/U2NlbmVyeQ/agnZA5o4.zip
program source: http://www.garycact.us/i/U2NlbmVyeQ/DEl1CH3f.zip (seems to be decently documented. i used this stuff in a school project and the teacher would've shot me if i didn't document it)

how to use it:
  • 0. do not be a fascist. if you are a fascist, the program will automatically detect it and blow up your computer.
  • 1. make sure you have the latest version of 64 bit JRE8 installed. you can find it here: https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html . the program does not support 32 bit versions of JRE.
  • 2. place Server_Minimap.zip into your Add-Ons folder, and extract the contents of program.zip to Blockland/minimap/jars.
  • 3. with the new duplicator, select the bricks you want to make a minimap out of and use the command /createminimap filename to save the selection (filenames with spaces in them are not supported). with this method, only bricks within the selected area will be rendered in the minimap. only super admins can use this command. to save the whole map at once, do not select anything with the new duplicator and use the command /createminimap filename all. both commands will create a .blmm file inside Blockland/config/server/Minimap.
  • 4. run start.bat, which you should have extracted earlier into Blockland/minimap/jars along with some other files. this will open up a GUI that should look like http://www.garycact.us/i/U2NlbmVyeQ/yZHCcJaM.png . select the .blmm file you just created in Blockland/config/server/minimap, adjust the stud resolution and decide whether or not you want shadows, then press create minimap. when you create a minimap for the first time, the program will take a while converting brick files into a format the program can use. this may take several minutes at worst. afterwards, a separate window will open that will rapidly flash small birds-eye-view screenshots of your map. after this process is complete, the program will save the minimap's result as screenshot.png within the jars folder.
  • 5. congratulations, you did it. don't forget to sacrifice at least one minimap screenshot biweekly to your nearest gyt effigy as thanks for the major miracle that is this program working at all.

technical description of how this works, for nerds:
the program converts all .bls files it needs to render a map into .obj's, which are then positioned, rotated, colored, and later rendered in a simple rendering engine i made in JOGL. the .bls -> .obj code is robust and should work with just about any .bls, even the ancient ones that were seemly handtyped by the worlds first chimpanzee blockland modders. when the converter discovers a malformed .bls file, its almost certainly the brick maker's fault and its likely the brick wouldn't have even worked in blockland anyway. the program takes many orthogonal screenshots of the map from above, with different zoom based on the pixels per stud resolution the user specifies. with shadows enabled, the program uses the worst shadowmap generator code you've ever seen in your life to make shadowmaps for each orthogonal screenshot, with the frustum adjusted based on the tallest brick in the build. the last part ensures even massive mountains or skyscrapers have their shadows applied to the rest of the minimap screenshot for miles, with only a minor downside of decreased shadow resolution. i found the best (easiest) way to make the minimap image was to take many smaller resolution screenshots (500x500, because a window of that size should be able to display without being cut off on any monitor made in the last 20 years) and stitch them together at the end to produce a final image. i didn't ever get the chance to sit down and optimize the program for speed and memory, so its likely this code could still be optimized down to run lean and mean and not use as much memory as a simulation of the entire known universe. that being said, its still very quick and i haven't had any issues rendering massive builds at decent pixel per stud resolutions on my stuffty laptop (any other traditional minimap generator you have seen from years past was typically a raytracer implementation and would take at least 100x longer to render anything at an equivalent resolution. additionally, as build size increases or as resolution increases, these raytracers would experience the hell of O(n^2) complexity and it would literally take a full day of raytracing to render a shadowed minimap at any pixels per stud resolution above 4x4).
« Last Edit: January 10, 2019, 07:50:31 PM by Gytyyhgfffff »

thank you a lot for this. really glad to see you put the effort into releasing this despite the poo community

yo this lools REAL forgetin nice dood

gj on cutting this game out from ur life too, with the stuff that happens here youre better off not even coming back to it

thank you gyt, this is good work. Glad to see you're still the face of quality content around here, it's pretty inspiring
« Last Edit: January 08, 2019, 01:14:21 PM by PhantOS »


I was thinking about this program relatively recently, and am very glad you got to releasing it.

THis is both amazing and the biggest coincidence ever, I was googling your old project thread to see if any development was done about 30 minutes before you posted this.

I’m really glad to see this finally released, I’ll have to try it out sometime


It's all I ever wanted and more

Good to see you’ve found more fulfilling things in life. Happy for you.

Sad to hear the community wore you down like that.

update:
  • fixed /createminimap filename all not saving 100% of the bricks

download the new add-on file here:
https://www.garycact.us/i/U2NlbmVyeQ/McrGhVmK.zip

update:
  • fixed some shadow artifacts on sloped surfaces and a weird shadow outline on most bricks

download the new program here, extract it to Blockland/minimap/jar:
http://www.garycact.us/i/U2NlbmVyeQ/qfj40OAt.zip


this is so good
i can finally have a print of my maps in the spawn areas :o