XBattle
Uniwersytet Gdański - Instytut Matematyki - Zakład Informatyki - Strona domowaOgólnie o grze
Gra XBattle to w zasadzie typowy RTS (ang. Real Time Strategy), gdzie bój toczyć się może pomiędzy wieloma graczami (w zasadzie bez ograniczeń).
Poniżej zamieszczam kilka plików, które kiedyś mi się przydały. Samej gry nie trzeba chyba opisywać! Uwaga - można się uzależnić!
- Mój standardowy skrypt uruchomieniowy.
Chodzi o to, że wystarczy 'odpalić' po prostu ten plik, i jeżeli masz zainstalowaną odpowiednią wersję Xbattle, wszystko ruszy samo. Gra dostaje takie opcje, aby było kilku przeciwników, twój kolor to żółty - i można grać samemu!!! YEAH! - Jeżeli chcesz zobaczyć treść tego skryptu, tutaj masz wersję źródłową.
- Przykładowa walka i skrypt, który umie ją odtworzyć.
Rozpakuj wszystko do jakiegoś katalogu i po prostu uruchom skrypt :) - Proste środowisko, trudny przeciwnik.
Oto wyzwanie dla tych, którzy umieją grać w kulki: prosta plansza, ale trudny przeciwnik. Spróbuj pokonać go w ciągu 10 minut... Potem może ci się nie udać! :) Wysoki koszt nałożono na spadochroniarzy, kopanie i usypywanie gór, trochę tańsze jest niszczenie baz i bombardowanie. Powodzenia... - Serwer Xbattle
do gry na niewielkiej planszy dla dwóch osób, który udało się nam zestawić po godzinnym analizowaniu manuala i wielu próbach. Niestety, trochę słabo działa klient, bo nie wyświetla niektórych ścieżek, i ma problemy z odświeżaniem stanu planszy. Dla desperatów. - Klient dla serwera
którym można się podłączyć jeżeli serwer jest postawiony. Po wielu, naprawdę wielu partiach z komputerowym AI mogę powiedzieć, że walka z człowiekiem to jest to! Zupełnie inna.
Edycja własnych map
Niestety, nie udało mi się skompilować gry w taki sposób, aby to działało... Może któregoś dnia siądę i poprawię błędy w kodzie, lub wpadnę na odpowiednią kombinację opcji...
Znany jest też oficjalnie co najmniej jeden bug związany z niemożnością gry (z powodu zwisu) przy ładowaniu jakiejś planszy predefiniowanej. Ale to raczej mało ważne, skoro nawet po normalnej, standardowej kompilacji gra nie zawsze chce działać... Warto by ją poprawić.
Jak wygląda gra?
Obrazki statyczne tego nie mogą oddać, ale dla całkowicie niezorientowanych zapodam parę... Co mi szkodzi... :)
Źródła do kompilacji
Niestety, projekt XBattle obecnie chyba nie jest żywy... Strony głównej brak, sama gra istnieje w wielu pakietach linuxowych, ale ogólnie wersja z dodanym AI nie jest do nich włączona. Poniżej zebrałem kilka pakietów do różnych dystrybucji, oraz wersję źródłową, której używam. Niestety (drugie niestety już, niestety) wersja ta działa mi stabilnie tylko na Athlonie64, natomiast na innych komputerach gra po paru sekundach się wiesza. Może zależy to od sposobu kompilacji, np. po wyłączeniu optymalizacji i przestawieniu kompilatora na arch=i386 wszystko chodzi, ale nadal niestabilnie. Może u kogoś będzie lepiej. Problemy miałem na intelu prescott (chyba 2500MHz - nie pamiętam już) oraz celeron M (1500MHz).
- http://source.meta.net.nz/svn/xbattle/ - Źródła w SVN - wersja z poprawkami błędów i różnymi dodatkami.
- xbattleai-1.2.2.tgz - plik z mojej dystrybucji gentoo - do kompilacji. Niestety, gra skompilowana standardowo jest niestabilna i zawiesza się po kilku sekundach.
- xbattle-ai-1.2.2a.tgz - oto wersja pakietu z nieco zmienionym Makefile (wyłączona optymalizacja), którego kompilacja prowadzi do otrzymania nieco bardziej stabilnych binariów gry. Nie jest to jakoś szczególnie dobrze poprawione, po prostu ciut inny makefile. Wywołanie skryptu configure może go całkiem zmienić - być może na lepsze...
- A tutaj jest ich spakowana paczka pobrana z serwera SVN: xbattle-svn-1.2.2-nz.tar.gz (2.9MB).
- Mirror całej strony http://www.lysator.liu.se/~mbrx/XBattleAI/, na wypadek gdyby znikła: mirror.
Pliki binarne do pobrania
Ponieważ nie jest wcale łatwo skompilować xbattle na niektórych architekturach, pomyślałem, że warto przygotować pliki binarne, które czasami uda się gdzieniegdzie odpalić. Oto one:
- xbattle-ai-1.2.2-bin.tar.bz2, 1.5MB, zestaw po 'make install' - wystarczy ręcznie gdzieś skopiować i już.
Info kompilacji:Host: 2.6.29-gentoo #2 SMP PREEMPT Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz ELF class: ELF64 (wersja 64-bitowa) Zlinkowane biblioteki: linux-vdso.so.1 => (0x00007fff52ffe000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f884aa5e000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f884a842000) libresolv.so.2 => /lib/libresolv.so.2 (0x00007f884a62b000) libnsl.so.1 => /lib/libnsl.so.1 (0x00007f884a413000) libm.so.6 => /lib/libm.so.6 (0x00007f884a190000) libc.so.6 => /lib/libc.so.6 (0x00007f8849e35000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f8849c31000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f8849a2b000) libdl.so.2 => /lib/libdl.so.2 (0x00007f8849827000) /lib64/ld-linux-x86-64.so.2 (0x00007f884ad8f000)
Update: xbattle-ai-1.2.2-bin-20090712.tar.bz2 - poprawka kodu xbattle.tcl aby startował lokalnie z katalogu bin. Kampania nadal nie działa, jak i inne skrypty.
I jeszcze prośba w stylu dzieci neo... wiem, że liczę na niemożliwe, ale... Jeżeli przygotujesz własną kompilację, proszę, przyślij ją do mnie, umieszczę tutaj razem z 'creditsami' :)
Wypasy
Ostatnio odkryłem, że obrazki z tej strony pokazał serwis thelinuxgames. Oto dokładny link do ich strony:
Ciekawe, kto jeszcze zapoda jakieś materiały stąd, nie podając źródła :) Tak czy inaczej, fajnie, że obrazki powędrowały w sieć - co wpadnie do sieci, to trwa w niej wiecznie!
- http://en.wikipedia.org/wiki/Xbattle - jest łącze ze strony Wikipedii :)
Opisy gry
Serwis http://everything2.com/title/XBattle zamieścił dość standardowe info na temat gry, można dowiedzieć się sporo o jej historii:
XBattle is a multi-player real-time strategy game that, according to the authors, ``captures the dynamics of a wide range of military situations through numerous options''. It is played on a (virtual) board consisting of a configurable number of hexagonal, square, triangular, or octagonal and square cells.
Each player in XBattle is represented by a colour. Each cell can be occupied by `troops'; the number of troops in a cell is indicated by the size of a coloured circle appearing in the cell. Players set up links between cells; in each time unit, a fraction of the troops in the source cell will move to the destination cell. If a cell contains troops of different colours, they fight, reducing the number of troops of each colour in the cell. The goal is to use strategy, tactics, and a little bit of luck to wipe out all your opponents' troops.
One of the best things about this game is the vast array of user-configurable options. These can greatly affect the nature of the game. For example:
- Using the build option, players can expend troops to construct bases, which produce one troop per time unit.
- With the farms option, each occupied cell slowly produces troops. This makes it advantageous to capture large territories, rather than simply setting up supply lines from bases to the front line
- The decay option simulates attrition: troops not at a base slowly disappear. This effectively means that each base can support only a limited number of troops.
- The guns option allows players to expend troops to destroy remote enemy troops.
- The dig and fill options allow players to raise and lower terrain at the cost of troops. Troop movement is slowed uphill, and accelerated downhill. This option also allows players to construct uncrossable moats, and bridges for piercing these moats.
- The horizon option provides a `fog of war': you can only see enemy troops if they are within a certain (configurable!) distance of yours. map and localmap make this apply to terrain as well.
XBattle runs on any computer with the X Window System---typically, but not necessarily, Unix. The program runs on a single machine; the program uses X's network transparency to draw a window on each player's display. Unfortunately, the inefficiencies of the X protocol make this very slow over low-speed or high-latency connections. The current developer has planned a client-server version of the game, but see below.
XBattle was developed by two Boston University graduate students: Steve Lehar and Greg Lesher. The first version was released in 1991, based on a board game designed by Lehar. Lesher continued to develop the game over the next few years, adding a number of new features. Unfortunately, it seems that development more or less stopped in late 1996, before the planned client-server version could be completed. The latest version is 5.4.1, released in February 1996. A sneak preview of the client-server version was released in April 1996, though it is clearly labelled a development version, and is quite buggy.
All is not lost, however. Mathias Broxvall has developed an unofficial continuation of XBattle, called XBattleAI. This version adds computer-controlled players using two different algorithms (one by Broxvall and another by Pierre Bureau), victory detection, and a few miscellaneous features. The latest version of XBattleAI is 1.1.8, released in late 2001. Broxvall is now working on a client-server version of the game; snapshots are available from eir web site.
- The XBattle web site is at http://cns-web.bu.edu/pub/xpip/html/xbattle.html (pio: page is dead now).
- The XBattleAI web site is at http://www.lysator.liu.se/~mbrx/XBattleAI/
Podobnie, serwis http://www.wlug.org.nz/XBattle również umieścił kilka słów:
XBattle is an old Unix Realtime Strategy Game.
The general idea is that there is a map (usually made up of hexes or squares, but can be as weird as diamonds or octagons), with some cities (represented by circles). Cities produce troops at a fixed rate. If you click near the edge of a cell then the game will toggle on or off a spigot where troops will leave that cell and "flow" into the neighbouring cell.
This has been rather popular amongst the WAND group recently, and so we have our own fork of the code which has some bugs fixed and a few extra features added. see http://source.meta.net.nz/svn/xbattle/ for our SVN tree.
The game supports as many teams and as many people as you care to play for, it also has some rather good AI's.
For an example game against the AI use:
./xbattle -ai 0 1 2 -blue you -red me -rbases 3 -sea 2 -march 2 -bound -attack -repeat -manage -farms 2 -militia 2 -hex -boardx 20 -boardy 20Don't use -ai x 1 y. It will deadlock the game.
To setup a multiplayer game with someone on orb:0.0
./battle -red me -blue orb:0.0 -rbases 3 -sea 2 -march 2 -bound -attack -repeat -manage -farms 2 -militia 2 -hex -boardx 20 -boardy 20 -dig -fillHint: Try and take and hold a corner.
A tutaj jest ich spakowana paczka pobrana z serwera SVN: xbattle-svn-1.2.2-nz.tar.gz (2.9MB).