TUTORIAL: Beginning BGE Python

this is nice using this and reading on my own and trying some stuff ill be able to try to learn python even out side of blender
i was reading up on it python is powerful and the code writing is not actually as hard as i though
as compared to like java and such

Great Tutorial Social!

thanks

hmmm… I tried twice to download the .blend and both times blender told me it was an incomplete file. I tried opening it with two different versions of blender too, with the same response.
What’s wrong?

delmarco_99>

Thank you.

I just downloaded it now, and blender ran it with no problems.

That, and the fact that you are the first to report this, leads me to believe that it’s most likely a problem on your end.

Try downloading it a few more times. If it keeps up, try reinstalling blender. If that doesn’t work I’ll put it up on filehut or something, and see if it makes a difference for you.

Bump…(sort of)
Thanks man, I couldnt understand coding of any sort, but this lays it down simply and easily.
Again, Thanks!
peace
Drew

I must say that this has inspired me to learn more about Python. I downloaded a copy of “a byte of python” and am reading through it. I come from a BASIC programming background so all this new fangled “Object Oriented” approach and no line numbers is mind numbing at first. Thank you for taking the time to write a tutorial.

I have one request. Would you be willing to dive deeper into this subject and create a series? Maybe take the fabled pong remake and create a series using python as the main scope, not modeling or UV texturing. This could really help explain how to approach the project from a programming point of view and how to tackle the problems.

Again thank you for what you have done.

JABayne

I appreciate the compliment. Also, thanks for bumping this. I should really find a way to get this into the tuts sticky if possible. Actually, I think the whole tuts/demos sticky needs a big update (it’s been like years).

Heh, yea, well I should certainly get around to it sometime soon.

You see, the initial idea was to make a complete game, and then write complete tutorials around that game. That’s how I started out (talk about ambitious), but I didn’t count on just how difficult it would be to properly document the whole thing. I realized that even though the game would take a relatively small amount of time to complete, the documentation would take close to forever, because you have to explain everything in detail but still keep it easy to read, and there is like a million other things that you have to account for.

So I just dropped it and concentrated on stand alone tutorials like this one, because it’s something that I can actually do on my own.

I understand the benefits of a: “series” as you call it, but I don’t think it’s something that I could do on my own.

What I can do however, is write one more python tutorial, that will introduce the user to some more complex methods etc.

Really nice Python tutorial. It reminds me from the tutorial written by Blengine, who was really good at using the blender game engine. I think it would be good to have once in a while a little python tutorial here, just to get people used to it and give Python a try when creating games.

With this kind of scripts you’re able to use less logic bricks then normal, which could result in some nice organised game setup structure. Using the Python GameKeys API of the engine, you can even remove the 3 of the 4 sensors used for moving and use only 1 sensor to control your object with. Because there is a way to check if a button is pressed or not, which key and so on, which makes it even easier to assign your own keys ingame. :slight_smile:

Python is pretty cool when creating games in blender, personally I’m one of the persons who like it more to have fully control using python and logic bricks as a sort of layer to create scripts instead of logic bricks being the main part. And I can remember someone on BConf had the same idea about it, I thought it was Theo who’s working on blender’s Python api (not game engine related one), and sure he can do crazy things with Python inside blender, he’s amazing with it. :smiley:

Awesome Tutorial! I, like free_ality did not know a word of code before this, but it does explain everything clearly and goes at a good pace. This is something I reckon all newbies at Python should check out.

EDIT: Also, you will be pleased to know (in case you dont already), that this tutorial, has been added to the tutorial sticky.

Ok, I’m convinced this must be good, I’ll check it out :wink: