Re: Proposed New MapGen File Format

It annoys me that I don't really know what's going on in this thread sad

52 (edited by =( sKoE )= 15-May-2009 01:30:38)

Re: Proposed New MapGen File Format

> Skoe your wrong. With 11 total characters...

*Sigh*. Lets create some examples:

A 5x5 map, 0s represent no system - 1s represent a system - 2s represent a home system.

01010
02200
00010
01000
10010

The first 2 is family #100, the second 2 is family #101.

The galaxy is Milky Way, with an ID of 1.

Morbo: Morbo can't understand his teleprompter. He forgot how you say that letter that looks like a man with a hat.
Linda: It's a 't'. It goes "tuh".
Morbo: Hello, little man. I will destroy you!!

http://www.youtube.com/watch?v=cpP7b2lUxVE

Re: Proposed New MapGen File Format

"What if each game uses different lingo? I.e. terminology that differs? Family might be called something else. Having a way to identify 'games' would be beneficial."
It becomes a question of how general you want to make the tool. Do you want to translate it to any game with a 2D map structure? Or do you want to limit it to IC-like games? It is possible to write a tool general enough to be used in many 2D games with maps, but it would require a different XML structure.

My assumption in making the tool is that it's applicable to IC-like games. That means sectors, systems, galaxies, families, planets, etc. Maybe in a future revision it could handle different language files, but for now I think it's simpler not to deal with the added complexity of different terms.

"Namespaces should be used for future revisions (1.0, 1.1, 1.2). Though i don't exactly see how much the map file can change..."
You were the one who suggested versioning the standard. wink

"Skoe your wrong. With 11 total characters, an error would not cause it all to fall down... an ignore anything but those 11 characters function can easily be written."
Huh? So if I replaced a 0 with a Z and the parser ignored that, would I cause an off-by-one error? One misplaced character can make the entire file invalid and impossible for the program to read. From personal experience, I managed to write a datafile (completely by accident) that froze the ICMapGen (I can't remember if it used 100% CPU or not). As skoe said, with XML, either you have a parse error (which can be detected and caught) or you have a change in the data.

CLEAR YOUR CACHE!
http://www.microsoft.com/windows/ie/usi … cache.mspx

Do not read this fortune under penalty of law.
Violators will be prosecuted.
(Penal Code sec. 2.3.2 (II.a.))

54 (edited by =( sKoE )= 15-May-2009 01:54:56)

Re: Proposed New MapGen File Format

Example #1 - proposed XML

<map galaxy_id="1" galaxy_name="Milky Way">
    <description>Round 69</description>
    <sectors_x>1</sectors_x>
    <sectors_y>1</sectors_y>
    <systems_x>5</systems_x>
    <systems_y>5</systems_y>
    <system_url>http://www.imperialconflict.com/system.php?x=%d&y=%d</system_url>
    <family_url>http://www.imperialconflict.com/myFamily.php?fam=%d</family_url>
    <systems>
        <system x="2" y="1" />
        <system x="4" y="1" />
        <system x="2" y="2" homesystem="100" />
        <system x="2" y="3" homesystem="101" />
        <system x="4" y="3" />
        <system x="2" y="4" />
        <system x="1" y="5" />
        <system x="4" y="5" />
    </systems>
</map>

Example #2 - Flints proposal

0101024'100'4'101'002000102100030010
Morbo: Morbo can't understand his teleprompter. He forgot how you say that letter that looks like a man with a hat.
Linda: It's a 't'. It goes "tuh".
Morbo: Hello, little man. I will destroy you!!

http://www.youtube.com/watch?v=cpP7b2lUxVE

Re: Proposed New MapGen File Format

> a future revision it could handle different language files

Multi-language features should be handled by the software. It should just know the difference
between two games, in order to know what lingo to use tongue.

Morbo: Morbo can't understand his teleprompter. He forgot how you say that letter that looks like a man with a hat.
Linda: It's a 't'. It goes "tuh".
Morbo: Hello, little man. I will destroy you!!

http://www.youtube.com/watch?v=cpP7b2lUxVE

Re: Proposed New MapGen File Format

This under the proposed line I put would be:

0101024'100'4'101'002000102100030010

a 0 for empty space, 1 for a planet, a 2 for next row no planet, a 3 for next row planet, a 4 for home system, 5 for home system next row. Or letters can be used. Each family could have an allowed number space inside ' ' brackets, for instance '4422'

Unwrapping it is just as easy.

Let me show it in a more broken up format now


0 = no star, check next number. 1 = star, not a home, check next 0.1.0... 2 = the next row for our star system is to start and there is no planet. 4'100' = There is a home system here, and it is numbered 100. 4'101' = There is a home system here, and it is numbered 101. 0.0.2.0.0.0.1.0.2.1.0.0.0... 3 = the next row there is a star, but not a home system. 0.0.1.0.

Now you can claim that if a 2 or 3 or 5 is placed incorrectly then the size of the galaxy changes...  but in truth the chances of that is pretty slim if you had it entered correctly the first time. Any errors can be easily detected with a simple script asking 'is each row of equal size?'

The only reason we need 11 characters is for family numbers, which can be 1234567890 in values (each separately a possibility) as well as our ' ' brackets to signify the area for the family number.

With this code I can easily do the following routine with MSWord.
First apply a space between all numbers with replace function, in turn. Assume a space in before and after in all below. Take all spaces out in fam numbers located between ' ' type brackets. This could be up to 100 fams with up to say 5 digits (in some future where IC becomes the pwn game to play) So this part would take 10 minutes... then...

Replace 5 with ^p Home:
Replace 4 with Home:
Replace 3 with ^p Star
Replace 2 with ^p empty
Replace 1 with Star
Replace 0 with empty
Replace '_ (_ simulating a space) with ^t
Replace space with ^t

Copy the results, paste to an excel file, and there is an instant map of the universe.

Everything bad in the economy is now Obama's fault. Every job lost, all the debt, all the lost retirement funds. All Obama. Are you happy now? We all get to blame Obama!
Kemp currently not being responded to until he makes CONCISE posts.
Avogardo and Noir ignored by me for life so people know why I do not respond to them. (Informational)

Re: Proposed New MapGen File Format

> Now you can claim that if a 2 or 3 or 5 is placed incorrectly then the size of the galaxy changes...

There are high chances that a number will be inputted incorrectly, for example:

0101024'100'4'101'002000102100030010

could be incorrectly inputted as

0101024'100'4'101'002000103100030010

giving the map:

01010
02200
00010
11000
10010

Which is valid (apart from the system count, which we havn't covered in the XML by the way <).


Anyway, to go back and fix your problem by hand is almost impossible. Remember that most galaxies
are quite large, and you would have a very large amount of data to sift through.

Morbo: Morbo can't understand his teleprompter. He forgot how you say that letter that looks like a man with a hat.
Linda: It's a 't'. It goes "tuh".
Morbo: Hello, little man. I will destroy you!!

http://www.youtube.com/watch?v=cpP7b2lUxVE

Re: Proposed New MapGen File Format

Standard coding would not give that error. We are talking such a pissy lil percentage as to be the chances Obama says he is not a natural born citizen as of tomorrow. Please if your gonna pick apart my idea at least give a legit reason.

Everything bad in the economy is now Obama's fault. Every job lost, all the debt, all the lost retirement funds. All Obama. Are you happy now? We all get to blame Obama!
Kemp currently not being responded to until he makes CONCISE posts.
Avogardo and Noir ignored by me for life so people know why I do not respond to them. (Informational)

Re: Proposed New MapGen File Format

- Its too easy to make a mistake flint. The chances aren't slim, they are huge.
- Your format is almost impossible for anyone to edit by hand (to fix a mistake).
- XML is standardised, and there is a wealth of information and stable APIs to use it.
- Your format is no where near as compressed as a binary format, and is just as unreadable by humans.

etc.

Morbo: Morbo can't understand his teleprompter. He forgot how you say that letter that looks like a man with a hat.
Linda: It's a 't'. It goes "tuh".
Morbo: Hello, little man. I will destroy you!!

http://www.youtube.com/watch?v=cpP7b2lUxVE

Re: Proposed New MapGen File Format

Smartys is the true know it all to his game (by computer function) Einstein the only thing you should do s evaluate what he has said more intricately than you have in the past.

Re: Proposed New MapGen File Format

My specialty is statistics and data. I may not be a computer language expert, but I can list an ideal format in here with ease.

Skoe is just a troll who hates me obviously and cannot come to grips with saying 'well it could work except' in a much more legit manner.

Errors... his errors are a joke, My warbot (IRC Eggdrop bot) was able to do things without error based upon input and output coding, he is just trying to troll.q

Everything bad in the economy is now Obama's fault. Every job lost, all the debt, all the lost retirement funds. All Obama. Are you happy now? We all get to blame Obama!
Kemp currently not being responded to until he makes CONCISE posts.
Avogardo and Noir ignored by me for life so people know why I do not respond to them. (Informational)

62 (edited by =( sKoE )= 15-May-2009 08:43:17)

Re: Proposed New MapGen File Format

>> Einstein wrote:

My specialty is statistics and data. I may not be a computer language expert, but I can list an ideal format in here with ease.

Skoe is just a troll who hates me obviously and cannot come to grips with saying 'well it could work except' in a much more legit manner.

Errors... his errors are a joke, My warbot (IRC Eggdrop bot) was able to do things without error based upon input and output coding, he is just trying to troll.q

Erm, well unless someone intelligent posts i'm officially finished for this thread.

Smartys:
- Add a game identifier
- Possibly add a total system count

The second point would be more of an error check then anything.

Morbo: Morbo can't understand his teleprompter. He forgot how you say that letter that looks like a man with a hat.
Linda: It's a 't'. It goes "tuh".
Morbo: Hello, little man. I will destroy you!!

http://www.youtube.com/watch?v=cpP7b2lUxVE

Re: Proposed New MapGen File Format

Sorry Flint Skoe is right

your coding scheme is crap- the current scheme is way better