Mark Sibly

Forum Replies Created

Viewing 15 posts - 1,276 through 1,290 (of 1,431 total)
  • Author
    Posts
  • in reply to: Julia set fractal generator optimisation (drawpoint) #2214

    Mark Sibly
    Keymaster

    Had a quick go at speeding this via render-to-pixmap and it’s not bad – was going 22FPS-ish, now does 60 if the mouse is at the edges!

    A bit of hackery involved – it draws directly to a pixel ‘ptr’ instead of SetPixel( x,y ) so it’s not recalculating pixel address all the time.

    in reply to: audio #2211

    Mark Sibly
    Keymaster

    > What I would really like to see is some kind of direct access to the audio buffer in mojo.

    There is actually limited/experimental support for this in now – see my blog update, but note there are issues with doing realtime stuff like audio in a single threaded app.

    There’s a little demo in the vsynth bananas folder called vsynth_mojo.monkey2. It basically does the same thing as vsynth – ie: realtime audio generation – only through a single openal audio channel, so you can mix it with stuff playing through other audio channels easily. I have no idea how well it runs on other machines though!

    in reply to: Graphics Driver? #2210

    Mark Sibly
    Keymaster

    Mojo uses the GLES20 API exclusively.

    However, Windows builds use ‘angle’ to convert GLES20 to D3D9/11 calls.

    You could theoretically switch to using native GLES20 on Windows, but I don’t think you’d gain much, if any, performance, and you’d lose a lot of compatiblity.

    in reply to: Parsing bug #2200

    Mark Sibly
    Keymaster

    Thanks, will fix, but please post bugs in the ‘issues’ thing at github in future, or I may miss them.

    in reply to: Class fields overlapping? #2145

    Mark Sibly
    Keymaster

    This turned out ot be a ‘spaces in filename’ build issue, but was kind of fun to find.

    The main problem was that mx2cc wasn’t recognizing a file had changed so wasn’t rebuilding it.

    But each time I tried to add something to the monkey module to do some testing, this was enough to trigger a rebuild! So I ended up having to add a new foobar field after each modules update – I ended up with about 5 foobars before it clicked what was happening…

    For a while it seemed like the ultimate heisenbug – each time I tried to measure it, it very predictably disappeared!

    in reply to: Can't debug #2135

    Mark Sibly
    Keymaster

    Nope sorry.

    I no longer even have a CD of Windows 7, although I guess I’m gonna need one sooner or later if there are problems with mx2 apps not running on it.

    And to be honest, I am not really keen on supporting Windows 7 as a dev platform. It’s officially reached ‘end of mainstream support’ and more and more stuff is just gonna break on it over time.

    There’s also the time factor for me – I’m already supporting 3 (soon to be 5) dev platforms and I just don’t like the idea of having to support another.

    Yeah, it sucks if you don’t like Windows 10, but that’s just the way it is if you’re a developer. I’m kind of lucky – I hate all versions of Windows equally so changing up has never been a big deal.

    Of course, if anyone can come up with fixes for Windows 7 that don’t break Windows 8/10  I’m happy to implement them – I could sure do with the help!

    in reply to: Help with an OpenGL sample #2130

    Mark Sibly
    Keymaster

    Monkey2 currently only implements GLES2.0, which means you need to create shaders and so on before you can draw anything.

    Also, you can’t yet render directly to OpenGL in mojo – coming soon though.

    in reply to: Geometry Wars style glowy lines and particles #2118

    Mark Sibly
    Keymaster

    Looking forward to next screenshot!

    in reply to: Geometry Wars style glowy lines and particles #2116

    Mark Sibly
    Keymaster

    As for lines (ie. DrawLine) they don’t appear affected by this change for glowy line style drawing.

    I think they are – the intersections between the bright and dark blue lines appear to be slighty brighter.

    But that may be an optical illusion! Another thing to remember is that blending results are clamped to [0,1]  so adding Color( 0,0,1 ) to Color( 0,0,.5 ) will still give you Color( 0,0,1 ).

    I just hacked in a LineWidth too, now up at github, although it’s not very clever. It basically just draws a rotated rect if LineWidth>1 and, unless blendmode is Opaque, attempts to ‘smooth’ it. The ends of the line are ‘hard clipped’ so it looks more like a cylinder if LineWidth is too big, but it’s not bad for a quick hack IMO.

    I really want to wait until shaders are going before getting too carried away with this stuff, but this should give people something to play with until that happens.

    in reply to: Maybe something wrong with Generics? #2112

    Mark Sibly
    Keymaster

    What error do you get?

    How do I reproduce the error?

    Also, there’s a version of Deque coming to std soon..


    Mark Sibly
    Keymaster

    Ok, possible fix is now up at github.

    Copy from console is indeed a little broken. Try ‘copy’ from the edit menu instead of ‘ctrl-c’, works here.


    Mark Sibly
    Keymaster

    Can you post the error?

    I’m guessing it’s the 8K command line character limit, will fix ASAP.

    in reply to: Defining preprocessor directives #2088

    Mark Sibly
    Keymaster

    I should perhaps clarify a bit…

    What I’d really like to add instead of #define is ‘StaticIf’.

    This would be a bit like a normal If, except it can appear *anywhere* in a program, not just in a block of statements.

    StaticIf expressions must be constant, but they can also include type comparisons which makes StaticIf also useful for kludging up generic code when necessary.

    The big issue with #define is that (the way it’s implemented in bmx and mx1 anyway) it happens during parsing, so is sensitive to ‘order of imports’ issues, eg:

    …will not print “YES” on bmx (I think) or mx1.

    It’s obvious in this case, but when you have a #define in one file and a dependant #if in another (and potential cyclic file dependancies) it can all get a bit hairy.

    ‘StaticIf’ solves this because it happens on the semant phase, after parsing, so this:

    …will actually print “YES”.

    Another thing I like about StaticIf is that code that is not generated because the StaticIf fails is still actually parsed, whereas #If just skips the code altogether, even if it’s full of garbage.

    Once StaticIf is in, the current __TARGET__, __HOSTOS__ etc symbols could also be implemented as simple Consts inside, say, a monkey.build namespace. This way, you’d be able to use them for both conditional compilation and directly in code.

    Not sure when this’ll happen though – and if anyone can come up with a better name than StaticIf…

    in reply to: Defining preprocessor directives #2076

    Mark Sibly
    Keymaster

    You can’t yet…

    in reply to: Geometry Wars style glowy lines and particles #2075

    Mark Sibly
    Keymaster

    Try BlendMode.Additive.

Viewing 15 posts - 1,276 through 1,290 (of 1,431 total)