Why some things doesn't work in windows as they do in linux?

I have this project I’m making with Blender 2.76b, I’m making it in ubuntu, cause it is what I use. But I need to create a windows executable for people to test it and play it. But when I open the game with the same blender version in windows, some things doesn’t work, the greatest problem I don’t know how to fix is the moving plattforms, the character doesn’t move with them in the windows version. Look at the videos, that is a great problem in a plattform game.

on ubuntu works fine

on windows it doesn’t


Is the python version of both systems the same?

I don’t work with that and I have no knowledge of programming or creating games, but it could be relate to that, no?

What errors do you get Dunkelheit. Window → System Console to see if there are any errors.

Hi, well python version are different, linux is 3.5.2 and windows is 3.4.2. I’ve been looking but I can’t figure out how to change the version blender is using.

I got no errors in the console related to this.

You can’t change the version that Windows is using - it’s built into Blender on that platform.
This also means that the customers computer doesn’t need Python installed. Even if you’re using extra libraries, you can include them in your distribution.

Does that mean that you are getting errors? If so, what do they say?

ok so the same version of blender, uses diferent python versions, cause as I said I use the same 2.76b, but in the console blender says 3.5 for linux and 3.4 for windows.
The errors are really not related, they say valueError, invalid literal for int(), that is in the load save script, because I just put some nonsense text to fill the text files this script reads, so they are no valid numbers for the variable, that for the moment is not bad I think, because the game just load the values predefined in blender.

For my problem, I have been fixing some things and I think I can make it work, but it is a shame that switching to windows made me have to change settings and scripts that worked on linux. I am not a coder, I use logic bricks for most things, but I have some scripts I found to make things like load/save and other stuff.

Something doesn’t add up. If the problem was due to different Python versions (or anything else Python related), then you’d get errors in the console saying as much**. Does your save/load happen before some other critical initialization stuff in the same script that never happens due to the script error?

If it’s not Python related, then you shouldn’t be having issues… the same version of Blender will treat the blend file the same way on both platforms.

You could try 2.79b instead. That uses Python 3.5.

Maybe you could make a minimum viable blend that demonstrates the issue and upload it so we can take a look?

** assuming the person that wrote the script didn’t put try/excepts everywhere

what script you use for the platform?

Simply add platform velocity to player velocity should solve it

player.velocity.x += platform.velocity.x

Not if he has “depreciation warnings” disabled in the debug settings I believe.

I can’t remember seeing deprecation warnings in Python, but every other language I’ve used, they’ve been exactly that - warnings. It keeps working as expected, and the warning is for you to change things before they stop working in future versions.

Is that different in BGE/Python?

Besides, if OP is using the same Blender version then they’d get the same warnings/behaviour in both, right?

Maybe… But than again; this is Linux. :woozy_face: Their file structure is sometimes more complex…
I’ve been wondering lately if Dunkelheit has accidentally corrupted his Python library. I myself have done that in the past when messing around with startup files…

I know it’s been a long time, but in the end I learned this:

  • The fact that it worked on linux has to do with gravity, I have gravity set to 30… because that was the way I feel it naturally. When I lower the gravity in linux, the same thing happens with the plattform, character just slips and falls.
  • The plattfom movement was an animation. I think I has less fps in windows, and that was a problem.
  • I fixed this, making the plattform moves with a variable, simple motion and changing states.
  • Now it works in both systems.

Sorry I started this with 0 knowledge on coding, so almost everything is made with logic bricks. From some months ago I have learned C# and python, now I write more and click less.
Thanks to everyone.