Blender compiling games????

(rav_bhara) #1

Now i think blender doesnt compile the game, it just packs the blend file with the exe. Ami right??? But would games be faster if it was actually compiled??? Thanx ppl

(Goofster) #2

call me stupid, but doesn’t every game do that? models are sepperate and the engine puts it all together?


(S_W) #3

As far is I know the .exe only attaches the .blend file to the stand-alone player and that’s it! :wink:

(bmax) #4

big deal…who cares as long as it works…sheesh! :-?

(Psilocybin) #5

You are sayiong that blender doesn’t compile so that would mean that it uses python interpeted.


Interpeted is way too slow are you guys serious about this?

What is the speed of intrerpeted python scripts versus compiled code?

If this is true I will consider leaving :stuck_out_tongue:

(IngieBee) #6

blender compiles the scripts. you can also use precompiled scripts, I believe, but haven’t done that myself. But it does get compiled before being used.

(sara) #7

do you remember that froggy.exe?

i think it was about 500k and with publisher i cant get a .exe smaller than 1.5mb even if the .blend is 1k.


(saluk) #8

Most games on the market have an ENGINE, which is an exe that remains the same for all games using that engine, and they have the CONTENT which is all the maps, scripts, models, textures, etc that go along with the game. Blender is no different. The exe is the ENGINE (the blender game engine) combined with the CONTENT (the .blend file containing scripts, models, textures, etc). It is no different than any other engine.

Psilocybin: the scripts are python compiled, which makes them a little faster, but nowhere near compiled speed. But most games out there use a scripting language similar to python. Scripting languages are plenty fast enough for what you would use them for. All the things that need to be run FAST (such as rendering the graphics, and keyboard input) are part of the blender player which is COMPILED.

(Psilocybin) #9


so does it compile the python scripts realtime or are the python scripts pre compiled ( can also be when loading the game ). If Python was to be compiled in game that would mean a serious effect on the framerate but if Python was compiled during loading time or even before that I would assume it would be as fast as any other scripting langauge.

What is pythons speed anyway.
We ought to make a test with a few languages perl PHP C C++ python VB and let them all fill a 15 megabytes large array with random low level variables and check with a stopwatch how long it would take to complete this task. Or some other speed test. How do you test the speed of langauge anyway can that be done?

(saluk) #10

Python is very fast. I belive the scripts are compiled the first time you run it and then they are saved as compiled, so second runs it doesn’t have to compile them again (unless you change the source). It might compile them realtime the first time the script is executed, but I don’t know. I wouldn’t worry about python speed, as from what I’ve seen using logic bricks is much slower than python anyway.

Unless you are doing something very complicated, python execution speed is not a problem.

There is ONE problem with using python however, and it has to do withwhen blender executes the code. When python is run, the game engine doesn’t seem to be run. So if you set the position of something it wont change until the script finishes. You can’t use infinite loops in python, because it will completely freeze the game. This can cause about a 1 frame delay for any script execution, so that can be tricky to get around.