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 6623209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:30:21+00:00 2026-05-25T21:30:21+00:00

I’m trying to wire up Lua to my VB.net game I am making. Now,

  • 0

I’m trying to wire up Lua to my VB.net game I am making. Now, I’ve read enough to know that I can wire each function up by itself like seen here:

pLuaVM.RegisterFunction("quit", pPrg.GetType(), pPrgType.GetMethod("quit"))

Now, how would I make it possible for my Lua scripters to instance classes, change properties of those classes, etc.

RegisterFunction just seems sloppy and not enough.

Thanks for any help!

  • 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-25T21:30:21+00:00Added an answer on May 25, 2026 at 9:30 pm

    My first piece of advise is to not use LUAInterface; as it isn’t cross platform, and to instead use IronPython, which is just as easy to pick up as LUA, and will run on Windows and OSX, depending on how you are writing your game; XNA and OpenTK should work cross platform under mono for the graphics engine.

    i found this out myself when experementing with LUA for my own vb.net based game, and eventually decided on iron python.

    But assuming you want to stick with LUA; here is something you can try.

    Based on the fact that you know:
    Any vb.net code written cannot be changed after run time, you can do something like this:

    Public Shared Lua as New LuaInterface
    
    Sub Game()
    Dim LuaCaller as New LuaAccess
    Lua("LuaAccess") = LuaCaller
    End Sub
    
    Public Class LuaAccess 
        Public Sub Grant(NewClass as String, Variable as String)
            Select Case NewClass
                   Case "LuaAccess"
                        Lua(Variable) = New LuaAccess
        End Sub
    End Class
    

    Then from Lua:

    LuaAccess:Grant("LuaAccess", "MyNewLuaAccess")
    

    You can add a new case for each class you want lua to be able to create an instance of; and use that to create new instances of classes.
    if you want it to be able to modify an active class used by the main program, just make the subs, or variables, or both in the class shared

    Public Shared MyVar as Integer
    

    That way there is only one copy of the variable, which any part of the application (even Lua) can modify.

    Although I’ll be honest IronPython really is more suited to this kind of thing, and is still being actively developed, unlike LuaInterface.

    remember one thing; when it comes to scripting, you really don’t want to give the scripting engine too much control; when it comes to games specifically you’re giving them access to everything your engine can do; and that can be used to cheat if you are not careful.

    good luck, and i hope i helped.

    Based on LuaInterface runtime v2.0.50727
    (the one that uses Lua51.dll)

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.