Jump to content

jpexs

Fremen
  • Posts

    10
  • Joined

  • Last visited

    Never

Reputation

2 Neutral
  1. jpexs

    Map generator

    I checked it now and on the first look - the algorithm seems to be the same. It is placed in "MapSeed.cpp" file. The method "SmoothNeighbourhood" in the file adds the spice to the map, so they have spice included. They have decoded also functions "getCosinus" and "getSinus" which are needed for spice generation. I didn't know these are sin and cos, so I have these precalculated values as arrays of bytes. (As stored from Dune2 memory) Their code is working but not very well commented, the one MrFlibble posted (and which I modified) is more clear to understand.
  2. jpexs

    Map generator

    Method printMap prints map on the screen. Constants near 'case' are defined at the top of "SEED.C" file. (#define SAND 0, define DUNES 2,...) The second commandline parameter is name of file for map with tiles. The output file is binary - 64x64 raw data. Each byte is index of tile image from icons.icn. (See http://www.junkyard.dk/icon_map.asp)
  3. jpexs

    Map generator

    It's finished now, see first post and enjoy ;-)
  4. jpexs

    Map generator

    Wow, thank you very much for posting this! It's nice commented code. Finally I know names of methods which I was programming :-). Accordingly to this source, my generator in version Beta1a finishes after method "spreadMatrix". After releasing Beta1a, I wrote "balanceMap" and "createRegions"... This means I am currently somewhere before "scanRegions". And there should be some function to add spice. I will try to parse it...
  5. jpexs

    Map generator

    "all we need" is probably me to finish the rest of code to produce spice fields:-). I am working on it, so stay tuned ;-). I think I can then create some program to convert the map to image, it will be the easiest part.
  6. jpexs

    Map generator

    I've added some progress information to the first post.
  7. jpexs

    Map generator

    I do not know about any C++ code for it. Does exist code for generating whole map including spice fields? I think not. As I said: I have parsed only first 700 lines of ASM code of generating map. Whole method for generating map has about 2200 lines. In the remaining 1500 ASM lines, there is surely generation of spice fields, so maybe sometime in the future I will finish it.
  8. jpexs

    Map generator

    I did a little modification now - you can download BETA1a (updated link in first post). Please let me know if it still does not work. I am running in in WinXP Prof. no matter it's in DOSBox or not.
  9. jpexs

    Map generator

    This error looks like file "mem.bin" is not found. Make sure you have file "mem.bin" in directory you are running the program from. In "mem.bin" there is some data from original EXE used for map generating.
  10. Hello people, I tried to dissasemble Dune2.exe to get its map seed generator. I converted about 1000 ASM lines to Pascal, then MrFlibble, posted C++ code which already does most things (see his posts below). So I took the C++ code and FINISHED IT. My modifications: * Generating spice fields * Fixed tiles converting via "ICON.MAP" Usage: SEED2MAP.exe <seed> <name> The generator creates map using <seed>, prints the map on standard output and then creates binary file <name> with indexes of tiles in the file "icon.icn". Source code included. This means now we have FULL map generator which is exactly same as in Dune2. No more "seed revealing" or "savegame map extracting", this code generates whole map from one seed number. ENJOY! Dune2MapGen.zip
×
×
  • Create New...