Git Product home page Git Product logo

bogey's Introduction

I’m a software engineer advocate of Self Hosting and Data Sovereignty. I work on Self Host Blocks to lower the bar of entry to these domains.

I am interested in distributed programming and declarative infrastructure as well as IoT electronics and smart home projects.

I’m working at Fastly on the Next-Gen Waf project, helping secure the web.

I’m the father of 6 wonderful children and married to a wonderful wife.

You can read some of my blog posts on my blog.

bogey's People

Contributors

bladehoarse avatar ibizaman avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cloudxtreme

bogey's Issues

Allow to move up and down

In the meantime that collision detection is working, it would be nice to allow the player to move up and down.

Add jump

Add jump movement based on gravity.

Move camera like in FPS games

The following keys should trigger the corresponding actions :

  • z -> move front
  • S-z -> sprint front
  • s -> move back
  • q -> straf left
  • d -> straf right

And moving the mouse should rotate the screen, limited to 89° up and -89° down to keep a realistic feeling.

Optimized cubes

The cubes should be optimized : faces that are next to each other should not be drawn.

A list of drawable faces should be created and only visible faces should be added to it. This can be done by separating the drawing of the faces from the Cube class to a Face class. A Cube would only have references to its faces.

Create cube with textures

We should be able to easily add cubes with textures.
There should be 6 faces (obviously) and only 3 textures : top, side and bottom.

add some simples forms

rectangle, square, cube, circle, sphere and maybe others forms

it will be usefull to create a basic world and testing new player's abilities

later, to create some tools for terraforming in a creative mode

Image size dependent texture mapping of cubes

The texture coordinates for the cube should be dependent of the size of the texture image.

The value of the ratio width/height of the image can help us determine what the modder wants :
If the ratio is :

  • 1 repeat the image on all sides
  • 2 the second square is on top
  • 3 the second is on top, the third is under
  • 4 the first is in front, the third on top, the fourth under
  • 6 the first is in front, the second is at right, the third in the back, the fourth at left, the fifth on top and the sixth under

Move on a surface

If you tilt de player up or down, the forward direction will be pointing up or down and if you move forward or backward you can climb in the sky.

Player movement should be restricted on the ground.

Cannot use sampler2D arrays in fragment shader

The fragment shader would be better if used like so :

#version 110

varying float fade_factor;
uniform sampler2D texture[2];

varying vec2 texcoord;

void main()
{
    gl_FragColor = mix(
        texture2D(texture[0], texcoord),
        texture2D(texture[1], texcoord),
        fade_factor
    );
}

But OSG doesn't seem to like uniform texture arrays.

At least his works :

#version 110

varying float fade_factor;
uniform sampler2D texture0;
uniform sampler2D texture1;

varying vec2 texcoord;

void main()
{
    gl_FragColor = mix(
        texture2D(texture0, texcoord),
        texture2D(texture1, texcoord),
        fade_factor
    );
}

Why is the first snippet not working ?

CTRL key bugs the movement of the player

Bug 1 :
Press another key than CTRL (e.g. S for back), then press CTRL and then release that other key. When you finally release CTRL, the movement for that other key is maintained (e.g. you still go back although no key is pressed).

Bug 2 :
Press CTRL then press another key, that other key movement is not performed.

It seems like the root cause is the fact that the detection of the press or release of a key is altered when a modifier key is pressed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.