nerobot

Forum Replies Created

Viewing 15 posts - 331 through 345 (of 805 total)
  • Author
    Posts
  • in reply to: Ted2Go IDE #10447

    nerobot
    Participant

    Hi everyone!

    Meet totally new Find / Replace panel !

    Say goodbye to annoying dialog. 🙂

    • Ctrl+F – to find
    • Ctrl+H – to replace
    • Escape – to close find panel

    Just build ‘dev’ branch.

    in reply to: SystemCursor (wrapper class for SDL_Cursor) #10443

    nerobot
    Participant

    Yes, in some cases I use classes just as a container for functions.

    It’s convenient way for me – keep all similar functions in one place / scope / entry_point.

    in reply to: SystemCursor (wrapper class for SDL_Cursor) #10441

    nerobot
    Participant

    Here’s a proper class version of the above for you as well

    In what place it’s proper?

    1. System cursor is a global thing, so we can manege it the sane way – via global functions. In your case we must create instance or instances.
    2. Separated global consts bring some noise in autocompletion, if I would write game for mobiles, I will see them when type cur somewhere.
    3. You restore CURSOR_ARROW, but cursor might be not an arrow type.

    My class present not a single cursor – it is cursor manager. 😉

    in reply to: custom app cursors #10439

    nerobot
    Participant
    in reply to: Using 'private facades' to accessing protected members #10437

    nerobot
    Participant

    Limitation is – you can’t inherit if class is final.

    In my case I want to access to protected but somewhere in inner scope. So I put such bridges to private section.

    Also there is an Internal keyword that we can use inside of our modules to access private sections. Like friend keyword in c++.

    in reply to: Projecting vectors #10419

    nerobot
    Participant

    Is there a plan to add switcher for camera orthographic / perspective mode?

    in reply to: file system quick look #10399

    nerobot
    Participant

    What are you going to do with that?)

    in reply to: Extending Mojo3D #10384

    nerobot
    Participant

    As for me, component-based approach can be presented as a custom module – internal or 3d party.

    in reply to: Extending Mojo3D #10381

    nerobot
    Participant

    This is a bit of a compromise in that it doesn’t store entities in components, but stores a single entity per gameobject (which is effectively its ‘transform’ too) that you can access directly.

    As a variant. But storing (wrapping) entities in components allow us easilly replace mojo3d.entity with any other and our system will still work because we work with components not with raw entities.

    This means a gameobject can’t have both a camera and a light component – it must have one or the other.

    I checked it – unity3d allow us to place light and camera into single gameObject. So you can do it if you wish (although it’s looks abnormal way).

    in reply to: Extending Mojo3D #10366

    nerobot
    Participant

    Wow, cool! 🙂

    One thing I dislike here – using component string name. In my code above I achived this by Typeof().Name, because you can take a mistake in string but not in type name.

    cam=GetComponent<Camera>()

    Afaik, in unity you can’t directly create components, them exists attached to gameobject only. Private / internal constructor is here.

    When we call gameObject.AddComponent () we get new instance.

    In monkey we can also declare private constructor and call virtual protected OnCreate method.

     

    My undone approach is here: https://bitbucket.org/nerobot/cluequa2d

    I think my core code (GameObject, Component, Behaviour) is good enough. 🙂

    in reply to: Extending Mojo3D #10360

    nerobot
    Participant

    DynamicProperty looks good. And I like entity’s signals, it may helps to wrap entity into gameobject if we want to provide public gameObject.Entity property to work directly with entity. But need to add many signals in this case, like Moved, Rotated, Scaled.

    in reply to: Can't use Color in Select/Case statement #10350

    nerobot
    Participant

    And the same problem have a place if we create other struct like color with comparison operators.

    in reply to: Can't use Color in Select/Case statement #10349

    nerobot
    Participant

    Hmm. If we add operator <=> via extension, we get different error message

    Probably, something wrong in generated c++ code.

    Other operators <> ,< , > , = don’t solve error.

    in reply to: Can't use Color in Select/Case statement #10346

    nerobot
    Participant

    Because r/g/b/a components of Color is Float type, and Float is not comparable type.

    Try to run these examples:

    in reply to: Change color in a sprite #10345

    nerobot
    Participant

    Or you can write own fragment shader to process images.

    Little more info: http://monkeycoder.co.nz/forums/topic/image-with-texture-mask/

    My idea is

    • pass R1 G1 B1 /  R2 G2 B2 (to get by-component control) integer parameters into shader using Image.Material.SetInt( “R1”,200 ) method,
    • inside of shader get color components, translate them into integers (color has ‘float vec4’ type in shader) and compare with your R1 G1 B1
    • if there is a match – replace color with R2 G2 B2, converted back to float
Viewing 15 posts - 331 through 345 (of 805 total)