Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3305410
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:09:56+00:00 2026-05-17T21:09:56+00:00

I am developing simple games as a hobby. For my new project, I want

  • 0

I am developing simple games as a hobby. For my new project, I want some parts to be scriptable. I am familiar with python but don’t mind learning new languages. Here is the question:

I am planning to implement path-finding, field-of-vision, collision detection etc. in C++ but want to use scripts for AI state machines, scripted events. What type of structure is used for this kind of job?
I imagine I can make a C++ program run a python process which in turn calls C++ methods, but it seems inefficient. Another idea is to develop a library to be called from python, which doesn’t sound very attractive either. What is the regular way of doing this(except for writing my own language and parser?) I heard lua is popular for embedding into C programs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:09:57+00:00Added an answer on May 17, 2026 at 9:09 pm

    From my personal experience, both lua and tcl have fantastic C APIs for embedding. Both languages are very simple. If you’re writing a command interface, I’d probably say go with tcl, but if you’re just using an embedded interpreter, I’d recommend lua. Given that you’re using C++, you might also want to look into the luabind API, I have heard good things about it.

    For AI scripting, or other state machine-type things, this blog post by Zed Shaw is a good read. Coroutine-based AI code can look a lot nicer for complex scripts, rather than managing an enormous pile of states and their transitions.

    If you’re using python, you might be better off extending rather than embedding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a simple platform game in Java using BlueJ. Over the next
I've been developing a simple website using asp.net MVC and I'm starting to add
I'm developing a simple Qt 4 app and making my own dialog. I subclassed
Hi I am developing a simple application based upon ASP.NET MVC. I have altered
i'm developing a simple C# Editor for one of my university courses and I
I'm looking at developing a simple validation framework for WPF (the IDataErrorInfo method doesn't
Here's the situation: I'm developing a simple application with the following structure: FormMain (startup
I am developing, a simple SharePoint Sequential Workflow which should be bound to a
I have a simple application using netbeans for developing and maven for building et
Developing websites are time-consuming. To improve productivity, I would code a prototype to show

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.