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 lit …
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 lit …
After getting the X-th virus on my computer (with Windows XP Professional), I decided to start using Ubuntu 11.04. I like it pretty much, although I’m still a bit irritated by …
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 …
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 …
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 …
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 sim …
I’m currently working on learning SDL and am also thinking about making my Mineshooter Projekt use SDL. Does anybody have experience with programming SDL-Applications and would advice against us …
Finally worked out the World-Collision problem. The player now collides perfectly with the blocks, but there is one problem left:
If you collide with a block in front on you, “you look inside the block”. That’s be …