Sign in to follow this  
  • entries
    47
  • comments
    63
  • views
    32013

python convert

Sign in to follow this  
NegativeGeForce

249 views

So, the last day or so I have been dwelling deep into the python cave. I have pygame + pyopengl running with a basic framework.

I always thought script languages were slow and gay. I was right about the slow part, but python is much easier to just write code with and get shit done. In c++ you have to lay down your entire design in header files and all that shit.


python = sucks + rules

In python. You just write the dam code. All the variables magically appear in the class as you define them in the actual functions. Its cool just to start writing a function and get workable code to use instantly. Oh yah, and no compile time, woot.

The bad part of python is I think it hates opengl. I wrote an Anglecode BMFont loader and render just like in my C++ code, but just a 30 character or so piece of text eats 1500fps or so. I am running an x1950 card now and a 1500fps drop from just some text is kind of stupid. I run 3500fps in my C++ code with text all over the dam screen.

I doubt its my code. I think its just the fact python is an interpreter language. I thought about trying py2exe, but that doesn't really "compile" the code. It just packages all the crap needed to run the program without the python install.

Either way I think its a great tool. With computers being wicked powerful and cheap I really don't know why I am complaining. Python is a great tool for small 2d games for sure. although its a BAD idea to use python for a larger 3d game, scripting the game code with it would work nicely for SURE.



48 game competition tools

I think I am ready for the game compo. The last piece I need to add is pyode and code up some more basic functionality to complete my RAD framework

the development environment is so much simpler with python compared to the big fat ide's of alot of languages. :P
Sign in to follow this  


1 Comment


Recommended Comments

Quote:
Original post by NegativeGeForce
The bad part of python is I think it hates opengl. I wrote an Anglecode BMFont loader and render just like in my C++ code, but just a 30 character or so piece of text eats 1500fps or so. I am running an x1950 card now and a 1500fps drop from just some text is kind of stupid. I run 3500fps in my C++ code with text all over the dam screen.


It's not as bad as you might think. FPS is not linear w.r.t. frame draw time, and your drop from 3500 to 1500 FPS only represents an increase of about 4e-4 seconds/frame (thats what, an additional .4 milliseconds per frame?). Once you get into the 100+ FPS range, it becomes much less valuable as a performance metric.

More info.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now