 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
Fubla
|
 |
San Jose
Jan 1970 time: 21:14
|
|
All right shade - that fixed it. And finally, archipelagos that actually are archipelagos! Well, sort of. Better than the Civ2 Map Editor anyway.
Speaking of which, I saved a map in .mp format, and the Civ2 Map Editor said it was invalid, but it worked fine in the game itself. Go figure. Also, I noticed that the resource specials in your editor didn't follow the same seed pattern as those in the Civ2 Editor - I think you went over that at your webpage. But I noticed that when you start a game on the maps, the only specials that show up are the ones that correspond with the Civ2 seed format, which means that there are huge masses of land with no specials whatsoever. (I'd like to see some of those 320 AD landings on THAT map...) Anyway, you might want to look into this, and you might not want to, considering it's designed to be an editor for your game and not Civ2.
Oh, another tiny problem - you might want to change "dessert" to "desert" on the terrain menu. Slightly different connotations.
But all in all, good work!
|
|
|  |
 |
|
shade
|
 |
of bribery.
May 2001 time: 06:14
|
|
I'm glad it was just that.Phew what a relief.
quote: Also, I noticed that the resource specials in your editor didn't follow the same seed pattern as those in the Civ2 Editor - I think you went over that at your webpage. But I noticed that when you start a game on the maps, the only specials that show up are the ones that correspond with the Civ2 seed format, which means that there are huge masses of land with no specials whatsoever. |
Well yeah,Civ2 uses a seed,I just put them on the map and save them with the terraintype.(but i will take a look at the save procedure,when i was trying to get rid of the huts i played around a little with one bit of the terraincode.if this bit is turned on there can be no resources(except for huts) on that terrainsquare.So i got the idea to (ab)use this so the rescources would be placed at the same spots as mine,but it didn't work=> I probably forgot to delete that line afterward,thx for telling me.
quote: Speaking of which, I saved a map in .mp format, and the Civ2 Map Editor said it was invalid, but it worked fine in the game itself. Go figure. |
(now shoot me)It worked fine with me.(try a 40x50 map=>let me know what it does)=>probably just the round function seems like it rounds 12.5->12 instead of 13 and that might give a problem.(i'll have a look in to it)
dessert oeps (that's one of the problems if English is not your native language=>more spelling errors )
shade
|
|
|  |
 |
|
Edward
|
|
Shade,
English is your second language!? You write better than many Americans I know!
You may be interested in some other Civ "re-creation" efforts. Check out the Alt.Civ area of Apolyton:
http://apolyton.net/alt/
Most notably FreeCiv.
FreeCiv's homepage: http://www.freeciv.org/
Apolyton's forum on FreeCiv: http://apolyton.net/forums/forumdis...?s=&forumid=111
It's open source so you could see potential ways to code Civ2 stuff. I believe one of it's creators is active on Apolyton.
quote: Originally posted by Blaupanzer
Personally, I'd rather live in a dessert than a desert. Specials could be spun sugar and big rock candy mountain. More useful for keeping people happy than oil and oases. We're all learning; keep civin'. |
I believe dessert's whale-group special is Molasses Swamp (3 movement points). However, even normal dessert squares produce a lot of food. Great for pumping out settlers in the early game.
|
|
|  |
 |
|
Quantum Satis
|
|
Sweden
Aug 2000 time: 06:14
|
|
I can recommend a very good map generator made by Peter Blackman. You can download the Zip-file (253 KB) from his homepage at: http://www.cix.co.uk/~spot/
|
|
|  |
 |
|
Edward
|
|
Shade,
A possible solution to circular rivers, go upstream:
Make your river algorithm always start a river in a coastal square (even if it's the coast of a small inland lake). All rivers must dump their water somewhere (unless they're really narrow stagnant lakes or were built by M.C. Escher).
After winding your main waterway inland, you can randomly add a few tributaries if desired.
|
|
|  |
 |
|
shade
|
 |
of bribery.
May 2001 time: 06:14
|
|
Fubla:I found the problem with the Civ2 editor(i think):there is no problem.I made some maps with my editor and with the civ2 editor using the same variables(ie same size),I also created a little testprogram to show me BYTE by BYTE what the difference between 2 such maps was.=>nada,njetsk,notthing,nil,...(you get the point and my depression)
But still the Civ2 editor gave an error loading my maps.(but not all the time)
=>There is 1 thing I am certain of now ,if you get the error just create a map(random or empty doesn't matter)with the Civ2 editor of the same size and try loading again.When i did that there were no more loading errors and everything went perfect ,don't ask me why or how.but this seems to work.
I included 3 maps in this post,if you want you(or anyone else) can try them out(i would ask to try without creating an other map first,i just want to know if they load)
(you really learn to "love" computers when you're programming )
Edward:that's a good idea but(yes there's a but,I'm sorry)
1)there still will be circles
2)takes longer to find a good starting spot(but this is the least of my troubles 
Shade
Attachment: testmaps.zip
This has been downloaded 3 time(s).
|
|
|  |
 |
|
Edward
|
|
shade,
You're correct, there could still be circles. But I think rivers without outlets are more "unrealistic" than rivers with an outlet and some circles in it. Even the Civ2 game generates rivers with loops.
To avoid circles you might try:
1) find a random coastal square. You could loop through all the squares on the map and make a separate array of only squares where:
* square is not ocean
* square isn't a hill or mountain
* square doesn't already have a river
* one or more of the four perpendicularly adjacent squares (not diagonally adjacent) are ocean
Then choose a random square from your array. Call it (coastX, coastY)
2) build the main river path by...
square [coastX, coastY] := river;
addRiverSquare (coastX, coastY, 1);
with the function:
function addRiverSquare (x, y, numRiverSquaresSoFar) {
if numRiverSquaresSoFar < someConstantBasedOnWorldWetness +/- randomNumber {
make array of all 4 adjacent squares (not diagonally adjacent) and call it adjacentSquare[];
jumble up the adjacentSquare[] array so the four elements are in a random order;
foundGoodUpstreamSquare := false;
i := 1;
while i <= 4 and not foundGoodUpstreamSquare {
if isGoodUpstreamRiverSquare (adjacentSquare[i].x, adjacentSquare[i].y) {
foundGoodUpstreamSquare := true;
square [adjacentSquare[i].x, adjacentSquare[i].y].hasRiver = true;
numRiverSquaresSoFar := numRiverSquaresSoFar +1;
addRiverSquare (adjacentSquare[i].x, adjacentSquare[i].y, numRiverSquaresSoFar);
}
else {
i := i +1;
}
}
}
}
This recursive algorithm avoids making loops (and sticks to Civ2's "rule" that rivers only connect to other river squares "perpendicularly" as opposed to flowing into a diagonally adjacent squares).
The function isGoodUpstreamRiverSquare() should return
false if the passed square is an ocean (you don't want to add a river in the ocean!),
false if the passed square is a hill or mountain (seems to be a Civ2 rule - no rivers in hills or mountains),
false if the passed square already has a river (you're just going downstream in this case),
false if the passed square is adjacent to more than one river (it'll always be adjacent to the river square you just laid down but we want to avoid making loops. (being diagonally adjacent to other river squares is OK)),
and true otherwise.
If you also make the function isGoodUpstreamRiverSquare() return false if the passed square is adjacent to an ocean, you'll avoid "deltas" (where a river spills out into the sea from multiple coastal squares) and also avoid a river cutting a continent in half. If you like deltas, you can add them by remembering the initial coastal square and making a perpendicularly adjacent (not diagonally adjacent) coastal land square a river square.
3) You can add tributatries by walking up or downstream to a river square (say at x, y) and invoking addRiverSquare (x, y, 1). The number of tributaries might be based the main river path's number of river squares (the longer the initial river the more tributaries). It might alternately be based on the wetness of the world (since returning the last numRiverSquaresSoFar value could be difficult if you're not used to recursive functions). When you add tributaries you might want to tweak the code so tributaries aren't as long on average as the main path.
Warning! This isn't written in any particular programming language and (since I just made it up on the fly) is sure to contain bugs and stuff I've overlooked (e.g. looking at adjacent squares when you're already on the edge of the map and such). You'll need to do some testing and tweaking but this is the basic idea. A friend of mine and I used a similar algorithm to recreate the famed Atari game "MazeCraze" on our Commodore 64. MazeCraze mazes (like ideal Civ2 rivers) don't include loops (I presume so the AI MazeCraze monsters wouldn't endlessly circle them).
|
|
|  |
All times are GMT. The time now is 05:14. Apolyton Time is 00:14. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|