Jump to content
  • Advertisement
Sign in to follow this  
dudedbz1

Scripting In C++

This topic is 4655 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all. Many people say that C++ may be used as a game engine, but not as the game itself. They say that the game itself is all scripting. How can you use scripting or whatever, when you have a C++ engine? What is scripting?

Share this post


Link to post
Share on other sites
Advertisement
You have your terms a little mixed up there.

C++ is a programming language in which you can make a game engine; C++ itself cannot be used as an engine for anything, other than expressing your ideas in a manner that seems insane to other, more normal humans.

Scripting usually refers to a language that is interpreted rather than compiled, although some notable languages are compiled to bytecode, so I suppose the connection is a little odd.

You don't have to do the game entirely in a scripted language, most people say this though because it's much easier to edit a script than to have to recompile a C++ project. Not only that, many scripting languages are much easier to express concepts of a game in than C++.

C++, in this case, would be used for lower level functionality such as allocating resources, creating device contexts, networking and so forth. You can almost think of it as the relation between a publisher and a writer. The publisher has all the muscle behind it, but all it can show is an empty book. The writer is what gives you the story.

Of course, that's all personal opinions from past experiences, and you're best off doing what's most comfortable to you. But I'd also have to recommend performing your game logic in script.

As far as how you would use scripting in an engine written in C++, the scripting engine usually offers a way to bind itself into your project, so it can refer to internal objects of your engine.

I've never used it myself, but many people say Python is a good language, and has a relatively easy process of binding. You may want to look into it.

Share this post


Link to post
Share on other sites
C++ isn't the actualy engine C++ is used to creat the game engine. Scripting is used to create interaction in games and add events to objects. So scripting virtualy makes things a whole lot easier to do other than hard coding it since you don't need to hard code events when using scripts.

Ahh you beat me to it lol.

Share this post


Link to post
Share on other sites
Uhh, I know what C++ is, and I didnt say that C++ is an engine. Its just that I'm making a mario clone(look in alternative librarys-my code(cont'd)) and ive heard people saying many games are made in scripting, just the engine is written in C++.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!