maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   New Port: Stratagus, a WC2 engine (https://talk.maemo.org/showthread.php?t=16774)

Bundyo 2008-02-17 16:56

New Port: Stratagus, a WC2 engine
 
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 (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 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 2008-02-17 17:02

Re: New Port: Stratagus, a WC2 engine
 
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

JFX 2008-02-17 17:04

Re: New Port: Stratagus, a WC2 engine
 
Awesome man. Great stuff! KEEP IT COMING GOD.

linman 2008-02-17 17:10

Re: New Port: Stratagus, a WC2 engine
 
Bundyo, thanks for your help!

linman 2008-02-17 17:14

Re: New Port: Stratagus, a WC2 engine
 
Quote:

Originally Posted by zehjotkah (Post 143645)
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 2008-02-17 17:53

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-17 18:27

Re: New Port: Stratagus, a WC2 engine
 
Just downloaded it from the site and installed it from the command prompt, seems to be working. Let me check from the browser...

Bundyo 2008-02-17 18:34

Re: New Port: Stratagus, a WC2 engine
 
Yes, there seems to be a problem with the Nokia app manager... I'll look into it, meanwhile

Code:

dpkg -i stratagus-0.1_armel.deb
works normal.

jussik 2008-02-17 19:12

Re: New Port: Stratagus, a WC2 engine
 
Quote:

Originally Posted by Bundyo (Post 143691)
Yes, there seems to be a problem with the Nokia app manager...

I believe AM only installs files that have section "user/something".

CyberCat 2008-02-17 20:44

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-17 20:52

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-18 01:46

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-18 04:04

Re: New Port: Stratagus, a WC2 engine
 
Quote:

Originally Posted by CyberCat (Post 143754)
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 2008-02-18 05:04

Re: New Port: Stratagus, a WC2 engine
 
Quote:

Originally Posted by OSEmuTech (Post 143903)
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 2008-02-18 06:23

Re: New Port: Stratagus, a WC2 engine
 
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:

Code:

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 2008-02-18 06:24

Re: New Port: Stratagus, a WC2 engine
 
@Arnim: Thanks, appreciated. Didn't try in OS2007.

Bundyo 2008-02-18 08:06

Re: New Port: Stratagus, a WC2 engine
 
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

Code:

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 2008-02-18 14:56

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-18 15:30

Re: New Port: Stratagus, a WC2 engine
 
And again does this happen if started from terminal?

Bundyo 2008-02-18 15:52

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-18 16:36

Re: New Port: Stratagus, a WC2 engine
 
Quote:

Originally Posted by Bundyo (Post 144113)
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)?


CyberCat 2008-02-18 18:18

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-18 18:48

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-18 21:21

Re: New Port: Stratagus, a WC2 engine
 
Updated to 0.1-4, fixed crashing when starting from menu.

spirytsick 2008-02-18 22:24

Re: New Port: Stratagus, a WC2 engine
 
I am trying to get the boswars to start but with no luck. Does it need a modified engine ?

Bundyo 2008-02-18 22:45

Re: New Port: Stratagus, a WC2 engine
 
Let me check.

EDIT: This game is not going to work anytime soon - requires OpenGL to get compiled. Sorry.

spirytsick 2008-02-20 22:25

Re: New Port: Stratagus, a WC2 engine
 
thanks Bundyo. I can now safely delete it from the tablet :) and hunt the old copy of w2

Nathan 2008-02-22 04:18

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-22 06:25

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-22 14:53

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-22 15:22

Re: New Port: Stratagus, a WC2 engine
 
Can you post the directory structure of /media/mmc1/games/stratagus?

Michiel 2008-02-22 15:41

Re: New Port: Stratagus, a WC2 engine
 
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
Part 2
Part 3

I should add; it works perfectly on PC (windowsXP)

Bundyo 2008-02-22 19:04

Re: New Port: Stratagus, a WC2 engine
 
Are you sure everything is copied? Could you connect it to your PC and run the PC stratagus with the same data?

ArnimS 2008-02-22 20:49

Re: New Port: Stratagus, a WC2 engine
 
Quote:

Originally Posted by Michiel (Post 146292)
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 2008-02-24 08:16

Re: New Port: Stratagus, a WC2 engine
 
Quote:

Originally Posted by Nathan (Post 146118)
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 2008-02-26 21:58

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-26 22:22

Re: New Port: Stratagus, a WC2 engine
 
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 2008-02-26 23:21

Re: New Port: Stratagus, a WC2 engine
 
1 Attachment(s)
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 2008-02-27 17:15

Re: New Port: Stratagus, a WC2 engine
 
It starts now, but crashes within just a few minutes. Not sure why...

linman 2008-02-27 20:50

Re: New Port: Stratagus, a WC2 engine
 
Quote:

Originally Posted by pearl62 (Post 148648)
It starts now, but crashes within just a few minutes. Not sure why...

See this http://www.internettablettalk.com/fo...7&postcount=17


All times are GMT. The time now is 06:51.

vBulletin® Version 3.8.8