Mark Sibly

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 1,431 total)
  • Author
    Posts
  • in reply to: Update rates (App, Scene, Physics, etc) #14859

    Mark Sibly
    Keymaster

    I just had a quick hack with hingechain by enabling VR and it seems to behave eactly the same as without VR.

    I didn’t play with UpdateRate at all – it defaults to 60, but it’s the elapsed time parameter that really matters here. A quick way to test the effect of different update rates is to remove scene.Update from OnRender and use something like this in your ctor instead:

    This works (with hingechain physics anyway) with every update rate I throw at it until I start using values less than 60, the default UpdateRate. To fix this, I need to either reduce UpdateRate to 30 or increase MaxSubSteps to 2, ie: either use one update at 30hz or 2 at 60.

    What you may be having problems with is the impulse stuff as I think. I believe impulse is ‘instantaneous’ so may have to be scaled by time somehow, will look into it.

    in reply to: Update rates (App, Scene, Physics, etc) #14858

    Mark Sibly
    Keymaster

    The Scene.UpdateRate and Scene.MaxSteps properties are only used by bullet when stepping the simulation – they are passed to this function:

    http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Stepping_the_World

    Thre first parameter of stepSimulation is computed by mojo3d and is simply the elapsed time since the last UpdateWorld.

    You should be able to determine HMD refreshrate by DrawText-ing App.FPS and looking at the app window with HMD removed, or even just by Print-ing it.

    On the Vive here, FPS is 90, but I seem to remember hezkore had to set SwapInterval=0 or he was getting 60?

    in reply to: Releasing modules #14857

    Mark Sibly
    Keymaster

    Thanks, the box2d module is now published and will appear in future releases.

    I haven’t had a chance to play with it yet, but it at least builds OK – well done, can’t have been easy!

    Anyone else who wants to have a go with it, just use the module manager from the build menu to install it.

    in reply to: Platformer Example #14845

    Mark Sibly
    Keymaster

    Is there a way to render a portion of an image without having to create new ones, as you do in the LoadSpriteSheet function?

    There are versions of Canvas.DrawRect that have a source image parameter, eg:  DrawRect( x,y,w,h,srcimage:Image,srcx,srcy,srcw,srch )

    in reply to: Releasing modules #14844

    Mark Sibly
    Keymaster

    If it builds OK, just get it out there I think!

    in reply to: Is there a way to change the window size/resolution? #14843

    Mark Sibly
    Keymaster

    > Yes a simpler official resize method would be nice…

    Ok, will do.

    in reply to: Is there a way to change the window size/resolution? #14828

    Mark Sibly
    Keymaster

    The View.Frame property can be used to ‘layout’ views – try adding this to your Window class:

    I’m reluctant to add this to the Window class as a ‘core’ method as it duplicates functionality that’s already there (ie: Frame). However, perhaps it would make sense to add some stuff like via built-in extension methods? This approach worked out well with Entity class IMO.

    And of course if your doing fullscreen there is also BeginFullscreen/EndFullscreen…

    in reply to: Is there a way to change the window size/resolution? #14823

    Mark Sibly
    Keymaster

    The easiest way is to override the window size in the window constructor.

    Have a look at the mojo template project – replace the 640,480 with your desired size:

    in reply to: Beginnings of my editor. #14797

    Mark Sibly
    Keymaster

    Not sure if it’s of any use to you, but I’ve just added a new ‘weak reference’ type that is already in the develop branch and will be in the next binary release in a few days.

    Weak references are mainly of use for writing ‘resource caches’ and the like – they are like variables in that they contain an object reference, only they don’t keep the object live for GC purposes.

    in reply to: Beginnings of my editor. #14762

    Mark Sibly
    Keymaster

    Looks very cool!

    in reply to: Compress/Decompress data buffers #14725

    Mark Sibly
    Keymaster

    So if I wanted to save a zip

    More functionality will need to be added to the ZipFile class before this can (easily) be done.

    in reply to: Compress/Decompress data buffers #14721

    Mark Sibly
    Keymaster

    Ok, haven’t done zip:: stream yet but you can now use Stream.SharedPath to get a unique path to an already open stream. This means the zipfile stuff is a lot nicer:

    in reply to: Space Pilot shooter game #14717

    Mark Sibly
    Keymaster

    Nice, all working A-OK here!

    in reply to: Compress/Decompress data buffers #14714

    Mark Sibly
    Keymaster

    See below for one possible solution. It loads a jpg image directly from a zip file.

    It’s not very nice though, a simple ‘zip::’ stream would be sexier, or even some way to pass a DataStream to Image.Load. Will look into this…

    in reply to: Bust! Some physics requests… #14708

    Mark Sibly
    Keymaster

    Hmm, I’ve done AmbientLight = 0 and all other lights 0, to no avail.

    You need to set scene.EnvColor=Color.Black too, or you’ll still be able to see specular reflections.

Viewing 15 posts - 31 through 45 (of 1,431 total)