Jump to content
  • Advertisement

93i

Member
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

117 Neutral

About 93i

  • Rank
    Member

Personal Information

  1. Ok, i'll give it a try, might work better
  2. 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: 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); } 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: array<array<int>> arr; arr[0] = {0}; gets me a: 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. 93i

    Web Game

    shameless plug: or you could try mine: http://gamvas.com (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. 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: 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); } } } Now if i execute the following 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); 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: class Image { Image(string name, float x, float y) { @inner = MyCImage(name, x, y); } void draw(float t) { inner.draw(t); } MyCImage @inner; } 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 engine->RegisterObjectBehaviour("SuperClass", asBEHAVE_FACTORY, "SuperClass@ f()", asFUNCTION(SuperClass_Factory), asCALL_CDECL); when i make a script like this: class MyClass : SuperClass { } 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
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!