Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

151 Neutral

About Shadowraix

  • Rank

Personal Information

  • Role
  • Interests


  • Twitter
  • Github
  • Twitch
  • Steam
  1. Shadowraix

    Embedding Lua in C# with P/Invoke

    Thanks for the detailed information once again. I'm slowly working through everything. So my program has an error saying that the entry point 'lua_pcall' cant be found. The tutorial I followed in OP was based on Lua 5.1, but heres the culprit code I believe. [DllImport("lua53.dll", EntryPoint = "lua_pcall", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern int lua_pcall(IntPtr lua_State, int nargs, int nresults, int errfunc); //simplify the execution of a Lua script public static int luaL_dostring(IntPtr lua_State, string s) { if (luaL_loadstring(lua_State, s) != 0) return 1; return lua_pcall(lua_State, 0, LUA_MULTRET, 0); }
  2. This is for Lua 5.0. Latest is 5.3.2 just making that known so there will be significant differences.   Lua was my first programming language then I transitioned to Java and C#. One of my C# Projects will integrate Lua. Its pretty easy to learn, simple, fast, extendible. Go for it.
  3. Shadowraix

    Embedding Lua in C# with P/Invoke

    Thanks for the detailed reply! I'm looking to do this myself for the experience. So if you can guide me a little bit i'd appreciate it. The tutorial I followed required me to build the Lua DLL myself for a few reasons: 1. Calling Conventions (Changing it to __stdcall in VS settings) 2. Decorated functions (Using a .def file, but that solution didn't work for me) 3. C Manifest (It describes how its built into the DLL but needs a standalone manifest too)   Is this a non-issue for you? Did you modify how the DLL is built or is it a simple import files and compile? I'd like to know how you solved these potential issues.   Are the LuaObject and LuaState CS files just wrappers so users of the library can use those to simulate those objects rather than using IntPtrs all the time?
  4. Hey! For a project of mine, I've been wanting to embed Lua in C# so I can use it in my C# projects. I do not wish to use things like NLua or LuaInterface. I want to use P/Invoke to access the DLL functions. This is an easy way for me to update Lua to use Lua 5.3.2 etc. I originally followed a tutorial: https://ttuxen.wordpress.com/2009/11/03/embedding-lua-in-dotnet/   So I pretty much followed it exactly except I followed some comments advice. I skipped the manifest part. I was confused as to what manifest file I needed and where it was. (Was it a Windows DLL manifest or should I create a manifest from the VS project? What?) Its not clear.   I ditched the def file and did this: #define LUA_API in luaconf.h to read #define LUA_API extern “C” __stdcall __declspec(dllexport)   I then copied the code example pretty much line by line then when running the console app I got: 'Unable to find an entry point named 'luaL_newstate' in DLL 'lua53.dll' Line 10 in the main function of the program.   I'm obviously doing something wrong and this is just in general chaotic for me. If anybody can lead me in the right direction to use P/Invoke with Lua and C#, it would be much appreciated.  
  5. Shadowraix

    Title for game? [Solved]

    Thanks for all of your help. I discussed titles with a few people and Animal Ascension had majority vote so I will be going with that. Probably would take me months to come up with a name if it weren't for you. Thanks a lot!
  6. Shadowraix

    Title for game? [Solved]

    Well, that can vary depending on what the player wants to do. However, the main focus of the multiplayer is roleplay. Be the animal you want to be and roleplay with others. Of course you don't have to. If you so wish you could explore, socialize, or fight others if you so wished.
  7. Shadowraix

    Title for game? [Solved]

    Now these are some suggestions I seriously considered. Some of them sounded a little ridiculous though. Haha. Ones I liked specifically were Alpha's Claim, Animal Ascension, Archy Outcast, and Alphascension. I got some feedback from friends and it's more geared towards Alpha's Claim. I'm a little conflicted with these names though. It does hint towards the singleplayer a lot, but it may give the impression that the multiplayer is only about wolves' as well when in reality it has multiple species. The multiplayer is probably a stronger point for the game than the singleplayer. So the question is should the title be aimed towards still the singleplayer or represent the game as a whole? Also, I haven't seen that anime. I'll have to check it out sometime.
  8. Shadowraix

    Title for game? [Solved]

    Story concepts? Last I checked at least half of those don't have one. Not sure about Aro'Kai, Primitive Call, or Everlost though. As they are still in development. The singleplayer I have planned isn't entirely complete, but I can say a general outline is it's about a young wolf who was abandoned by his pack for not proving his usefulness and you experience the friends he makes and the challenges he will soon face. He eventually meets with his pack once again and fights to take place as Alpha.
  9. Shadowraix

    Title for game? [Solved]

    Hmm..I don't know. Most of those names I just don't see fit. Animal Instincts sounds alright, but i'm not sure if I would want to use it due to its generic name. I like something a little more unique. Some games around this genre are called: FeralHeart, Sanctum of Eventide, Aro'Kai, Primitive Call, Everlost. All somewhat unique names if that list helps with any other possible suggestions.
  10. Shadowraix

    Title for game? [Solved]

    I have a game in development and i'm having trouble coming up with an actual title for it. It would be nice to receive any suggestions. The main point of the game is to be a animal role-play. You can hunt prey, or other players. Explore worlds, communicate with others or just roleplay. You can be from various animals like Deer, Wolves, Lions, Owls etc. That's the main gist of it. It also contains tools for map making as well. Includes a Single-Player and Multi-Player.
  11. Shadowraix

    Classes and Constructors

      Some programmer do it this way but that is not the idea behind a class. classes try to implement the concept of OOP. but yes sometimes it is only that what you said...   Alright. Thanks for your help. I'll go take a look at some examples of classes and hopefully i'll have a better understanding of it. 
  12. Shadowraix

    Classes and Constructors

        In other words a class describes a set variables and a set of functions which are exclusively only part of this class you would define. In your case it is the basic of your language!! The constructer or ctor is a very special memberfunction. the ctor has the job to initialize your class before the instance of your class exist. to make a comparison. your Ctor is the bootloader of your class. That is the reason why every class need to have a ctor.   Alright, I understand about the constructor. So are classes mostly used for organizational purposes? I mean, couldn't you fit your code all into one class? Albeit it would most likely be messy code. Can any real-world examples of when classes would be useful be provided?
  13. Shadowraix

    Classes and Constructors

    I recently started learning C# for use within the Unity game engine. I've been trying to follow a couple of tutorials on Classes and Constructors, but I simply can't see to understand it. I would appreciate it if anyone could explain Classes and Constructors and what they are useful for. I am just learning so try to keep it as simple as possible.   Thanks in advance!
  14. Shadowraix

    Any Advantages to use Hexadecimals?

    Ahh, I see. Alright, thanks for the info.
  15. So, just for the fun of it, I learned how to convert numbers into hexadecimals just so I can use it in math operations to confuse those who don't understand it. Although, are there any advantages to coding in hexadecimals compared to regular numbers? Wouldn't it be faster? Right now I would be using it in Lua as that's the only programming language I can code in fluently at the moment.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!