Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

115 Neutral

About Oscar1

  • Rank
  1. Since I can use Object reference as parameters in my functions and the object handle is in fact NOT a pointer, is there really any reason of using (or even having) object handles? I just can't find that good reason.   The only difference I see is that I can reseat the object handle with different object and I can also use it as a return parameter of function.   I really don't know, I wanted to wrap my head around the need for object handles - especially the reason why I would want to use them, but since I can pass reference in functions, I can't find any reasonable reason to use them. Is there some safety issue, speed issue or something else? Is there something obvious I don't see?   Give me some ideas. Thanks. Love the angelscript, I just want to understand it better.
  2. Andreas, the compile worked ok with my Copy(const image @&in), the runtime went into an loop when executing it. I didn't debug it as I knew I was probably doing something I shouldn't.   I tried the copyconstructor and it works, but as any other reference input it doesn't accept @ tag which maybe makes the syntax confusing or maybe not... there is something about the object handle syntax I am not 100% comfortable. 
  3. I am trying to do a copy constructor on asOBJ_REF class. Seems the asBEHAVE_CONSTRUCT does not apply to asOBJ_REF classes.   Any ideas?   I settled so far for    RegisterObjectMethod("image", "void Copy(const image &in)", asMETHOD(CByteImage,Copy), asCALL_THISCALL); assert( r >= 0 );   However my image class asBEHAVE_FACTORY is all object  handles, but I seems not to be able to make the Copy accept the object handles as argument.   so I can go    img2.Copy(img);  and it is fine   the  img2.Copy(@img);   would throw compile error.   I tried RegisterObjectMethod("image", "void Copy(const image @&in)", asMETHOD(CByteImage,Copy), asCALL_THISCALL); assert( r >= 0 );   and while it is accepted, the runtime runs into what seems an endless loop (well it does returns after 7 sec which is probably some protection in the angelscript), so I don't think this is how I am supposed to do it.   Any help & ideas?   BTW, speeds are pretty awesome. I use it for image processing (the looping through the pixels is the main toll) and the scripted version vs native code is about 10-12x slower. So if native version would be 35ms,, the scripted version would be for example 450 ms. I think that is pretty amazing.
  4. Oscar1

    AngelScript 2.26.3 is out

    Thanks, fantastic work. The asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE is definitelly going to be set TRUE in my project
  5. Oscar1

    What's everyone doing with Angelscript!

    Thanks, I do understand the left hand requirement, I just got surprised by the @ on right side of assignment. Anyway, it is logical.
  6. Oscar1

    What's everyone doing with Angelscript!

    The script works like a charm in the development version (plugged it all today). I started from your texture generator demo, creating similar image class, not realizing the library changed a bit from there... but I got my bearings very quickly.   One thing I would like to have more explained is the typing convention with the reference sign @. say you have void function(image @img) {...}   image@ img = @image(200,200);   function(@img);   is this @ on the function(@img) just for convention? Because it works as function(img) as well.   Same with the  image@ img = @image(200,200); omitting the @ from the front of image(200,200) works as well and seems to not do anything different, but is there any difference or it is all for convention?   [attachment=15627:angelscript.jpg]
  7. Oscar1

    What's everyone doing with Angelscript!

    I am working on a nodal graphical software Photo-Reactor and after three days of messing with the angelscript, I am 100% positive this will become a great part of the software. I previously contemplated to write my own bytecode interpreter as nothing I found was suitable and I need both 32 and 64 bit version. I am absolutely glad I spent the time looking around, the angelscript is exactly what I was after. Big kudos to Andreas. The angelscript is a beast. What I love the most is that it is c/c++ syntax and it is brilliantly plug-and-play. More about the project: http://www.mediachance.com/reactor/index.html  
  • 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!