Mark Sibly

Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 1,431 total)
  • Author
    Posts
  • in reply to: Playniax news #4708

    Mark Sibly
    Keymaster

    Looking good!

    How are you doing the music?

    in reply to: extern C const pointer #4706

    Mark Sibly
    Keymaster

    > If this is possible it could be a good solution for automation.

    This wont work, because the munging needs to be done on the mx2 function, and since a function pointer can point to *any* function the compiler can’t know which functions to mung, eg if the compiler sees a function such as:

    Function MyDebugDraw( p:cpVect Ptr,…)

    Should the compiler use ‘const’ or not? It doesn’t know if it’s supposed to be used with a debugdraw function ptr or not. It *probably* is – although even that would be hard to work out – but it can’t know for sure.

    in reply to: Layering lighting. #4703

    Mark Sibly
    Keymaster

    I’d recommend doing things like this if possible:

    For each layer:

    Draw unlit background (if any)

    BeginLighting

    Add lights and draw any opaque/alpha stuff that needs to be lit.

    EndLighting

    Draw non-additive particles (if any)

    Draw additive particles/fake lights.

    Draw unlit overlays (if any)

    Next

    Drawing particles/fake lights inside lighting should still work, but it will incur extra overhead.

    in reply to: Layering lighting. #4700

    Mark Sibly
    Keymaster

    > Can I do a loop like in this pseudo code?

    This should work fine, just remember that EndLighting() clears out all add lights and shadowcasters, but that’s generally what you want if you’re doing ‘layers’.

    Beats the hell out of the old ‘renderer’ system doesn’t it?

    in reply to: extern C const pointer #4699

    Mark Sibly
    Keymaster

    Nice hack! But it’ll mean you end up with 2 unrelated cpVert classes wont it? Perhaps that’s not a problem though, or perhaps it’s a rare enough issue – it should only be a problem with function pointers like this I guess.

    I guess the user can always cast a const_cpVect Ptr to a plain cpVect Ptr if they only want to deal with the 1 type. In fact, perhaps const_cpVect should be ‘anonymous’ and they should have to do this? This would be easier to automate anyway.

    in reply to: Alien Phoenix #4686

    Mark Sibly
    Keymaster

    Adding in per-bullet lighting quickly spikes usage and with 100 or so lighted bullets the GPU usage will zoom to 65%.

    That’s still pretty cool!

    My plan is reserve per-bullet lighting to special weapons that tend to be a single bullet object.

    If it’s a rapid fire type game, how about using a real light for the first bullet fired after some timeout, eg: 1 second? Would make the ‘head’ of the bullet stream stand out a bit.

    in reply to: Add Variants to a List not working. #4685

    Mark Sibly
    Keymaster

    Just looking into some of these issues right now, and have it mostly working.

    The tricky bit at the moment is comparing variants, so for now I’m going to leave comparisons as simple ‘identitiy’ comparisons.

    This means 2 variants will only be equal if they are the *same* variant, not just 2 variants containing the same value.

    in reply to: Bump map Bleed. #4649

    Mark Sibly
    Keymaster

    Ok, a fix for this is now up.

    A couple of notes:

    • Alpha is taken from the diffuse map so normal map can be a 24bit png. Ideally, normal maps should probably ‘blend to’ Color(0.5,0.5,1.0) where alpha=0. This value represents ‘flat’ in terms of normal maps.
    • Specular map is monochrome (only red channel is used if png is color) so can be an 8bit png. Specular actually ends up in the normal texture alpha channel so bump mapping only involves 2 textures.
    in reply to: Reflection and interfaces #4643

    Mark Sibly
    Keymaster

    Ok, interfaces are in but not well tested!

    in reply to: I hessitate to ask but… UDP? #4642

    Mark Sibly
    Keymaster

    Ok, that should all be working pretty well now, have a look at the updated echoserver_udp banana.

    in reply to: Reflection and interfaces #4638

    Mark Sibly
    Keymaster

    You can’t yet, only non-extern/non-generic classes are fully implemented right now.

    Other types can still be used with variants (so can be used as invoke parameters/return values) but will generate an ‘Unknown’ typeinfo.

    Interface support should be pretty easy to add, but support for generic types is a while off yet and I suspect that’ll be what you need next!

    in reply to: I hessitate to ask but… UDP? #4626

    Mark Sibly
    Keymaster

    It might still be a bit dodgy – finding a few issues on Mac. Will keep hacking tomorrow.

    in reply to: I hessitate to ask but… UDP? #4624

    Mark Sibly
    Keymaster

    Ok, udp is now in.

    I’ve added an echoserver_udp banana to give you some idea of how to use it.

    I also modified the socket architecture a bit which may break existing code if anyone’s using it, but nothing major.

    in reply to: I hessitate to ask but… UDP? #4619

    Mark Sibly
    Keymaster

    If memory serves Monkey 2 is using EFFNET?

    Nope, never heard of EFFNET.

    Monkey2 currently only supports IP4/6 TCP sockets, which should be easy to make work with client/server UDP so I’ll have a go at that now.

    in reply to: Problems in v1.0.9, /native/bbvariant.h #4616

    Mark Sibly
    Keymaster

    Should be fixed now.

Viewing 15 posts - 1,036 through 1,050 (of 1,431 total)