Thursday, July 9, 2009

OpenGL time

Hello there. I stopped posting again. Darn it :P Well I will try to fill in the holes. But lets forget that, new plan is here.

Yep I decided to move from SDL bliting to OpenGL. One of the main things about this is performance. Because in my current games 90% of the games CPU usage is blendigg with SDL. IIf I create a game and use a background to blit and then everything else, then the game uses somewhere 60 - 70% of my CPU ( at 60 FPS ). Yea it is true that I have a AMD 64 3000+ 1.8Ghz CPU but still. That is a lot. So that is one thing.

Next. With OpenGL I have the option of 3D.  I don't play to start making 3d games ( to much work, math and stuff )  and at the end nothing interesting would come out. So 2D FTW. But I will be able to use 3D features with 2D images and so on. The next thing is rotation, morphing and these stuff with images ( textures in future ). I realy need to learn rotating images and so. So it will be more interesting.

Soo this is cleared. I will probably get through the basic tuts in a day or 2 with some example programs. 

Next thing Experimental gameplay Project is back. After some years ( i think ). That gives me an additional "morale" boost to make games in 7 days. The theme June was nonexperimental shooters. Now I am waiting for the july theme and start working on a game :D Go and pay the a visit. Here.

Hmm long post. But I will include a fast "how i did the circle detection " in my last game.

Picture first: ( fast paint )

So let me try to explain this. The game created red particles as an effect when you drew the line. In reality bigger collision boxes were created when you moved a certain amount of pixels. When you made a circle arround something and the last collision box collided with one of the first ones the game though that you made a circle. So it created a collision box by the folowing pattern:

The x from the collision box that was on the far left became the X of the big collision box.

The y ..................................... far top .... bla bla bla

You know what I mean.

It realy isn't anything special and the system can easily be abused ( by drawing a diagonal line and then back ), but it worked nice.

Bye for now :D

No comments:

Post a Comment