Jump to content

Dune II - maps


WhiteFang

Recommended Posts

  • 2 weeks later...

I found them to be pretty inconsistent.

Sometimes ')' was used instead of '^', and many other such things.

Symbols representing rock were rock though, and sand was sand.

It's just that if you try to take the symbols for specialized graphics you'll see some mistakes. Example: '^' meaning a tile consisting entirely out of rock. They are sometimes not that. They are rock though, just not always the special type of rock the textfiles let you believe.

Link to comment
Share on other sites

  • 5 weeks later...

The format is quite inconsistent due me being bored and not thinking about a good format in time. However, here is a code snippet that should clear this for you:


if (letter[0] == '%')               
                    map.create_spot(iCell, TERRAIN_ROCK, 0);

if (letter[0] == '^')
map.create_spot(iCell, TERRAIN_ROCK, 0);

                if (letter[0] == '&')
map.create_spot(iCell, TERRAIN_ROCK, 0);
               
                if (letter[0] == '(')
map.create_spot(iCell, TERRAIN_ROCK, 0);
               
if (letter[0] == 'R')
{
map.create_spot(iCell, TERRAIN_MOUNTAIN, 0);
}
if (letter[0] == 'r')
{
map.create_spot(iCell, TERRAIN_MOUNTAIN, 0);
}
if (letter[0] == '+')
{
                    map.create_spot(iCell, TERRAIN_SPICEHILL, 0);
}
if (letter[0] == '-')
{
map.create_spot(iCell, TERRAIN_SPICE, 0);
}

// HILLS (NEW)
if (letter[0] == 'H')
map.create_spot(iCell, TERRAIN_HILL, 0);

if (letter[0] == 'h')
map.create_spot(iCell, TERRAIN_HILL, 0);

Btw, DUNE 2 -> JAVA? Possible? Is there a good graphical library for this then?

Link to comment
Share on other sites

You're probably already using some sort of framebuffer mode.

That is to say, writing a screen to a piece of memory, and when that's done, displaying that piece of memory.

I'm sure the same thing can be done with Java. Should be fairly straightforward.

Also, if that's your current code, you might want to use a switch statement.

That should speed things up; not letting the program go through all those if checks.

I could post the code I currently have for it if you want. Though it's straightforward to implement.

Also, the hills ('H' and 'h') are in your code! Haven't come across them in the (textfile) maps yet. Do you have new maps? *crosses fingers* ;)

Link to comment
Share on other sites

One thing is actually making a frame buffer system (quite simple). Another thing is getting the graphics card to cooperate efficiently. I hope there's a library for that in Java. I've used DirectX before, and that was a breeze to learn and work with.

Link to comment
Share on other sites

the code above is actually used, and yeah a switch is better to be used, but the code is old (very old...) and it worked.. and you know "dont fix things that aint broken".. bah .

Btw, the code is in C.

In d2tm i use the buffering method to display. Write all data on a buffer, then display buffer to screen and so on (reduce flicker, speeds up fps).

If that can be done easily in Java, and with good speed, i can do probably all in Java then what i am doing now in D2tm C/C++. But doing it 100% OO if done right. ;)

Edit:

The hills are in some seed files, the later ones (see d2tm latest download, which has ALL dune 2 seeds revealed).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...