Cool video of the Linux version

wololo

Been followin' the console hacking scene since 2006, I'm an old guy so get off my lawn!

You may also like...

Hey, reader. The ads below are not "inappropriate", they are computer-generated "popular topics on the web". Data doesn't lie. Don't blame me, blame mankind.

27 Responses

  1. J says:

    For those who care :
    Yes the Linux version is quite cranky yet. I mean, sure it’s working, but you still have a number of
    things to do by hand to build it, mostly because I’ve been much to lazy to automate it yet.
    JGE now has a half-decent makefile that should allow compilation of any of the supported versions with
    minimal effort, but same cannot be said of wth?! for which building the Linux version has to be
    done half by hand. Bindings can’t be redefined without changing the code as of yet, and also, I’m
    using the Glut library for window interaction, which means easy development but for some reason
    the library does not allow detection of Ctrl or Alt or Shift as stand-alone keys, so we’ll have to redo some work and shed Glut if we want to have them – which is quite desirable, indeed.
    What else ? The game is playable but has some speed issue – it’s way, way too fast. Due to some hairy
    internals animations finishing in the blink of an eye mess with the IA, and the deck editor is barely
    usable for excessive speed – that’s the next thing I intend do fix.

    So… yeah it’s pretty nice. The presence of a bazillion development tools for Linux that do not exist
    for windows should account for easier debugging, and good development environments could save us
    some time.

    Ah, also, new artwork is being created, as you can see some of it in the video. The artwork currently
    being used borders on copyright infringement and that’s something we’re really not keen on, and
    it’s the chance to continue giving Wagic its own graphical style. I’m not much of an artist, but I’ll be
    giving it a try with Wololo :)

  2. x-man says:

    A quand une version Mac ???

  3. wololo says:

    Je pense que la version Linux doit pouvoir compiler pour mac avec des changements mineurs.

    I think you can compile the Linux version for Mac as well…but I ‘m not the one who’ll try

  4. J says:

    Logically if you got all the dependancies installed I suppose compiling on a Mac as if it was a Linux
    (as in make linux, instead of make) would work.
    I don’t really have a mac in handy to test however, if I happen to stumble upon one on which I can
    install dependencies I’ll look into it

  5. Nanocore says:

    FWIW I am going to have a go at compiling on the Mac. We’ll see how far I can get…

  6. Incantus says:

    So does JGE require the PSP SDK? I’m trying to figure out how to compile it on my mac, but as far as i can tell there is no way.

  7. wololo says:

    I think that if you are not compiling it for the PSP, you should type “make linux”… this would be a question for J, I’ll try to have him answer your question

  8. J says:

    Ah, no it doesn’t. You do not need the psp sdk to compile the game for Unix.

    Basically, you need :
    – libgif
    – zlib
    – fmod
    – glut and its dependancies
    …and I think that’s all ?
    On top of your normal build system, including gcc and its libs and make.

    Then to compile JGE you go into the JGE directory and type `make linux’. That’s supposed to compile the linux version ; if you just type `make’, it’s trying to determine whether you got the PSP SDK or not and if not it’s building for linux – and if you got it it defaults to compiling for PSP firmware 3.x.
    It’s supposed to be as simple as that to get JGE for PSP.

    Now for the game, I started writing the real Makefile yesterday and it’s not complete – I’m reluctant to do it because it’s boring :p So there is a Makefile for linux (that I think would work on Mac) but it is cranky to use.
    Basically you should start by cleaning the build tree – erasing the .o files and all. Then use `make -f Makefile.linux’ which hopefully will compile the game then put the binary into the ./bin dir under the Makefile.

    Note that you cannot run the game unless you go in its binary dir before you run it – it’s using relative paths to find files, and crashes if resource files are not present under the ./Res directory from where you are. Looks like a job for Autoconf… if I ever get the time…

  9. Nanocore says:

    I am compiling for Mac and am about 2/3 the way through the JGE library and it is stumped at compiling the source “src/linuxmain.o”. A source file by the name linuxmain.cpp does not exist, so I will look around and see what you meant to use for this file.

    As a side note, FWIW, I am using the darwin ports which are ports of unix libraries and includes. So far, I have included the following ports:
    glut @3.7_1+darwin_9 (active)
    jpeg @6b_3 (active)
    libpng @1.2.33_0 (active)
    libungif @4.1.4_2 (active)
    zlib @1.2.3_1 (active)

  10. Nanocore says:

    in addition… I added the freetype library and includes and went with the glutmain.cpp and the library was compiled. Now I am working on the game itself, and all source compiles but it doesn’t link yet. Will try again later…

  11. wololo says:

    Nanocore, thanks for your efforts so far !
    It seems glutmain.cpp is the one. I’ll ask J to give you more precise answers, maybe the Makefile isn’t up to date in the SVN ? Do you have the latest version ?

  12. J says:

    The linux version was first made with glut ; because of various limitations of glut I switched to glX and rewrote the file. The glut version should still work, though with these limitations – the glX version won’t work on a mac unless you use an X server, which you probably won’t want to do.

    I think you have an old version of the Makefile as the new one mentions Xmain.cpp and not linuxmain.cpp ; you are right however in using glutmain.cpp, this is the file that used to be linuxmain.cpp, and probably the easiest version to have it work on a mac.

    The game doesn’t have a proper Makefile yet – I compile the linux version using make -f Makefile.linux, which you probably figured out. You also need to have the hge library compiled, which I thought was generated when you call Make in the JGE dir but it apparently doesn’t – I’ll have to look into it when I got a second. Anyway, go into the JGE directory and just use “make hge”, that should work.

    Thanks for your help on this, it would be nice to have it work on mac :o

  13. Nanocore says:

    OK, a couple of things… Yes, there is an X11 server that comes with the Mac, so compiling for an X server is certainly a possibility. The X applications run right alongside regular Mac apps. Also, yes, I did use the Makefile.linux. Once I have something working then I will see if you want to incorporate my changes to the various files. Once it works, I will go through and make the changes more robust (ie, ifdef and probably a separate Makefile etc) and then submit for SVN commit. And yes, the hge source compiled without a problem (had to make a lib/linux/ directory first). So, at least all source compiles without a problem, it just doesn’t link. I just need to be able to have a block of time to get over this last hump.

  14. Nanocore says:

    After I pulled in fmod and got the framework libraries correct (its a Mac thing) I was able to produce a binary. Upon running, I get a window, some output in the terminal and then crash before anything fills the window. Close, so close!

  15. Nanocore says:

    OK, it errors out with a null font address and after some tracking back it looks like it may be a reference creating a font. In GameStateMenu.h around line 112

    mFont = GameApp::CommonRes->GetJLBFont(“graphics/f3″);

    I don’t see a file called “f3″ in graphics. And I am assuming this is in the bin/Resources directory, as that is where I found a “graphics” directory. What is “f3″?

  16. Nanocore says:

    Sorry, one more for today… there is another GetJLBFont call that is looking for “graphics/magic” that isn’t in that directory either…

  17. wololo says:

    Nanocore, I am very sorry, these files where missing from the SVN.
    I added them, but may I suggest that you also retrieve the PSP version of the game (on the download page) ? It probably contains most of the needed resource files, including card pictures.

  18. Nanocore says:

    I had thought that maybe I would find the needed files in the source tarball and downloaded it. It does have a few other files but not the ones under the “bin” directory. Hmm, maybe you are referring to another tarball.?. I will check later on today.

  19. wololo says:

    I was talking about the “main” download file : http://wololo.net/files/wagic/wth_021.zip
    Everything that is in the “Res” folder can be important. The SVN version of the files (in bin/Res), when they exist, are of course more recent and should be used.

  20. Incantus says:

    Well, I’ve gotten wagic running on my powerpc Mac, unfortunately the font system is screwy, and instead of printing text, everytime there is a font string being rendered I just see the entire font alphabet. But otherwise it looks great :)

  21. Incantus says:

    OK, I figured out what was wrong. The dat files for the 2 bitmap fonts (f3 and magic) were in little endian format, while my machine is big endian (ppc). A quick python conversion script and I’m in business :).
    Thanks J for the linux port :)

  22. Nanocore says:

    And I am up and running on my (Intel) MacBook Pro. I will add the things from the zip you mention in the link above and see how it looks then.

  23. Incantus says:

    I can run the program and enter all the menu options, but as soon as i start a game it says i lose. I wonder if there are any more binary data files that might have endian issues. Wololo, can you think of any?

  24. wololo says:

    Incantus :
    There are lots of text files in the game. The card database are simple ASCII text files in the DOS format. It might be the cause ?
    When you immediately lose the game, it generally means that your deck has no cards (and the game tried to draw a card from your library). You might want to check Res/players/deck*.txt, or maybe try to create a deck from scratch in the editor.

  25. Nanocore says:

    Is there a key mapping when not running on a PSP device? I can build a deck and select one but can’t seem to play a game. The demo mode runs very well, at least it looks like it runs pretty well. The esc and space key seem to be mapped, just need to figure out the rest.

  26. wololo says:

    hmmm, when I did it initially for windows, left, right, up and down where working, but the controls have been updated recently and I’m not sure the arrows still work.
    I’m not 100% sure but try these (sorry, french keyboard mapping…):
    A = left trigger
    E = right trigger
    Z = up
    S = down
    D = right
    Q = left

    i = triangle
    k = cross
    j = square
    l,space = circle
    ctrl = select
    esc = start

    In the near future we’ll have a configuration file for the key mapping

  27. Nanocore says:

    Thanks for the heads up, that got me looking. As it turns out those keys are defined in the “main” you use for the JGE library. I am using the glutmain and there are only 5 keys defined. So, I will go through and see what keys were used in the other “main” sources and determine the key codes from there and add them to glutmain source.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>