Bit Blot Forum

Aquaria => General => Topic started by: Alec on June 03, 2010, 08:47:16 AM



Title: Aquaria Source Code Released
Post by: Alec on June 03, 2010, 08:47:16 AM
Go nuts.

http://infiniteammo.ca/blog/aquaria-source-released/


Title: Re: Aquaria Source Code Released
Post by: doc on June 03, 2010, 09:19:37 AM
We love you Alec! Or at least your work. ;)

It'd be hard enough for me to release a week's work on something, let alone several years worth, where it's nearly become part of you! But it means a lot to the OS community; hopefully you'll see results!


Title: Re: Aquaria Source Code Released
Post by: Pelar on June 03, 2010, 03:14:24 PM
Nice!  Appreciate the work you did on releasing the source. We know you're super busy working on Marian, so thanks!


Title: Re: Aquaria Source Code Released
Post by: Lady-Succubus on June 03, 2010, 04:24:33 PM
Let's first worship it, and then tear it apart. ^.^

The source code, not Alec. But let's worship Alec anyway. :3


Title: Re: Aquaria Source Code Released
Post by: Smurf on June 03, 2010, 05:37:10 PM
Ah wonderful, thank you

I am fascinated by how you built this glorious game  :)


Title: Re: Aquaria Source Code Released
Post by: Echolocating on June 03, 2010, 10:24:24 PM
In Alec's and Derek's names, we pray.  8)


Title: Re: Aquaria Source Code Released
Post by: Align on June 03, 2010, 10:30:56 PM
Remind me to get back to this after I finish my software architecture with java exam...


Title: Re: Aquaria Source Code Released
Post by: frostyfrog on June 04, 2010, 05:48:30 AM
And... how did I miss this post until just now...
Hopefully, I can educate myself with all of the messy code from the 4 games. Also, THANK YOU! Now all I need is to change my Mod DB's license and get it hooked up to Aquaria. :D


Title: Re: Aquaria Source Code Released
Post by: Pelar on June 04, 2010, 05:41:16 PM
It just occurred to me- this should probably be stickied.  ;D


Title: Re: Aquaria Source Code Released
Post by: Echolocating on June 04, 2010, 06:34:50 PM
It just occurred to me- this should probably be stickied.  ;D
It should also be on Bit Blot's front page.


Title: Re: Aquaria Source Code Released
Post by: Peet on June 04, 2010, 08:04:59 PM
Is there a someplace that someone has put a basic write-up for getting from the source code as it's provided to compilation?  Like, what compilers or IDE were used for development/can currently compile the code, what dependencies we need that aren't included, etc.  Something to help out the simple minded, you know.

If someone knows of such a document, please provide a link?  Thanks.


Title: Re: Aquaria Source Code Released
Post by: Alec on June 04, 2010, 09:03:09 PM
There's a mailing list available (run by icculus), that's probably a good place to start with questions.


Title: Re: Aquaria Source Code Released
Post by: SplinterGU on June 06, 2010, 12:25:07 AM
Congrats!
Thanks lot of!
Cheers,
SplinterGU


Title: Re: Aquaria Source Code Released
Post by: Guy on June 06, 2010, 04:30:17 AM
Erm, just curious... perhaps I shouldn't be posting this but couldn't one build the source and then download the game from Ambrosia, getting the complete game for free?


Title: Re: Aquaria Source Code Released
Post by: Lady-Succubus on June 06, 2010, 05:22:04 AM
I was under the impression that the demo already has the full engine, just different (less + nag) content? :S


Title: Re: Aquaria Source Code Released
Post by: Inyssius on June 06, 2010, 08:26:17 AM
Erm, just curious... perhaps I shouldn't be posting this but couldn't one build the source and then download the game from Ambrosia, getting the complete game for free?

Maybe? I dunno.

... but if one were determined to get Aquaria without paying for it, there are far less circuitous ways. Three seconds of googling for "aquaria torrent", three minutes of download time, and Bob's your (shady, alleyway-dwelling, morally disreputable) uncle.


Title: Re: Aquaria Source Code Released
Post by: Alphasoldier on June 06, 2010, 07:17:28 PM
Guys, even IF this all is common knowledge, let's not give people any ideas, okay?


Title: Re: Aquaria Source Code Released
Post by: NeatNit on June 06, 2010, 08:25:25 PM
Oooh, I am SOO going to pirate Aquaria now! >:D


Title: Re: Aquaria Source Code Released
Post by: Inyssius on June 06, 2010, 08:33:44 PM
Oh no! What have I done?!


Title: Re: Aquaria Source Code Released
Post by: Guy on June 06, 2010, 09:06:38 PM
Well yeah, I guess my point was that it seems like a totally legal way of obtaining a full copy.


Title: Re: Aquaria Source Code Released
Post by: GMMan on June 06, 2010, 10:23:06 PM
I tried compiling Aquaria with MinGW and Visual C++ 2010, and neither works. I made dozens of little changes everywhere so that they won't give me errors. MinGW went all the way to linking, until it told me it can't find longjmp and WinMain@16. I have absolutely no idea where to find those methods (I've already tried the MSVC libraries, and they're not much help). With VC++, it gave me errors on every single file, until I undefined INPUT_MOUSE and INPUT_KEYBOARD. After a few more fixes, everything halted with the compiler not parsing FreeType's headers thoroughly, and I am not going to bother changing every one of those #includes to a static file name. Anyone had more luck?

EDIT: Wait... Just found out that the Mercurial repo is updated. I might try compiling again. Though should I use VC++ or MinGW?


Title: Re: Aquaria Source Code Released
Post by: Alphasoldier on June 06, 2010, 11:30:45 PM
Yeah, thanks for all the narcissism, assholes.


Title: Re: Aquaria Source Code Released
Post by: Inyssius on June 07, 2010, 12:16:06 AM
... what.


Title: Re: Aquaria Source Code Released
Post by: Xiagan on June 07, 2010, 09:44:39 AM
C'mon guys...

Quote from: Alec
*group hug*


Title: Re: Aquaria Source Code Released
Post by: Yogoda on June 07, 2010, 07:19:05 PM
Anyone did compile the code successfully ::) ? I would like to know what compiler to use.

I had a hard time getting the code too, because I didn't know anything about this Mercurial, so here is what to do :

Download and install TortoiseHg : http://tortoisehg.bitbucket.org/
Create a directory, right-clic on it, TortoiseHg->Clone...
Set : http://hg.icculus.org/icculus/aquaria/ as source, clic Clone

It should get the code. The Clone thing is what confused me :P


Title: Re: Aquaria Source Code Released
Post by: Lady-Succubus on June 08, 2010, 12:36:57 AM
I think any way of obtaining any part or whole of Aquaria is illegal if it's not Bit-Blot sanctioned. :3


Title: Re: Aquaria Source Code Released
Post by: GMMan on June 08, 2010, 01:09:35 AM
I think we're still missing a bit of source code. For example, there's no VC++ project, no binary resources (such as icons), no version info, and AQConfig is completely missing. Maybe Alec should commit the rest of the project (sans game data) to the repository?


Title: Re: Aquaria Source Code Released
Post by: Alec on June 08, 2010, 02:26:03 AM
You need to get on the mailing list. They're setting up a VC++ project right now.

For anything else about the source, hit up the mailing list first. That's where you'll find people actively working on the sauce.

Info in this post: http://blog.wolfire.com/2010/06/Aquaria-goes-open-source


Title: Re: Aquaria Source Code Released
Post by: user452 on June 08, 2010, 07:36:23 PM
Thanks for the source code, Alec!

Mailing list signup page is here: http://icculus.org/mailman/listinfo/aquaria
Mailing list archive is here: http://icculus.org/pipermail/aquaria/ (no signup needed to read)


Title: Re: Aquaria Source Code Released
Post by: Princess_Backpack on June 11, 2010, 12:16:23 AM
Anyone did compile the code successfully ::) ? I would like to know what compiler to use.
I've successfully compiled it. I'm on Linux (Fedora Core 12), with an AMD64 processor.
My gcc version appears to be 4.4.3.

Here's what I did
1. checkout the code like you said.
2. Install cmake if needed
3. change to the directory you want to build in
4. "cmake /PATH/TO/aquaria/CMakeLists.txt" (where the path here is the location of CMakeLists.txt)
5. make (careful, if you're doing all this in your existing game directory you might overwrite your aquaria executable)
6. copy the resulting executable to a directory with the game data (symlinks don't seem to work, or am I horribly mistaken here?)
7. run!

64 bit builds seem to run pretty good right now, though I had to delete the AL directory from the sourcecode to force it to use my systems openAL and actually have working sound. There was also a bit more slowdown than the prepackaged (32 bit) version for some reason. Maybe I accidentally made a debug build <_<. Yep, it was because it was a debug build all right. Silly me.


Title: Re: Aquaria Source Code Released
Post by: Lady-Succubus on June 11, 2010, 03: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


Title: Re: Aquaria Source Code Released
Post by: Chew-gun on October 03, 2010, 07:10:00 PM
How do I get these sources working? >_<


Title: Re: Aquaria Source Code Released
Post by: Chew-gun on October 08, 2010, 01: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  ::))


Title: Re: Aquaria Source Code Released
Post by: False.Genesis on February 18, 2011, 06: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.  ^-^)


Title: Re: Aquaria Source Code Released
Post by: achurch on February 19, 2011, 01: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.


Title: Re: Aquaria Source Code Released
Post by: King_DuckZ on February 10, 2012, 09: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 (http://mercurial.selenic.com/), 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.


Title: Re: Aquaria Source Code Released
Post by: False.Genesis on February 11, 2012, 07:14:19 AM
If you plan to hack on the code or get a bit active otherwise, be sure to join the mailing list (http://icculus.org/mailman/listinfo/aquaria) (archive (http://icculus.org/pipermail/aquaria/)).
The repo is usually rather slow in beeing up to date, you can also check mine (https://bitbucket.org/fgenesis/aquaria) 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.


Title: Re: Aquaria Source Code Released
Post by: King_DuckZ on February 11, 2012, 01: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 (http://pastebin.com/JFPamKXd).


Title: Re: Aquaria Source Code Released
Post by: ArneBab on April 01, 2013, 11:31:35 PM
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 (http://pastebin.com/JFPamKXd).

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/



Title: Re: Aquaria Source Code Released
Post by: ArneBab on April 02, 2013, 01: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