Hey, we have forums!

Author Topic: Aquaria Source Code Released  (Read 70399 times)

0 Members and 3 Guests are viewing this topic.

Offline Lady-Succubus

  • Hero Bit
  • *********
  • Posts: 538
  • Aren't I cuuuutee? =^.^=
    • View Profile
    • Woefully Outdated Blog
Re: Aquaria Source Code Released
« Reply #30 on: June 11, 2010, 05:40:19 am »
Wow. If I get a tiara and then find a backpack, will I someday be as smart as the above poster? T_T
Bored little neko, pouncing along, scattering posts everywhere. =^.^=

Offline Chew-gun

  • Bit
  • ***
  • Posts: 12
    • View Profile
Re: Aquaria Source Code Released
« Reply #31 on: October 03, 2010, 09:10:00 pm »
How do I get these sources working? >_<
Excuse me for... MAH ENGRISCH ._.

Offline Chew-gun

  • Bit
  • ***
  • Posts: 12
    • View Profile
Re: Aquaria Source Code Released
« Reply #32 on: October 08, 2010, 03:27:15 pm »
How do I get these sources working? >_<
C'mon, people, I won't believe that nobody has compiled it succesfully (except Alec  ::))
Excuse me for... MAH ENGRISCH ._.

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: Aquaria Source Code Released
« Reply #33 on: February 18, 2011, 07:34:14 pm »
Is there a commit log or something, to see how the source evolved over time?
That would be really educational... and probably explain why there is so much commented out code left in there, and what it was supposed to do.
So... i plan getting my hands dirty on the code, but it is hard to find a way through this jungle, as the initial commit at icculus.org is just throwing everything at one's face :P

I wonder how Alec managed his code... localhost git/hg/rcs repo, or the good old copy-and-zip-everything-once-a-day version tracking strategy? ;)

EDIT: Totally forgot to say, thanks for releasing the source. I heard it was a hard decision, but this opened a good opportunity for others to learn from it.
(Or so to say, releasing code that is worth money requires faith, and code that is a mess requires balls. Ehm.  ^-^)
« Last Edit: February 18, 2011, 07:41:22 pm by False.Genesis »

Offline achurch

  • Bit Bit
  • ****
  • Posts: 90
    • View Profile
Re: Aquaria Source Code Released
« Reply #34 on: February 19, 2011, 02:21:29 am »
No, not to my knowledge. For one thing, releasing the internal repository would probably leak information under NDA (Steam code, for example) and is likely impossible for that reason alone.

That said, I started from the Icculus repository and successfully worked my way to a functional alpha build for the iPad, so it can be done! (: My suggestion would be to start with a single point of interest, like "how do the sprites work?" (answer: look at BBGE/SkeletalSprite.{cpp,h}), and branch out from there.

Offline King_DuckZ

  • Mini Bit
  • **
  • Posts: 2
    • View Profile
Re: Aquaria Source Code Released
« Reply #35 on: February 10, 2012, 10:25:07 pm »
Hi guys, just in case this will be helpful for someone, I successfully built aquaria with both gcc and ekopath.

gcc (Gentoo 4.6.2 p1.0, pie-0.4.5) 4.6.2
PathScale EKOPath(tm) Compiler Suite: Version 4.0.12

With gcc it just worked, just cd into an empty directory and run
cmake <path to aquaria> -DCMAKE_BUILD_TYPE=Release
make -j<your number of cores>

(if you don't know how many cores you have just run make alone, or "make -j$(cat /proc/cpuinfo | grep -m 1 'cpu cores' | grep -Po \\d)" note that the higher the number you put, the more memory you will need)
Once finished you can copy the binary to wherever your data files are and delete this temporary dir. The code will still be kept.

With ekopath some fixes were needed, but I still think the coders did a great job in writing high quality code. Bravi! Enough said, down to the fixes:
in the CMakeLists.txt I added those two lines:
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -OPT:Olimit=0")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -OPT:Olimit=0")

Those are optional. You can drop -O3, you would still get a good result. The second option, -OPT:Olimit=0, shuts down a warning about the optimizer running out of memory and giving up in some cases, but the build would still be successful. Make sure you have enough ram if you use this option (I needed around 1 GiB and I ran make -j2). To save up memory you can run make without the -j option.

Second fix is in aquaria/BBGE/Joystick.cpp, as the compiler would complain about close() and write() not being defined. The prototype for those functions are in unistd.h, so open Joystick.cpp, go down where you see #include "Core.h" and add the following right after that:
#ifdef __LINUX__
#include <unistd.h>
#endif

That's it, run cmake with the following command:
CC=pathcc CXX=pathCC cmake ../aquaria/ -DCMAKE_BUILD_TYPE=Release

run make or make -j and wait for your steaming hot binary :)
In my case, gcc made a 3 MiB binary, ekopath a 8.7 MiB one. Building with intel compiler should be easy enough, you can try if you want, just replace pathcc with icc and pathCC with icpc in the previous command. Me, I'm happy enough with my ekopath binary. Have fun!

Edit: I see some people are having issues getting the code. Just install mercurial from your package manager or get it from here, cd into a new dir where you want the code to be downloaded and run
hg clone http://hg.icculus.org/icculus/aquaria/

A new directory called aquaria will be created and you will find the code inside. You can then remove mercurial if you want.
« Last Edit: February 10, 2012, 10:41:06 pm by King_DuckZ »

Offline False.Genesis

  • Administrator
  • Super Bit
  • **********
  • Posts: 461
  • PRESS COMPILE FOR RAINBOWS
    • View Profile
    • My source code!
Re: Aquaria Source Code Released
« Reply #36 on: February 11, 2012, 08:14:19 am »
If you plan to hack on the code or get a bit active otherwise, be sure to join the mailing list (archive).
The repo is usually rather slow in beeing up to date, you can also check mine if you want.

But cool that you can build with ekopath. I can report that it builds fine with gcc,  clang 3.0, and MSVC.

The joystick fix you made would be a good thing to post on the mailing list.
Which OS are you using that you get that joystick error? Compiles fine for me on win/linux/osx.
(And btw, instead of __LINUX__, BBGE_BUILD_LINUX and related are used throughout the code.)

I have crash problems with gcc and -O3, better use -O2, to be on the safe side.

Offline King_DuckZ

  • Mini Bit
  • **
  • Posts: 2
    • View Profile
Re: Aquaria Source Code Released
« Reply #37 on: February 11, 2012, 02:45:49 pm »
Quote
Which OS are you using that you get that joystick error? Compiles fine for me on win/linux/osx.
I'm running Sabayon Linux. Btw with gcc the code built fine, only ekopath needed that inclusion to be added. It's a standard header, so it won't do any bad in gcc but if you think it's better to limit it to specific compilers, the correct ifdef for ekopath would be __PATHCC__ (and __INTEL_COMPILER in case icpc complains about the same thing, I only tried the fixed version with it).
Quote
(And btw, instead of __LINUX__, BBGE_BUILD_LINUX and related are used throughout the code.)
I don't know, I just saw other ifdefs like that in the same file and copied & pasted.
Quote
I have crash problems with gcc and -O3, better use -O2, to be on the safe side.
I played with the ekopath bin and had no problems. I added the necessary to CMakeFiles.txt to keep -O2 for gcc only.

I'm attaching a patch (based on revision 37d19fdd3fc4+), it contains the fixes we've been discussing plus warning fixes for the intel compiler plus some minor crap.
All of the fixes can be put on the main repo, as well as the CMakeLists.txt. The only thing that should be noted is that I added the -march=native option in there: this means that you can use it to build on your machine but the generated binary is suboptimal or broken for other machines. That option must be taken away when builing a distributable binary.

I'm not really planning to bash onto the code, I had some time to kill and played with it, but thanks for telling me about the mailing list!
Edit: the attachment function is not working, the patch is here.
« Last Edit: February 11, 2012, 02:50:40 pm by King_DuckZ »

Offline ArneBab

  • Mini Bit
  • **
  • Posts: 2
    • View Profile
Re: Aquaria Source Code Released
« Reply #38 on: April 02, 2013, 01:31:35 am »
I'm not really planning to bash onto the code, I had some time to kill and played with it, but thanks for telling me about the mailing list!
Edit: the attachment function is not working, the patch is here.

Thank you for your patches! They allowed me to get the code to compile for me.

The game did not run due to opengl errors (r600 card not found).

It does not yet work completely again (my mouse clicks get ignored, though the fish track the mouse), but it starts, and that’s a good beginning.

I pushed my code to a forked repo: https://bitbucket.org/ArneBab/aquaria/


Offline ArneBab

  • Mini Bit
  • **
  • Posts: 2
    • View Profile
Re: Aquaria Source Code Released
« Reply #39 on: April 02, 2013, 03:33:44 am »
My local version of Aquaria now works again.

Thank you for making the engine free software! Otherwise I would never again have been able to play your great game (it was broken for almost a year until I decided to make it run again today).

The version which compiled is https://bitbucket.org/ArneBab/aquaria/commits/branch/builds-on-bab-gentoo