.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #1  
Old July 19th, 2008, 10:57 AM

llamabeast llamabeast is offline
National Security Advisor
 
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
llamabeast will become famous soon enoughllamabeast will become famous soon enough
Default Creating a fake map image file

Calling all technical types.

I would like people to be able to upload their own maps to the LlamaServer. However, I'd rather they didn't have to upload the images as well, since they are often large. It occurred to me that the images are surely fairly pointless - the server doesn't have to see the prettiness of the map. So I was hoping to set it up so that only the .map file need be uploaded.

However, you can't actually start a game without the map image present (it gets angry). So, I decided to write a program to create a fake image file, containing only a row of white pixels with as many pixels as there are provinces listed in the .map file. Ingenious, I thought. Unfortunately, it turns out that Dominions isn't happy with such an image file. On trying to create a test game, it said:

N�got gick fel!
can't find a valid starting province
N�got gick fel!
can't find a valid starting province
Aborted

So, my question is: what other features of the image file do we think Dominions needs? Do I need to space out the white pixels somehow? I'm at a bit of a loss, being as I don't know what Dominions actually does with the image file.

Hope someone has some ideas!

Thanks, llama
__________________
www.llamaserver.net
LlamaServer FAQ
My mod nations: Tomb Kings and Vampire Counts
A compilation of high quality mod nations: Expanded Nations Packs
Reply With Quote
  #2  
Old July 19th, 2008, 11:41 AM

Aezeal Aezeal is offline
Lieutenant General
 
Join Date: Sep 2007
Posts: 2,691
Thanks: 5
Thanked 39 Times in 31 Posts
Aezeal is on a distinguished road
Default Re: Creating a fake map image file

well no idea but just try to space them with a green pixel
__________________
Want a blend of fantasy and sci-fi? Try the total conversion Dominions 3000 mod with a new and fully modded solar system map.
Dragons wanted? Try the Dragons, Magic Incarnate nation.
New and different undead nation? Try Souls of Shiar. Including new powerfull holy magic.
In for a whole new sort of game? Then try my scenario map Gang Wars.
Reply With Quote
  #3  
Old July 19th, 2008, 11:43 AM

llamabeast llamabeast is offline
National Security Advisor
 
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
llamabeast will become famous soon enoughllamabeast will become famous soon enough
Default Re: Creating a fake map image file

Okay, I think I may have fixed it. I created a file like this:

RRRRRRRRRRRRR
RWRWRWRWRWRWR
RRRRRRRRRRRRR

where W is white and R is dark red, and it didn't complain. I'll do a bit of testing to see if there are any side effects, but if not this is going to be super awesome.
__________________
www.llamaserver.net
LlamaServer FAQ
My mod nations: Tomb Kings and Vampire Counts
A compilation of high quality mod nations: Expanded Nations Packs
Reply With Quote
  #4  
Old July 19th, 2008, 11:45 AM

llamabeast llamabeast is offline
National Security Advisor
 
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
llamabeast will become famous soon enoughllamabeast will become famous soon enough
Default Re: Creating a fake map image file

This is also quite exciting because trying to work out the .tga file format was the first ever time I've had a go at hex editing. Turned out, unsurprisingly I guess, to be quite easy.
__________________
www.llamaserver.net
LlamaServer FAQ
My mod nations: Tomb Kings and Vampire Counts
A compilation of high quality mod nations: Expanded Nations Packs
Reply With Quote
  #5  
Old July 19th, 2008, 12:30 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Creating a fake map image file

Love the concept but I dont think its going to work.

I tried copying a random maps RGB over another random map of the same size and starting a server game.

My machine had the map that the .map said was being used so no transmitting was done. But the result the old map, with very strange placements of flags. I didnt think that the host needed the graphic file either but apparently it does use it for something.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #6  
Old July 19th, 2008, 12:38 PM

llamabeast llamabeast is offline
National Security Advisor
 
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
llamabeast will become famous soon enoughllamabeast will become famous soon enough
Default Re: Creating a fake map image file

Bugger. Looks like you're right Gandalf.

Hmm, I think that's game over for that plan. What a shame.
__________________
www.llamaserver.net
LlamaServer FAQ
My mod nations: Tomb Kings and Vampire Counts
A compilation of high quality mod nations: Expanded Nations Packs
Reply With Quote
  #7  
Old July 19th, 2008, 12:39 PM

Aezeal Aezeal is offline
Lieutenant General
 
Join Date: Sep 2007
Posts: 2,691
Thanks: 5
Thanked 39 Times in 31 Posts
Aezeal is on a distinguished road
Default Re: Creating a fake map image file

/me gives llama a hug and an A for effort
__________________
Want a blend of fantasy and sci-fi? Try the total conversion Dominions 3000 mod with a new and fully modded solar system map.
Dragons wanted? Try the Dragons, Magic Incarnate nation.
New and different undead nation? Try Souls of Shiar. Including new powerfull holy magic.
In for a whole new sort of game? Then try my scenario map Gang Wars.
Reply With Quote
  #8  
Old July 19th, 2008, 12:48 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Creating a fake map image file

You might offer a number of different well-chosen maps from the various map generators, and support players creating their own .map files to go with them. Thats the only thing I can think of.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #9  
Old July 19th, 2008, 01:15 PM

llamabeast llamabeast is offline
National Security Advisor
 
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
llamabeast will become famous soon enoughllamabeast will become famous soon enough
Default Re: Creating a fake map image file

Thanks Aezeal!

Gandalf - yeah, I think that's the best plan really. Maybe down the line I could allow upload of whole map images, but there's the potential for problems there. Not least is the fact that the LlamaServer's web server is provided by a volunteer student group, so I want to leave as small a bandwidth footprint on it as possible.
__________________
www.llamaserver.net
LlamaServer FAQ
My mod nations: Tomb Kings and Vampire Counts
A compilation of high quality mod nations: Expanded Nations Packs
Reply With Quote
  #10  
Old July 19th, 2008, 02:29 PM
Ballbarian's Avatar

Ballbarian Ballbarian is offline
Colonel
 
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
Ballbarian will become famous soon enough
Default Re: Creating a fake map image file

Try this llamabeast:
Create a cross-platform program that your users can download (or run from a browser) that will change every pixel to black except for the pure white province markers. Then have them upload the resulting image.

I have attached a "minimized" version of the silent seas map image. The file size goes from 2787 KB to 50 KB. If you are able to automate zip file decompression as well, have the user or your distributed application zip the resulting "minimized" image and it will squeeze down to 2 KB.

I have not tested the map image in game yet, but I see no reason why it should not work. I have attached it to this post for anyone who wants to try it out.

Hope this helps!
Attached Files
File Type: zip 626221-silentseasBLNK.zip (1.1 KB, 65 views)
__________________
RanDom v2 - Map gen & Semirandomizer.
Province Editor - Custom province creation made easier.
God Editor - Custom pretender creation made easier.
Map Forge - Map editor
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:44 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.