Allegro.cc - Online Community

Allegro.cc Forums » The Depot » [SpeedHack] E'th

This thread is locked; no one can reply to it. rss feed Print
 1   2 
[SpeedHack] E'th
SiegeLord
Member #7,827
October 2006
avatar

Here's my entry to the 2014 speedhack.

E'th

{"name":"608630","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/4\/54dafc9207ba595a5655a58cfefa8172.png","w":1206,"h":725,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/4\/54dafc9207ba595a5655a58cfefa8172"}608630
{"name":"608631","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/e\/cef42af64454b4eeb8273804952a065b.png","w":1206,"h":725,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/e\/cef42af64454b4eeb8273804952a065b"}608631

Blog.

Competition version

Source.
Windows binary (3 MiB) (now should work with WinXP).
Linux 64-bit binary (1.7 MiB).

Post-competition fixes (fixes the fuel bug)

Source.
Windows binary (3 MiB)(now should work with WinXP).
Linux 64-bit binary (1.7 MiB).

Start with the 'BETH' mission set, as it's a mini-tutorial. 'BRADFORD' is in principle doable, 'IRA' might be impossible. Check out options.cfg file if you find fullscreen/music to be objectionable.

It's actually not too bad to compile this from source (as long as you get everything at the revisions mentioned in the Readme) if you have some time to kill... either way, I'll make some static Linux binaries tomorrow.

If anybody observes this working on WinXP, please tell me, as I've went through some pains to patch the Rust runtime just for you ;).

Thanks to Matthew for hosting the event..

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

AMCerasoli
Member #11,955
May 2010
avatar

Uh?
{"name":"608635","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/b\/fbcd1ab99c91ba20ae8861d2bbe44ab2.png","w":413,"h":165,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/b\/fbcd1ab99c91ba20ae8861d2bbe44ab2"}608635

The folder and file is there.

SiegeLord
Member #7,827
October 2006
avatar

Gosh darn it, I keep forgetting that the audio addon dynamically loads some libraries! Seems like a nice feature, but nightmarish for getting the distribution right. I've updated the download with the missing files.

Glad I got the dialog addon working :P.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Elias
Member #358
May 2000

Don't we have a cmake option to disable the dynamic loading?

--
"Either help out or stop whining" - Evert

SiegeLord
Member #7,827
October 2006
avatar

Wouldn't do me much good, as I'd have to remember to turn it on.

Anyway, I just created a 64 bit Linux binary with statically linked Allegro (see OP). I had to fix a small bug in RustAllegro, but the game code is unaffected.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

AMCerasoli
Member #11,955
May 2010
avatar

I thought that compiling an universal Linux binary was 100% impossible. I tried on xubuntu and I get:

task '<unnamed>' failed at 'Could not init audio addon', /home/siege/src/rust/src/libstd/option.rs:167

Why am I seeing that directory? :-/

{"name":"608645","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/b\/5b05a00e86335bd4934f5ea383b4e553.png","w":483,"h":179,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/b\/5b05a00e86335bd4934f5ea383b4e553"}608645

Oh BTW I played your game on Windows, it works perfectly there. I was just curios about this, I wanted to know if it could run out of the box on Linux, I'm interested in doing something like this with my game.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I'm playing E'th right now and its pretty cool. I'm on the level with 4 stars in a diamond and 4 ships around them and I don't have enough fuel to reach both sides. It's really hard to break out of the center with out using fuel or only slingshoting it around a star, but that's hard because of the large centralized gravity well the four stars provide. So far I've bought a better camera and a fuel tank and that's all I could afford.

Screenie :

{"name":"608646","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/1\/d166e0cbc05958d3c1c7a27595fe7bef.png","w":1280,"h":800,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/1\/d166e0cbc05958d3c1c7a27595fe7bef"}608646

It was on Bradford mission.

Good game SiegeLord ;)

SiegeLord
Member #7,827
October 2006
avatar

Oh damn... there's a bug when you reset the mission, all your bonus fuel is gone... I suppose if you're awesome you could do everything on the first try, but this sort of makes fuel upgrades pointless for the rest of us... That said... it is possible to win that mission with just camera upgrades (which are unaffected by the bug).

I thought that compiling an universal Linux binary was 100% impossible.

It's not too bad (I compiled on a Debian Stable VM), but clearly it needs some testing... (it did work on my Ubuntu). I'm not sure why it fails to init the audio addon :-/.

Quote:

Why am I seeing that directory? :-/

The failure messages take into account the directory where the file was built... same thing happens with debug info.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Dizzy Egg
Member #10,824
March 2009
avatar

This is cool! I took care of 'BETH' pretty easily, but can only manage the first level of IRA!

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

TinoR
Member #1,343
May 2001

I get this message on windows xp

{"name":"608650","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/b\/0bb2e2015b27f927a02eacaf7f7d93ad.jpg","w":1024,"h":600,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/b\/0bb2e2015b27f927a02eacaf7f7d93ad"}608650

Arthur Kalliokoski
Second in Command
February 2005
avatar

I got this with the patched 64 bit linux binary

pepsi@fractal:~/EthLinBin 08:29 PM $ eth
eth: error while loading shared libraries: libdumb.so.1: cannot open shared object file: No such file or directory

They all watch too much MSNBC... they get ideas.

SiegeLord
Member #7,827
October 2006
avatar

I get this message on windows xp

That's... new to me. I'll investigate.

I got this with the patched 64 bit linux binary

Need to install DUMB ;). There should be a package for it in most distributions, and the website for it is here: http://dumb.sourceforge.net/.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Arthur Kalliokoski
Second in Command
February 2005
avatar

Quote:

Need to install DUMB ;)

Can't be bothered. Another entry requires D, which I won't bother with either. I'm lazy.

They all watch too much MSNBC... they get ideas.

SiegeLord
Member #7,827
October 2006
avatar

You wouldn't be able to compile it without DUMB even if it was in C/C++ :P.

EDIT: allegro.cc's having trouble with attachments at the moment, so I can't link to it (although try this post's paperclip icon), but I think I have fixed the WinXP issue once and for all.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Gideon Weems
Member #3,925
October 2003

Arthur, you should consider installing DUMB regardless, as DUMB is awesome.

I get the same audio init error as AMCerasoli (running Debian Stable). :-/

Arthur Kalliokoski
Second in Command
February 2005
avatar

Arthur, you should consider installing DUMB regardless, as DUMB is awesome.

I always turn off in-game music, if possible. It's distracting. OTOH, if I did want to listen to music while playing a game, I'd rather play my own choices with vlc or whatever.

I remember downloading and installing the Quake I shareware demo so many years ago, and Led Zeppelins "Houses of the Holy" was in the cd drive, and I thought "Hot damn this game has some good music in it!" Until I wondered why it was so familiar...

They all watch too much MSNBC... they get ideas.

Gideon Weems
Member #3,925
October 2003

I always turn off in-game music, if possible.

If that's true, then you're missing out! Sometimes--not all the time but sometimes--a soundtrack brings the game to an entirely different level.

I do appreciate the option to turn off in-game music, though, particularly with games that treat their music as an afterthought (as opposed to an integral part of the experience).

SiegeLord
Member #7,827
October 2006
avatar

I get the same audio init error as AMCerasoli (running Debian Stable). :-/

Yeah, something's wonky with the audio addon, I think. It really shouldn't be failing... I'll investigate later today.

EDIT: What's happening is that PulseAudio is failing, for some reason. I could enable ALSA, but that introduces massive lag which sort of defeats the purpose of having sound in the first place...

Do other Allegro games/examples work with sound on your systems?

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Gideon Weems
Member #3,925
October 2003

We may have uncovered something, as I don't even have Pulse on my system. A lot of people don't these days. It's unnecessary and has been known to cause all sorts of conflict issues.

The Allegro examples (and other SpeedHack entries with sound, including mine) work fine. I tried ex_audio_simple using sound effects from E'th.

Is there a collection examples specific to the D bindings?

Arthur Kalliokoski
Second in Command
February 2005
avatar

SiegeLord said:

I could enable ALSA, but that introduces massive lag

Explain further please.

They all watch too much MSNBC... they get ideas.

Thomas Fjellstrom
Member #476
June 2000
avatar

ALSA should have less lag than PA. Since PA uses ALSA underneath.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

SiegeLord
Member #7,827
October 2006
avatar

We may have uncovered something, as I don't even have Pulse on my system.

That'd explain it, as I only configured my Allegro to have OSS and PA.

ALSA should have less lag than PA. Since PA uses ALSA underneath.

I'm just relaying what I observed... maybe when Allegro asks for ALSA on the systems I tested, it instead gets the PA ALSA emulation.

Still, this suggests that on systems without PA ALSA might be tolerable... I've updated the binaries to also have the ALSA backend enabled.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Gideon Weems
Member #3,925
October 2003

SiegeLord said:

I've updated the binaries to also have the ALSA backend enabled.

Indeed you did! It works perfectly now. Awesome game! I'm really liking the balance between careful planning and fast-twitch reaction.

Let's see you monkeys beat my 84% fuel record on Bradford 3. 8-)

Dizzy Egg
Member #10,824
March 2009
avatar

Let's see you monkeys beat my 84% fuel record on Bradford 3.

WHAT!?!? How!?

----------------------------------------------------
Please check out my songs:
https://soundcloud.com/dont-rob-the-machina

Gideon Weems
Member #3,925
October 2003

100% pure luck. 8-)

Edit: Just got 86%. I'll make a vid tomorrow.

 1   2 


Go to: