Showing only posts tagged mineshooter. Show all posts.

Open GL ES 1.1 and 2.0

I recently stared messing around with the simple sample app from the WebOS pdk a bit, trying to draw with vertex buffers and so on. I had a few problems, since the sample app used Open GL ES 2.0, which basically means you have to do everything yourself (Doesn …

Rendering Text!

I somehow feel happy about finally being able to render Text ;)

image0

I’m using the Freetype Library and OpenGL. I thought about using SDL TTF, but somehow I ended up deciding on this :)

This post was imported from tumblr.

World optimization (lvl 1): Bugs

Okay, here are a few bugs in order of appearance:image0

It wouldn’t bother if you could only look at the world from above, but… imagine a mountain looking like this! (I also like how you can see the different layers of block types ;) )

image1

(You can see exactly how high …

World optimization: level one

One of my last posts was about back face culling. This was because of my performance problem while trying to render 130 000 blocks smoothly. I also said I was going to optimize the world data a little bit before applying shaders (I didn’t know I was already using …

back-face culling

I recently found a tutorial on back-face culling. It means telling OpenGL not to draw invisible faces (faces on the back side ;) ) of a mesh, which does speed up the rendering a lot.

I was looking for something like this after I increased the height of the world in Mineshooter …

Mouselook and SDL - Code

Okay, here is some code for mouselook with SDL

struct {
              int x, y;
              //In this case: the position where the mouse is held at
              bool trap; //flag for holding mouse at one place
          } mouse;

          void MouseMotion(){
              /* Set x and y to the current mouse position */
              int x, y;
              SDL_GetMouseState(&x …

Fixed the SDL and Mouselook Problem

After spending hours trying to figure out why my mouselook function didn’t work with SDL, I finally got a solution.

The problem was that I didn’t use SDL_PumpEvents() before calling SDL_GetMouseState(). But if I do that I get the next problem: my Keyboard Events get delayed because the …

Mineshooter with SDL...

Almost done with rewriting Mineshooter to work with the Simple DirectMedia Layer Library. Still have a few problems with the mouselook, but I should be able to work out a solution very soon.

SDL is quite simple. I now have about 150 lines less than when I used the Windows …

page 1 | older articles »