Mark Sibly

Forum Replies Created

Viewing 15 posts - 901 through 915 (of 1,431 total)
  • Author
    Posts
  • in reply to: #Import “*.png” or similar yet? #6382

    Mark Sibly
    Keymaster

    There’s no file filter yet, but you can import directories ‘to’ directories, eg:

    #Import “assets/images/@/images”

    The trailing ‘/’ after ‘assets/images’ means ‘import all assets in assets/images dir’.

    The ‘@/images’ specifies a dest dir in output assets storage, so you can access files here with “asset::images/blah”

    Windows XP is not ‘officially’ supported sorry.

    It may or may not be theoretically possible to get monkey2 going on Windows XP (and if you or someone else can get it going, I’m happy to add the fixes to the repos) but I wont be attempting this myself.

    in reply to: Object Events #6362

    Mark Sibly
    Keymaster

    Have a look in the modules/mojox/tests directory for some fairly useful how-to mojox examples.

    in reply to: How to init array? #6361

    Mark Sibly
    Keymaster

    … if only there was a wiki for all this stuff…

    This is fundamental stuff that *should* be in the language reference, not a wiki.

    It’s my fault it isn’t of course, and I’ll be spending some time soon updating the docs.

    in reply to: Emscripten default page #6314

    Mark Sibly
    Keymaster

    Working fine here – output file are in blah.products/Emscripten. Are you using the latest version of mx2?

    Not sure what’s up because emscripten shouldn’t be generating an html page at all – that needs to be copied in by mx2.

    in reply to: Keyboard.KeyHit appears to have auto-repeat #6311

    Mark Sibly
    Keymaster

    I’ve added a ‘repeating:bool=False’ param to KeyPressed (and KeyHit) now in develop branch.

    in reply to: Keyboard.KeyHit appears to have auto-repeat #6306

    Mark Sibly
    Keymaster

    It looks like Keyboard.KeyHit has auto-repeat, at least on MacOS.

    IMO, it shouldn’t and this MAY be a new thing.

    I’d like to fix this but am worried people are writing GUIs and depend on this behaviour – is this correct?

    Perhaps KeyHit (and KeyPressed!) could look like: KeyHit( key:Key,repat:Bool=False )

    in reply to: 3D Module #6305

    Mark Sibly
    Keymaster

    I’m planning on building something from scratch (although Urho3d looks mighty fine at a quick glance – never heard of that!).

    Native file format will probably be ‘gltf’, and I’d also like to implement the ‘assimp’ library as an optional module for model loading.

    Bullet physics will likely be ‘built in’.

    32bit/64bit is really down to the compiler env. This is an easy choice on macos/linux as 64bit is so common now it’s a no-brainer.

    However it’s a bit trickier on Windows as it *still* supports 32bit  – yes, even in 2017 – and I am guessing many of the new surface devices use 32bit windows (my several-years-old tablet does) so if you want your stuff to really run ‘everywhere’, 32bit is still the safest way to go on Windows.

    64bit for windows will happen eventually, but it’ll likely be a completely separate target and, unless you’re doing something that requires vast amounts of memory, I’d recommend not using it as you’ll only be limiting your potential audience.

    in reply to: Keywords 'As' and 'Is' #6304

    Mark Sibly
    Keymaster

    No, but I don’t really like the idea for a number of reasons: I don’t like using new keywords unless absolutely necessary and IMO casting should be a bit ugly anyway, as it can be a sign you’re doing something slightly dodgy.

    Also, I’m not a huge a fan of offering multiple ways to do the same thing unless it clearly achieves something. If Cast<>() can ‘do it all’ why confuse things?

    in reply to: SDL window resizing issue #6267

    Mark Sibly
    Keymaster

    You don’t mention the platform, but I’m guessing Linux?

    I’m gonna be taking a look at linux windows sizing issues this week sometimes, as it also affects the IDE.

    in reply to: Override question #6223

    Mark Sibly
    Keymaster

    When overriding a method, yes, you need to call Super.Blah or it’ll never be called.

    When writing a constructor, you can user Super.New(…) to explicitly call a super class constructor, in which case the call to Super.New must be the first statement in the constructor.

    If your constructor does not call Super.New(…) the super class must have a ‘default’ constructor  – ie: a constructor with no params – and this will be called for you before your constructor runs. Note that a default ‘NOP’ constructor will be automatically generated for any class with NO constructors.

    In monkey2, you can also use Self.New instead of Super.New at the start of a constructor. This will call a constructor in the same class instead of a super class constructor. A constructor can only call Self.New or Super.New but not both.

    in reply to: DEBUG MESSAGES on the Console #6222

    Mark Sibly
    Keymaster

    I think monkey2 needs a ‘log’ system…will look into it soon.

    in reply to: MacOS – EMSCRIPTEN Python2 Not Found #6221

    Mark Sibly
    Keymaster

    On macos, I think if you install emscripten to ~/emsdk, it should all ‘just work’ as this is where env_macos.txt expects to find it. Note that emscripten also requires python2, but apple did something to PATH in El Capitan that stopped it finding python2 via emscripten’s interrnal PATH. To get around this, I had to add this to bin/env_macos.txt – make sure you have it too (you should have so I’m guessing the problem is not that):

    PATH=/usr/local/bin:${PATH}

    In general, I don’t want to get too caught up with being responsible for the installation of (non-desktop) SDKs. I mean, feel free to ask and discuss here, but also be ready to do some googling etc if I/we can’t help or you could be waiting forever! This is esp. true of emscripten which is kind of ‘bleeding edge’ and is a pretty big/complex project. If you go for 3rd party help though, you might want to try and get an mx2-less hello_world.cpp working first (see download page I think) – if you can do that but mx2cc still doesn’t work, then it *is* my problem!

    I’ve found the emscripten google group to be a good place to get help with installation and building emscripten from source. And the authors post there too, so if you discover an installer bug it can get fixed in the release!

    in reply to: array in struct bug? #6122

    Mark Sibly
    Keymaster

    Arrays types are, like objects, reference types so are never ‘value copied’.

    in reply to: MojoX – ScrollView for displaying large images #6121

    Mark Sibly
    Keymaster

    Mojox is missing an image view – here’s a quick replacement for now:

    in reply to: MojoX -> RequestInt -> Can't suspend main fiber #6120

    Mark Sibly
    Keymaster

    You currently need to create a ‘fiber’ inside event handlers if you are writing blocking code, as event handlers run on the main thread and you can’t block the main thread or the entire app will halt.

    In this case, something like this should work:

Viewing 15 posts - 901 through 915 (of 1,431 total)