Questions tagged [scripting]

A type of programming, often meant to be easier to learn than more "traditional" programming. Scripting is often used when performance is less important than ease of use. Examples of scripting languages are: Javascript, Lua, Perl, Python, and PHP. Scripting languages are often interpreted instead of compiled, and thus they can be executed directly without generating machine code.

Filter by
Sorted by
Tagged with
72 votes
6 answers
32k views

Why do we use scripts in development?

In my current project, Lua scripts are called by the C++ functions on the server side. After that, the scripts again call the C++ functions still in that solution. Why should we do such things and not ...
user avatar
72 votes
6 answers
56k views

How does Lua work as a scripting language in games?

I'm a little hazy on what exactly Lua is and how a game that is programmed in C++ would use it. I'm asking primarily about how it is compiled and run. For instance when you use a program written in C+...
XSoloDolo's user avatar
  • 823
59 votes
1 answer
55k views

What scripting language should I choose for my game? [closed]

In what cases are what scripting languages better than others? All answers are appreciated, please provide a description, and describe in what cases the language excels in.
28 votes
2 answers
30k views

How do you add a scripting language to a game?

Let's say I have a game written in C++. But I want to add some modding or scripting functionality to it. How would one go about adding a scripting functionality to your game?
Ólafur Waage's user avatar
27 votes
6 answers
11k views

What's the technology that allows programming inside a game?

There are some games which allow the player to write/create scripts in-game, for example: Space engineers or Psi. I want to use something similar to either one, but I've had a hard time finding ...
Westside Tony's user avatar
21 votes
6 answers
9k views

Is implementing your own scripting language viable?

I am coding a beat 'em up game in C++ and the time has come to implement scripting for events, triggers, cutscenes etc. I have read around on the internet and gotten a fair bit of information. My ...
skiperic's user avatar
  • 371
18 votes
4 answers
3k views

What can I do to avoid one-off flags and checks throughout my code?

Consider a card game, such as Hearthstone. There are hundreds of cards that do a wide variety of things, some of which are unique even to a single card! For instance, there is a card (called Nozdormu)...
Raven Dreamer's user avatar
18 votes
3 answers
7k views

How can I implement smart scripting, in my game?

I'm developing a game engine. It is supposed to be an entity/components based one. For developing my game, itself, I thought to use some scripting language to actually create the entities. For ...
nathan's user avatar
  • 1,876
17 votes
2 answers
6k views

Tips for implementing MMO quest mechanics?

What tools, patterns, or best practices would you recommend to implement the quest mechanics given below listed requirements? I am talking about software architecture (how generic should you be) and ...
jmp97's user avatar
  • 979
17 votes
4 answers
3k views

Game engine: a decent way, architecture-wise, to implement scripting support?

I am developing a simple game engine (in C#, if it matters), and I can't think of a decent enough way to implement scripting in terms of architecture. It's a simple turn-based strategy with custom, ...
Artemiy's user avatar
  • 271
15 votes
1 answer
28k views

why is Lua so important ( frequently used ) in game development [duplicate]

I have written some small games for fun myself, but never used Lua myself. I have seen people discussing Lua's use in games everywhere. The question is: What benefit can I get from using Lua in game ...
zinking's user avatar
  • 300
14 votes
6 answers
12k views

What scripting language would you recommend for a C++ game project? [closed]

By scripting here I mean not just putting config data in a script, but scripting parts of the project like some class methods, test specific game loop, etc. This would be not just to accelerate ...
Frédérick Imbeault's user avatar
13 votes
6 answers
2k views

When would I use "scripts" or "scripting" in a game, as opposed to the core language?

The terms scripts and scripting appear to be used interchangeably on the Game Development Stack Exchange, but other than reading questions about a scripting language choice, I don't understand the ...
user avatar
13 votes
7 answers
2k views

Domain-specific languages for scripting [closed]

As most of you know, embedded interpreters for languages like Lua and Python are widely used for scripting game logic, but I haven't seen much information on people going with domain-specific ...
Serafina Brocious's user avatar
12 votes
3 answers
2k views

Scripting and Cinematics without Threading

I've been struggling with how to implement scripting in my game engine. I only have a few requirements: It should be intuitive, I don't want to write a custom language, parser and interpreter, and I ...
ojrac's user avatar
  • 282
11 votes
5 answers
1k views

Why place entity config outside of scripts?

I've seen a lot of games that define the entity components in script files, but when they configure each entity and specify what components it has, they use some other file format (like XML). Why do ...
Paul Manta's user avatar
  • 3,177
11 votes
3 answers
11k views

Exporting Blender bones

I wrote an exporter for blender models that works great for meshes. I'm attempting to extend that to bones defined in blender. However I haven't found good information for exporting bone data. How can ...
House's user avatar
  • 73.2k
11 votes
4 answers
5k views

Game engine with good Lua entity creation/management [closed]

I'm looking for an engine that constructs it's entities using Lua or other scripting language. This is in order to find inspiration and do it in my own engine as well. I know that CryEngine does use ...
Mr.Gando's user avatar
  • 575
11 votes
2 answers
2k views

Handling scripted and "native" components in a component-based entity system

I'm currently trying to implement a component-based entity system, where an entity is basically just an ID and some helper methods tying a bunch of components together to form a game object. Some ...
Mario's user avatar
  • 383
10 votes
3 answers
451 views

Should scripts interact with an abstraction of the engine?

I'm using Java and Jython, and after some research I discovered giving scripts direct access to the engine interface could be a mistake, as it would tightly couple the two. It looks like most ...
user avatar
10 votes
3 answers
14k views

How does Unity use C# as a scripting language?

To my knowledge, thus far, I have thought that C# is and has always been a compiled language. I have recently started studying Unity3d and noticed that they give C# as an option for scripting and ...
Brandon Clapp's user avatar
10 votes
3 answers
1k views

What do you look for in a scripting language? [closed]

I'm writing a little embedded language for another project. While game development was not its original intent, it's starting to look like a good fit, and I figure I'll develop it in that vein at some ...
Jon Purdy's user avatar
  • 800
9 votes
2 answers
5k views

Scripting engine for XNA

Say I'm making this big game in C# with XNA. What options do I have to include a scripting feature to my code base?
astk's user avatar
  • 521
9 votes
2 answers
4k views

What are the pros and cons of Lua vs. Python as a scripting language for XNA/C# platform? [closed]

I am thinking about giving a go to one of my ancient ideas for a game. The core point of this game would be the possible level of functional customization of the game environment and objects (such as ...
famousgarkin's user avatar
9 votes
2 answers
2k views

User-friendly scripting when using an ECS?

I am currently creating a small hobby project to get back into game development, and I have decided to structure my entities using an ECS (Entity Component System). This implementation of an ECS is ...
Charanor's user avatar
  • 7,840
8 votes
1 answer
2k views

How do I communicate with an IronPython component in a C#/XNA game?

My XNA game is component-oriented, and has various components for position, physics representation, rendering, etc, all of which extend a base Component class. The ...
doppelgreener's user avatar
8 votes
3 answers
11k views

Binding C++ and V8 Javascript from Google

The examples are quite challenging to grasp if you are still getting your head around other things, so the simplest example would be great. Is there a simpler example?
underscorediscovery's user avatar
8 votes
1 answer
835 views

Bohemia Interactive's bio2s format

Does anyone have specifications for the bio2s scripting language from Bohemia Interactive? They develop Operation Flashpoint, Armed Assault (ArmA), and Virtual Battlespace. These scripts are ...
Jaime Soto's user avatar
7 votes
2 answers
834 views

How is scripting done in games such as Zelda?

How do games implement their triggers and events that make up the plot of the story. For example, to be concrete how would one implement the story of a game such as The Legend of Zelda: A Link to the ...
user782220's user avatar
  • 1,007
7 votes
4 answers
34k views

InputManager in Unity

I´m having a rough time trying to figure out a proper way of dealing with key mapping and key bindings in unity. The built-in unity input manager is useless to me since it doesnt support key mapping ...
Scar4mouche6's user avatar
7 votes
2 answers
934 views

How can I write a trigger to detect when a terran building burns to its death? (Starcraft 2)

I'm working with Starcraft 2 Map Editor, and am having a little bit of a trigger problem. It's quite easy to detect when a specific unit kills a structure (simply check if triggering unit == whatever)...
Raven Dreamer's user avatar
6 votes
4 answers
10k views

Should NPC dialog be stored in XML or in a script?

I'm developing an action RPG with some friends. I would like to know the differences and pros/cons of making NPC's dialogue using a file in XMLformat instead of using a script. I see that script ...
Andrea Tucci's user avatar
6 votes
2 answers
580 views

How do you handle scripting in multithreaded environment

In my experience, two approaches are preferred when people want to handle scripting in multithreaded environment. Synchronize every accesses to scripting module with one coarse-grained lock. No ...
summerlight's user avatar
6 votes
3 answers
9k views

How to make Unity game moddable with scripting in a friendly way?

I am building a game in Unity using C# and visual studio. I want to make it possible for users to write code in some scripting (for modding purposes) without necessarily opening the source. What are ...
Elliot JJ's user avatar
  • 211
6 votes
3 answers
340 views

Which parts of game should belong to engine and which should belong to scripts?

Often, a game is split into engine code (i.e. C++) and scripts (i.e. Lua). Which parts / modules of game code should typically belong to engine, and which should belong typically to script-domain ...
komorra's user avatar
  • 213
6 votes
0 answers
192 views

Design patterns for live coding/script reloading [closed]

I would like to make C++/Lua combo and write scripts for a game with live script reloading. What design patterns should I be aware of so not to cause me unnecessary pain? For example if I have a ...
lukas.pukenis's user avatar
5 votes
7 answers
3k views

Is it possible to use Java as a scripting language?

Is it possible to use Java as a scripting language for a C++ engine/game? I understand that you need to make a binding to the interpreter, but I haven't seen any around.
LizardGamer's user avatar
5 votes
2 answers
539 views

How to keep Lua bindings from cluttering up C++ code? [closed]

I'm writing a game engine that uses C++ and Lua (and Luabind). Currently, I'm writing all the bindings inside the constructor of the class being binded. I really don't like this because it's ...
DormoTheNord's user avatar
5 votes
2 answers
870 views

Visual Programming tool for creating game quests

I've found a question for visual script editing software tool for creating game behavior logic, but I am looking for something more flexible. I would like to configure the tool to make it produce code ...
Balon's user avatar
  • 257
5 votes
2 answers
1k views

Can you write the current frame number to a text file?

I am running an experiment in Unity 5 to see the effect increasing the particles of a particle effect has on FPS over time. (this is background work for a much larger piece of work). Currently I write ...
CH99's user avatar
  • 563
5 votes
1 answer
328 views

How do game makers (without coding) work?

How do game makers/engines like Buildbox, GameSalad, Construct, GameMaker, etc work? What technologies (programming languages, APIs, etc) are used to build the and how does the program convert the ...
Sean Nam's user avatar
5 votes
1 answer
5k views

iOS build size is too large in Unity

I have finally completed my game and ready to upload my game to the App store, but my build size is too large. I have checked log statement and it is roughly 13.3 mb but when i build my game and test ...
user3191102's user avatar
5 votes
3 answers
248 views

Scripting: to block or not to block [closed]

Context: I'm making a little "program your robot army" sort of game in Java in which the player writes Lua scripts (which are then run by LuaJ) to program their robots to do stuff. So far there are ...
Max's user avatar
  • 306
5 votes
0 answers
164 views

Scoreboard setdisplay list shows correctly per char. Can i make my sidebar show correctly per char as well?

So I've been writing a script over the last little while in Python that interacts with the Minecraft console. I'm basically trying to make a scoreboard based currency system that is world independent ...
VTSTech's user avatar
  • 51
4 votes
3 answers
2k views

Creating a game with in game programmable AI [closed]

I am looking to make a game where the player can access an in game terminal and then use this terminal to write AI logic in a programming language such as C++ or C#, then they can compile the code and ...
Matthew Pigram's user avatar
4 votes
2 answers
5k views

In Ren'Py, how do I show a different image depending on variables?

At the start of my RenPy game, the player chooses a male or female character. The game plays out the same for both, save for some details. The problem is that I want to write: ...
Klaim's user avatar
  • 2,624
4 votes
2 answers
341 views

generating animations in runtime

i am creating my 3d game engine using Opengl. this question might sound stupid to you but i am still in the process of learning, i have a 3d animated girl that slaps guys of different talls on the ...
FPGA's user avatar
  • 143
4 votes
3 answers
613 views

Use of classes for lua extensions

I'm asking about a very small domain. One-off extension scripts. IE, defining a new weapon for scorched earth. When providing and API for small extension I've seen two approaches. The API exposes ...
deft_code's user avatar
  • 7,602
4 votes
3 answers
563 views

Single Switch Script vs Multiple Scripts

Would it be better to have one script that switches or have multiple scripts with each with their own function? In example, Lets say I am making a powerup script. Option 1: Create a single powerup ...
DarkDestry's user avatar
  • 1,431
4 votes
1 answer
868 views

How to design a useful scripting system?

I have decided to use the Squirrel (probably doesn't matter much for this question) scripting language in my C++ project. I'm wondering how game developers usually handle scripting in their games. I'...
Alex's user avatar
  • 143

1
2 3 4 5 6