Sign in to follow this  
Rad94

High-level Scripting Languages and Lower-Level Ones

Recommended Posts

I haven't been doing programming for about 4 months now so I forgot alot(I mean alot) of stuff. So I'm wondering, how do high-level scripting languages like Lua and Python work together with lover-level languages like C++? What are these languages used for in game development?

Share this post


Link to post
Share on other sites
Generally, the lower level languages tend to handle a lot of the nitty gritty aspects of a game engine such as rendering the graphics. Since they are low level, there tends to be a lot less overhead and the engine performs a lot better. In other words, it can interact with the hardware much faster than a higher level language to get a model or a texture rendered to the screen pretty quickly. However, whenever you make a change to code that is this low level, it usually requires re-compiling all the files in the project. This can eventually become very time consuming and cost you millions of dollars if you are making a commercial product.

Higher level languages like Python and Lua are usually too slow to handle the more intense aspects of the game engine such as the graphics, but they can run fast enough the game logic--the rules and mechanics that make a game interactive and potentially fun. The higher level language can tell the engine where to position the model, how fast to make it run or how high to make it jump. The intermediate binaries that compile from higher level languages like Python and Lua usually do not require the recompilation of all the files in the project and are often quicker to work with when making small changes to the game logic.

It's generally a good idea to have the game logic separate from the game engine. That way, the actual engine stays flexible (and ultimately, reusable) and you can make game design decisions quicker and easier without having to constantly compile your engine.

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