Welcome fellow humans, dragons, and other life forms!
Anyway here’s the Blengine! Module! You’re probably wondering what it is, well if you haven’t played UFO yet click the link in my sig and have fun. This module was originally started when UFO was being developed to save time. It have awesome scripts like the gravity manipulator. It’s very easy and I wrote full documentation on the functions! To learn more about it read the documentation.
New: Mouselook support!
The new mouselook() function has been documented with a tutorial in our documentation!
Download: MediaChicken
Documentation: MediaChicken
Enjoy people! It’s still very largely in development. I will post a link in my blog now… http://www.mediachicken.com/blog
C&C
OH one more thing, it you’d like to submit scripts or anything please do so, just give me the script in normal .py format and I’ll edit it to make it work with Blengine!. Submit script at garet@mediachicken.com.
If you want to request features to-be-added just put the suggestion in a reply!
ENJOY!!!
Time for an update! I’ve made a lot of progress and added some new “handy” features!
New Features:
levelsys() (basically, as it sounds, an automated leveling system)
getPosition(axis) (get the position along a fixed axis)
getOrientation(vector,axis) (get the orientation inside any vector and axis)
I will update again soon, but not many more releases will be in the blengine! future. I am hoping to release BlengineX before long (maybe mid april? after 2.5 is released) I am writing tons of new fuctions for it and actually coding some logic bricks! Well I didn’t get time to update the documentation so here’s the documentation for the levelsys (not on mediachicken yet)
BLENGINE LEVEL SYSTEM!
about:
These are all very new features that have not yet been added into the documentation. This is the all new level system! It’s a very powerfull system that uses math to calculate the increase of levels.
How it works:
Basically you run the standard functions for running any blengine script, but to activate you must run blenging.levelsys(). Notice how we’ve cut back on arguments that blengine requires. For the gravity script you need to type in 7 arguments, for this we use our all new methods to use no arguments saving you time! Instead of weak variables we use strong properties. Prior to running you setup the increase and the starting level and blengine does the rest!
Tutorial:
So let me guess… you’ve just made an RPG game and need a leveling system… but one problem… you don’t know python and logic bricks would get a bit “hairy”. There is a sane way of doing this, and all you’ll need is 4 properties and 2 lines of python. Let’s go!
First let’s setup our properties, I will first tell you the type (float, int, bool) then the name, then the value:
INT: xp = 0
INT: level = (put in your stating level, usually 1)
INT: levelxp = (put in the xp required for the first level)
FLOAT: increase = (I usually do a 1.5 increase, if you enter 2 and the levelxp is 10 to get to level 3 you’ll need 20, then 40, 80, 160,320,etc)
So now we got our props done, that’s the hardest part! Finding a good increase rate depends on 2 things: your game type; the speed of your game. I usually do a 1.5 increase, this gives a good variation without making your game crazy hard. So now we have to setup our logic:
For this demo I used a property sensor connected to the python controller with our script in it. I set the property sensor to “changed” and the variable to xp. This means our python script will check to see if you can level up each time you gain xp. Now I set a keyboard sensor to a property actuator adding +1 to the prop: xp. Now everytime you hit the keyboard key you gain 1 XP.
Time for python!!
import blengine
blengine.levelsys()
Wow… that was very simple. Now you have a fully fledged leveling system!!
Questions, Comments? Contact the admin at: garet@mediachicken.com
And I’m attaching the file for the 1.2 release. It has different demos in different layers. Layer 1 > levelsys, Layer 2 > getPosition, Layer 3 > getOrientation
Enjoy!
Attachments
blengine.blend (138 KB)
and may later Ben implementing this function in c for faster performance.