any language restriction for Steam?

Discussion in 'Game Development (Technical)' started by wazoo, Dec 12, 2008.

  1. wazoo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    519
    Likes Received:
    0
    With my luck, no doubt it's prominently displayed on some webpage on Steam's site, but I'm making some technical decisions about a project I'm working on now and kinda want to keep the Steam option open..

    Can it distribute Java clients? Or just C++ created binaries...?

    thanks,
     
  2. ChrisP

    Indie Author

    Joined:
    Feb 5, 2007
    Messages:
    971
    Likes Received:
    0
    The Steamworks SDK is C++. This doesn't mean the game has to be in C++, though, as long as you can call into C++ somehow. For example, Mayhem Intergalactic is written in D 1.0, which can't call into C++ directly (D 2.0 can but I decided it's too much of a hassle to upgrade). It can call functions exported as C, however, so I wrote a simple little C/C++ wrapper (exporting C functions that call C++ code) to mediate between my D code and Steam's C++ code. Your code won't actually need to know about objects as such, so this is easy.

    Java can call C so this is fine from that perspective too. However, there are other obstacles. I'm pretty sure that the system expects to have an .exe that it can wrap* with DRM and run to launch the game. I know there's a field for putting in your executable's filename at least. Probably it's possible to generate an .exe from a Java program by embedding a VM or some similar nonsense, but I'm not familiar enough with Java to know anything about this.

    *I'm not 100% sure that it does wrapping. I've never had to worry about it myself, but then again I wouldn't since Valve handles all of that. This page says it does:

    In short: Native code will definitely work as long as you can talk to C++. Managed code... possibly, but only if you have an .exe file, and I couldn't say for certain that it would actually work. Best thing is to ask Valve if you're unsure.

    Most of this can be inferred from the public Steamworks page, so I don't think I'm overstepping the bounds of my NDA here. :)
     
  3. wazoo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    519
    Likes Received:
    0
    Much appreciate the info Chris.

    Yeah, I did manage to find some contact information so hopefully I can get a few questions answered from "the source".

    But you filled in a lot of blanks for me with that great explanation. Thanks again man.

    Good luck on whatever project you got going on!

    cheers,
     
  4. Ciardhubh

    Ciardhubh New Member

    Joined:
    Oct 9, 2008
    Messages:
    131
    Likes Received:
    0
    If you only have to provide an executable .exe file, you can use Launch4J (http://launch4j.sourceforge.net/). Launch4J wraps Java programs in a native executable (Win, Mac, Linux, Solaris) and lets you customise whether it should use a bundled JRE or one installed on the user's system.
     
  5. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Or write your own tiny JNI launcher and bundle the VM - it's just not worth relying on the user having a VM installed for the sake of a few extra megs on the download. Broadband FTW!

    Cas :)
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer