Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Language Interoperability Preferences of the Professionals


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
47 replies to this topic

#21 3Ddreamer   Crossbones+   -  Reputation: 3159

Posted 18 January 2013 - 10:32 AM

Python will probably be my second language to learn after this C# right now. I am considering C for my third language way down the road. For now I just want to get good at C#.

 

I have OS cross-platform on my mind every day, naturally I would ask how one would make a 2D game in C with Python be cross-platform. Would OpenGL be enough with C and Python to make for Windows, Mac, Android, and iOS, or would the developer need something else, too?

 

 

If I had my way, I would write absolutely everything in Python. Why? Because it is friendly, concise, and fun to program in.

Unfortunately, there are still various performance issues, especially if you want to run on more limited platforms, like iOS or Android.

 

 

Would Lua be any better for cross-platform?

 

I wonder also if Lua wouldn't work well with any of the other more common languages.  Does anybody like to use Lua with anything else?


Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


Sponsor:

#22 AltarofScience   Members   -  Reputation: 934

Posted 19 January 2013 - 03:06 AM

Why are you so insistent that I have to have some kind of favoritism or preference? Why is it a problem for you that I don't hold unjustifiable opinions about arbitrary things?

Not trolling - serious question.

You are trolling and you know it. Bad moderator! /trout slap



#23 Memories are Better   Prime Members   -  Reputation: 769

Posted 19 January 2013 - 06:05 AM

Most of my situations involve C# being the primary language, C++ for calculations or intense crap (and in the future driver related work) and F# for maths

 

The project decides the language, but im happy using all three, most stuff is done in C# though



#24 ApochPiQ   Moderators   -  Reputation: 15980

Posted 20 January 2013 - 06:26 AM


Why are you so insistent that I have to have some kind of favoritism or preference? Why is it a problem for you that I don't hold unjustifiable opinions about arbitrary things?

Not trolling - serious question.

You are trolling and you know it. Bad moderator! /trout slap
 



You don't have to believe me.

But I genuinely want to understand why the OP has this expectation.

#25 Hodgman   Moderators   -  Reputation: 30882

Posted 20 January 2013 - 07:42 AM

Would Lua be any better for cross-platform?
I wonder also if Lua wouldn't work well with any of the other more common languages.  Does anybody like to use Lua with anything else?

Lua is a C API, which means you can use it with anything that you can use C with (which is about everything).

 

Lua has good performance out of the box, but the LuaJIT version has great performance. Unfortunately, most closed platforms don't allow JIT'ed code on them... You can still use LuaJIT as it gives better performance than plain Lua (even when not JITing!) but you have to disable it's JIT feature that gives great performance.



#26 3Ddreamer   Crossbones+   -  Reputation: 3159

Posted 20 January 2013 - 03:04 PM

Most of my situations involve C# being the primary language, C++ for calculations or intense crap (and in the future driver related work) and F# for maths



The project decides the language, but im happy using all three, most stuff is done in C# though

 

 

Interesting post you made.  Is F# math for higher or lower level coding?  How would you use F# with C#?  Do they work well together?  It's obviously common for more intricate things to be done in C++, right?  Do you handle much image rendering in your applications?

 

 

Lua has good performance out of the box, but the LuaJIT version has great performance. Unfortunately, most closed platforms don't allow JIT'ed code on them... You can still use LuaJIT as it gives better performance than plain Lua (even when not JITing!) but you have to disable it's JIT feature that gives great performance.

 

 

By JIT, you must mean Just In Time compilation, correct? I couldn't find anything detailed in the internet about LuaJIT.  Some coders love Lua, but I don't remember reading about anybody using LuaJIT in a game so I must not have been at the right place to find it.  I wonder why we don't see many popular games which have been made with Lua and C - can't think of any at the moment.


Edited by 3Ddreamer, 20 January 2013 - 03:05 PM.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#27 swiftcoder   Senior Moderators   -  Reputation: 10230

Posted 20 January 2013 - 03:08 PM

I couldn't find anything detailed in the internet about LuaJIT

Try the first result from google.


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#28 3Ddreamer   Crossbones+   -  Reputation: 3159

Posted 20 January 2013 - 03:26 PM

Thanks, swiftcoder. I didn't use Google and maybe I didn't query it correctly.  So... how swift are you and what language would you use in scripting for fast development, even with another lower level one, if you had your cake and could eat it, too?


Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#29 3Ddreamer   Crossbones+   -  Reputation: 3159

Posted 20 January 2013 - 03:48 PM

most closed platforms don't allow JIT'ed code on them

 

What exactly does this mean: Closed Platforms?  Are you saying Windows? laugh.png  

 

If something is so great, then why would any platform manufacturer not allow JIT?  Is it hardware issues and not OS ones which kill it there?


Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#30 swiftcoder   Senior Moderators   -  Reputation: 10230

Posted 20 January 2013 - 03:59 PM

For years Apple forbade interpreted/JIT'd languages from iOS, though I believe they have since relaxed that restriction. I'm sure other platforms have similar rules.

 

As I said earlier in the thread, Python is my jam, and I'll use C/C++ with it where I have to (though PyPy is making this an increasingly rare need).

 

That said, I'm in the process of writing what I expect to be a much more suitable language for my tastes - only time will tell...


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#31 3Ddreamer   Crossbones+   -  Reputation: 3159

Posted 20 January 2013 - 04:15 PM

Yeah, I have heard a little about PyPy going deeper. Some are just like you sticking with it unless they just have to use say C/++ or other. How are you going to implement your own language - interpreter? I have no idea how to make a language.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#32 swiftcoder   Senior Moderators   -  Reputation: 10230

Posted 20 January 2013 - 04:17 PM

How are you going to implement your own language - interpreter?

I was initially looking at targeting the CLR (the virtual machine/runtime underlying .Net and Mono).

 

However, I have decided that the advantages of native compilation (using LLVM for native code generation) outweigh the benefits that the CLR provides.


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#33 3Ddreamer   Crossbones+   -  Reputation: 3159

Posted 20 January 2013 - 04:20 PM

What are you saying - make your own virtual machine?

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#34 Hodgman   Moderators   -  Reputation: 30882

Posted 20 January 2013 - 07:28 PM

By JIT, you must mean Just In Time compilation, correct? I couldn't find anything detailed in the internet about LuaJIT.  Some coders love Lua, but I don't remember reading about anybody using LuaJIT in a game so I must not have been at the right place to find it.  I wonder why we don't see many popular games which have been made with Lua and C - can't think of any at the moment.

Lua is extremely popular in games wink.png Every game that I've worked on, which wasn't using UnrealScript, was using Lua.

 

LuaJIT is a drop-in replacement for Lua -- it's the same API, but the author has re-written the whole library in assembly code to keep it as lean as possible. He's then also added an extra option you can enable, which enables Just In Time compilation of the Lua bytecode to native assembly for even more speed.

What exactly does this mean: Closed Platforms?  Are you saying Windows?   
If something is so great, then why would any platform manufacturer not allow JIT?

Closed platforms are ones where you need permission from some "gate keeper" in order to publish a game on them -- e.g. Nintendo, Sony, Microsoft, Apple.

Usually, these platforms require all of your code to be compiled into the version that you submit for testing, so JIT compilation is banned. This is mainly a security issue -- if someone manages to modify your game's data files, they can edit your scripts. Normally, this wouldn't be a problem for the platform-gate-keeper, however, if these scripts can generate and run native assembly code, then perhaps that will let people hack into the OS, etc, etc...



#35 3Ddreamer   Crossbones+   -  Reputation: 3159

Posted 21 January 2013 - 02:39 PM

In other words, JIT is great for hobbyists but a dead end for commercial games, right?

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#36 Hodgman   Moderators   -  Reputation: 30882

Posted 21 January 2013 - 03:40 PM

No. On PC JIT is wonderful stuff. See every HTML5 game in Chrome for example.

#37 3Ddreamer   Crossbones+   -  Reputation: 3159

Posted 21 January 2013 - 06:43 PM

Okay, that's great to know, but what about Windows based games? Who are the "gatekeepers" for Windows?

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#38 swiftcoder   Senior Moderators   -  Reputation: 10230

Posted 21 January 2013 - 07:08 PM

Who are the "gatekeepers" for Windows?

There aren't any gatekeepers per se, because you are always free to sell your software by direct download (or, in the past, on disk), thus bypassing any potential need for approval.

 

That said, as app stores become more popular, they start to fulfil that role. You might argue that Steam and the Windows Store both take on the role of gatekeepers.


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#39 Hodgman   Moderators   -  Reputation: 30882

Posted 21 January 2013 - 07:23 PM

Yeah, Valve are the gatekeeper of Steam, but they boast that they don't require you to go through a strict certification process like other platforms ;)

 

Windows/Linux/Mac are great because everyone can make and release software for them without needing to go through a publisher.

 

The Windows8 app store on the other hand (for buying Win8 "metro" apps, like the iPhone app store), or the old "Games for Windows Live" label... they do have a certification process, where your app has a whole bunch of requirements it has to pass. I'm not familiar with them though, so I'm not sure what they are.


Edited by Hodgman, 21 January 2013 - 07:24 PM.


#40 Kylotan   Moderators   -  Reputation: 3338

Posted 22 January 2013 - 07:13 AM

Back on the original topic - I don't really think about what languages I'd like to use. When I start a new project I think about which engine or libraries are going to get the game working with the least amount of work, and that usually decides the language for me. Picking a language without considering the needs of the project is a bit like picking the musical instrument before picking the music - fine if you just want to play but not usually the best route to practical results.

 

In the last month I've worked with C++ for one project, C# for one project. Python for two others, and Javascript for another. You just get used to switching.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS