[HowTo] play demos without frontend

12 replies [Last post]
Mkk-Bote
User offline. Last seen 9 years 11 weeks ago. Offline
Joined: 2009-01-17
Posts: 142

How to

Quote:
Demos can now be played without the frontend
?

rbaleksandar
rbaleksandar's picture
User offline. Last seen 9 years 33 weeks ago. Offline
Joined: 2009-01-09
Posts: 685

I want to know that too Big Grin

HTML = How To Meet the Ladies

Here is my Unofficial Manual for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin

nemo
nemo's picture
User offline. Last seen 3 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Tiy said he'd do a writeup on it, but basically, unc0rr added capability for engine to read its data directly, without using socket.
Since I wanted to be able to add arbitrary options, I made the syntax more complicated than initially by him by adding back in all the usual variables (sorry) Smile
Essentially, you just setup your call to hwengine (say in windows program list or when specifying program to open in firefox) like so:

/path/to/hwengine /path/to/hedgewars/Data %1 1280 960 32 0 1 en.txt 128 20 0 1 1 0

In this particular case, the parameters are:
1) path to Data so hwengine can load maps and such
2) %1 - the full path to the hwd/hws you are trying to open - if in Firefox, you'd use %1 and it'd pass in the temp directory3) horizontal resolution
4) vertical resolution
5) colour depth
6) fullscreen - 0 no, 1 yes
7) sound - 0 no, 1 yes
8) locale file, in this case en.txt
9) volume - 128 is 100%
10) timer interval - is related to frames per second
11) show FPS - 0 no, 1 yes
12) show alt damage tags - 0 no, 1 yes
13) enable music - 0 no, 1 yes
14) reduce quality - 0 no, 1 yes

Usually I generate these just by launching a game with parameters I like, then using a normal hwengine commandline:
For example:
$ ps auwx | grep hwengine
nemo 8271 41.7 2.6 214184 82732 pts/14 SLl+ 13:46 0:03 /home/nemo/games/bin/hwengine /home/nemo/.hedgewars 1280 960 32 50838 0 1 en.txt 128 20 /home/nemo/games/hedgewars/Data 0 1 bmVtbw== 1 0

In this case, the parameters are:
[/home/nemo/.hedgewars] [1280] [960] [32] [50838 - REMOVE] [0] [1] [en.txt] [128] [20] [/home/nemo/games/hedgewars/Data - MOVE TO FRONT] [0] [1] [bmVtbw== - REMOVE] [1] [0]
Which results in:
/home/nemo/games/hedgewars/Data 1280 960 32 0 1 en.txt 128 20 0 1 1 0

Then I just add %1 as 2nd parameter and done Smile

I suppose a wrapper could be made to read the config file to make this easier.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

rbaleksandar
rbaleksandar's picture
User offline. Last seen 9 years 33 weeks ago. Offline
Joined: 2009-01-09
Posts: 685

Shocking I say you definetly don't know the meaning of the word group "user fiendly". Big Grin For all this cr*p I'd better run HW and play the demo from there. Big Grin

HTML = How To Meet the Ladies

Here is my Unofficial Manual for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin

nemo
nemo's picture
User offline. Last seen 3 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

You only do it once though. Seemed pretty straightforward to *me*.
But. Tell ya what.
If you tell me what the standard install locations are under windows, and what your preferences are for sound and such, I'll give you a string to copy and paste into the firefox
"open with application" box.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

rbaleksandar
rbaleksandar's picture
User offline. Last seen 9 years 33 weeks ago. Offline
Joined: 2009-01-09
Posts: 685

Nah, I can do that following your instructions. What I'm saying is it's too much Big Grin

HTML = How To Meet the Ladies

Here is my Unofficial Manual for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin

Mkk-Bote
User offline. Last seen 9 years 11 weeks ago. Offline
Joined: 2009-01-17
Posts: 142

@Nemo:
Ty for the answer.
My Install folders:
hw engine:
C:/Programme/hedgewars 0.9.10/bin/hwengine.exe
de locale:
C:/Programme/hedgewars 0.9.10/hedgewars/Data/Locale/de.txt
music:
C:/Programme/hedgewars 0.9.10/hedgewars/Data/Music
sound:
C:/Programme/hedgewars 0.9.10/hedgewars/Data/Sounds
demos:
C:/Dokumente und Einstellungen/Mkk-Bote/.hedgewars/demos
saves:
C:/Dokumente und Einstellungen/Mkk-Bote/.hedgewars/saves

Edit:
Settings can be like your 1st post, only de.txt and path I posted.
Is this enough?

nemo
nemo's picture
User offline. Last seen 3 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

"C:/Programme/hedgewars 0.9.10/bin/hwengine.exe" "C:/Programme/hedgewars 0.9.10/hedgewars/Data" %1 1280 960 32 0 1 de.txt 128 20 0 1 1 0

Try pasting that into the "open with" dialog then...

of course the file you open will have to be a 0.9.10 one.

If 1280x960 is too large or does not work with your SDL, try your normal resolution I guess.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

rbaleksandar
rbaleksandar's picture
User offline. Last seen 9 years 33 weeks ago. Offline
Joined: 2009-01-09
Posts: 685

Nah Smile I just installed Ubuntu (not on a virtual machine) and I rule Big Grin

HTML = How To Meet the Ladies

Here is my Unofficial Manual for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin

Koda
Koda's picture
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 2008-11-10
Posts: 215

hm i noticed that most of this changed with 0.9.11
here is the correct guide: http://www.hedgewars.org/node/1465

bye
Koda

mfosby
User offline. Last seen 14 years 11 weeks ago. Offline
Joined: 2009-06-02
Posts: 11

is it easy to implement a record demo feature so it leaves a .avi , .flv file or something, for easy making of youtube videos and such?

unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 5 weeks ago. Offline
Joined: 2006-11-27
Posts: 576

no, it doesn't seem easy

Smaxx
Smaxx's picture
User offline. Last seen 12 years 50 weeks ago. Offline
Joined: 2009-04-29
Posts: 391

It's rather easy to write AVI files using OpenCV (did it two or three weeks ago). However it would increase the number of hedgewar's dependencies etc. unless it's possible to do dynamic bindings that don't require some specific dll unless called ... might have to try that. Wink Smiley

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]