The future of [Insert programming language]?

Discussion in 'Game Development (Technical)' started by elias4444, May 24, 2008.

  1. jankoM

    Indie Author

    Joined:
    Feb 17, 2005
    Messages:
    1,003
    Likes Received:
    0
    I am sort of a language nutcase, I didn't have time to read all posts but few parts jumped in my eye. So I will tell few of my dilemmas and opinions...

    First, python has a lot of bindings to various 3d engines. Like PythonOgre, Panda3d, I am sure there is one for irrlicht too.

    Similar is with Lua, but lua is somewhat faster. It's JIT and recent innovations make it really fast for a dynamic language. There is tons of lua bindings to 3d engines and engines based on it (beacuse it's so easy to embed probably also) . Stonetrip (Shiva) has very impressive graphical features for example and full stack IDE, Luxinia on the other hand is more texteditor based (which I prefer personally). These two are the ones I am constantly checking out.

    But I would use these dynamic langs only for specific 3d games where I know I won't have to do much processing. For anything else 3d I intend to use a Java based 3d engine. I tried and witnessed that java is very fast and it (and .NET probably) seem to me the closest thing to c/c++ speeds. For example I am making a 2d shooter with bugs and I want >800 of them running around the screen avoiding me if I need to and java enables me that.

    There is also BlitzMax which has speeds much higher than scripting languages above and has 3d bindings too.

    Then there is D which has speeds of c++ and higher level properties some even more advanced than Java. Kenta Cho did his game in D for example.

    Then there are also languages lice OCaml, Factor, SmallTalks, Stackles Python if you feel adventurous. These all have some interesting properties for game development but I won't bore you with that.
     
  2. ATL

    ATL New Member

    Joined:
    Aug 24, 2008
    Messages:
    31
    Likes Received:
    1
    Not an issue providing you don't start programming the first idea that comes into your head. If you make a good tech document then these aren't really going to happen. You could always make your own memory manager, not a massively tricky task as long as you remember to call your own new and delete functions rather than C++ new/delete. Also, as I said previously, there are a couple of libraries that make up the boost library to drastically reduce any chance of a memory leak (safe pointers etc.). There are numerous tools that can check your code for memory leaks and TBH, I'd be more concerned about running out of heap space in Java than I would with a memory leak. A memory leak doesn't guarantee a crash, but running out of heap space does.

    As Cas said, ain't gonna happen, unless you're not using the drivers (which means not using any common API, DirectX, OpenGL) then you may risk overclocking the GPU past acceptable limits.

    Not that complicated actually, there are a couple of common problem areas such as pointers and templates, but nah, even for code complexity, you're not looking at much of a difference. See this wiki page for a comparison.

    Don't worry about the flags, you won't have to touch the majority of them. If you prefer, get an IDE which will hide most of that from you. Here's a list but I recommend sticking with GNU and make files.

    HTH,
    ATL.
     
  3. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Well... running out of heap space guarantees an OutOfMemoryError being thrown rather than a crash. World of difference! And then you can just take a peek at the heap and find of what sort of object's been leaked. Dead easy.

    <edit>BTW that Wikipedia page is a bit... erm... inaccurate here and there.

    Cas :)
     
    #43 princec, Oct 13, 2008
    Last edited: Oct 13, 2008
  4. MacMan45

    MacMan45 New Member

    Joined:
    Jul 13, 2006
    Messages:
    127
    Likes Received:
    0
    C++ is a great language to learn, but you will get python much easier & quicker.

    I have worked with Ogre with both C++ & python, and in the end, I feel like I get more done in python.

    As for the files being easily readable, use something like py2exe (there are mac & linux equivalents as well).

    It wraps everything up in an executable & zip file etc.

    Most people won't know or care that the code is there, and even then it is in pyc which is harder to read and change.
    If you are really worried, use an obfuscater, then you are really limiting the number of people that would even try.
    That would bring it up to the same point as a java or flash app (just as easy to decompile), and few people are concerned about others decompiling their flash / java games.


    If you want an example, have a look at my blog:
    http://blurryvisiongames.blogspot.com/

    I have a few python-ogre games up for download.

    My code was shit & I didn't even bother to obfuscate it, download one of the games, open the "library.zip" file, and see what you can figure out about my code.
    (If you do go this way, I have found you need to use UPX to get the dlls down to a reasonable size, otherwise a basic game starts at 40 meg, instead of the 10 I got it down to).
     
  5. vjvj

    Indie Author

    Joined:
    Sep 25, 2004
    Messages:
    1,732
    Likes Received:
    0
    You summed it up quite well; your fears ARE irrational. I guarantee that if you earnestly WANTED to stick with C++ for a while, you'd see that the only legit fear you mentioned above is memory leaks... Which are easy to avoid if you aren't lazy. And even if you are lazy, there are lots of tools available to help detect memory leaks.

    Everything else, like frying a GPU or having to write 10x the code... No. Just... No :)
     
  6. ATL

    ATL New Member

    Joined:
    Aug 24, 2008
    Messages:
    31
    Likes Received:
    1
    Ah! So you're the one who did tribal trouble eh? I remember seeing that a few years ago when looking into the possibility of using Java for a game, clearly from my comments here, I didn't go with Java. (-:

    True, but if you have an OutOfMemoryError thrown in Java, that's it, you aren't going to recover from it without restarting the application with a larger heap size. That's the very sort of thing which doesn't happen in an C++.

    Care to share? Btw, in that page I was only indicating to look at the code samples to compare code complexity.

    ATL.
     
  7. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Nah, that was Oddlabs, I just had a hand in the OpenGL bindings.

    No, in precisely the same circumstances in C++ you use up all of the RAM in the OS till it grinds the machine to a halt, followed by a "Windows has used all its virtual RAM" message, followed usually by a hard crash.

    Well, it's more to do with the fact it's a bit of an apples-to-oranges comparison than anything - Java and C++ are actually very far removed from each other and just share a similar syntax - but the benchmarking links near the bottom should probably have a health warning attached to them.

    Cas :)
     
  8. ATL

    ATL New Member

    Joined:
    Aug 24, 2008
    Messages:
    31
    Likes Received:
    1
    Sorry, I don't understand - they didn't use LWJGL or something?

    C++ is capable of using all virtual ram a computer can offer - java is not. Java is limited by its heap size set on the vm start flag. The default for the latest VM is 1GB or 1/4 of available memory, whichever is less. So if your application ever exceeded this, then you've got an error which cannot be corrected other than restarting the application and overriding the default xmx parameter. Also because of the way Java handles the heap, irrelevant of the maximum heap size set, it can never exceed more than 1.4 GB. While this shouldn't be much of a problem for most games here, it is nevertheless something that should be considered when choosing to develop in Java... Not to mention the speed using Java to call a native method... Hehehe... :)

    Agreed, although that's exactly what elias was asking about... ;)

    ATL.
     
  9. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Yeah - it was LWJGL I had a hand in. LWJGL was pretty much developed to make Alien Flux and Tribal Trouble work :)

    Cas :)
     
  10. ATL

    ATL New Member

    Joined:
    Aug 24, 2008
    Messages:
    31
    Likes Received:
    1
    You're kidding! :O Hahaha, I had no idea.. Alien flux, ain't heard of that (just checked, that seems to be one of yours!) - I'll check it out.

    Blimey mate! As much as I detest the idea of using Java to do native work, it's an impressive library, hats off to you. Not 100% sure what was going on with the heap space thing - we must have got our wires crossed somewhere, my last post must seem like selling coal to Newcastle - you clearly know java, my apologies for that. ;) That's some decent work you've done, even nicer that's it's a UK developer (North East at that!) :D.

    Later,
    ATL
     
  11. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Currently I'm hiding in Taunton though until the sun comes back out.
    Alien Flux is probably broken (even if you can find it ;)) - it's waaaay out of date now.

    Cas :)
     
  12. Davaris

    Original Member

    Joined:
    Sep 29, 2004
    Messages:
    767
    Likes Received:
    0
    I've been tempted to move from C++ to Java for a while. The only reason I haven't done so is because it would take too long to convert my code base by hand and I would introduce lots of bugs. On the off chance I did a search on C++ to Java and found this:

    http://www.tangiblesoftwaresolutions.com/Product_Details/CPlusPlus_to_Java_Converter_Details.htm

    It seems too good to be true. Has anyone tried programs like these? Can they convert all of the code, or are there parts they can't do or don't do well?
     
  13. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    I think you'll probably find that starting from scratch is the best bet anyway, as it'll help you learn your way around Java a bit more, and give you the opportunity to fix all the things you didn't like about your existing engine anyway. Your only big decision though is whether to stick to standard Java2D rendering, or start using LWJGL (or for whatever reason, JOGL). And then you're sort of losing a bunch of Windows customers going that route because they don't have GL drivers.

    Cas :)
     
  14. Devman

    Original Member

    Joined:
    Sep 3, 2004
    Messages:
    78
    Likes Received:
    0
    In the web space, the new release of Silverlight (which has been mentioned on these forums a few times) now allows C# development for web games, with good graphical abilities. The run-time is only 4.6 MB.

    I've been a professional C++ developer for 7 years and using C# has been like a dream come true. I used Java in college but never developed a large app with it.

    I released my first web game earlier this month and plan to keep creating more web games with Silverlight.
     
  15. MedievalElks

    MedievalElks New Member

    Joined:
    Jul 25, 2006
    Messages:
    82
    Likes Received:
    0
    It is used heavily in the financial sector (quote servers, etc.), embedded systems, desktop applications, etc. This kind of FUD gets old.
     
  16. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    It's not very easy to find a job using C++ in the financial sector these days. And desktop apps... mostly being developed in these new gen languages too as well.

    Cas :)
     
  17. HappyCat

    Original Member

    Joined:
    Jun 28, 2005
    Messages:
    54
    Likes Received:
    0
    I don't know about C++ jobs - never looked for one - but I know that I've had no problem keeping myself gainfully employed in .Net development for the last 8 years. Certainly in my field (oil industry, North East of Scotland) almost all the big companies are now developing in either .Net or Java.
     
  18. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    The reason is that it's so much easier to do. Reckon on taking about 50% less time to do a project in Java/C# versus C++. That's not FUD but a reasonably accurate fact. When you're trying to get a grip on sofware development costs that's a huge factor.

    That's why some of these even weirder fancier scripting languages are really taking off too. They make some tasks even faster - and hence much cheaper and more agile.

    Cas :)
     
  19. MedievalElks

    MedievalElks New Member

    Joined:
    Jul 25, 2006
    Messages:
    82
    Likes Received:
    0
    That's just not true, as least here in Chicago, where the market is teeming with opportunities for C++ developers.
     
    #59 MedievalElks, Oct 16, 2008
    Last edited: Oct 16, 2008
  20. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    OK Chicago notwithstanding. Here in the UK there are about 3 Java jobs for every 2 C++ jobs advertised roughly. The Java jobs pay about 5% more too ;) Not that there are many jobs going at the moment - seems everyone's being laid off. Get writing those games!

    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