Jump to content

tec.imp

Members
  • Posts

    39
  • Joined

  • Last visited

Posts posted by tec.imp

  1. Hey there,

     

    I've got a problem regarding the function CreateTexture in 2.31 and the later use of the all new created texture object.

     

    Here's what I do (pseudo code):

     

    myTexture = CreateTexture(256, 64, TEXTURE_RGBA);
    
    BindTexture(myTexture, 0);
    <1. render stuff and flip>
    
    UpdateWorld();
    
    BindTexture(myTexture, 0); // <- crash
    <2. render stuff and flip>
    

     

    As you can see, this is nothing fancy. I create a new texture object, bind it, render some stuff, see it on screen, update the world and render some more stuff. You may say that the texture is empty. Well it is but that's only for testing purpose and shouldn't cause any problems now, should it? Well, wrong.

     

    It crashes on me within the second render part. Apparently, the pointer/handle/whatever to the texture object is now invalid and the engine will crash. However this behaviour isn't true for textures being loaded from file. Wth?!

     

    If I remove the UpdateWorld() call everything is just peachy. I do suspect the BlitzMax Garbage Collector of being overeagerly doing its work. Seriously, what's going on here?

     

    Josh, maybe?

     

     

    Mfg Imp

  2. Dear forum,

     

    so I made my camera entity child to another entity which I move and rotate around the world. Rotating the other entity, and thereby its camera child, though, produces at times some strong jittering; sometimes when trying to rotate to some direction the camera shakes left and right wildly and slowly comes to rest at some middle point, while sometimes it works smoothly as intended.

     

    Now, I've read that one shouldn't use parenting with camera entities. However, the results are the same if I don't use parenting and just Get/SetMatrix or just copy position and rotation manually. I don't have a large level either, just about 50x50 units.

     

    Any ideas?

     

     

    Mfg Imp

  3. They do work, although I can't say if they work as intended. The discrepancy in resulting movement speeds (for controllers as well as for objects falling due to gravity) becomes quite apparent to the naked eye with framerates of 60 and 250, which I achieve by enabling/disabling vsync.

     

    Thanks for trying to help.

     

     

    Mfg Imp

  4. Hey there.

     

    The Wiki gives some definition of the value AppSpeed returns (60/UPS?), and in particular that it is to be used to achieve framerate-independent movement. From looking at the values returned, they seem to also be averaged/curved in some way.

     

    UpdateController produces movement speeds subject to framerate, with faster framerates producing slower movement. Multiplying the input movement vectors of UpdateController with AppSpeed produces similar results: faster framerates produce slower movements. Then again, multiplying the movement vectors with my own delta time produces this effect too, leaving me to conclude that UpdateController already factors time into its calculations by its own.

     

    This leaves me with UpdateWorld and the step size I supply - AppSpeed - which I assume is the abovementioned time factor that controllers use. However, not only does UpdateWorld(AppSpeed) not produce framerate-independent movement at controllers, to my surprise it does not seem to produce framerate-independent updates at all. This becomes evident in the fact that gravity (as measured in the speed of falling objects) is subject to framerate as well (again, faster framerates produce slower falling objects). :blink:

     

    So, how am I to achieve framerate independent movement using controllers in Leadwerks, and for that matter, world updates?

     

    Thanks in advance.

     

     

    Mfg Imp

  5. In case someone cares, I managed to get atleast the finalization part done.

     

    It does work just like Josh said, it does unload the Dll. Within my dedicated server i do have two threads, one main thread taking care of the gui and one of handling the game stuff aka the server part. The server part does load the lw engine and other stuff and when it is done it destroys the thread and the engine dll with it because its within the same process.

     

    So the next part will be writing a null opengl32.dll. Anyone here who actually has done something like that or can me point to a already "finished" wrapper?

     

     

    Mfg Imp

  6. Well i guess i found a way to fix it.

     

    As you use the Abstract Path you have to set it first with:

     

    Leadwerks.FileSystem.AbstractPath = "Data";
    

     

    After i did this, it works just fine :P

     

    PS: However its wired that it does crash if you don't set it, that shouldn't be the case.

     

     

    Mfg Imp

  7. Thanks Josh that sounds great! A null Renderer is exactely what I'm looking for.

     

    Is there an estimate release date for ver. 3.0 ? (I guess when its done :)

     

    Until then I was thinking of writing an Opengl32.dll wrapper which bypasses the LW initialization. The thing is, I dont have a clue what LW is asking Opengl32.dll and what i have to give back to let LW think all is fine while it actually is not :P

     

    Any thoughts ?

     

     

    Mfg Imp

  8. Hey there,

     

    as a result to the problem ZioRed and I had/have i would like to request two API functions which allows us to:

     

    1) Initialize the engine with or without graphic initialization (think dedicated server)

    2) Finalize the engine while not shutting down the whole application. (unloading the dll is one way, but rather clunky)

     

    About the first part I really like to see this because it is imperative to me to be able to build a dedicated server with full scene/physics but without any graphic support.

     

    Thank you.

     

     

    Mfg Imp

  9. Seems an odd feature request. Why not just stop using AddForce() if you don't want it to affect the controller? And if the request is handled, why not introduce a flag indicating whether the controller should be subject to physics or not?

     

    But thanks for your reply :)

     

     

    Mfg Imp

  10. Hey there,

     

    I was wondering how one would go about using a controller with a model that is, ultimately, to be affected by physics. My first attempt was to parent the model to the controller and have the controller handle all collisions, while the model has no collision responses at all; this works fine for movement, gravity and collisions with other objects, if somewhat inaccurate due to the cylinder shape of the controller, but the controller seems unaffacted by any physical forces manually added (e.g. AddForce()), regardless of whether I call UpdateController() or not.

     

    Is there some recourse other than writing my own controller on top of bodies that receive force by user input? Am I missing something?

     

    Thanks in advance.

     

     

     

    Mfg Imp

  11. Hey there,

     

    as the topic stated I does run into some issues regarding LW Engine init / shutdown handling.

     

    I'm working right now on a dedicated server and I'm unable to create the LW engine without poping up an graphics window in my face. Even "better" I just can't shutdown the engine without shutting down my whole application.

     

    I'm really lost on how to init the engine WITHOUT an graphics window, I just don't need it. And is there a way to shutdown the engine without terminating my application?

     

    Thanks in advance.

     

     

    Mfg Imp

  12. Thanks ZioRed,

     

    thing is delegates produce some overhead structural and memory wise and for such things like Point(x,y), Size(Width, Height), etc. I think it's too much. Well one solution I found was immutable objects which is what I implemented to get rid of the overwriting and not get notified (setter not called) ****.

     

    I really wonder why C# does not implement such a behavior in the first place...

     

     

    Mfg Imp

  13. Hey there,

     

    i bumped the other day into a little problem regarding C#'s properties.

     

    Let's say i do have this setup:

     

    public class Point
    {
    public float X;
    public float Y;
    }
    
    public class Control
    {
    protected Point m_Position = new Point();
    
    public Point Position
    {
     get { return m_Position; }
     set 
     { 
       m_Position = value; }
       // reorganize internal structure..
       reorganize();
     }
    
     protected reorganize()
     {
      // do some stuff
     }
    }
    

     

    This is all fine, but when it comes to usage, i could write something like:

     

    Control myControl = new Control();
    myControl.Position.X = 1.0f;
    

     

    The thing is, my Control class wont recognize that the Position has been changed because set hasn't been called.

     

    So i guess my question is, is there a way to make Control aware of any Position changes?

     

     

    Thanks in advance!

     

    Mfg Imp

  14. Hey there,

     

    I recently played around with shadows within the engine and came across a wired shadow artefact of some kind. Well images do speak more then thousand words, don't they :unsure:

     

    shadowbug.th.jpg

     

    What exactely I'm seeing here? There is some kind of shadow lod and a fish eye? effect. Is it possible to disable this or is this a gfx bug of some kind?

     

     

    Thanks in advance!

     

    Mfg Imp

  15. I use C# all the way and thanks to the work of Ubu it works quite well :)

     

    I used to use C++ until now and it does the job quite well, but i wanted to try something new and i was, and still are, surprised how well C# does get the job done. You get so much functionality right out of the box, thats quite awesome!

     

    Mfg Imp

×
×
  • Create New...