Official Codex Discord Server

  1. Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.
    Dismiss Notice

Which programming language did you choose and why?

Discussion in 'Codex Workshop' started by Destroid, May 1, 2012.

  1. Destroid Arcane

    Destroid
    Joined:
    May 9, 2007
    Messages:
    16,620
    Location:
    Australia
    Just a general question to the people here programming original projects. If you are using an existing engine but the programming language was a major part of your decision to use that engine, it's worth mentioning that too.
     
    ^ Top  
  2. Ulminati Kamelåså! Patron

    Self-Ejected
    Joined:
    Jun 18, 2010
    Messages:
    20,233
    Location:
    DiNMRK
    I don't do games development but I am a programmer by trade. I find myself using a mish-mash of various languages depending on the project in question. I usually have to work with existing architectures, so an average month in my life usually sees me dabbling in C, C++, Java, Perl, Python and PHP.

    If I were to do a project from scratch, it'd depend very much on what SDK I went for for the GUI elements. In a 2D game I'd probably end up using C++ with Qt. If it was 3D, I'd go with whatever language was natively supported by whatever engine I rolled with. I don't see myself ever coding a 3D engine from scratch.
     
    ^ Top  
  3. crojipjip Developer Übermensch

    crojipjip
    Joined:
    Jan 11, 2012
    Messages:
    4,253
    C++. Games and game hacking. i was especially big on mmo exploits being utilized in software
     
    ^ Top  
  4. DakaSha Self-Ejected

    Self-Ejected
    Joined:
    Dec 4, 2010
    Messages:
    4,574
    C#/XNA, Unity3D (Uses C#/Mono), HaXe (For Flash and AIR)

    Also is prosper answering a post normally or am I dreaming
     
    ^ Top  
  5. 20 Eyes Liturgist

    20 Eyes
    Joined:
    Nov 23, 2010
    Messages:
    1,395
    C# with XNA. It's free, powerful, and (from what I've been told) easier to learn than C++. The last point was what made me chose it, as I have zero background in programming.
     
    ^ Top  
  6. crojipjip Developer Übermensch

    crojipjip
    Joined:
    Jan 11, 2012
    Messages:
    4,253
    There are four rivers. Each river is a flood of hexagons. Inside each hexagon is a web. Just like our INTERNET a web is the connection of many computers. The web is changing all the time. The connection between one computer and another depends on the logical context. What I mean by this is a web becomes a collection of circuits. The goal of the many is the object for our design. People will be dropped and added depending on a particular need. When our sequences are finished for a program, a new goal is created. There is no longer a job crisis or inequality.
     
    ^ Top  
  7. crojipjip Developer Übermensch

    crojipjip
    Joined:
    Jan 11, 2012
    Messages:
    4,253
    because our web is built on software, we can change our circuit boards . synthesize all the advantages , even of those hardwares you don't fancy, and you can always be with sameness.
     
    ^ Top  
  8. J1M Arcane

    J1M
    Joined:
    May 14, 2008
    Messages:
    10,531
    C# with XNA.

    Reasons:
    I care about PC, not phones or consoles.
    XNA makes so many things easier, like content pipeline, spritefonts, etc.
    C# is easy like Java, but more useful and made by smarter people.

    The only thing I think Java does better than C# is enums. C++ can certainly do the job, but I find it leads to lower productivity.

    If you are just looking to play around with modding, I suggest the Unreal engine. UnrealScript is quite powerful and if you mod an existing game instead of pulling down the UDK you have access to a lot of existing art and a large codebase to learn from.
     
    ^ Top  
  9. TheDeveloperDude Novice

    TheDeveloperDude
    Joined:
    Jan 9, 2012
    Messages:
    27
    Java and LWJGL for game programming. By LWJGL I can use OpenGL/OpenAL.
    Earlier I was using C++/DirectX and C# but in recent years I have had a Java programmer job and one language is enough for me.
     
    ^ Top  
  10. Destroid Arcane

    Destroid
    Joined:
    May 9, 2007
    Messages:
    16,620
    Location:
    Australia
    Honestly I'm a little shocked at the overwhelming use of C# and XNA. No-one cares about cross platform?
     
    ^ Top  
  11. DakaSha Self-Ejected

    Self-Ejected
    Joined:
    Dec 4, 2010
    Messages:
    4,574
    Well that's why i stoppped using it.
    Having said that there is Mono and Monogame (Which unity3d uses btw)
     
    ^ Top  
  12. Yaar Podshipnik Arcane Patron

    Yaar Podshipnik
    Joined:
    Jan 9, 2011
    Messages:
    2,137
    Codex 2012 Codex 2013 Codex 2014 PC RPG Website of the Year, 2015 Codex 2016 - The Age of Grimoire Make the Codex Great Again! Grab the Codex by the pussy Codex USB, 2014 A Beautifully Desolate Campaign
    I'm not developing any games but I write C++ for a living. While it is not as "productive" as more dynamic languages, I find that proper use of type system (hard, but not impossible, to do) saves you many headaches with stupid bugs. A good IDE (Visual Studio, Eclipse, Qt Creator) helps a lot.
    Thinking about your architecture, class dependencies, etc., before you start coding also helps. And for fuck sake, don't stick blindly to "patterns", "recepies", "frameworks" or the like - good stuff is what works for you and your team, so use your head.

    Bad thing about C and C++ is that there is no standard build system for projects in them. You have the old make+friends, cmake, qmake, scons and others. They all suck.

    Another difficult point about C++ (but not C) is debugging. Visual Studio has an excellent debugger, but it's not free. If you are stuck on GCC be prepared to learn some really arcane stuff about how C++ types are represented. No idea about clang/LLVM beyond the fact that it has much, much better compile-time error messages, especially when templates are involved, than GCC and VS.

    One thing you should keep in mind is that limiting your project just to one language may be counterproductive. I personally like to use python for rapid prototyping. Python can easily interface with C++ code, so you can work on performance-critical parts in C++ and just slap them together with python glue.

    Python does suck for large projects IMO - no IDE with something like IntelliSense (Aptana Studio is OK for general work though), not knowing the exact type of the object can lead to some strange bugs (although it might be just me coming from years of C++). Of course EVE online is written mostly in Python (Stackless to be precise), so it probably doesn't suck as much as it seems initially.

    For in-game scripting I would go with either javascript (with SpiderMonkey or V8) or Lua.

    Now, engines I've tried:
    • Unity3D - it has very nice editor, you can write scripts for it in something like javascript or C# like. C# is easier for me to get into. This engine also has a very big community and assets library, most of it require you fork over some cash. It has one giant flaw though, so big that I can't actually work with it - source control. You can't reasonably version an Unity project with its assets and code in git, SVN, or whatever you use (tar.gz snapshots will work, if you are a sick and perverted individual living in stone age). So to have a decent source control you actually have to fork over for Pro licence ($1k) so that you can connect to their asset server, which is free but useless without pro licence. Of course you can find a copy of it that fell of the truck, or maybe Siara will give you one, but you can't publish anything you made with such tools.
    • SDL - it's not much of a game engine, more of tools you can use to build a simple game or an actual game engine. I did my bachelor thesis using it. Easy to use but not very abstract and you have to do a lot of stuff yourself.
    • Panda3D - initially it looked like shit engine, but I've grown to like it very much. The engine itself is written in C++, and you can write your games in C++ if you wish. Main mode of working with it is using Python. I actually find it very nice, being able to easily throw something together I want to do in py and then if I like how it works move it to C++. The whole project is open source, Carnagie Mellon University and Disney being big contributors to it. There is a pretty active community, tons of addons for the engine and lots of tutorials. It doesn't have a nice scene editor like unity but there are some 3rd party addons (free) that help you build your own world editor inside your game. To get the full feature set of unity you need to combine it with a good python/c++ editor, 3D design program (I use blender, being a cheap bastard), 2D editor for textures (I use KDE stuff on Linux and Paint.NET on windows), and a good shell (you've got it if you work under linux, good luck on windows), 3rd party stuff for pathfinding etc. It does support several physics libs.
    For all the stuff I currently play around with I use Panda3D. Unlike Unity3D it supports render to texture for free, so you can combine it with Qt for interface. I personally find that quickly written py code is better than quickly written c++ code, while carefully designed c++ is much better in long term than carefully written python. Due to this I really like p3d.
     
    ^ Top  
  13. J1M Arcane

    J1M
    Joined:
    May 14, 2008
    Messages:
    10,531
    XNA is Windows, Xbox, and Windows Phone. You can use all the same source code and (optionally) change the art assets.

    Do you really think there is a large number of PS3 owners that actively purchase from the PSN who don't also own an Xbox? And why would you want to release on Android/iPad initially? That would slash the price you can charge.

    More importantly, if you are just doing this for money you probably have investors telling you what to do. You should be working on a project that you want to do, not chasing some mythical windfall that will suddenly materialize if you choose the right platform.
     
    ^ Top  
  14. Destroid Arcane

    Destroid
    Joined:
    May 9, 2007
    Messages:
    16,620
    Location:
    Australia
    I was more thinking so the linux bros could play, I don't imagine many of the people posting about their projects in codex workshop care much about consoles.
     
    ^ Top  
  15. crojipjip Developer Übermensch

    crojipjip
    Joined:
    Jan 11, 2012
    Messages:
    4,253
    i am programming the matrix right now. it will change the whole world once people play it.
     
    • Brofist Brofist x 1
    ^ Top  
  16. tiagocc0 Arcane

    tiagocc0
    Joined:
    Jun 29, 2007
    Messages:
    2,053
    Location:
    Brazil
    C++ because it's easy and Qt because it's works nicely in windows, max os x and linux (don't know exactly which) and makes C++ even easier.
     
    ^ Top  
  17. Alex betthurt

    Alex
    Joined:
    Jun 14, 2007
    Messages:
    5,113
    Location:
    São Paulo - Brasil
    I too am not making any games right now. My favorite language, however is Smalltalk. I really like that everything about the language is open to the developer, yet it is so well written.

    Lately, I've also been looking into functional programming lately, like Scheme and Haskell.
     
    ^ Top  
  18. SCO Arcane In My Safe Space

    SCO
    Joined:
    Feb 3, 2009
    Messages:
    16,297
    Shadorwun: Hong Kong
    The only language that impressed me as a alternative paradigm to modern typed imperative vm ones was PROLOG. The underlying inference engine idea is frigging brilliant (pity it's slow).
     
    ^ Top  
  19. Alex betthurt

    Alex
    Joined:
    Jun 14, 2007
    Messages:
    5,113
    Location:
    São Paulo - Brasil
    SCO

    So, you are not a fan of Object Orientation?
     
    ^ Top  
  20. SCO Arcane In My Safe Space

    SCO
    Joined:
    Feb 3, 2009
    Messages:
    16,297
    Shadorwun: Hong Kong
    Oh, right imperative as opposed to O.O. No, i'm thinking of the opposition to functional languages.

    Functional language can compress a program so much (due to fetishists i suspect), that it turns unreadable. They appear to purposefully choose the worst names possible, and since there are no need for infunction variables and you can do most things by using a well applied fold or map (very general methods, that get very general argument names), things quickly get out of hand.
    All structure, meaning implicit.
     
    ^ Top  
  21. Alex betthurt

    Alex
    Joined:
    Jun 14, 2007
    Messages:
    5,113
    Location:
    São Paulo - Brasil
    Oh, I should have realized you meant that in the broader sense, not the more strict one. Sorry about that.

    I don't know. Functional programming can get pretty weird if the programmer doesn't take care to make his meaning explicit (even if the method is implicit). And not having control as to how the program is processed, requiring to read the documentation to know what the processor will try first, sounds like a bad deal to me. But I can't help but think it could help make much more orthogonal the meaning of the program and the process it uses to get there.

    Also, have you ever heard of Cola? It is a language developed by the Viewpoints Research Institute. It is very interesting in that it is implemented in itself... in runtime! That is, the basic parts of the language (like what is a vtable or how it deals with integers) are themselves objects running in the language itself. Of course, there is a cheat there that bootstraps the working language using a static version of it first. But once it is running, you can change or add objects that change hoe the language behaves without needing to recompile it all.
     
    ^ Top  
  22. SCO Arcane In My Safe Space

    SCO
    Joined:
    Feb 3, 2009
    Messages:
    16,297
    Shadorwun: Hong Kong
    [​IMG]

    And i though that duck typing was bad...
    you aren't that kind of person that competes in the "underhanded C contest" are you?
     
    ^ Top  
  23. Alex betthurt

    Alex
    Joined:
    Jun 14, 2007
    Messages:
    5,113
    Location:
    São Paulo - Brasil
    I wish I was. Alas, I don't have the kind of creativity to write code like that.
     
    ^ Top  
  24. Jasede Prestigious Gentleman Arcane Patron

    Jasede
    Joined:
    Jan 4, 2005
    Messages:
    22,410
    When I work on my amazing masterpiece I will work in C++.
     
    • Brofist Brofist x 2
    ^ Top  
  25. Alex betthurt

    Alex
    Joined:
    Jun 14, 2007
    Messages:
    5,113
    Location:
    São Paulo - Brasil
    Jasede

    Do you already know what kind of game it will be?
     
    ^ Top