[Release] TinyMap (DMap converter & loader)

02/02/2011 02:14 .Kinshi#1
TinyMap v1.7 + Source

:Updates:
  • Fixed bug with multiple Map Id's using the same DMap

:What?:
TinyMap is a DMap loader and converter for private servers (or any Conquer application) coded in C# (.Net 4.0)
It unzips the DMaps, loads them, combines them with Scene files, and converts into TinyMap format.
TinyMap files load a lot faster than the regular DMaps.

:Why?:
TinyMap is quick and easy to use. If you're still loading the regular DMaps or not loading them at all, this is for you!

:How to use:
Download the file below, it will have a TinyMap.dll file and a 7z.dll file.
Add a reference to only the TinyMap.dll file to your application, but NOT the 7z.dll file or SevenZipSharp.dll file. Put the 7z.dll and SevenZipSharp.dll files with your executable.
Include it in the file where you want to use it.
Code:
using TinyMap;
Then define a new TinyMapServer.
Code:
public static TinyMapServer TMapServer = new TinyMapServer();
To begin loading, change ConquerDirectory to where you installed Conquer.
Make sure it has the ini and map folders in it.
Code:
TMapServer.ConquerDirectory = @"C:\Program Files (x86)\Conquer 2.0";
TMapServer.Load();
To check for valid coordinates use:
Code:
bool valid = TMapServer.Valid(MapID, X, Y);
To check for valid coordinates, using height as well, use:
Code:
bool valid = TMapServer.Valid(MapID, currentX, currentY, newX, newY);
:Options:
Code:
// Options shown are set to their default value
TMapServer = new TinyMapServer() 
{
    ConquerDirectory  = @"C:\Program Files (x86)\Conquer 2.0",
    LoadPortals = false, // Adds portals to TinyMaps
    Threading = false, // Runs on a different process
    ShowOutput = false, // Shows what TinyMaps is doing
    ShowErrors = true, // Shows errors that occur
    LoadHeight = false, // Adds height to TinyMaps
    ExtractDMaps = true // Set to false for older client versions
};
:Features:
  • Scene support
  • Height support
  • Fast TinyMap load times
  • Optimized DMap load times
  • PNG conversion
  • Load TinyMap when a player enters a map

:Thanks:
  • Sparkie
  • Korvacs
02/02/2011 15:27 ImFlamedCOD#2
Looks great, checked it out tested it with my latest source and everything worked fine. Nice release tho.
02/02/2011 19:22 .Kinshi#3
Quote:
Originally Posted by ImFlamedCOD View Post
Looks great, checked it out tested it with my latest source and everything worked fine. Nice release tho.
Thanks, I'm glad it worked for you!


Added version 1.4!
02/03/2011 02:41 Santa#4
Doesn't Korv's loader do the same thing? Doesn't he convert them to like .smap or something? How does this compare to his?
02/03/2011 09:31 .Kinshi#5
Quote:
Originally Posted by StarBucks View Post
Doesn't Korv's loader do the same thing? Doesn't he convert them to like .smap or something? How does this compare to his?
Well, the new DMaps are zipped into .7z files, thus changing the GameMap.dat file to look for the .7z files, not .DMap files.
Korvac's doesn't support this, so it won't find and convert the new DMaps.

TinyMaps on the other hand, unzips the 7z files for you, loads them, and converts them.
If new maps come out, just delete your "tinymap" folder and the TinyMap server will convert them automagically.
It has more options to what you want to do, and is a lot easier to set up, you don't have to change files and folders around at all.

Plus, I'm updating and adding new features to TinyMaps.

Give it a try.
02/03/2011 12:26 .Kinshi#6
Update!

Added version 1.5.9!
Changes:
  • Added validity checking for height
  • Fixed bug where scene files weren't loading correctly
  • Modified PNG conversion
02/04/2011 04:21 Its Arco#7
TOO AWESOME MAN. YOU THE PRO MAN. I LOVE YOU KINSHIKINS!
02/04/2011 05:51 .Kinshi#8
Quote:
Originally Posted by stigs View Post
TOO AWESOME MAN. YOU THE PRO MAN. I LOVE YOU KINSHIKINS!
Thanks!


Update!

Added the SevenZipSharp.dll, which I forgot to pack this whole time cause I'm slightly retarded.
Just keep it with the 7z.dll file.
02/04/2011 17:38 gabrola#9
Hmm you should save the accessibility and height values as bits just like in Korvacs' loader, that should make the maps much more smaller in size.
And you should work on converting to a png like this one...

[Only registered and activated users can see links. Click Here To Register...]
02/04/2011 23:29 .Kinshi#10
Quote:
Originally Posted by gabrola View Post
Hmm you should save the accessibility and height values as bits just like in Korvacs' loader, that should make the maps much more smaller in size.
And you should work on converting to a png like this one...

[Only registered and activated users can see links. Click Here To Register...]
Yeah I think that's the next update I'll work on.

Well this is designed for private servers, so accessibility and height are all I need. Making an image like that would require loading more values, which is not the point of this.
02/05/2011 03:34 Illiest#11
That would be nice, just putting the .DDS files together then breaking them apart when you're done editing them.
02/05/2011 07:10 gabrola#12
Quote:
Originally Posted by .Kinshi View Post
Yeah I think that's the next update I'll work on.

Well this is designed for private servers, so accessibility and height are all I need. Making an image like that would require loading more values, which is not the point of this.
It shouldn't be, this should be pretty useful for a person developing a bot for official CO.

Quote:
Originally Posted by edwardvuong View Post
That would be nice, just putting the .DDS files together then breaking them apart when you're done editing them.
Theirs still scenes which need to be put on the map, such as trees and stuff.
02/05/2011 08:21 .Kinshi#13
Quote:
Originally Posted by gabrola View Post
It shouldn't be, this should be pretty useful for a person developing a bot for official CO.
Well what I was getting at is that its not designed to load all those extra stuff.
It checks for accessibility and height, which are the only things you really need for a server, or a bot, or anything like that.
02/05/2011 09:55 Its Arco#14
Quote:
Originally Posted by gabrola View Post
It shouldn't be, this should be pretty useful for a person developing a bot for official CO.
Well since its posted in the PServer Guides & Releases, one wouldn't think its for official CO.
02/05/2011 12:27 .Kinshi#15
Quote:
Originally Posted by stigs View Post
Well since its posted in the PServer Guides & Releases, one wouldn't think its for official CO.
It reads the official DMaps. So really it can be used for any application needing access and height from DMaps. Private servers are just the most prevalent application.