• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

117 Neutral

About 93i

  • Rank

Personal Information

  1. Ok, i'll give it a try, might work better
  2. [quote name='alraz' timestamp='1342008689' post='4957995'] It is possible to implement a script proxy class that gives a light wrapper on top of the application registered object, and then have the script classes inherit from the proxy instead. For example: shared class FSMProxy { FSMProxy() { @inner = FSM(); } .... [/quote] this works fine in general, but now i have the following problem: i have a class 'Drawable' that provides all functions for drawable objects, like move, rotate and so on... then there are class like 'Image' that does provide functionality on top of this class. so i have: [code] class Drawable { Drawable() { @drawableInner = NativeDrawable(); } function move(float x, float y) { drawableInner.move(x, y); } NativeDrawable @drawableInner; } class Image : Drawable { Image() { @imageInner = NativeImage(); } NativeImage @imageInner; } function test() { @img = Image(); img.move(10, 0); } [/code] So this example would move the '@drawableInner' c++ object, but not the @imageInner of Image. Ofcourse i can reimplement all the move and rotate and so on function in my Image wrapper, but thats ugly, is there a better way?
  3. Hi, i want to use a array in array, but none of the ways in the docs seem to work for me: For example: [code] array<array<int>> arr; arr[0] = {0}; [/code] gets me a: [quote] ERR : Expected expression value [/quote] I tried other ways, like arr[0].insertLast(0); or even arr.resize(1); arr[0]...; none seems to work. How is it supposed to work?
  4. Web Game

    [quote name='Serapth' timestamp='1344886164' post='4969171'] To help with your research, [url="http://www.gamefromscratch.com/page/Links-of-interest-for-HTML5-game-developers.aspx"]check out this list[/url]. It's a pretty comprehensive list of game development libraries for HTML5 development. [/quote] shameless plug: or you could try mine: [url="http://gamvas.com"]http://gamvas.com[/url] (which is not on this list :-/ ) , which was born out of more then 21 years of game development experience, but its quit at the beginning. Just in case you are missing something, do not hesitate to contact me
  5. thanx, those references gonna bug me a lot, thats for sure ;-)
  6. [quote name='dAgeCKo' timestamp='1344770249' post='4968685'] I am now looking for a good scripting language to use within C++ which will replace the current one (luabind). [/quote] Well in my opinion best two options are AngelScript ( http://www.angelcode.com/angelscript/ ) and Squirrel+Sqrat ( http://squirrel-lang.org/ + http://scrat.sourceforge.net/ ) Squirrel itself does not support C++ out of the box, but the Sqrat wrapper makes it really easy to extend c++ objects. While Squirrel+Sqrat are easier to integrate, AngelScript is much faster and has the better support (this forum ;-) but requires you a lot of more typing.
  7. Hi there, i am trying to build a state system with AngelScript, here it is: [code] class GGameState { string name; GGameState() { name = ""; } GGameState(string nm) { name = nm; } void update(float t) { print("update in base class"); } } class GStateManager { dictionary states; string currentState; void addState(object@ st, bool makeCurrent = true) { states.set(st.name, st); if (makeCurrent) { currentState = st.name; } } void update(float t) { GGameState @state; if (states.get(currentState, @state)) { state.update(t); } else { print("notfound "+currentState); } } } [/code] Now if i execute the following code: [code] class MyState : GGameState { MyState(string nm) { super(nm); } void update(float t) { print("update in state"); } } GStateManager @man = GStateManager(); MyState @mainState = MyState("aggi"); man.addState(mainState); man.update(0.1); [/code] I get "update in base class", not as i would expect (and want) "update in state" How can i achieve this in angelscript? Thanx
  8. I have a C++ class for a image. In constructor, it creates a opengl texture and provides a draw function where it binds the texture and draws a quad with the texture on it. I have a angelscript wrapper that looks like this: [CODE] class Image { Image(string name, float x, float y) { @inner = MyCImage(name, x, y); } void draw(float t) { inner.draw(t); } MyCImage @inner; } [/CODE] When i create a c++ object in my application and draw, everything is fine, but when i create a angel script object and draw via angelscript, drawing in general works, the quad shows up and if i give every vertex a color, it shows the vertex colors, but the quad is untextured. Any idea what this could be?
  9. Hi, i am new to angelscript and i'm trying to make a game engine scriptable, where i have C++ objects and i want certain methos of this objects be overwriteable from angelscipt. I have the class registered with [CODE]engine->RegisterObjectBehaviour("SuperClass", asBEHAVE_FACTORY, "SuperClass@ f()", asFUNCTION(SuperClass_Factory), asCALL_CDECL);[/CODE] when i make a script like this: [CODE]class MyClass : SuperClass { }[/CODE] i get a error message: Can't inherit from class 'SuperClass' marked as final Can i 'unset' the final, or is this not possible, and if it is not possible, what would be the best (as in the easiest for the script author) to achieve a similar beavour, so that a script editor can overwrite methods, like for example onCollision()
  • Advertisement