Jump to content
stefanhendriks

D2TM - Help develop! Get the source. (SVN)

Recommended Posts

Andrew    100

However, do not think i will ALWAYS invite upon request; there is a limit in my amount of invitations so perhaps others can help you get a membership at Google.

You must've converted a lot of people. I still got 99 invites. Havn't invited anyone in at least 6 months.

Anyone need one?

I don't know coding, but testing the game is sometimes fun.

Share this post


Link to post
Share on other sites
Gilneas    0

How would I go about compiling this package on Linux?

I know I need a 'configure' script, or at least a 'Makefile', but I don't know how to make one myself.

Share this post


Link to post
Share on other sites

Since i use Visual Studio .NET i have no clue how to do that either, its all done there for you. I think if you get the Allegro library compiling on Linux, and the 3rd party libraries, then you are on your way for doing totally on Linux. I am no expert on that side, but i hope someone who has the expertise will come along and explain how. When the makefile is ready, a makefile.linx could be committed then to the project.

Share this post


Link to post
Share on other sites
gunner154    7

So I need to have a Google account to help out? Okay... but I don't know how to work this computer stuff out. Zero coding knowledge in my head at present...

Share this post


Link to post
Share on other sites

Yeah, thats what it comes down to. I can link your username to the project, and then you can add issues, etc.

edit:

I have now completed the how-to-get-this-thing-compiling step by step guide. The source is there for download. If you get this to work, you will be treated with the nice lightning effects.

Share this post


Link to post
Share on other sites
Beonid    0

Now you can get a Gmail account without an invite. Just go here. I'm interested, but I have no experience with code, but I can test.

Share this post


Link to post
Share on other sites

I have made a lot of changes to the code, simple ones though. You can now compile the code with the free Visual Studio 2005 Express. Since its free, and easy to setup (a simple registration is needed though) , you can compile and have fun with the source.

Link: http://msdn.microsoft.com/vstudio/express/vwd/download/

Also, TortioseSVN is a handy tool to get the source. Perhaps i will write a simple tutorial how to get the source compiling.

Share this post


Link to post
Share on other sites
spekkio    0

hi stefan,

just a request... maybe you can export a makefile from VS2005 so that those who are using other compilers/IDEs can compile it too? it'd be much easier for others to contribute too.. :)

im no makefile geek so i can't convert the existing .vcproj to a makefile

cheers!

spekkio

Share this post


Link to post
Share on other sites

I've done a little research, but i could not find a way to export a makefile in Visual Studio 2005 Express. The only way is to write your own, and i have no clue how.

Share this post


Link to post
Share on other sites
spekkio    0

hi again

i think you've missed out 'cMentat.h' in the repository? couldn't find it; can't compile the program :(

:)

spekkio

Share this post


Link to post
Share on other sites
t0th    0

Hi

I tried to compile this code on linux, but there were several problems some of which were easy to resolve. First one was that you used the '' symbol (which is windows specific and not cross platform). The second was writing #include "Raknetsomething" in code although the directory was actually named "RakNet". This works on windows but linux (and other unixes like Darwin, which is the core of Mac OS X) use case sensitive filesystems.

Unfortunately it still doesn't compile because the allegro library version you use is different from the one i have on my system. Mine doesn't have alfont.h header. Making the compiler use headers you provided didn't work - they are windows specific. I think that even if it would compile, it wouldn't link because of the different library versions. So could you please tell me what's the version you use? Or perhaps i should make D2TM use the new version? I really want to make it work on linux :) Perhaps i can help develop if i get it compile and work on my system. Please reply asap :)

Share this post


Link to post
Share on other sites
nemafakei    6

Is the alfont.h the file that allows you to read .ttf and .fon files? If so, it might be worth phasing it out altogether and sticking with the bitmap table fonts.

Share this post


Link to post
Share on other sites
t0th    0

Yeah i think so. But well, my bad, alfont.h is a header file from allegrofont library, not allegro itself. I'm trying to get it installed now. Sorry ;)

[edit]

good news guys :D after few hours of work i finally compiled D2TM on linux. The worst part wasn't actually porting the code (just changes in paths and some minor code alterations) but compiling all the libraries. It wasn't a simple task 'cause they have buggy makefiles or their code itself is just bad (perhaps it's a compiler matter). Eventually i succeeded and here is a screenshot of D2TM working natively on linux. Not everything works by now but i'm too tired to check this now. I will do this tomorrow. Good night ;]

post-4402-12833239405677_thumb.png

Share this post


Link to post
Share on other sites

Very nice results indeed!

Yes, the 3rdparty libs (alfont, almp3, etc) need to be recompiled. About the path reference, i thought (but obviously was wrong) that "" was cross-os compatible, instead of , but i think i have mistaken it with '/' (which is not compatible in Windows). The changes you have made to the source would be handy if you submit them (if you are project member).

Is it possible to deliver pre-compiled-lib files in a zip package like it is now done for windows? So you can easily compile it on Linux now? Or doesn't it work like this? (forgive me, i am a linux-noob).

Thanks for the great work!

Share this post


Link to post
Share on other sites
t0th    0

Yes, it is possible, however there are many gcc versions out there and their ABI (http://en.wikipedia.org/wiki/Application_Binary_Interface) is likely to be different in the 4.x.x versions. I can provide the allegrofont, raknet and fblend libraries compiled with gcc 4.1.1 or create a package with their corrected sources and makefiles. Other libraries are available in most linux distributions. There is still some work to do so i won't be able to submit them now. I have to make some more #ifdef's so that the same code will compile both on windows and linux.

i've got a few questions:

1. could you please check if the '/' separators work on windows as well? (i think they should but i don't know if they do on VS)

2. there are few bugs which cause the game to crash if a file doesn't exist

3. what's with the campaign and skirmish directories? I tried using the ones from demo3.5 but comparing it to the code, i assume that you changed some of the filenames or sth.

4. sound doesn't work, perhaps you know why? ;) (i'm asking because you might have disabled it or whatever)

5. could you please add me as a project member? ;] my account name on google is wonszson

Share this post


Link to post
Share on other sites
t0th    0

Linux makefiles should be ready tomorrow. Did you (Stefan) check if slashes work on windows as they should? It's important 'cause i don't know if i should commit the changes i have made. What do you think?

[edit]

Ok, sound didn't work because of some allegro bug. It does work on linux using different driver though.

Also i found out that the missing files were actually there. It was just my script for fixing paths that was buggy and damaged the code.

Share this post


Link to post
Share on other sites
t0th    0

I also suggest that we changed all filenames and hardcoded paths to lowercase, because it's another issue. This includes:

- fonts "BENEGESS.FON", "Arakeen.fon"

- scenarios [these are a mess 'cause some of them are all uppercase and the others are like Sceno0.ini]

I will also add a newline at the end of each source file so that g++ will be happy and won't show:

structures/cBarracks.h:19:3: warning: no newline at end of file

;]

[edit]

Of course, the lowercase filenames DON'T include source files;] i hope it's obvious but i just wanted to make myself clear.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×