Categories
Game Development

How much to manage remote contractors?

If I’m lucky I’ll soon have enough work with RakNet that I wouldn’t be able to handle the workload by myself anymore. That means I’ll be in the hiring market for a bright graduate, someone talented, trainable, and willing to work cheap, at least until business is at a point where I can afford a raise.

Anyway, I’ve been debating internally how many checks and structure to give to a remote employee.

At one end, there’s my own first job out of college as a telecommuter. There was essentially no structure. I didn’t have to write reports. I had a very high level task (write the networking) but never had to write design documents or anything like that. I essentially decided on my own tasks, when I wanted to do them. I even used my own data structures and such in my own code, even though the code base already had data structures.

At the other end I could impose structure similar to my job now. Daily reports. Meetings. When you get a major task you are generally expected to write a design document first. What you work on is given to you in a schedule. (This is still very lax compared to some other places.)

The problem with the first approach is that you need someone who is very good and self-motivated. It would be of no benefit to me to hire someone who made a mess of things and I had to go back and have them redo it, or do it myself. In both cases neither of us will be happy. Similarly, without daily interaction and deadline pressures it’s easy to just have your telecommuter just do nothing, which is wasted money. However, when it works it works great. I considered that the best job in the world, except for the pay.

The problem with the second approach is that it’s essentially a waste of time – all that structure is designed to keep bad programmers from doing bad things and not working. At best it’s annoying to a good programmer and not motivating at all to work on something you don’t want to. You bleed programmers who think the grass is greener on the other side. However, since you always know what your people are working on you don’t get slackers who do as little as possible for years (which also happened at my first job).

This may change with time and experience, but I think the best approach may be to hire the best and trust them to do their best. Guide, rather than force, people to your goals through proper motivations such as giving them options on what to work on (and all the options are useful to you). Explaining why things need to be done rather than telling them to do it. Giving them freedom to make important decisions, both in programming and in game design. I think intrinsic motivations (the desire to do a good job) are more important than extrinsic motivations (money, bonuses) and it’s important to motivate people using the former, while still having the latter as a bonus for a job-well done.

Categories
Uncategorized

The perfect scripting language, part 2

The author of Angel Script was kind enough to reply to me about his library:

Hi Kevin,

AngelScript is not an interpreting scripting engine, but its built-in compiler is fast and suitable for (re)loading and compilation of scripts at runtime. The script language is similar to C++, though not 100% compatible. It is also possible to compile the script code and save the precompiled bytecode to disk for later use, if you do not want to distribute your script sources.

You mentioned in your post that the script will be able to call into the engine but not vice versa. This is not quite true, the engine obviously has to know how to make a call for it to be able to do it, but you could define interfaces or callbacks that the script can connect to, which the engine then uses to call into the scripts with. This is of course not an exclusive feature of AngelScript.

The main advantage of AngelScript over other scripting languages is that it is statically typed, just like C++, and that it can in most cases interact directly with the C++ application without the need for wrapper functions. This makes it particularly easy to embed in applications with an efficient interface. I cannot guarantee that AngelScript is the fastest scripting library, but it is for sure one of the fastest available.

I suggest you give it a try, to see if you like it and if it suits your needs.

Regards,
Andreas

1. It is good that you can reload at runtime.
2. To me it’s roughly equivalent to releasing script and releasing C++ game code for modders. On one hand, with script you don’t need to think about which interfaces you expose, and making nice header files for those interfaces. On the other hand, if you plan for this from the start it’s not really extra work and you get the use of a debugger.
3. Regarding script compilation, I think the best solution is to check the file dates of the script and the compiled script. When your game runs, compile the scripts that are out of date. If you change scripts at runtime and reload them, always compile them.
4. There is no debugger for AngelScript that I know of. Perhaps the script code execution module throws an exception? I would refrain from writing too much in script without a debugger. This is not a big deal from me, since I think it’s always a bad idea to write too much in script. Script should only be for things which change very frequently during development, such as gameplay specific numbers or algorithms. The Unreal Engine is an example of where script was overused pointlessly.
5. The author points out that Angel Script isn’t directly equivalent to C. With the use of defines (there is a preprocessor add-on) and refraining from using non-equivalent language semantics I see no reason why one would not be able to both script and compile the same code. I’d have to look at it in more detail to know for sure.

I can see the use for this for something like a map file for an RPG. When the character talks to NPC A, and selects option B, then trigger C.

Categories
Uncategorized

The perfect scripting language

In general I don’t like scripting languages. But you have to admit it’s much faster to iterate changes in a scripting language than C++. Here’s a simplified list of pros and cons:

Pros of C/C++:
Fast execution
Compiler helps you find errors
Full access to the engine.

Pros of Scripting:
Fast iteration
Easy for users to modify

Conversely:

Cons of C++:
Slow iteration
Hard for users to modify

Cons of scripting:
Slow execution
Error prone
Access limited to exposed interfaces

It’s true that any language which can be interpreted can be compiled, and any language which can be compiled can be interpreted. So how’s this for an idea:
Your scripting language is C or C++ (why invent a new language?) which is interpreted and has full access to all your other code. Obviously your script can only call into your engine, and not vice-versa, but this is the only limitation.

Since it’s a script, it is valid and reasonable to hardcode numbers into the script.. You can tweak these numbers and change the script while the game is running to play around with settings.

When you are ready to ship a build, switch your flag to compile rather than interpret the scripts. Or, if you wish user mods, just leave it interpreted.

This is one use of a script system that makes sense to me and I’d fully support in a game project.

Note: there is a library called AngelScript but I’m not sure if it’s capable of doing everything I outlined here. If so, let me know!