Right now I’m loading modules into my application as follows:
ModPath = Filename(MYGameDIR+"/mods")
OSModPath = ModPath.toOsSpecific()
from my_module import *
If this way isn’t going to work for Win, Linux and Mac once an installer is made for the application, what is the best way for finding modules, for all systems?
This question might be better suited for Drwr or Rdb.
It’s a bit awkward, but it’ll still work in the runtime environment. You do need to make sure that MYGameDIR is set to the correct thing and that you include the modules in the “mods” directory manually when packaging.
I use this code first to get the OS specific:
WingameDir = abspath("")
MYGameDIR = Filename.fromOsSpecific(WingameDir)
All other ways to find modules in the game path seem to raise an exception. I figure P3D will pack it’s own python for usage with the game (during install creation), but rather or not the site packages folder will be present…I don’t know. Putting modules in the site packages folder is the only other way I’ve been able to get them to run.
However, I wanted to make sure those modules will be along side the game exe path; that’s why I decided not to use site packages.
I am concerned with rather or not my current App will run on Mac and Linux, so I’m thinking about placing a temporary link to a demo of the App once it’s finished so those who are on a Mac or Linux system can try to install it.
I am very close to finishing the casual arcade 3rd person shooter; I have two more levels to do then it’s all the stuff I hate, like creating a game save and load system… (yuk!).
The game is being created for PMME2 and is in association with SM, so please do not redistribute, decompile, etc.
Rather or not my App will find its modules on other systems…that’s bugging me out. I also do some reading from text files during game play, but I did use P3D’s open instead of python’s original open, so I’m hoping all is well there.
The game is better suited for a Mature audience, because the main characters conversations gets kind of “hot.” Lol. Nothing ex-rated though; it’s of a comical nature.
By casual game, I mean a game that’s better than your typical flash player games found all over the net, but not commercial quality either. Gameplay is the biggest concentration and graphics will be taken lightly and placed a little stronger where they are mainly needed.
Such casual titles will not take up all your time playing them. The purpose is to allow the “gamer” to generate a final game score (as well as have some fun).
When you do get to saving, my GameSaver module may be of use to you.
Casual Arcade Space Shooter:
Approaching one Month on this game now; spent more time on it than I wanted to. I want to get the basic game done this weekend, because I still have to produce music, create save/continue function, complete GUI and add in missing game elements. PMME2 will launch not to long after this title is finished (there is still some minor work left for the site as well).
The reason development has taken this long is because of the first time creation of modules. If I were to do another 3rd person shooter game like this one, it will probably take me half the time (unless I wish to take more time with visuals) because I can just import the reusable modules.
I’m so not using my true graphic creation talent with this game…after all, it is just a simple casual game and nothing hardcore. Not to mention S.M. is hard on performance, but I repect that. This game should perform well; the models are low poly and the code isn’t that heavy.
You will enjoy this game much more than most flash games spamming the net…trust me. The story is easy to follow and the actors’ personalities are well done.
Screenshots don’t really tell the story, but I will be creating a trailer for every PMME2 game I design or co-design.
If any of you design music on your PC/Mac and would like to design scores for this game and receive credit for it (game credits), be my guest. That would just save me some time. I haven’t produced music in a long time, but have done it before (which turned out well, but I’m short on time, this time around).
Everything was suppose to be up and running by mid of this year, so you can see…I’m behind time.