abakobo

Forum Replies Created

Viewing 15 posts - 316 through 330 (of 455 total)
  • Author
    Posts
  • in reply to: What's the way to derive from structs #7954

    abakobo
    Participant

    Structs are copied by value, that’s why you are not supposed to make very big struct, it would slow it down. This makes another problem with inheritance, it would slow down it’s speed benefit if it could have ‘extends’. However you can use ‘extension’, but then it’s always the same struct name. The ‘extension’ keyword is not documented but you can find some examples in the forum:http://monkey2.monkey-x.com/forums/topic/possible-to-add-method-to-rect-with-extention/

    in reply to: Does monkey have macros? #7907

    abakobo
    Participant

    Macros are not there.
    There is aliases but not real macros.

    in reply to: Is 'Delete' reserved keyword for methods? #7891

    abakobo
    Participant

    Array, Delete and Friend are three reserved keywords I could not find when/where they are used. I’m interrested in some examples if they have any functionality.

    in reply to: Random numbers #7881

    abakobo
    Participant

    Do you import and use std?
    Rnd is part of std module.
    At the beginning of your code you should have:

    [/crayon]
    in reply to: Editor Crashes #7686

    abakobo
    Participant

    Looks pretty nice. I’m looking forward to test it!

    I had to copy vcruntime140.dll to ted21 folder because it’s not in my path. (old mx2 prob looking for it though it’s not necessary, I suppose it’s because you use an older mx2cc). It could be usefull to redist it in ted21 folder if allowed.
    I had to put ted21 folder it in my mx2 folder too of course.
    The first execution I could see no text, but then it was ok.

    in reply to: Redis integration #7573

    abakobo
    Participant

    there is the c2mx2 tool(src/c2mx2.monkey2, you have to install LLVM read readme of c2mx2).Tthat could do this for you automatically (with luck), it will be a good base and warn you for some parts that he could not glue correctly.

    I made some little exercices example for external imports here:
    https://github.com/abakobo/learn_monkey2/tree/master/externs
    https://github.com/abakobo/learn_monkey2/tree/master/char_t
    (not sure all this works fine 😉

    const does not exist in monkey2 so sometimes it is a problem (with abstract/pure virtual things mostly).
    for chars you’ll want to use libc module’s char_t types:

    [/crayon]

    unfortunately not findable in the docs because of some doc generation bug…

    in reply to: Static Lib Hell #7572

    abakobo
    Participant

    it could have something to do with compiler optimisation flags (I don’t know how to change them though!)

    in reply to: Struct goofiness #7571

    abakobo
    Participant

    In the docs:

    Structs

    Structs are similar classes, but differ in several important ways:

    A struct is a ‘value type’, whereas a class is a ‘reference type’. This means that when you assign a struct to a variable, pass a struct to a function or return a struct from a function, the entire struct is copied in the process.
    Stucts are statically typed, whereas classes are dynamically typed.
    Struct methods cannot be virtual.
    A struct cannot extend anything.

    So it should tell you may not extend struct and use virtual methods. Or structs are now extendable?

    in reply to: Static Lib Hell #7563

    abakobo
    Participant

    there are some automatic extern importers, you could have a try

    src/c2mx2.monkey2
    src/cxx2mx2.monkey2

    importing big libs is always not trivial though…

    in reply to: stream, binary file #7548

    abakobo
    Participant

    using absolute path returned by

    [/crayon]

    I could save where I want on W7 except my sys root dir (C:\ –> no error but no files)

    on OSX I can only save on user dir if on sys drive (memory acces violation if not user dir), everywhere on other drives

    the filter is not working on OSX so

    [/crayon]

    will crash too

    never used assetsdir(), desktopdir(),…

    all this should be reported on github when we have a clearer idea of where it actually crashes/not-working.

    in reply to: English Premier League #7543

    abakobo
    Participant

    Welcome!

    here is a little list of some educative content:

    THE pack of examples for now, probably the most educative content you can get (it’s in a forum sticky post):
    https://github.com/Pakz001/Monkey2examples

    A WIP tutorial on how to use chimpmunk and timelineFX, it has very nice comments and is step by step and actually covers a larger part of monkey2 than just chipmunk..:
    https://github.com/peterigz/Monkey2Tutorials

    There’s also a WIP monkey2 doc with a bit more info in the language reference section than in the current official distro (Pointers, Conditionals, Loops, Preprocessor, Index,…). You can avoid a lot of questioning by reading all the language reference (the “Monkey2>Language Reference” thing). It is not very long so I really advise you to do so.
    http://turdus.be/monkey2docs/docs/

    You should also read the mojo main doc page because mojo is the main Gfx module and it’s very usefull to understand its workflow:
    http://monkey2.monkey-x.com/mx2-docs/mojo-module/

    in reply to: stream, binary file #7534

    abakobo
    Participant

    use FileStream to write to a file (FileStream extends Stream)

    [/crayon]
    in reply to: Chipmunk + TimelineFX #7526

    abakobo
    Participant

    That’s Nice and Clean! Great step by step tutorial. Congrats! Looking forward to see things exploding.

    in reply to: Fixed Shooter #7380

    abakobo
    Participant

    here on W7 mx2 1.1.03

    [/crayon]
    in reply to: Canvas memory saturation (Bug?) #7351

    abakobo
    Participant

    Does this mean that canvas should discard the passed image!?

Viewing 15 posts - 316 through 330 (of 455 total)