TerraGenesis Perlin

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Loop
Engineer
Engineer
Posts: 72
Joined: 10 Apr 2006 21:05
Location: Poznan, Poland

Post by Loop »

richk67 wrote:On a similar vein, I am a little disappointed with how often towns are built just outside the reach of shipping. I may introduce a bias to the town placement that if there is any water within 10 tiles, it moves the town centre to within 3 tiles of the water's edge.
This is a very, very good idea. And a realistic one! Most of the towns were built near some kind of water basins - mostly rivers, but also lakes, ponds etc. And also, when there was a sea/ocean ( :P ) nearby, it was better to build the settlement there (fish, trade).
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Here is something a little different - TGP with temperate snow.

Its a combination of the TGP patch (r4600) and the Snow In Temperate patch (r4601). Snow in Temperate works properly; it isnt just the graphics. Towns above the snowline need food to grow, tree types adjust to the snow line. Forests use the different snow/temp graphics dependent on the snowline, and some other industries have snowy ground tiles where needed.
Attachments
TGP+snow_r4601.patch
Combined TGP & Snow patch
(47.5 KiB) Downloaded 268 times
Snow in Temperate with TGP land. Note the different houses & forests above/below snowline.
Snow in Temperate with TGP land. Note the different houses & forests above/below snowline.
TGP Snow, 25th Mar 2007.png (146.24 KiB) Viewed 5924 times
tempsnow.zip
Partial Temperate/Snow tiles with permission by M.Blunck.
(40.9 KiB) Downloaded 266 times
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

Where does one find food in a temperate climate game?
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
User avatar
sidew
Engineer
Engineer
Posts: 115
Joined: 31 Aug 2005 06:46
Location: Milan, Italy
Contact:

Post by sidew »

That is my dream... :shock:

Many thanks, richk!

I'll update my italian town patch to latest revision and i'll try combining both...
Sidewinder

Italian Town names patch for OTTD (R5266) now in trunk since 0.4.8
For typo, errors or bug on OTTD italian translation, please PM me.
unofficial italian TTD/OpenTTD forum: http://wolf01.game-host.org/forum/index.php
User avatar
AlienDNA
Engineer
Engineer
Posts: 97
Joined: 12 Apr 2004 08:53
Location: Leiden, Netherlands

Post by AlienDNA »

Brianetta wrote:Where does one find food in a temperate climate game?
A valid question indeed. Perhaps it is time to make some work of new industries, so this excellent feature can be implemented.
"I'm gonna rip his leg off and kick him with it!", Sanjuro, Shogo-MAD
Jango
Traffic Manager
Traffic Manager
Posts: 189
Joined: 28 Aug 2004 12:13

Post by Jango »

i personally would like to see all the industries in the original game (baring toyland) and maybe all the vehicles too, all within the temperate climate - maybe even with some desert ;)
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Brianetta wrote:Where does one find food in a temperate climate game?
Oops... oh yeah! Until we get industries in any climate, I'd better remove that bit! Dunno what came over me!
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Jango wrote:i personally would like to see all the industries in the original game (baring toyland) and maybe all the vehicles too, all within the temperate climate - maybe even with some desert ;)
Unfortunately desert and snow are mutual exclusive.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

richk67 wrote:
Jango wrote:i personally would like to see all the industries in the original game (baring toyland) and maybe all the vehicles too, all within the temperate climate - maybe even with some desert ;)
Unfortunately desert and snow are mutual exclusive.
Yeah, we definitely need an all-climate map :D.
It is true snow/desert are mutually exclusive but the snow/desert bit can just simply be moved seperate and then they won't :). Of course for this to work it needs some more work; a lot more work.

- which climate to identify this new one with?
- probably would break a lot of newgrf stuff
- clean up the mess of industries/cargos
- new graphcs, mainly temperate > desert, temperate > rainforest, snow > rainforest
- probably some few more, but it would be absolutely stunning :D
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

Darkvater wrote: - which climate to identify this new one with?
the 5th 1
Darkvater wrote: - probably would break a lot of newgrf stuff
unfortunatly, this is true
Darkvater wrote: - clean up the mess of industries/cargos
you've basicly got 2 options here, but i'd go with the newGRF new industries method, which would mean you need to do the newGRF new industries support.
Darkvater wrote: - new graphcs, mainly temperate > desert, temperate > rainforest, snow > rainforest
for a graphixler, this should be pretty easy actually.
Darkvater wrote:- probably some few more, but it would be absolutely stunning :D
would just be awsome to do it.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

bobingabout wrote:
Darkvater wrote: - which climate to identify this new one with?
the 5th 1
The one for which no newgrfs have been written? I can see that being popular.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Darkvater wrote:Of course for this to work it needs some more work; a lot more work.

- which climate to identify this new one with?
- probably would break a lot of newgrf stuff
- clean up the mess of industries/cargos
- new graphcs, mainly temperate > desert, temperate > rainforest, snow > rainforest
- probably some few more, but it would be absolutely stunning :D
And I would then create my USA scenario (2048x1024) which needs every climate from green flatlands and temperate forest, Rocky Mountains in snow with high altitude forests, Cuba & Mexico with tropical forests, deserts for Arizona etc. I have the terrain map, but it desperately needs multi-climate support. I didnt want to populate the map with towns & cities until the map could support more climates.

Newgrf has the problem that many of the newgrfs hard-replace graphics inside the core sets to achieve a pseudo-effect. This OTTD solution would be true extension of the climates, not faking replacement/addition of new industries.

As I see it, there are 3 major task areas:
1) Modify map for desert bits to co-exist with snow. Maybe not too difficult - but would need to carefully add a translator for old games. I will investigate this for TGP4. If I can get desert graphics into the temperate map, then that is getting close to preferred multi-climate effect. (but with restriction that only temperate vehicles & industries are available). It does raise the question of how to decide if some terrain is desert... ok for ScenGen scenarios, where the player can "paint" desert on (especially using my dither tool for delicate feathering of the edges), but in an auto-generated game, the decision is harder to make.
2) Industry graphics already work 100% in all climates. Some graphics though have the ground tile painted in (eg. temperate iron ore mine), so on the "wrong" terrain, the graphic looks odd. The whole arrangement of ground tile and building tile is a mess. For some, there is a proper ground sprite, and a separate building sprite with transparent base. However, some have a fixed-climate base, and some have the building sprite in the ground sprite itself. A mess in other words.

OTTD cargo scheme has hard-coded overlaps, and in my view, best solution is to abandon current OTTD cargo definitions for the TTDP global cargo definitions. A big job, in many areas. However, some of the mechanisms are already in place within the newgrf code to translate from TTDP to OTTD cargos. All we need to do is not convert - but use the TTDP values throughout. Again a translator is required for savegames.
3) Allow multiple vehicle sets to co-exist at the same time. This is a really big and nasty piece - definitely need lots of peter1138's experience here. I have little idea of what knock-on effects this may have, but its the sort of thing that IMO would in itself raise the release a whole point... ie. 0.5.0 to 0.6.0. Big nasty - dont want to think about it. :)
Last edited by richk67 on 28 Apr 2006 12:32, edited 1 time in total.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

bobingabout wrote:
Darkvater wrote: - probably would break a lot of newgrf stuff
unfortunatly, this is true
Shock, horror... newgrf having to catch up with OTTD ... Im sure some people would be pathologically opposed to anything implying OTTD can do more than newgrf! ;) (its a joke ok... not a cue for an argument)
Darkvater wrote: - clean up the mess of industries/cargos
you've basicly got 2 options here, but i'd go with the newGRF new industries method, which would mean you need to do the newGRF new industries support.
Sort of halfway. You change the underlying data structure in OTTD to support & use TTDP cargo types as its default type. This would be sufficient to unblock the industries, and allow them to co-exist. Its not far off already.

Newgrf support is useful, but IMO we should code something that allows a greater breadth of support, within which current newgrf newindustries is enclosed. ie. if newgrf has limits, as long as OTTD supports at minimum those limits, there is no reason why OTTD should not go beyond. eg. IF newgrf newindustries can only allow 128 cargo types, there is no reason why OTTD should limit to that, when 256 is more and provides the minimum. (hypothetical - I dont know what the newgrf limit is - its an example of the principle not the detail). When it comes to limits, I dont see why OTTD should limit itself in any way... we aren't trying to win a competition to see how compact a data structure we can create! (eg. railtype vs. railtypemask - both describe what railtypes there are, but one uses 2x as many bits, but is far more flexible.)

The problem are the vehicles, as you would need to have a combined set of wagons that have all the industry cargo types (why we dont have wagons & cargos in separate grfs to the locos I dont know... its a logical separation IMO).
I have been thinking on this for a while, and if someone wanted to work on the cargo side, I would be happy to extend TGP to provide multi-climates. Any takers?
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
SpecialK
Engineer
Engineer
Posts: 35
Joined: 11 Apr 2006 14:51

Post by SpecialK »

richk67 wrote:
Jango wrote:i personally would like to see all the industries in the original game (baring toyland) and maybe all the vehicles too, all within the temperate climate - maybe even with some desert ;)
Unfortunately desert and snow are mutual exclusive.
You, my good friend, have obviously not been to the mountains outside of Phoenix or Salt Lake or eastern Oregon any of the western high desert states. It snows there, heavily, even down to the desert floor.
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

SpecialK wrote:
Unfortunately desert and snow are mutual exclusive.
You, my good friend, have obviously not been to the mountains outside of Phoenix or Salt Lake or eastern Oregon any of the western high desert states. It snows there, heavily, even down to the desert floor.
True, nor to the Tibet Plateau, or the Gobi Desert. I was meaning "in OTTD currently" desert and snow are mutually exclusive - they actually use the same bits in the map array!
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

richk67 wrote:When it comes to limits, I dont see why OTTD should limit itself in any way... we aren't trying to win a competition to see how compact a data structure we can create! (eg. railtype vs. railtypemask - both describe what railtypes there are, but one uses 2x as many bits, but is far more flexible.)
It seems to me that you can pack 256 rail types into 8 bits, but a railtypemask for 256 types will require something slightly more than 16 bits. Did you possibly mean 2^x bits?

Exponential increase is a substantially different matter than geometric increase.
richk67 wrote:(why we dont have wagons & cargos in separate grfs to the locos I dont know... its a logical separation IMO).
No, it's not.
Take, for example, the Hiawatha: Image or the Daylight: Image
Where do the wagon sprites go? With the engine, or with all the other sprites for that wagon?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Note to self: dont respond to Dale-baiting.... nope, cant not do.
DaleStan wrote:It seems to me that you can pack 256 rail types into 8 bits, but a railtypemask for 256 types will require something slightly more than 16 bits. Did you possibly mean 2^x bits?
No, I meant specifically that OTTD currently has RailType with 4 values 0=rail,1=elec,2=mono,3=mag. But RailTypeMask does a bit mapped version so you can have "rail+elec". RailType represented in 2 bits, RailTypeMask in 4 bits. Last time I checked 4=2x2. I made no inference beyond that to higher levels of bitmapping.
richk67 wrote:(why we dont have wagons & cargos in separate grfs to the locos I dont know... its a logical separation IMO).
Why do I have to specify everything to the Nth degree for the pedants. I KNEW someone would go "what about dedicated rakes?" Well, duh! You keep dedicated rakes together; I think a coal wagon is a separate quantity to a loco; to me they are logically separate. Clearly MUs, and passenger coaches in general, are closely related to their MPU. To me, a passenger coach is a coach, not a wagon.

The ONLY example I know of of "freight" wagons that are in dedicated rakes are the Chunnel car-ferry trains. And no doubt someone else will argue that differently.

I would separate: mineral wagons, goods wagons, etc. etc. from motive power. Only coaches in fixed rakes with the motive power make any sense in with the locos. This would then give more flexibility as you could have different freight wagons, loads, etc., with the same locos. No doubt the answer is Jesus, err I mean Newgrf.

(And some poor bugger will have to code the support for it... )
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
bruce89
Engineer
Engineer
Posts: 76
Joined: 06 Dec 2005 17:28
Location: Glasgow, Scotland
Contact:

Bug

Post by bruce89 »

I have found a bug, when you are in the landscape generation dialog, and you choose toyland, the water in the background game turns teal. This is with r4593M - Integrated build.
edit --- It's actually the background sample game at the start that is affected.
Last edited by bruce89 on 29 Apr 2006 22:04, edited 1 time in total.
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Re: Bug

Post by richk67 »

bruce89 wrote:I have found a bug, when you are in the landscape generation dialog, and you choose toyland, the water in the background game turns teal. This is with r4593M - Integrated build.
Its meant to. It is the standard graphic for Toyland water... and people wonder why no-one plays toyland ;)
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

I've had some thinking about the progress window. Apart from doing any threads anything else is really hacky. What you can do however is use a global variable-counter, for example _terrain_generation that is incremented after a certain part is done (eg towns/industries/terrain/whatever). After each section you return control to the main game so the gameloop, etc is run. This causes any dirty blocks to be drawn and you are safe.

All you need to add is a GM_GENERATOR or similar _game_mode. I think that is a doable solution apart from threading the whole thing.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 16 guests