Many people in here don’t know any python scripting for the game engine. Python scripting in the game engine isn’t only usefull but also cleaner. Inmagine yourself creating the full controls of a character for your game, afther some adding of logic bricks, it gets messy. With scripting you solve that problem.
My idea behind this topic is creating a game with as much python scripting as possible and less logic bricks. I’ll post a beginning I created, people can download it, change the python code and reply there changes. Afther each python code line the scripter has to add # with the info what the piece of code does. So when beginners take a look at it, they can see how it works.
- add code to txt files, not inside blender.
- adding code, and explain it with #info about code and/or comments.
- less seperated scripts as possible, try to put as much in one text file.
- keep the blend file as clean as possible.
- solve errors before replying your addition.
- when replying, make list what you added, fixed or changed.
The idea behind it:
- learn game python to beginners
- create a python game and check if python is faster then logic bricks
- show power of game python
Has scripts for:
- forwards, backwards, left and right movement, jump
- error logger, prints errors to txt file
scripts to add:
- movements when on ground, disable when in air
- shoot a bullet
- turn sensors and key strokes into python (possible ??)
- camera following character, also on slopes.
- going trough walls, replace Dloc, Drot with another motion
File can be found here: http://home.tiscali.nl/jdvhulst/various/python_game.zip