Well I have a couple problems again!
First is: How do I keep the UV textures in a game when I save it as a seperate executable?
Second: I used a python script to load a video in the game using a direct filename for the load. How would I format the filename of all this if I wanted to upload my game folder to a seperate disc or a flash drive, and either play this from the flash drive or the other computer it will be uploaded to?
When you use the full file name of the movie, that is called the absolute path. You can also a relative path to find the file. While an absolute path tells the exact location of the file on your system, a relative path tells where the file is “from here.” It is important, then, to know where “here” is. Relative paths are a bit different on each operating system, but since you’ve identified yourself as a Windows user by the way you talk, I will explain to you how to use relative paths on Windows.
(Windows specific information)
If you launch Blender using the Blender icon in your start menu, then “here” is the Blender directory, so Blender will look for all relative paths starting from the main Blender directory. However, if you launch Blender by double-clicking a .blend file in a file browser window (My Computer), then “here” is the directory that the .blend is located in. When you make your executable game file, “here” is the folder that the executable is in, your main game folder, so it will work exactly the same way that double-clicking the .blend file in the file browser did. (End Windows specific information - if anyone needs Linux or Mac info, let me know.)
Once you know where “here” is, you need to know how to tell Python to use a relative path. There are two special characters used when navigating directory structures by relative path. They are . and …
. means “the current directory” (what I’ve called “here” up until now)
… means “parent directory”
Let’s say you have your video (named “myVidoe.avi”) in the “Videos” subfolder of your main game folder. In Windows, you would refer to it like this in your Python script:
myVideoLocation = ".\Videos\myVideo.avi"
(Unix-based operating systems–such as Linux, Mac OS X, or FreeBSD–use the opposite slash for file structures, the way web addresses do.) Just use that relative path in your script wherever you had the absolute path before, and Blender should have no trouble finding the video.
BTW, if you are ever having trouble figuring out what directory is the current directory, there is a Python function called “os.getcwd()” You need to import the os module in order to use it, so if you ever want to use it in one of your games, be sure to copy Python25.zip and zlib.dll into your main game folder along with all the other required .dll files. (The os module is in the zip file, along with the other modules it depends on. zlib allows Blender to use the files that are inside the zip archive without extracting them.)
I tried packing the data, saving the .blend file, then I saved the Runtime and started the game, but it just kept saying image unavailable MA(material) will not show over and over.The game never loads anymore too.
I used the relative file path: (Game .Exe is located in folder “Aryonomics”)
“G:\Documents\Aryonomics\Videos\OpeningSequence.avi” is now…
“.\Videos\OpeningSequence.avi”
But now it keeps saying that msvcr71.dll could not be found (kept in the “Aryonomics” folder, along with other .dlls) and i tried it in the videos folder (“Videos” contains only “OpeningSequence.avi” and “BlendVideoTex.pyd”) Anyone have some quick help?