Hahaha, the power of the command-line interface. I have developed a way to make your games run, in full screen, using a batch file in windows. You could come up with a similar distribution method from linux, but I’m not familiar with blender under linux.
All you have to do, is distribute your .blend, along with the blender exe and the python dll. Use word or some such to write a batch file to put in the same directory with the other files. In the batch file, just write
blender -W -F [filename]
where you replace [filename] with your .blend’s name. Make sure to include the .blend part. Now, save that in the directory with the other files in ascii mode (.txt format) and rename the .txt extension to a .bat extension. Now, you can distribute these four files in a zip and inform the user to run the .bat file to run your game.
Oh yeah, make sure your game is set to autostart, and that you clear away all the blender menus and things out of the picture.
It works like a charm, no plugin or programming required. It’s not quite as good as publisher, in that your actual blend file isnt protected, and your distributing the tool the user could use to hack your game with, but for distribution on the internet to normal people, it should be fine.
You can even cheat and change the blender icon and filename, and mess with the paths placing all the files except the batch into seperate directories etc.
When I try to run Blender, I get the following error:
![http://www.geocities.com/sanderwozniak/ScreenShot.jpg](http://www.geocities.com/sanderwozniak/ScreenShot.jpg)
(Sorry, but I don't get english error messages ;) )
I’m not sure whether this is a problem with my graphics driver (I have a ATI Rage 128 Pro)
I don’t get it running.
Could anybody help me, please?
Are you sure you typed the -w -f part right? When i run the batch file that I made It opens blender and shows the animation screen (the one that pops up when you click the “anim” button). i think one of those extensions is wrong.
I’m not sure, but you might have to use blender.exe instead of just blender. Also, make sure you type in your filename just right.
Heres an example of a batch file I used for my test:
“zelda.bat”
blender.exe -W -F zelda.blend
Oh, make sure that the “W” and the “F” are capital, they are case-sensetive I believe. If you still have problems, could you post EXACTLY what you wrote?
It works it works! .
for those people that don’t know how to create a batch file, here you go:
go into the ms-dos promt, there should be a shortcut in start–programs but there might not be, in which case just go to start–run and type in “command” (without quotes).
next, go to the directory where you put your blender.exe and the blend file and all that stuff.
Now type in the following (after each line hit enter, including the last one):
copy con game.bat
blender -W -F yourblendfilehere.blend
now after that hit ctrl-z which should bring up a little tidle and a Z on the screen one line after the blender -w -f… and then hit enter, TADA! now when you type in game then it should load up your game, full screen.
if you can’t figure that out, you’re really stupid and don’t deserve to work on computers .
Just kidding,
Well, I created a file named “test.bat” in the Blender directory and copied a blend file named “test.blend” there as well.
Then I typed the following command line:
blender.exe -W -F test.blend
The problem with the error doesn’t appear when I leave the -W argument out. But that is probably for using the whole screen.
ok, i made this example file for you all. I didn’t include the blender.exe and python.dll, so you’ll have to extract the zip file into your blender directory. When you run “example.bat” it will, i repeat will, work. If it doesn’t your computer is funky, cause it worked on mine!
Gargola, putting the command in a wordpad file will NOT work as creating a batch file. If Saluk said that to you he’s crazy. Follow my instructions, they’re pretty easy. I could understand how to do it when I was 6.
ok, i made this example file for you all. I didn’t include the blender.exe and python.dll, so you’ll have to extract the zip file into your blender directory. When you run “example.bat” it will, i repeat will, work. If it doesn’t your computer is funky, cause it worked on mine!
Gargola, putting the command in a wordpad file will NOT work as creating a batch file. If Saluk said that to you he’s crazy. Follow my instructions, they’re pretty easy. I could understand how to do it when I was 6.
Um, pooba, wordpad WILL work to make a batch file. All you have to do is make sure to save it in .txt format and that the extension is .bat instead of .txt. For instance, if you save it “Mygame.txt” all you have to do is rename it “Mygame.bat” and there you go: you have a batch file.
Also, I found out that you don’t actually need the “-F” part of it. It can just be “blender.exe -W myfile.blend”. FOr me it still worked with the -F, but on other computers, that might confuse it.
Also, I’m not sure, but in the batch file you may have to make it blender.exe, not just blender.
If you still can’t get it to work, then I dont know what to tell you, here is my example file.
ok! i got it to work with Saluk’s Worpad batch…i removed the -F from the code,added a copy of the original blender exe(not a copy of a shortcut to blender)it requires python20.dll on the folder of the game and last,if you got a game(like mine)named something like Flash Ninja,you got to remove the space(FlashNinja).that’s all.hope this helps you S_W.
ps:make sure to use Blender.exe on the code (blender.exe -W yourgame.blend)
Well, perhaps the problems is my graphics card or driver.
It doesn’t work in fullscreen.
If I leave the -W out it is the same as when I doubleclick an autostart blend file. But for giving it to friends, you don’t have to install blender on the system. Thank you all anyway!
Well, that was your problem, of course the shortcut wouldn’t work! You need the acual execuatble! And he said that you needed python20.dll there too. Follow instructions people! Also, DOS doesn’t do to well with directories or files with spaces in them, it tends to make it so that you have to type in a ~ sign sometimes.