Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

What are the features and language objectives (general problems to solves) or paradigms that a fictive programming language targetted at games (any kind of game) would require?

For example, obviously we would have at least Performance (in speed and memory) (because a lot of games simply require that), but it have a price in the languages we currently use. Expressivity might be a common feature that is required for all languages.

I guess some concepts from not-usually-used-for-games paradigms, like actor-based languages, or language-based message passing, might be useful too. So I ask you what would be ideal for games.

(maybe one day someone will take those answers and build a language over it? :D )

Please set 1 feature/objective/paradigm per answer.

Note: maybe that question don't make sense to you. In this case please explain why in an answer. It's a good thing to have answers to this question that might pop in your head sometimes.

share|improve this question
1  
-1 blog.stackoverflow.com/2010/09/good-subjective-bad-subjective What kind of questions should I not ask here? Avoid asking questions that are subjective, argumentative, or require extended discussion. This is not a discussion board, this is a place for questions that can be answered! –  David Young Nov 4 '10 at 11:18
3  
I don't agree at all : it's about features/paradigms that are importants to game programmers. What's the discussion here? –  Klaim Nov 4 '10 at 11:23
    
If allowed, list questions like this should be CW. But I'm -1ing because I think this is a ridiculous question. No programming language feature is more or less game oriented than any other. –  user744 Nov 4 '10 at 16:00
    
CW << agreed, forgot about it. "No programming language feature is more or less game oriented than any other." << Can you explain this poin? I didn't ask for a programming language but for programming paradigms that are important for a game programmer and that should be considered seriously if you wanted to implement a language made with games in mind. PHP is made with web in minde, so there ARE languages with target domain in mind, whatever the final usage is. –  Klaim Nov 4 '10 at 16:26
    
Maybe the question should be reformulated then? –  Klaim Nov 4 '10 at 16:27
show 4 more comments

2 Answers 2

up vote 6 down vote accepted

The language usually isn't the most critical aspect of game development. However, certain aspects of a language could make it more or less suitable for game development.

  • Data Management - Games are ultimately about data. Probably the most critical decision you make when you build a game is how the data will be managed. Pick a language that has good data management features. If all you've got is arrays, that's fine, but Objects, Structures, and advanced data types like linked lists and trees are often extremely helpful. Sure, you can build these things yourself, but it's great if they're already a part of the language.
  • Object-oriented - Games are one area (GUIs are another) where the object-oriented paradigm really shines. It really makes sense to think of the map as an object, each player as an object, items and inventory as objects, and so on.
  • Event-driven - This really goes hand-in-hand with OOP. Games are about events: the passage of time, user input, objects bonking into each other, robot zombie oppossums falling out of the sky, whatever. It's best if the language already has robust support for event-handling. Most OOP languages already have this.
  • Access to libraries - Typically you'll rely on some sort of rendering library to do the graphics work. You'll want a language to have a binding to at least the most basic libraries (DirectX / Direct3D for Windows, SDL / OpenGL for everything else) It's even better if you have access to some higher-level libraries that simplify the process.
  • Ease of use - Writing a game is hard. It's even harder if you're wrestling with your programming language. Often this is subjective, because a language is easy if you already know it. However, some languages (like Python) have a clean syntax and seem to stay out of the way. Java and C++ are great languages, but if you're not completely comfortable with their way of thinking, you'll fight the language more than write code.
  • Performance - You may be surprised that this factor is so low on the list, but I think that's appropriate. Certainly you don't want a language that prevents your game from playing at an adequate speed, but usually the language is not the problem with slow games, algorithms and data structures are the real logjams. Some quite impressive games have been built with Flash, which is about as slow as a modern game development platform can be. Optimize when necessary, but not before.

All in all, the programmer is a lot more important than the language. There is no perfect game programming language, but there are several that are good. I've taught and written about game programming in several languages: C++, Java, Python, and Flash. My current favorite gaming language is Python. It meets most of the criteria above. While Python is sometimes criticized for being slow, it usually relies on graphics engines written in C/C++ for the heavy lifting. Also, it's quite easy to write a critical section in C++ and run it from Python as an external module.

Hope this helps...

share|improve this answer
    
I Agree with your summation. And especially with performance being low on the list! But I must add the observation that when travelling down the gaming road you can't spit without hitting a gravestone with some obscure "game language" name on it that died on the way to the promised land of releasing a product. –  Patrick Hughes Nov 17 '11 at 9:59
add comment

The entire concept of programming language fits right in with modeling games.

class D20PC
{
   int level
   string charname
   string playername
   EnumClassName mainclass
   EnumClassName multiclass
   CBackpack *inventory
   Array *feats
   CSkillList *skills
   Image *charPortrait
   int Strength
   int Dexterity
   etc...
}

It all just flows naturally. I mean if you wanted to build a library where you import game rules and the language builds class templates for you... but other than that I don't think there's anything specific about one language feature or another that's more important than the rest.

Obviously, being Object-Oriented is good. Having access to Databases is good too, but outside of that, any OO language would work. I've done games in C#, C++, Objective-C, and Java, and I don't find that they really lack anything.


[EDIT]

And IMO, LISP would be a horrible choice for programming an RPG game engine. I just have no idea how it would be done.

share|improve this answer
    
Lets give you an example that don't work nicely for games : functional programming. Okay you cited LISP, so you see what I mean. So it's not all languages that are adequate. In fact, even Flash have quircks that make game engine go over the environnement to make it's own game loop for example. –  Klaim Nov 4 '10 at 12:38
    
That has a little more to do with the "OS" of flash. In an event-driven OS like on the iPhone, you don't need a game loop. –  Stephen Furlani Nov 4 '10 at 12:50
    
Plus, many great games were coded in BASIC - snake comes to mind. Functional programing was used exclusively to code games like Mario and a lot of the early stuff. I seriously doubt the 8-bit NES has a OO compiler. –  Stephen Furlani Nov 4 '10 at 12:55
1  
Just because you don't know how to do it doesn't mean it can't be done: gamasutra.com/view/feature/2985/… (see 5. GOAL rules!) Naughty Dog wrote Jak and Daxter in LISP, and that's a AAA Game. It's not exactly an RPG, but I don't see a reason why an RPG cannot be done when something like Jak & Daxter can. –  Michael Barth Nov 4 '10 at 13:09
1  
@Michael, they wrote it in (Game Object Assembly Lisp). Not strait LISP, and they admit that it sucked. –  Stephen Furlani Nov 4 '10 at 13:15
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.