0
$\begingroup$

I would like to use Blender for a python class project. Many students are writing simple games using pygame etc. Instead would like to write a simple game using blender+python. But - this is a python class! so using previous blender + game engine is not python.

So what I'm really asking is this: is it possible to write python scripts that move simple objects around and implement a simple game (eg, say, a pong game, or very simple 2D mario-like game, but within Blender so it can utilize Blender's many features and be very nice looking.

Means the script runs in real time and accepts keyboard input (no sounds needed though)

Hope that was clear enough.

thanks for any info.

Matt

$\endgroup$
  • $\begingroup$ What do you mean by "using previous blender + game engine is not python" ? Blender Game Engine can be used through logick bricks but also through Python scripts, via the "bge" module. Search "bge python" for a lot of examples and documentation. $\endgroup$ – thibsert Mar 1 at 21:09
  • $\begingroup$ Ah sorry I should have phrased that better. I merely meant that making a game with the logic functions isn't coding python, but doing what you suggest surely is. thank you for your reply. $\endgroup$ – MattG Mar 2 at 17:42
0
$\begingroup$

Yes.

A game is an activity that one engages to have fun. By this definition a game can be made using pretty much anything.

Python is a powerful programming language and it can run in Blender 2.80. You do not need any of Blender's functions to script even a very sophisticated game in Python alone and run it from inside Blender. Blender 2.80, even though it is not designed to make games in, has a lot of functionality in general and that functionality can be manipulated using Python and Blender's Python API so there are even more tools there that can be used to create environments or situation suitable for activities one could engage to have fun. Blender is not designed for this purpose, however there is nothing stopping you from coming up with ways to have fun.

There are other questions that might be relevant to your context that might be useful to consider. For example - time needed to learn functionality of Blender and time that you will need for learning to use its Python API. Because of the amount of information we are talking about time in terms of weeks and months, possibly even years here. Learning to use Blender and its Python API can be very useful as well as a lot of fun and can bring you a lot of satisfaction and pleasure, however it might not be an amazing idea in the context of a class project, unless you enjoy unrealistic goals and failure. Another thing to consider - are there maybe better tools for the task that could be easier to learn and use for the specific purpose? There must be some reasons people use game engines to create games. Is it possible it might make more sense to look into open source game engines in your situation?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.