python convert

Published December 13, 2007
Advertisement
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
Previous Entry work ethic? lol
Next Entry compo is over
0 likes 1 comments

Comments

Driv3MeFar
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.
December 13, 2007 06:28 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

Jonk, Inc

5384 views

13 Years later

2802 views

shadowers

1101 views

screwing around

1090 views

minimalistic cpu

1227 views

been a while

1075 views

ridin on bumps

1457 views

ms3dness

909 views
Advertisement