Upbge: Questions regarding this project

Hi I have a few questions regarding this project.

  1. Since it is under GPL license, do I have to legally disclose my source code for the game that I produce?
  2. Am I able to use Rust for this by any chance?
  3. Is this an extension or a fork of Blender? If it is a fork of Blender, wouldn’t it make more sense to have it as an extension?
  4. Is there some ECS integration or something? Or is this something planned in the near future?

all blends are yours to do with as you please and are your property. gpl only applies to code that directly interfaces with blender/upbge import bpy or import bge, etc.

rust isnt part of blender, is it? it probably has its own license and rules.

come on, we are all sick of answering these questions. use the search feature.

Ok so if I script something, lets just say to move a cube, would that code be under gpl?

Is there some binding out there?

to be on the safe side, keep you code separate in a scripts folder and import it into you game.

lets say you have a script called myawesomecode.py in a folder names scripts
then you simply import it into you project and it stays independent the same way importing Rust does.


import bge
from scripts import myawesomecode 

but no “import bge” in your code in you scripts folder

Ah I see, thanks

Keep in mind gpl on scripts using the bge module however you import it stays under gpl.

It’s not the fact that

import bge
from bge import logic

Makes your script(s) gpl bound, but using the module makes it bound. Meaning if you got a .py file where you import everyting

import bge
import my script
import 100 more of my scripts

Then that .py is gpl bound but also any script that is using the module, so ‘my script’ uses something like this:

scene = bge.logic.getCurrentScene()

Then that whole file is gpl bound as well. Unfortunately this can’t be avoided, because even with functions someday you will need the bge module to grab something.

But then again, for some things you can actually work around the gpl. Simply to use the same method as above, importing scripts, but then put everything that needs the bge module into the gpl bound script, and then import that script in your script.py and only call the function you need in your script.py.


#gpl bound script
import bge

def getscene():
    scene = bge.logic.getCurrentScene()
    return scene
# not gpl bound
import my_gpl_bound_stuff as my_script

def pingpong(cont):
    scene = my_script.getscene()
1 Like

We all give away amazing things, and the community and engine grows from it,

if you wish to make money from making something for the engine, do it up front.

make the thing, and get paid to release it for everyone.
GoFundMe - Kickstart - paetron etc.

GameDev is a science and should be treated as such.

1 Like

this is the wrong order, if import gpl-bound-stuff into non-gpl-code is the same as importing bge, you non-gpl turns gpl, if you want to avoid infecting you non-gpl code keep it a dependency.


One would think so indeed, but no it wil not be gpl bound, because import bge alone will not gpl the script. using 1 of the bge api’s makes it gpl bound.

As you can see in my example, the non gpl script does not use any api. the bound gpl script does.

I hear you think about yeah but you import script into script, YES! indeed and the non gpl script has nothing to do with gpl in this case, because the other script holds the code. (importing a script into a script will not make it 1 script, it stays 2 sepperated scripts(1 with and 1 without gpl))

So if anyone would ask to see your code, you only have to supply the gpl script with all the functions you use in your other scripts, as long as you do not use any bge api in your non gpl scripts.

So if you use one script to call bge and import all your scripts, and then use the bge.logic inside the imported scripts, then everything will fall under gpl.

1 Like