Monkey2

This topic contains 6 replies, has 5 voices, and was last updated by  cocon 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5537

    DaY
    Participant

    so I have just found this website and I like the idear of monkey2(maybe not the name though)

     

    how close to blitzmax is it going to be? I never used monkey one as Max still works but struts , pointers etc sound way to good to not at least look at.

    im going through a book “real time rendering with DX and hlsl” and there is a precompiled lib could I bring this into monkey2? as I couldn’t get it to work with max.

    also has any one redone the nehe tuts yet and if so were are they as I cant find many tuts that interest me yet.

    #5577

    abakobo
    Participant

    how close to blitzmax is it going to be? I never used monkey one as Max still works but struts

    I never used Max…

    and there is a precompiled lib could I bring this into monkey2? as I couldn’t get it to work with max

    Theoretically Yes but it may require a lot of work depending on the size and complications you’ll encounter

    from the docs:

    System Imports
    System files are files that are generally provided with the compiler toolset, and that the compiler and/or linker are configured to find automatically. Monkey2 recognizes the following system file types:
    System file type suffix————System file type
    .o, .obj, .a, .lib—————–Static library.
    .so, .dll, .dylib——————Dynamic library.
    .framework————————-MacOS framework.
    .h, .hh, .hpp———————-C/C++/Objective C header.
    .monkey2—————————Monkey2 module.

    also has any one redone the nehe tuts yet

    Don’t know for Nehe but some people played with Opengl/monkey2 if you look in the formus..

    For basic Monkey2 there’s this one :
    https://github.com/Pakz001/Monkey2examples

    And the bananas, examples in the official monkey2 releases (I think there’s some opengl stuff in there?):
    https://github.com/blitz-research/monkey2/tree/master/bananas

    I also put most of my learning examples in a repo but it’s just some specific little things, some for external calls:
    https://github.com/abakobo/learn_monkey2

    There isn’t much for now. Most of what I learnt was with these or by reading most of the posts on this forum. When I have more time I hope I can start some tutos with examples and stuffs because MX2 needs it! But i’m not into GL. I like monkey because it’s at higher level than openGL..

    #5643

    DaY
    Participant

    Thank you for the reply im still trying to figure out using c++ I  import the code and setup the Mx2 class but my class has a union in it is there a mx2 version of union?

     

    [code]

    class vec2
    {
    public:
    union{
    struct{float x, y;};
    struct{float s, t;};
    struct{float r, g;};
    };
    vec2() : x(0.0f), y(0.0f){}
    ~vec2(){}
    vec2(float num) : x(num), y(num){}
    vec2(float x, float y) : x(x), y(y){}
    vec2(const vec2 &u) : x(u.x), y(u.y){}
    vec2& operator = (const vec2 &u){x = u.x; y = u.y; return *this;}
    vec2 operator – (){return vec2(-x, -y);}
    float* operator & (){return (float*)this;};
    vec2& operator += (float num){x += num; y += num; return *this;}
    vec2& operator += (const vec2 &u){x += u.x; y += u.y; return *this;}
    vec2& operator -= (float num){x -= num; y -= num; return *this;}
    vec2& operator -= (const vec2 &u){x -= u.x; y -= u.y; return *this;}
    vec2& operator *= (float num){x *= num; y *= num; return *this;}
    vec2& operator *= (const vec2 &u){x *= u.x; y *= u.y; return *this;}
    vec2& operator /= (float num){x /= num; y /= num; return *this;}
    vec2& operator /= (const vec2 &u){x /= u.x; y /= u.y; return *this;}
    friend vec2 operator + (const vec2 &u, float num){return vec2(u.x + num, u.y + num);}
    friend vec2 operator + (float num, const vec2 &u){return vec2(num + u.x, num + u.y);}
    friend vec2 operator + (const vec2 &u, const vec2 &v){return vec2(u.x + v.x, u.y + v.y);}
    friend vec2 operator – (const vec2 &u, float num){return vec2(u.x – num, u.y – num);}
    friend vec2 operator – (float num, const vec2 &u){return vec2(num – u.x, num – u.y);}
    friend vec2 operator – (const vec2 &u, const vec2 &v){return vec2(u.x – v.x, u.y – v.y);}
    friend vec2 operator * (const vec2 &u, float num){return vec2(u.x * num, u.y * num);}
    friend vec2 operator * (float num, const vec2 &u){return vec2(num * u.x, num * u.y);}
    friend vec2 operator * (const vec2 &u, const vec2 &v){return vec2(u.x * v.x, u.y * v.y);}
    friend vec2 operator / (const vec2 &u, float num){return vec2(u.x / num, u.y / num);}
    friend vec2 operator / (float num, const vec2 &u){return vec2(num / u.x, num / u.y);}
    friend vec2 operator / (const vec2 &u, const vec2 &v){return vec2(u.x / v.x, u.y / v.y);}
    };
    float dot(const vec2 &u, const vec2 &v);
    float length(const vec2 &u);
    float length2(const vec2 &u);
    vec2 mix(const vec2 &u, const vec2 &v, float a);
    vec2 normalize(const vec2 &u);
    vec2 reflect(const vec2 &i, const vec2 &n);
    vec2 refract(const vec2 &i, const vec2 &n, float eta);
    vec2 rotate(const vec2 &u, float angle);

    [/code]

    it shouldn’t be that hard but I seem to be dim today!

    #7082

    PD8
    Participant

    I have monkey 1 pro version, it’s ok ,

    I just tried mx 2 today , tried all the samples,

    emscription looks interesting , looks very power and promising.

    #7132

    TomToad
    Participant

    I guess you could emulate unions with properties

    #7138

    abakobo
    Participant

    the SDL_Event is a union in it’s SDL_events.h
    And SDL_Event is declared in extern section as a struct..
    Dunno if it will react exactly as a union but sdl2 events works!
    SDL_events.h

    [/crayon]

    sdl2.monkey2

    [/crayon]
    #7996

    cocon
    Participant

    For the record monkey2 has a Vector2 class, unless you want to increase your experience and writing it yourself. 🙂

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.