Jump to content

martyj

Members
  • Posts

    544
  • Joined

  • Last visited

Posts posted by martyj

  1. I'm not getting a request to set a cookie when I visit that page. When a server wants to add a cookie to a users browser, the server will send a "Set-Cookie" header.

     

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie

     

    A simple solution and one that I prefer is to use $_SESSION instead of cookie. That way the data is stored on the server instead of on the users browsers making it more secure.

     

    Make sure to call session_start() when working with $_SESSION.

  2. What Ma-Shell said.

     

    The nice aspect about this application is it can be deployed separately for 100% offline documentation.

     

    Another nice aspect is that if you deploy the application say with version 4.4 of Leadwerks, the documentation matches the code. Kind of self-versioning.

     

    I could try a JSONP request to pull down the documentation, the downside is it removes offline capabilities. We could also maybe use local storage to help with this as well.

  3. I still have a lot more work to do on this, but here is what I have so far on a documentation app.

     

    http://martyj.net/LEDocs/

     

    I'm planning on making it fully offline as I've wanted offline docs since forever.

     

    Things left to do:

    • Style page better
    • Parse XML to Javascript Objects
    • Generate NAV based upon XML
    • Support Page Changing with Nav
    • Load XML when you change the page

  4. I'd recommend you split up parameters like this.

    <parameters>
    <x>
     X component of the specified position.
    </x>
    <y>
     Y component of the specified position.
    </y>
    <z>
     Z component of the specified position.
    </z>
    <position>
     the position to set.
    </position>
    <global>
     indicates whether the position should be set in global or local space.
    </global>
    </parameters>
    

     

    Would allow for more flexible documentation. If I have some pare time I'll try to throw together a simple Bootstrap/Angular Material example together.

    • Upvote 1
  5. I am thinking of creating a minimap generator.

     

    I was wondering if anyone had suggestions on how to place the camera?

     

    You have a map of X by X size (512, 1024, 2048)

     

    You need to generate an image of Y b Y size (probably 2048)

     

    Position of the camera would be at Vec3(0.0, Q, 0.0)

     

    Where Q is the height of the camera.

     

    To have the projection where the map bounds end at the same bounds of the context, what height would you have to set your camera at?

     

    Is this just simple trigonometry?

     

    Q = X/Math::tan(camera->GetFOV()); ?

  6. In my game I use SetInput for camera rotation and movement The problem is that the camera doesn't rotate if the player is standing still.

     

    The code:

    
    if(cameraMovement())
    {
    double camMovementX = ((window->KeyDown(Key:) ? 1 : 0) - (window->KeyDown(Key::A) ? 1 : 0)) * strafeMultiplier;
    double camMovementZ = ((window->KeyDown(Key::W) ? 1 : 0) - (window->KeyDown(Key::S) ? 1 : 0)) * moveMultiplier * speedMultiplyer;
    
    this->playerModel->SetInput(cameraRotationY, camMovementZ, camMovementX);
    }
    else
    {
      	 this->playerModel->SetInput(cameraRotationY, 0.0, 0.0); // No movement if a menu is open
    }
    

×
×
  • Create New...