Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About MrFloat

  • Rank

Personal Information

  • Interests
  1. MrFloat

    Creating 64bit iOS native calling support

    line 193 seems to be for when the execution return type is not a handle (pointer). You can see that the handle version has the opposite assert. I guess it just assumes that the first 64bits of the return type should not be all 0 and tries to catch instances where people incorrectly used return values by handle. I think the return address will be treated as a fully constructed object and some form of assignment will be used on it. Make sure that having the first 64bits of 0 in your object instance is valid before removing that assert.
  2. MrFloat

    Statics Angelscript

    At least in the AngelScript version before the latest one, you could register global functions under a namespace that is the same name as the class name (not sure if that changed or if there are plans to not allow this in the future). So yeah you probably can still register a global function / property "Up" under namespace "Vector3" and this way it will be accessible in scripts with "Vector3::Up" (Fingers crossed this is not going away without an official static variable replacement) If static members do get introduced, I imagine the in-script syntax would be the same and wouldn't require script changes to transition.
  3. MrFloat

    Angelscript Shaders? Post Processing Effects Help!

    Hi, you might be misunderstanding what AngelScript is. It's a scripting engine that can be given game engine classes and functions, but it's not a game engine in itself. Out of the box Angelscript has no notion of rendering pipelines or physics systems. What you're after is some specific integration of AngelScript with specific functionalities exposed to it. You're better off indicating what game engine you are using in case there are people with knowledge about that entire setup as what you are after would be understanding a specific rendering system or its integration to AngelScript.
  4. MrFloat

    Question about Shared class behaviour

    Is using pType->GetMethodByDecl("void set_Prop(SomeClass@)"); not a mistake? Based on the actual interface one would expect to see pType->GetMethodByDecl("void set_Prop(IInterface@)"); It sounds like you might not be using shared classes correctly, you can read more about them here: https://www.angelcode.com/angelscript/sdk/docs/manual/doc_script_shared.html It's mentioned that "in order to work the scripts in all modules that share the entity must implement the entity the same way", so all modules are expected to contain the shared classes. The thing to be carefull here is that I think when I tested the shared classes were "owned" by the first module that was loaded with them and if that module gets disposed, the shared classes it owned get destroyed even if other modules were using them (not sure if it's a bug or intended). That page also gives the alternative to having duplicate class definitions in a form of "external" keyword.
  5. I don't think angelScript has an answer for your pursuit of convenience. If you haven't checked some of the addon examples, weakref is an implementation of a value type handle that you might be interested if you don't actually need ref counting for your handles. However it's fairly easy to automate a handle registration to simply have the same methods as the class you are interested in. Given an angel script type info structure, you can loop through and register the same methods while also storing the original script function pointer in the new function user data. Provide all of the duplicate methods with the same function that just does the table lookup you want and uses the original function pointer from user data to call the actual function. You should be able to automate the registration of a fake class/handle for any class this way.
  6. MrFloat

    Auto handles with the ref add-on

    I don't think you're supposed to use @+ for types with asOBJ_ASHANDLE flag If you look at the ref type registration, it doesn't even have the functionality tegistered to have a counter for itself and asOBJ_ASHANDLE types are a value type, so I guess they don't need a counter. I assume you don't need track ref counting for the "ref" type itself but for whatever "ref" type holds and looking at the implementation, that is already done when you assign values to the type.
  7. MrFloat

    Returning arrays of ""pointers""?

    I think you are doing the right thing. Just use handles to your classes "array<Enemy@>" instead of "array<Enemy>" maybe? If you use "Enemy" directly, the script will create a new physical object in that scope. You can refresh on handles here: https://www.angelcode.com/angelscript/sdk/docs/manual/doc_script_handle.html
  8. Yes, I was aiming to run some logic on copy. Didn't have one specific thing; wanted some debug output on one class, some c++ calls on another and try cloning object handle data on a third
  9. Hello, I'm using the AngelScript SDK 2.32.0 that is listed on the AngelScript website as latest (http://www.angelcode.com/angelscript/downloads.html). I find that script copy constructors mentioned in the docs (http://www.angelcode.com/angelscript/sdk/docs/manual/doc_script_class_desc.html) are not called. I'm trying to use something like "engine->CreateScriptObjectCopy(m_obj, typeInfo);" to create a copy of script object with a copy constructor, but asSTypeBehaviour::copyconstruct is always null and the process defaults to regular construction and assignment. Even simple script only example like: Main() { TestClass arg; TestClass result = copyTest(arg); } class TestClass { TestClass() {} TestClass(const TestClass &in other) { Print("Hello World!"); } } TestClass copyTest(TestClass a) { return a; } Does not call the copy construction even once. Would anyone know if this is a known issue and was already solved in some beta build/commit before I go digging into the script parsing code to try fix it myself? Thanks
  • 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!