Jump to content

Pitunia

Members
  • Posts

    22
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.ancarians.pl
  • ICQ
    0

Profile Information

  • Gender
    Female
  • Location
    Poland

Previous Fields

  • Favorite pizza topping
    cheese
  • Why do you want to join DarkMatters?
    milk
  • All time best video game ever played
    Sacred
  • Real Name
    Iwona
  • Country
    Poland

Recent Profile Visitors

3,949 profile views

Pitunia's Achievements

Indium Shaman

Indium Shaman (4/20)

0

Reputation

  1. Oh congratulations with the little one!!! Take it nice and easy! Gentle hugs!

  2. A dzień dobry xD

  3. Hi in New Year. Sorry that so late but I wasn't for some time in front of computer. During last days I'm a little bit absorbed in my pregnancy.

    Thanks for your Christmas Hugs.

    Hugs and Kisses :*

  4. Christmas Hugs attack!!!

  5. Pitunia

    svchost.exe

    Command line is superb... I had situations in past when I was forced to repair computer software using only commands Probably only people from 70. or 80. know how to do it Young persons probably don't know how DOS looks like and how using it BTW... Norton Commander and Midnight Commander rlz PS: That was my boyfriend xD
  6. Llama8... But that order is only in Sacred 2. In S1 all tiles are sorted into rhombus and displaying them isn't as easy as it looks. What more... If you want display images you must know what to display and how user can navigate. Because of that Schot choose MapLib. It's good solution but has limitations. If you don't want have them you must know how to use Google Maps API functions. It's Object JavaScript mostly (but you may also use XML, PHP, MySQL). My boyfriend is programmer (MSc of IT) so looks into code, read few manuals and examples and made working one. Later he start writing scripts to handle with images, because, as I wrote earlier, Google Maps use a tons of thumbnails 256x256 and each must be named according to pattern which is used to choosing this, which should be displayed (there is function which we first must write, define and whole displaying is based on it). With Sacred 2 it's easy because they are nice named in files (I've described pattern before your post). But making similiar for S1 will be muuuuuuch more complicated. Maybe not impossible, but veeeeeery hard... If we compare Sacred 2 and S1, work with Sacred 2 tiles was piece of cake Good, that he has experience with map generator (do you like it Schot? ) for S1 because at least he know everything about order in files and may try write some converter between order on google maps and S1 files. We will see how long it take Or rather if he will be able to write something that This script for converting images from Sacred 2 has a little more than 100 lines, but 1/3 of them are comments. Exactly 79/127 lines are working code. Rest are comments what is what and how works And back to topic... Displaying map on page is hard, because you don't know in fact how big will be output image, depending on scale. Very detailed means huge in size... To compare I say how big is most detailed map in Sacred 2 made from tiles. Map is a square which is made from 128x128 tiles 256x256 big so... 32768x32768 Some of them are only blank, but whole size is as you see enormous... Ok... This is how it works now. 7 levels of zoom (and level 0 as a global) display area 512x512 step by step Lvl0 is max zoom out. Google move sphere on something flat so on left and right from original they are "rolled" Look and compare. But remember... Those are png files, because I didn't wanna loose quality. Check, that most of them are 0.5MB files, and because of that I put thumbnails only. If you wanna see how it looks, click on chosen one. They are in scale 1:1 and that is how I see it on my screen. And as a bonus... First and second level of underground map as a whole: But this time only on lvl1 zoom
  7. Smile yourself Schot... Now my boyfriend is testing some scripts he wrote today They cut images extracted from Sacred2 PAK folders, name them and need only script which can display them. And this using Google API is already written Now only start script and check if they do work with images correct But png isn't good solution for server... Biggest layer (from 7 layers - 7 levels of zoom) have more than 16.000 of 256x256 images So on disc all images from all layers in png would take more than 2GB. And number of files reach almost 33000. JPG have worse quality, but on-line page with map from PNG-files could be veeery slow [EDIT]Everything done without problem Scripts works for Sacred 2 and their tiles long but flawless After all there is 24416 PNG-files which take 1487,5 MB JPG with 70% compression level... only 141,7 MB, which could be acceptable I think Remember, that at one time, one person download on 512x512 display only 4 images, and when zoom in, zoom out or move... download only uncached tiles. Of course it takes bandwidth, but not as much as downloading single big file OK... I run script to generate tiles for lvl1 underground
  8. When I was playing with generator of Sacred2 map I've found funny Easter Egg, which is unable to seen in game. Only through extracting files Two of tiles in minimaps.zip on lvl1 of undergrounds made together a freak emoticon 054_004_D1.dds and 054_003_D1.dds and here is result of those two:
  9. Now its easier than in UW Tiles are in order easier to understand than in S1: Tiles are numerated: first 3 digits from left to right, second 3 digits from bottom to top, and 2 letters as a level (layer). You will see it as a 000_063_B0 001_063_B0 (...) 062_063_B0 063_063_B0 000_062_B0 001_062_B0 (...) 062_062_B0 063_062_B0 (...........................................................................) 000_001_B0 001_001_B0 (...) 062_001_B0 063_001_B0 000_000_B0 001_000_B0 (...) 062_000_B0 063_000_B0 And something similiar with D1(dungeon lvl1) and D2(dungeon lvl2). You probably noticed that already It's much easier now to make interactive map. Even very detailed should be easy to do with Google API because normal tile in minimaps is 512x512 so it's exactly 4 tiles 256x256 (and that size is needed by GAPI)
  10. Would you like to have tis php file for Sacred: UW or Sacred2? Just moment ago my boyfriend finished script for generating minimap for Sacred2 world. It's memory consuming and many times browsers stop responding when it is loading data on screen. So using it is best after starting system, when memory is fully free. But it works for sure. You switch between surface and both levels of undergrounds with select and with checkbox you mark which should be generated. Something similiar is with Sacred UW. But it has no undergrounds so after loading fully to browser you may check what you want and generating [EDIT]: I've sended you information on PM Schot Script are without comments inside but I think you will understand it Oh... One more It need Apache with PHP and GD2 library installed. This library is usually installed by default with PHP so you shouldn't have any problems. Check and try it. On slower computers however it may take time fully load in browser. Sacred UW script load more than 6000 thumbnails 64x64, and Sacred2 script at start load surface so about 3000 thumbnails 64x64 Be patient And as I wrote in PM... Those scripts are so memory-consuming that they are only for works on localhost
  11. So I add also my opinion in copyright discussion. Copyright in many countries are different. They aren't unified. What is legally protected in USA in my country for examples, don't have to be. Everything is cover by each country "Copyright Protection Act" and here lies a problem. What is in one country legal in second don't have to be. As a second example well known copyright sign in my country has no power. In my country everything must be verified by some national agency earlier to compare if someone has no rigth to something similiar. There is one exception - something with International Protection Rights. For example rights to Sacred2 has Ascaron, but in my country, polish distributor - Cenega. Much worse is with intelectual rights. We have Legal Act but it's so unclear, that in many situation many depends from situation, context, interpretation :/ If I wanted, I could add to my code for example that it is on LGPL licence, CreativeCommons or whatever I could choose from many of them. But in case of map for me there is a subtle difference. All of us are clients of Ascaron because we bought game and EULA (End User License Agreement) is binding us. According to it we are unable to do nothing with game: modding, extracting data... simply - we can only play. Anything else is breaking EULA :> Those rights was made to protect producer from persons who modified game in way which it may be dangerous for third persons (trojans, viruses, malware attached to modification) and to protect them from using their work under other name. Our scripts are only GUI (Graphical User Interface) which use data for which rights have Ascaron. We may be only authors for that scripts. Unless we don't add extracted data to it - we are fully legal. I may tell you what to do, but cannot give data here, because simply I don't have rights to them. I use this data on my own way but only on my own computer and don't leak on another. If I add, for example only, few images for someone to check how this script works it would be breaching of rights. But as I said... I'm still owner of that script because I don't use software of third person at this moment. If someone will use it... do it on it's own, if only have missing data for which I don't have rights. The same is with plugins. Someone who write them have rights to them but cannot include to it code or compiled version of software which use this plugin. It may be even sold... But seperately, not budled. Only exception is when legal ownership agree on that. Without his permission it is illegal. There is another aspect of this. EULA is too fast. We are forced to accept it without knowing what is included in precompiled exe/jar/script. We of course have right to uninstall it when it don't meet our expectations, but for example DRM aren't treating us as a legal owner. They cross invisible line treating us like a potential pirat user sometimes blocking software which is legally on our machine. It is far from being fair...
  12. OK... Now my turn At start I explain a little. I used extracted and converted images from archives. It's faster than reaching each time to archive. I use folders and files structurized. Before I start explaning I write as a code structure on my server I add also info how to extract and what to do before we start browser. Map of Sacred2 First we need to extract data from /pak/minimaps.zip and only files with names starting with sat. Those starting with grnd are only with blurry grounds. Then we need one additional software: DDS Converter, because extracted files are dds files which are unreadable to browsers and most of image browsers. This tool can convert dds to jpg or png. Then move to folder (or folders). My structure on server is: minimapB0/ minimapD1/ minimapD2/ index-mini.php I put here code in PHP. And after I tell what is in <html> <head> <meta http-equiv="Content-type" content="text/html; charset=UTF-8"> <title>Map of Sacred2: Fallen Angel - whole minimap</title> <style> body{ background-color: black; } img{ outline: solid 1px red; position:absolute; } select { position:fixed; } p { color: red; font: bold larger Helvetica, Arial, sans-serif; } </style> </head> <body> <form method='post' action='index-mini.php'> <?php $wysokosc = "B0"; if ( isset( $_POST['layer'] ) ) { switch ( $_POST['layer'] ) { case "D2": $wysokosc="D2"; break; case "D1": $wysokosc="D1"; break; default: $wysokosc="B0"; break; } } $sciezka='minimap'.$wysokosc.'/'; for ($I=0; $I < 64; $I++){ for ($j=0; $j < 64; $j++){ $filename = sprintf("sat%03d_%03d_%02s.png", $I, $j, $wysokosc); $name = sprintf("%03d_%03d", $I, $j); if (file_exists($sciezka.$filename)){ $l=$I*512; $t=(63-$j)*512; echo "<img src='".$sciezka.$filename."' style='position:absolute; left:".$l."px; top:".$t."px'>\n"; echo "<input type='checkbox' name='".$name."' style='position:absolute; left:".$l."px; top:".$t."px'>\n"; echo "<p style='position:absolute; left:".$l."px; top:".$t."px'>".$name."</p>"; } }; }; ?> <select id='layer' name='layer' onchange="submit()"> <option value="B0">Choose layer</option> <option value="B0">Surface</option> <option value="D1">Underground lvl1</option> <option value="D2">Underground lvl2</option> </select> </form>enations: </body> </html> And now explain... action='index-mini.php' As a action put here name of that file. He is requesting itselt info about which layer we choose $sciezka='minimap'.$wysokosc.'/'; Here are paths to images. I use different folders for each layer. So I have 3 folders: minimapB0, minimapD1, minimapD2. If you put all of them in one folder change that code to: $sciezka='your_name/'; for ($I=0; $I < 64; $I++){ for ($j=0; $j < 64; $j++){ This is how big part of map will be displayed. 64x64 is whole map. If your computer have less memory change values here to different range from 0 to 64. Remember: there are sometimes errors in files and some tiles are looking like they don't match it's place or have corrupted colors. Try convert them from original DDS file once more. If that don't change anything - it means that is error of original image. This code only display right image in right place. Nothing more. At least now $filename = sprintf("sat%03d_%03d_%02s.png", $I, $j, $wysokosc); If you saved files not as PNG but JPG - change that extension. Remember: Browsers accept only few extension as a images: JPG, PNG, BMP, GIF. Use only one of them. $l=$I*512; $t=(63-$j)*512; Tiles have width and height 512 pixels so we multiply by 512. If you have different size - change it. Attention! If you have changed values in part above (in for loops) here you must change also code a little. I gave example how it should look. for ($I=5; $I < 18; $I++){ for ($j=8; $j < 22; $j++){ $filename = sprintf("sat%03d_%03d_%02s.png", $I, $j, $wysokosc); $name = sprintf("%03d_%03d", $I, $j); if (file_exists($sciezka.$filename)){ $l=($I-5)*512; $t=(21-$j)*512; echo "<input type='checkbox' name='".$name."' style='position:absolute; left:".$l."px; top:".$t."px'>\n"; echo "<p style='position:absolute; left:".$l."px; top:".$t."px'>".$name."</p>"; First whole line can be erased. I will use it in near future, when I change this code to code which generate images from chosen tiles. Second line add name of image on it. It makes looking for chosen files easier I have some similiar code but for Sacred: Underworld. That second is not from original size tiles. It display 64x64 thumbnails and is full working generator. It is ancestor of this one which, code is above. But it's limited by our system memory. When we choose to much, system is unable to allocate enough memory and script crush. If you are interested I may post and explain it here.
  13. Yes... But it's only surface view as you already mentioned. I played also with unpacked files and there are also two levels of dungeons. In fact there is more than only one map of world. One is "fairy" (as we see under M key), second is as your linked thumbnail. But there is much detailed version combined from minimap parts(as we see when Tab is pressed). I have script which can display them in browser, but it is php script so need server on localhost who have php-interpreter. It should be simple to convert it to JavaScript what could be a good solution. Problem for people could be with files. Originally in zips are DDS (Direct Draw Surface) files which have to be converted into "readable" for browsers JPG or PNG. I have script which display whole map of Ancaria in Sacred: Underworld and it was memory consuming. After load it could use approx. 1,5GB of memory. And it was "only" more than 6000 thumbnails 64x64 pixels. Loading of original 256x256 takes few minutes. I even cannot imagine how long it could take in Sacred2. Probably you may go to kitchen and make a coffe or two before map fully load
×
×
  • Create New...
Please Sign In or Sign Up