View Full Version : New Port: Stratagus, a WC2 engine
Bundyo
02-17-2008, 12:56 PM
This one was in fact ported by linman. Stratagus is an OSS RTS engine, compatible with Warcraft 2, but can run other OSS campaigns, get them here (http://www.stratagus.org/games.shtml) (only Warcraft 2 was tested though). Right click for movement has been mapped to double click in a 32x32 square (since double click with a stylus is tricky). The hardware buttons are not remapped for now. The resolution is 800x480 (but says 800x600 in the options).
Screenshot:
http://www.bundyo.org/maemo/stratagus/stratagus.png
To get any game working:
1. Install the deb from here: http://www.mediafire.com/?3f30xvhrd1g.
2. Copy the game files in the /media/mmc1/games/stratagus (internal card).
For Warcraft 2 it is trickier - use Wargus (http://wargus.sourceforge.net/) to convert the Warcraft data files from your original CD to Stratagus ones and then copy them to the card. NOTE: The linux convert script creates two symlinks, which would not work in vfat, so please use the windows one or after the convert replace the symlinks with the real files.
EDIT: Updated to 0.1-4, in Media Fire. Arnim, could you update your file too?
Fixed from 0.1-3:
* Fixed the crash when started from the menu. Quite stable now.
EDIT: Updated to 0.1-3.
Fixed from version 0.2:
* The menu link now works.
* The custom resolution files copy to the card.
Version 0.2(do not use): http://pupnik.de/stratagus-0.1-2_armel.deb (thanks to Arnim)
That's all folks. have fun.
zehjotkah
02-17-2008, 01:02 PM
Wohaaaaaaaaaaaaaaa!!!!
Linman, you´re my hero!!!
I love you... sweeeeeeeet...
Another reason to buy a IT!!!!
Edit: Is it possible to play Starcraft with that?
If not, will it be possible in the future?
Thanks
Awesome man. Great stuff! KEEP IT COMING GOD.
linman
02-17-2008, 01:10 PM
Bundyo, thanks for your help!
linman
02-17-2008, 01:14 PM
Wohaaaaaaaaaaaaaaa!!!!
Linman, you´re my hero!!!
I love you... sweeeeeeeet...
Another reason to buy a IT!!!!
Edit: Is it possible to play Starcraft with that?
If not, will it be possible in the future?
Thanks
The project does not support starcraft at all but in the feature I hope it will.
See this: http://stargus.sourceforge.net/features.shtml
When it become functional we will try to port it.
CyberCat
02-17-2008, 01:53 PM
Hey Bundyo, when I try to install it, it says"Incompatible application package." What do I need to do?
It also says it will use 1.7GB... :eek:
Bundyo
02-17-2008, 02:27 PM
Just downloaded it from the site and installed it from the command prompt, seems to be working. Let me check from the browser...
Bundyo
02-17-2008, 02:34 PM
Yes, there seems to be a problem with the Nokia app manager... I'll look into it, meanwhile
dpkg -i stratagus-0.1_armel.deb
works normal.
jussik
02-17-2008, 03:12 PM
Yes, there seems to be a problem with the Nokia app manager...
I believe AM only installs files that have section "user/something".
CyberCat
02-17-2008, 04:44 PM
Bundyo, dpkg worked fine. What's the directory structure supposed to look like? I've got a feeling my files or permissions are incorrect. When I start stratagus, I get about 30 or so errors like"can't open file `orc/units/teron_gotrfiend/annoyed/1.wav' also it says "couldn't set 800x600x0 video mode: no video mode large enough for 800x600
terminate called without an active exception"
Bundyo
02-17-2008, 04:52 PM
Okay, updated the link in the first post, now it will install through app manager (10x jussik), still says 1.7G though but that's easy.
@CyberCat:
In /media/mmc1/games/stratagus you should have directories like this:
campaigns
graphics
maps
music
scripts
sounds
ArnimS
02-17-2008, 09:46 PM
Thanks linman, bundyo!
The mediafire link package has correct control information:
Package: stratagus
Priority: optional
Section: user/other
Users: if you try to install a .deb package and it gives an error, please report what OS you are using! (os2007/os2008)
(edit) I don't know how long those mediafire files are active. If you don't mind, i can host the deb also and make a little page for it (with attribution of course). Does this install on OS2007 also?
http://pupnik.de/stratagus-0.1-2_armel.deb
OSEmuTech
02-18-2008, 12:04 AM
Bundyo, dpkg worked fine. What's the directory structure supposed to look like? I've got a feeling my files or permissions are incorrect. When I start stratagus, I get about 30 or so errors like"can't open file `orc/units/teron_gotrfiend/annoyed/1.wav' also it says "couldn't set 800x600x0 video mode: no video mode large enough for 800x600
terminate called without an active exception"
I'm getting the same thing. Those wav files weren't dumped by Wargus. And despite Stratagus ignoring those wav files and attempts to load, it gives me the 800x600x0 error and ends too.
At the beginning, when loaded via terminal, it says it says it 'Can't open file "preferences.lua": No such file or directory.'
I have all the directories set up in /media/mmc1/games/stratagus.
But Wargus uses the files and runs on Windows correctly.
CyberCat
02-18-2008, 01:04 AM
I'm getting the same thing. Those wav files weren't dumped by Wargus. And despite Stratagus ignoring those wav files and attempts to load, it gives me the 800x600x0 error and ends too.
At the beginning, when loaded via terminal, it says it says it 'Can't open file "preferences.lua": No such file or directory.'
I have all the directories set up in /media/mmc1/games/stratagus.
But Wargus uses the files and runs on Windows correctly.
Yeah, exactly the same with me. My directories should be setup properly, but it won't start. And now, I guess this program (or something) has caused my usb mode to stop working so I can't connect my unit to my computer anymore. :(
Bundyo
02-18-2008, 02:23 AM
Maybe the files for the 800x480 resolution aren't copied properly... check if you have stratagus/graphics/ui/human/800x480 and stratagus/graphics/ui/orc/800x480
also i have those not found sound messages too and i don't have preferences.lua in stratagus/scripts, but stratagus runs.
If you start it from the command prompt use this line:
stratagus -v 2 -d /media/mmc1/games/stratagus/
You can also try with -v 1 which will start the game in 640x480 (if the files for 800x480 are not in the right place)
USB is highly unlikely to be affected by Stratagus. Mine is working and i installed and reinstalled this package too many times.
Bundyo
02-18-2008, 02:24 AM
@Arnim: Thanks, appreciated. Didn't try in OS2007.
Bundyo
02-18-2008, 04:06 AM
Oh, stupid me, forgot to update the service file. I guess nobody has been able to run it from the menu...
For who don't want to reinstall - edit the file /usr/share/dbus-1/services/com.nokia.stratagus.service to exec the file like that
Exec=/usr/bin/stratagus -v 2 -d /media/mmc1/games/stratagus
(the same as in the desktop file). For the others - soon there will be another deb.
EDIT: Updated the main post with a new version (Arnim, could you update yours too?).
OSEmuTech
02-18-2008, 10:56 AM
Cool! Thanks Bundyo ... I can launch the game from the menu now. However, while the lone peasant is building a town hall, the game repeatedly crashes with no warning. :confused:
Bundyo
02-18-2008, 11:30 AM
And again does this happen if started from terminal?
Bundyo
02-18-2008, 11:52 AM
No it doesn't (also works in 770 with OS2008HE, but very slow).
Again this menu crashing problem, i get the feeling this is related to dbus in some way.
OSEmuTech
02-18-2008, 12:36 PM
And again does this happen if started from terminal?
Great! It appears to be stable after running via terminal shell (I meant to try that ;)):
stratagus -v 2 -d /media/mmc1/games/stratagus
BTW: Can we run this on mmc2? Can it be hildonized so we can switch to another program and switch back to the game (mainly so I can take screenshots of the game)?
http://fkwjcw.bay.livefilestore.com/y1p27A0pF0A3D_i7_TA_VFykfdnFqUoy_Whs8_y1Izk1t59fZd 3ZW7T6lx_VYVDBnjz_w18dvWhoC0JxBjcKaW55Q/stratagus.jpg
CyberCat
02-18-2008, 02:18 PM
Thanks Bundyo. It turned out the USB issue had to do with my computer. I don't know what happened, but I just rebooted and it seems to be working ok now. Your -3 version runs ok for me, although it does crash when I try to build stuff. It doesn't crash when I run it from the terminal though. This game plays plays surprisingly well on the tablets, a little bit slow yes, but totally playable. A mouse would sure make it easier! Thanks a lot for this!! :D
Bundyo
02-18-2008, 02:48 PM
No problem ;)
Though it doesn't crash when you build, if you leave the game for a while it will crash by itself. These symptoms are usually caused when the dbus service isn't properly configured, but i can't seem to solve it for now.
Bundyo
02-18-2008, 05:21 PM
Updated to 0.1-4, fixed crashing when starting from menu.
spirytsick
02-18-2008, 06:24 PM
I am trying to get the boswars to start but with no luck. Does it need a modified engine ?
Bundyo
02-18-2008, 06:45 PM
Let me check.
EDIT: This game is not going to work anytime soon - requires OpenGL to get compiled. Sorry.
spirytsick
02-20-2008, 06:25 PM
thanks Bundyo. I can now safely delete it from the tablet :) and hunt the old copy of w2
Nathan
02-22-2008, 12:18 AM
Quick Question, does it support the music? Or did something not get copied correctly?
-- Edit: Answer: Nope; the Wargus converter doesn't pull music. I'll see if I can get it to play mp3's... :)
Nathan
02-22-2008, 02:25 AM
Very Interesting, I've got the title music working. Unfortunately the game doesn't support MP3 or OGG so you have to use either a WAV or a .WAV compressed with gzip (maybe bzip, haven't tried it but the source code supports it) to at least take a bit (about 1/5th) of size off of it.
Man I forgot how much I loved the WC music until I heard it coming out of my N810... :-D
Someone else has a simple LUA patch to add file based music instead of CD music. I'll convert it to wav format patch and then if you really want to "waste" 20-30 megs of space for the music (like me) you can. ;-)
Once I have ported it -- I'll let post the simple replacement script file. In the meantime you can download the "official WCII MP3" from several sites on the web (22 megs) -- Blizzard released them a while back.
Nathan.
Michiel
02-22-2008, 10:53 AM
This looks great, and I can't wait to play it on my N800 (OS2008), but I can't get it to work properly. Installing the .deb from the opening post and extracting game files went ok, but when I try to run it (with stratagus -v 2 -d /media/mmc1/games/stratagus) I get the following:
...A long list with things like this:
Can't open file `ui/statsthump.wav'
Can't load the sound `ui/statsthump.wav'
...
[string "/media/mmc1/games/stratagus/scripts/fonts.l..."]:32: error in function 'New'.
argument #3 is 'nil'; 'number' expected.
2
stack traceback:
[C]: ?
[C]: in function `New'
[string "/media/mmc1/games/stratagus/scripts/fonts.l..."]:32: in main chunk
[C]: in function `Load'
[string "/media/mmc1/games/stratagus/scripts/stratag..."]:333: in main chunk
Also tried -v 1, same problem.
Bundyo
02-22-2008, 11:22 AM
Can you post the directory structure of /media/mmc1/games/stratagus?
Michiel
02-22-2008, 11:41 AM
ofcourse, it's a straight copy from what Wargus extracted:
Links to images of directory structure (it's exactly the same on memorycard in N800)
Part 1 (http://img257.imageshack.us/img257/5483/wargustree1ss0.jpg)
Part 2 (http://img235.imageshack.us/img235/4996/wargustree2bn0.jpg)
Part 3 (http://img235.imageshack.us/img235/6341/wargustree3wb6.jpg)
I should add; it works perfectly on PC (windowsXP)
Bundyo
02-22-2008, 03:04 PM
Are you sure everything is copied? Could you connect it to your PC and run the PC stratagus with the same data?
ArnimS
02-22-2008, 04:49 PM
Links to images of directory structure (it's exactly the same on memorycard in N800)
As an aside, unless i'm misremembering, you can capture the output of tree on windows with output redirection, e.g. tree > mydirtree.txt
PeteBog
02-24-2008, 04:16 AM
Very Interesting, I've got the title music working. Unfortunately the game doesn't support MP3 or OGG so you have to use either a WAV or a .WAV compressed with gzip (maybe bzip, haven't tried it but the source code supports it) to at least take a bit (about 1/5th) of size off of it.
Man I forgot how much I loved the WC music until I heard it coming out of my N810... :-D
Someone else has a simple LUA patch to add file based music instead of CD music. I'll convert it to wav format patch and then if you really want to "waste" 20-30 megs of space for the music (like me) you can. ;-)
Once I have ported it -- I'll let post the simple replacement script file. In the meantime you can download the "official WCII MP3" from several sites on the web (22 megs) -- Blizzard released them a while back.
Nathan.
If you do not wish to dload 20-30M of mp3s, an alternative is to download the midi files that amounts to <150K. Then use timidity to convert the mid files to ogg,mp3 or wav.
Garage appears to contain a Timidity player but i'd imagine the cpu load would be too high for ingame music. One alternative may be to convert the midi files to mod format. Mod files are somewhat smaller than mp3s and playback cpu load would be low.
You mentioned a lua patch. I've been unable to get DefinePlaySections working in sound.lua. Any info would be useful.
Pete
pearl62
02-26-2008, 05:58 PM
I am getting the same errors reporting the preferences.lua and .wav files missing.
At the end of the error messages is one final one that seems to be stopping it:
"Invalid graphic (width, height) ui/fonts/small.png
Expected: (7,6) Found: (90,84)
terminate called without an active exception
Aborted"
This is with executing from xterm with -v 1 or -v 2. I am using the latest OS2008 (51-3) on a N800.
Can someone send me their ui/fonts/small.png file?
linman
02-26-2008, 06:22 PM
I am waiting to get my n800 and after that I will check the whole port. I have a plan to support original sound track if it possible without decreasing game speed and current frame rate.
Meanwhile I am trying to port Widelands and now it works fine ... I just have to remove the last edges and will make the package.
pearl62
02-26-2008, 07:21 PM
Thanks! Replacing small.png seemed to make it work.
I've attached it here in case anyone else needs it... It goes in the /media/mmc1/games/stratagus/graphics/ui/fonts/ folder.
pearl62
02-27-2008, 01:15 PM
It starts now, but crashes within just a few minutes. Not sure why...
linman
02-27-2008, 04:50 PM
It starts now, but crashes within just a few minutes. Not sure why...
See this http://www.internettablettalk.com/forums/showpost.php?p=143967&postcount=17
pearl62
02-28-2008, 01:09 AM
That seemed to help only a little... The game lasted maybe a minute longer. I also tried moving the game files to mmc2, which for me a a faster class 6 SD card. The game was faster, but it still crashed.
It looks promising, but is there anything I can check to try to get better results?
pearl62
02-28-2008, 01:28 AM
As soon as the third peasant is delivered it crashes.
linman
02-28-2008, 05:47 PM
Which version of WC2 you tried to create data files with wargus?
You need warcraft 2 version 1.22 "tides of darkness". Make your data files from this version and try the game again.
pearl62
02-28-2008, 09:55 PM
That's what I was thinking... I'm trying to find that version. Thanks!
Bundyo
02-29-2008, 06:25 AM
Yes, the battle net edition is not supported i think.
linman
03-06-2008, 05:02 AM
Finally I got my n800 device :) Next days I am going to try the game and maybe will create new package.
pearl62
03-10-2008, 12:50 AM
Ok, finally found the tides of darkness version and it's working really well, at 640x480. How do I get the 800x480 files?
Also, the double click doesn't seem to work as a right click. It's maddening! The only way I can get a guy to go where I want is to double click when the destination is in fog (I hope that makes sense...), or use the M command. The double click only works to get a guy to move to an open space.
Bundyo
03-10-2008, 02:04 AM
For some operations the double click is working - like wood cutting :)
When you install the package it should automatically install the 800x480 files. If it don't - rename the directory and try to reinstall, then look in the new dir for the 800x480 files and add them to the others.
pearl62
03-10-2008, 01:38 PM
Awesome!! It works great now.
zehjotkah
04-18-2008, 05:47 AM
Thanks!!!
I had to install "libbz2" via redpill-mode
then it works, but starting from caommand-line gives some errors, but the game starts, and it works very well!!!
THANKS
Twistedgrim
05-04-2008, 02:09 AM
I installed bzip2 to make it work libbz2 isnt available for 2008 for me for some reason but bzip2 worked
apt-get install bzip2
also just wanted to say I had some confusion about the data to install FROM wargus the data folder in the wargus directory is the one to load from gives the files exactly.. Hope this helps the next person.. Man I got RA and WC2 could this be any better.
Hi! Good job, but game doesn't work for me:
Stratagus default config file loading ...
[string "data/scripts/stratagus.lua"]:54: attempt to call global `SetMenuMusic' (a nil value)2
stack traceback:
[C]: in function `SetMenuMusic'
[string "data/scripts/stratagus.lua"]:54: in main chunk
I have some errors on configuration files.
konus
05-23-2008, 04:10 AM
Hi! Good job, but game doesn't work for me:
Stratagus default config file loading ...
[string "data/scripts/stratagus.lua"]:54: attempt to call global `SetMenuMusic' (a nil value)2
stack traceback:
[C]: in function `SetMenuMusic'
[string "data/scripts/stratagus.lua"]:54: in main chunk
I have some errors on configuration files.
i have same errors... :(
hyankov
09-05-2008, 03:45 PM
Thanks. Great to see WarCraft 2 again. Speed is terrible though... How did you guys move the files to MMC2?
zehjotkah
09-07-2008, 03:54 AM
speed is here fullspeed.
maybe you have the wrong version? read the first post again...
just move the game-files to external mmc (on N810 mmc1) mmc1/games/stratagus
hyankov
09-08-2008, 12:41 AM
Maybe I misunderstood something but...
It was on MMC1, worked fine, but slow. Moved the files to mmc2 (my other card, duh) and game doesn't start. So I guess it works with mmc1 only.
Thanks.
belgarath419
03-05-2009, 09:04 PM
Is anyone else unable to see their own cloaked submarine/turtle units?
allnameswereout
03-06-2009, 02:42 PM
Hihi wow!! Fills me with warm feelings seeing this possible :) (although I won't run games)
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.