Sign in to follow this  
Structural

Unity game programming... is all about scripting nowadays?

Recommended Posts

Structural    328
I recently bought a license for the Torque engine just so that I don't have to worry about the "plumbing" anymore and could start making games, and I was surprised about the elaborate scripting language. I was even more surprised when I read numerous posts in the community stating that game logic was usually implemented in script. I asked a colleague of mine today who worked in the game industry for a number of years if it was normal that game logic was often implemented in script (apart from the Torque engine), and he stated that it was becoming more and more common that games were created entirely in script languages because it's easier to work with. The reason I'm surprised comes ofcourse from my complete lack of experience of the "real games industry" and the trend of the threads I read on gamedev. Most of the things I read here are about C++/Java/other compiled languages. Thereby, my gut-feeling says that script is not being "easier to work with" because it is probably lacking decent (debugging/development)tooling and community support. Also, I'm sort of lost where one can draw the line between engine and script. What do I put in my engine? What do I put in script? Is there a rule of thumb? So, what do you think of this? Can you confirm the increasing popularity of scripting languages? Are you as surprised as I am? Do you think scripting is becoming more and more important? If so, also in the indie game development scene who might not be able to afford elaborate engines with scripting?

Share this post


Link to post
Share on other sites
Sneftel    1788
Quote:
Original post by Structural
Thereby, my gut-feeling says that script is not being "easier to work with" because it is probably lacking decent (debugging/development)tooling and community support.

Why?

Quote:
Also, I'm sort of lost where one can draw the line between engine and script. What do I put in my engine? What do I put in script? Is there a rule of thumb?
Script everything you can without sacrificing performance. If there's any doubt, script it, and redo it in C++ if necessary.

Quote:
Can you confirm the increasing popularity of scripting languages?
Yep.
Quote:
Are you as surprised as I am?
Nope.

Now, when you say "scripting", that's sort of a misleading word to use. A "script" is a description of what characters in a play or movie say. It's fully linear, without control structures or logic. Most of the so-called "scripting languages" you're looking at here are better defined as "high-level programming languages". And the march from C/C++ to high-level programming languages is as natural as the march from assembler to C/C++ was.

Share this post


Link to post
Share on other sites
rip-off    10979
I hope scripting is becoming more important.

Even my own game uses a simple lua interface for lots of game logic. Its really great to be able to work on my game without having to run it through a compiler. My game logic is simple enough ( its an asteroids clone ) that I haven't run into anything that would require serious debugging tools yet. I was pleasantly surprised at how easy it was to integrate lua and my own code ( which I would hesitate to call an "engine", its a bit too simple for that ).

I don't play lots of games, but some of the ones I've bought recently ( Civ 4 and prey ) have scripting language support, or so I've heard.

So yeah, I think its becoming about scripting. But its a really good trend [smile]

Share this post


Link to post
Share on other sites
Promit    13246
Scripting is the lifeblood of modern game development. It drives things, and is far, far more important in most cases than most of the underlying C++ code that forms the "engine". To that end, scripting languages have become increasingly refined, tested, supported, and optimized. Lua and Python are popular choices, with commercial games using them extensively and fairly sophisticated development environments appearing. They're also brutally efficient; even N64 and PSX games had scripting systems, despite the decidedly low end hardware.

Current trends indicate that scripting languages will continue to become more and more important. The need to rapidly prototype and develop games makes it necessary.

Share this post


Link to post
Share on other sites
Structural    328
Quote:
Original post by Sneftel
Quote:
Original post by Structural
Thereby, my gut-feeling says that script is not being "easier to work with" because it is probably lacking decent (debugging/development)tooling and community support.

Why?

Because the user base of such a language is much smaller than that of say, C#. And the availability and quality of tooling and support is, in my opinion, directly related to the number of people using the language.
I am aware that comparing C#, a fulfledged can-do-anything language, with a scripting language with much less features. So when you take that into account the smaller community might not be such an issue. But I still have a very strong feeling that the availability and quality of tooling is less of what you can expect of other languages.
But as I said, this is a gut-feeling and I could be completely wrong.


Quote:
Now, when you say "scripting", that's sort of a misleading word to use. A "script" is a description of what characters in a play or movie say. It's fully linear, without control structures or logic. Most of the so-called "scripting languages" you're looking at here are better defined as "high-level programming languages". And the march from C/C++ to high-level programming languages is as natural as the march from assembler to C/C++ was.


Ah, sorry for the wrong use of words. :)
But I agree that high-level languages are making things much easier. I am currently working in a research facility where we create demo's and implement research concepts and the use of modern languages makes implementing a demo much easier (C#, as opposed to C++).
But still, my doubt for scripting languages in games mainly comes from the tooling perspective.

Share this post


Link to post
Share on other sites
Sneftel    1788
Quote:
Original post by Structural
I am aware that comparing C#, a fulfledged can-do-anything language, with a scripting language with much less features.

You need to define "full-fledged". Are you talking about syntactic features, or base libraries? Yes, C# includes functions to calculate the date of the Chinese new year, and things like ActionScript don't. But a video game probably doesn't need that anyway. Likewise, on the syntactic front C# has delegates and suchlike, but really offers very few extras which are frequently used.

Quote:
But still, my doubt for scripting languages in games mainly comes from the tooling perspective.
Then I suggest you do research to determine what tools are available for these "scripting languages", and what tools are required.

Share this post


Link to post
Share on other sites
Rand    193
The commercial game i'm working on is using the Unreal engine, and we are hardly touching c++ for it. Its practically all in Unreal Script. The excellent tools mean the designers and artists can do most in the engine, which runs efficient c++ code without project programmers.

Say the 3 most intensive parts of a game were gfx, physics and ai. The first 2 are in the engine in c++, and the AI specific to our game is in half in c++, half in unreal script.

Share this post


Link to post
Share on other sites
JohnBolton    1372
Script engines in games have been around for a long time. They have become more popular for a few reasons:
  • The types of games that use scripts have become more popular.
  • The complexity of NPC behavior has grown.
  • Processing power has increased.
Some advantages of scripts over compiled code:
  • Scripts are easier to modify and the turn-around time is faster. In some cases, they can even be modified while the game is running.
  • The languages are generally simpler and higher-level, making script-writing accessible to non-programmers.
  • Less people modifying the code makes management of the code easier.
  • Level designers are much cheaper than programmers.
Some of the drawbacks are:
  • Execution is slower.
  • Circular dependencies can be a problem.
  • Tools are lacking.
  • Non-programmers writing scripts can be a problem because it does require some level of programming ability.

Share this post


Link to post
Share on other sites
Oluseyi    2116
Quote:
Original post by Structural
Because the user base of such a language is much smaller than that of say, C#.

No. TorqueScript is not representative of "scripting" languages as used in games. In reality, the trend is to use widely available languages that have long been employed in other domains - Lua, Python, JavaScript, even Perl - and these are languages with huge user bases and long histories.

Quote:
And the availability and quality of tooling and support is, in my opinion, directly related to the number of people using the language.

There is a measure of proportionality, but it is by no means the largest factor. Language design is a much greater influence; languages with native support for reflection and introspection are easier to write debuggers for than opaque languages with horrendous type systems (C++), but also have less need for debuggers because so much meta information is readily available to the programmer during the development of his solution.

Quote:
I am aware that comparing C#, a fulfledged can-do-anything language, with a scripting language with much less features.

Perl has more features than C#. Python has even more than Perl. All of them are dependent on their libraries (.NET in the case of C#... which is available to IronPython) for the majority of said functionality.

Quote:
But still, my doubt for scripting languages in games mainly comes from the tooling perspective.

Do some research. Tool growth has been explosive in modern high level languages. Look outside the games domain and see what's being done in rich internet applications/web apps with JavaScript. Look at the tools that are emerging to support various paradigms in those areas. nunit isn't as old as Perl's SimpleTest, after all...

Share this post


Link to post
Share on other sites
Excors    715
It's not just games - Adobe Lightroom uses Lua [PDF] for 40% of its code (and maybe more since when that was written). I suppose Mozilla is an atypical example since they're heavily into scripting already, but it's still interesting that they're planning to move much of their "middleware" C++ code into JavaScript (actually JavaScript 2, on the Tamarin JITting VM).

Share this post


Link to post
Share on other sites
Rand    193
Quote:
Original post by JohnBolton
Scripts are easier to modify and the turn-around time is faster. In some cases, they can even be modified while the game is running.


So can C and C++ code, depending on the target platform. Check out edit and continue.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Quote:
Original post by Rand
The commercial game i'm working on is using the Unreal engine, and we are hardly touching c++ for it. Its practically all in Unreal Script. The excellent tools mean the designers and artists can do most in the engine, which runs efficient c++ code without project programmers.

Say the 3 most intensive parts of a game were gfx, physics and ai. The first 2 are in the engine in c++, and the AI specific to our game is in half in c++, half in unreal script.


That is actually a really bad idea with UnrealScript, as you will no doubt find out when you come towards the end of your project.

Share this post


Link to post
Share on other sites
Rand    193
Why? Its not the first project we've done this way.

Unless your talking about all the save game/memory card stuff etc...

Share this post


Link to post
Share on other sites
jkleinecke    251
Quote:
Original post by Rand
Quote:
Original post by JohnBolton
Scripts are easier to modify and the turn-around time is faster. In some cases, they can even be modified while the game is running.


So can C and C++ code, depending on the target platform. Check out edit and continue.


Actually, you still have to recompile. Plus, there might not be trivial changes which will force you to shutdown and restart. With a script, the engine just reloads the new script and you are ready to go.

Share this post


Link to post
Share on other sites
Rand    193
Quote:
Original post by jkleinecke
Quote:
Original post by Rand
Quote:
Original post by JohnBolton
Scripts are easier to modify and the turn-around time is faster. In some cases, they can even be modified while the game is running.


So can C and C++ code, depending on the target platform. Check out edit and continue.


Actually, you still have to recompile. Plus, there might not be trivial changes which will force you to shutdown and restart. With a script, the engine just reloads the new script and you are ready to go.


Depending on the scripting language you have to recompile too. You are right about the edit and continue bugs though that can crop up.

Share this post


Link to post
Share on other sites
xgalaxy    124
'Scripting' languages are far from being a new concept in game development. Since TorqueScript was mentioned, it should be noted that it was used in Tribes 2, which is an evolved form of the Tribes 1/Starsiege scripting language. It goes even further back to the Earthsiege titles and this was in the early 90's.

It most likely wasn't the first. Scripting language use in game development has been around for well over a decade.

Share this post


Link to post
Share on other sites
Kylotan    10012
I've not read the rest of the thread, so I apologise if I repeat some things that have already been said.

Quote:
Original post by Structural
I recently bought a license for the Torque engine just so that I don't have to worry about the "plumbing" anymore and could start making games, and I was surprised about the elaborate scripting language.
I was even more surprised when I read numerous posts in the community stating that game logic was usually implemented in script.


It shouldn't be surprising; that specific engine was obviously created with scripting in mind. They wouldn't add an elaborate scripting language if there was little reason to use it.

Quote:
The reason I'm surprised comes ofcourse from my complete lack of experience of the "real games industry" and the trend of the threads I read on gamedev. Most of the things I read here are about C++/Java/other compiled languages. Thereby, my gut-feeling says that script is not being "easier to work with" because it is probably lacking decent (debugging/development)tooling and community support.


You've made several mistakes in the logic there.

Firstly, most people here are not in the "real games industry" and therefore the balance of topics here wouldn't match those on a professionals-only forum.

Secondly, many people here are not working with existing engines, and therefore they are forced to use C++/Java/etc to create their game. Professionals often have pre-existing engines which not only already contain extensive scripting support (eg. Unreal/UnrealScript), but also have most of the C++ level problems already 'solved'.

Thirdly, community support and extensive tooling is less important when the language itself is easier to use. Many of the posts on these forums address basic architectural or structural issues which tend to cease to exist with higher level languages, doubly so when that language is already embedded into a working system.

Quote:
Also, I'm sort of lost where one can draw the line between engine and script. What do I put in my engine? What do I put in script? Is there a rule of thumb?


No. You do what is right for the game. At one extreme, some people may use no script at all, or only use scripts for tiny aspects of event-callback processing. At the other extreme, some people may write the entire game in a so-called 'scripting' language, and just convert some parts to C++ to gain extra speed as an optimisation pass.

Quote:
So, what do you think of this? Can you confirm the increasing popularity of scripting languages? Are you as surprised as I am? Do you think scripting is becoming more and more important? If so, also in the indie game development scene who might not be able to afford elaborate engines with scripting?


Yes, they're increasingly popular.
No, I'm not at all surprised, because I've spent enough time with Python/javascript/Lua/my own scripting languages to see the benefits.
Yes, it's becoming more and more important.
Yes, I think the indie scene will eventually integrate more scripting, since the scripting languages themselves are typically free.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Partner Spotlight

  • Similar Content

    • By Levgre
      I have a design doc I can share, either contact me here, at levgree@yahoo.com, or on Discord (tag is levgre#1415). I am only going over some of mechanics in this post, with more focus on combat than campaign, as combat is the core of the game.  designers could possibly be welcome, at the least I don't ever mind getting additional ideas/feedback.
      Like said in the title, the game is inspired by Darkest Dungeon, but aspiring for deeper and more varied combat/campaign mechanics.
      Theme: the player controls a party of raiders that go on missions, getting loot, building up reputation and experience, etc.  These missions would often be populated areas like towns and forts, but also could be caves, forests, and other settings.  
      The player will control a party of 6 characters.  Changing group formation and individual character positions will be an essential part of strategy for all party compositions.   However, most characters will still be in frontline combat, as often they will be fighting off enemies from both sides (just less often from the rear).
      Characters, both friendly and enemy, will be able to die or be severely injured in one hit, and no magical healing available.  However they will be able to dodge or deflect most attacks until they run out of "stamina", at which point they become sluggish and easier to kill.  So gameplay wise, stamina behaves sort of like the regenerating shield in halo.  However if the player makes a tactical error or puts a character in a situation where they are outmatched, characters could still be wounded even at full stamina.  So individual battles are not the only threat, but also tiring  from many waves.  The players' group can rest when needed, but that will allow the enemies to ready their defenses or get reinforcements.  So speed and smart stamina management is encouraged.  Although, there will be some variety in approach, the player could have a more heavily armored team that slogs through tougher fights, or a lightly armored quick characters for a fast team that relies more on the element of surprise. 
      Weapon and armor choices for each character will be significant strategic decisions, based on battle formation and also the strengths and weaknesses of the party comp/individual characters.
      The exact setting is not yet decided, it could be realistic medieval, high fantasy medieval with demihumans and magical creatures and some level of magic, steampunk, etc..  The "raiders" could be seafaring viking types, fighting in a religious conflict like crusaders, or some of both.
      Thanks for reading, and lmk if you are interested or have any questions.
    • By Spronx
      Hi guys,
      I'm Andy from StriX Interactive and we are
      LOOKING FOR A LEVEL DESIGNER
      to join us on this incredible adventure of developing Blood Oath. Open world fantasy 3rd person RPG in the style of The Witcher.
      We plan to launch a Kickstarter campaign by the end of the year. So it's not a paid job yet.
      We need someone capable of making terrain according to the world map that we have and over all level design. We have a great team and want YOU to be a part of it.
      Contact us on our facebook page https://www.facebook.com/StriXInteractive/

    • By Java Nigga
      Hi there!
      We are JN Studios, we are looking for people to work with us in our project.
      About US:
      JN Studios is a 2 people amateur studio. we have like 1 year making games, but this is our first professional project to show it to the public. We are a programmer guy(Me) and a 3d modeller.
      About the game:
      Strategist Sniper is a RPG/FPS game, yes RPG and fps :v you awake in the middle of the unknown and a small voice tells you that you have to go through the world killing other snipers to get out of there. the mechanics of the game are based on the basic controls of games like League of Legends and in FPS games like Counter Strike.
      What we are looking for?
      actually we are looking for another c# programmer, a musician and an artist(for game illustrations for the marketing of the game).
      Profits Share:
      when the game is in a stable alpha phase we will create a campaign in Idiegogo to obtain money to finance the game. each of the project participants will receive a percentage depending on the work done.
      How to apply?
      just send us a email with a portfolio and in what you can help our team -       trabajojava1@gmail.com


      Devblog1.mp4
    • By cursetalegame
      Hello! I am building the main scene in Unity for a 3D cards game. My goal is creating "card slots" to place the different cards from a deck and use it as "buttons". The image below represents somehow what I want to develop. I have been reading and I think that I have to generate a canvas and place in my scene the slots where I want to place the cards, but I am not sure about it. Also, to use the cards, I don't know if setting buttons is the best option (maybe I should use images instead).
      All recommendations and tips are welcome

    • By cursetalegame
      Hi! We are looking for a unity 3D developer to join our small "beginners" team. We are 3 artists (illustration, concept and 3D modeling), 2 designers and 1 programmer (me). We are developing an online video game that we have already designed. Our goal is to create a small studio and build up this game to take it to video game events around Europe and try to find publishers. Also we want to learn step by step how to develop games, so, is better if you don't have a huge experience in developing
      For more information, or any question, you can send us an email to cursetalegame@gmail.com 
      Cheers
  • Popular Now