Head2Head play
Moderator: OpenTTD Developers
Head2Head play
Based on an old patch by TrueBrain, I present you (again) head2head play. I'll write a more detailed explanation later. What this patch does:
If you start a new game the world is copied and pasted to the SE side of the map. You now have two exact same halves. The first company can play on the NW half, the second company on the SE half. This way you can play competitive without industry stealing/blocking etc. Just get two teams ready and see who can make the most money.
Download here: http://www.openttd.org/en/download-head-to-head
Repository here: http://hg.openttd.org/developers/yexo/head-to-head.hg/
If you start a new game the world is copied and pasted to the SE side of the map. You now have two exact same halves. The first company can play on the NW half, the second company on the SE half. This way you can play competitive without industry stealing/blocking etc. Just get two teams ready and see who can make the most money.
Download here: http://www.openttd.org/en/download-head-to-head
Repository here: http://hg.openttd.org/developers/yexo/head-to-head.hg/
Last edited by Yexo on 29 Mar 2009 19:58, edited 1 time in total.
Re: Head2Head play
Only the first two companies are restricted in which map they can build in. Companies beyond #2 can build in both.
Nice patch, was fun playing.
Also, helicopters can fly to oil rigs in the opposite map.
Screenshot at the break between maps:
Nice patch, was fun playing.

Also, helicopters can fly to oil rigs in the opposite map.
Screenshot at the break between maps:
- Attachments
-
- Yex0 Transport, 13th Mar 1954.png
- (122.19 KiB) Downloaded 541 times
Last edited by andyp on 29 Mar 2009 02:00, edited 2 times in total.
-
- Engineer
- Posts: 19
- Joined: 15 Mar 2009 11:41
Re: Head2Head play
This is cool. Hopefully in future there should be able to play up to 4 players against, and a options to enable/disable this in advance settings or in map generator. Thx
.

Re: Head2Head play
I've just made my own Head2Head server.
It is 512x512 and uses a few ingame content download newGRFs.
Edit: Oh, crap.. I think that I have got some technical problems here.. Does anyone see it in the list?
Edit2: No you can't.. I also found openttdcoop's server, so there is no need for mine anyway.
It is 512x512 and uses a few ingame content download newGRFs.

Edit: Oh, crap.. I think that I have got some technical problems here.. Does anyone see it in the list?
Edit2: No you can't.. I also found openttdcoop's server, so there is no need for mine anyway.

Re: Head2Head play
Nice multiplayer approach! And very suitable for an idea I came up with a long time ago: Allow each player to have exactly one train. Every player starts at town X and the first who gets his train to town Y wins. These seperate maps make the challenge a little more fair without players obstructing one another.
(Ofcourse, for this challenge to work, you should have far less money than the amount needed to buy a train and construct a railway between X and Y.)
(Ofcourse, for this challenge to work, you should have far less money than the amount needed to buy a train and construct a railway between X and Y.)
Maybe add a few extra tiles of water between each halve?Yexo wrote:It's possible to 'steal' goods if an industry is near the edge where the two halves connect, this shouldn't be possible.
Re: Head2Head play
Judging from the commit logs, this problem is already solved nowFooBar wrote:Maybe add a few extra tiles of water between each halve?Yexo wrote:It's possible to 'steal' goods if an industry is near the edge where the two halves connect, this shouldn't be possible.

Re: Head2Head play
Come to think of it, water might be a bit odd in case of a map with land at all edges...
So better ignore that suggestion!
So better ignore that suggestion!
Re: Head2Head play
The logs can be deceivingRoujin wrote:Judging from the commit logs, this problem is already solved now

I thought I fixed it, but the problem is still there.
Re: Head2Head play
Ok, most know bugs fixed.
Download here: http://www.openttd.org/en/download-head-to-head
Repository here: http://hg.openttd.org/developers/yexo/head-to-head.hg/
There is a setting under constructions->number of head-to-head ares. This must be set to a multiple of 2! Valid values are thus: 1, 2, 4, 8, 16. Failure to do so will result in a crash during map generation. Also make sure that mapsize_y * number-of-areas <= 2048. Again, failure will result in a crash.
Todo / known bugs:
Don't crash but handle the above cases nicely.
Make AIs aware that not all towns/industries/tiles are valid.
Make it possible to have the areas not only in NE<>SW direction, but also inthe NW<>SE direction.
Download here: http://www.openttd.org/en/download-head-to-head
Repository here: http://hg.openttd.org/developers/yexo/head-to-head.hg/
There is a setting under constructions->number of head-to-head ares. This must be set to a multiple of 2! Valid values are thus: 1, 2, 4, 8, 16. Failure to do so will result in a crash during map generation. Also make sure that mapsize_y * number-of-areas <= 2048. Again, failure will result in a crash.
Todo / known bugs:
Don't crash but handle the above cases nicely.
Make AIs aware that not all towns/industries/tiles are valid.
Make it possible to have the areas not only in NE<>SW direction, but also inthe NW<>SE direction.
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Head2Head play
hi will you be bring out a patch file for this
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Head2Head play
why make a patch when you have the repository right there? it's just unnecessary time spent for the developer that he could spend much more usefully.
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Head2Head play
so to make a patch on this i have to add them bits all togiver and it should work 

For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Head2Head play
no, you check out the repository and tell it to make a diff between "tip" and the last "sync from trunk" commit. you can find out which revision that is by using the log.
Re: Head2Head play
Really cool idea. I see you use the OpenTTD binaries server, so I've added Last Head-to-head as a target option in OpenTTD Auto Update.
To users (who are not aware of how Cargodest was hacked into OpenTTD Auto Update): The OpenTTD Auto Update client don't know how hg versions look like, so it will look like nothing is installed in "more info", but the server side knows how to interpret the raw version string from openttd.exe. And it is the OTTDAU server that decides if there is an update available or not, so it will work, just don't look as pretty as it could do.
To users (who are not aware of how Cargodest was hacked into OpenTTD Auto Update): The OpenTTD Auto Update client don't know how hg versions look like, so it will look like nothing is installed in "more info", but the server side knows how to interpret the raw version string from openttd.exe. And it is the OTTDAU server that decides if there is an update available or not, so it will work, just don't look as pretty as it could do.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: Head2Head play
sounds like you have to do that manually, can't you autodetect any added lines in the finger output?Zuu wrote:so I've added Last Head-to-head as a target option in OpenTTD Auto Update.
Re: Head2Head play
Sure with a bunch of work I could do that. But that would need me to autodetect hg-versioning too, which I don't at them moment. Also I would probably need to restrict it to nightlies/* and custom/*, but what if in future there will be something using */* that is interesting to have, while extra/openttd-usefull is not really interesting to have. In addition there is some additional information I keep that is not on fingers. Such as which letters should be upper case in the GUI etc. (this could be made good enough by an algorithm, but would require a design change)Eddi wrote:sounds like you have to do that manually, can't you autodetect any added lines in the finger output?Zuu wrote:so I've added Last Head-to-head as a target option in OpenTTD Auto Update.
So yes, not impossible, but would require quite some changes here and three to make it automatic.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Head2Head play
In the hope of the availability of updated binaries (nudge @ truebrain) we're planning a tournament on Friday night, starting at 20h CEST (= 18h UT). The map will be 128 x 512 tiles per company with 15 company slots available. Have a look at our blog for more information and join us on [url=irc://irc.oftc.net/coopetition]#coopetition[/url] where also the competition server will be based.
Download links will be the usual branch download links; they will also be available within the IRC channel.
Hope to see you this Friday!
Download links will be the usual branch download links; they will also be available within the IRC channel.
Hope to see you this Friday!
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Head2Head play
We are currently "BETA" testing for tomorrow evening:
on h518233e5 (svn r15907M)
quite many desyncs, which we can't reproduce and following assert:
After try to prospect a industry:
src/industry_cmd.cpp
void DoCreateNewIndustry(Industry*, TileIndex, int, const IndustryTileTable*, byte, const Town*, Owner, Owner): Assertion `founder == OWNER_NONE || GetAreaByTile(tile) == founder + 1' failed.
on h518233e5 (svn r15907M)
quite many desyncs, which we can't reproduce and following assert:
After try to prospect a industry:
src/industry_cmd.cpp
Town Names:


Still work in progress: OpenGFX or/and OpenSFX - Please help!
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Head2Head play
The output in my xterm was when desyncing:
Code: Select all
dbg: [misc] Nested widgets give different results
dbg: [net] Sync error detected!
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Head2Head play
Yes, I played on #OpenTTDCOOP Coopetition Server and there were unnormal much desyncs...
...but i really love this way to play! No one who blocks your industries
I hope in the next H2H release is less desync.
...but i really love this way to play! No one who blocks your industries

I hope in the next H2H release is less desync.

Who is online
Users browsing this forum: No registered users and 6 guests