Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to build a web game with Blender and I know PHP. Is it possible to mesh Blender with PHP?

share|improve this question
1  
You can export rendered images, then use those. But without more details, it'll be hard to answer this question. Not sure if you've thought this far ahead or not, but you need to tell us what you want to do. Do you mean make the graphics for a game? –  Byte56 May 3 '12 at 19:41
1  
Sounds to me like you've got some gaps in your knowledge of programming / gamedev. I would suggest you take a step back and work on some simple games to get a little more experience. –  stephelton May 3 '12 at 20:15
1  
Wait... What? PHP, as far as I know, is an HTML preprocessing language. How do you plan to do anything graphical with it? –  akled May 3 '12 at 20:49
1  
He never said he wants to do anything graphical with PHP, which of course just leads to another huge problem with this question: what exactly are you trying to do anyway? Talk about vague! –  jhocking May 3 '12 at 21:44
add comment

closed as not a real question by Tetrad May 9 '12 at 15:31

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

The short answer is: not really. Blender can be used directly to implement game logic. Also internally Blender can be scripted using Python.

As @Byte56 mentions you could create graphics in Blender and then export them.

But, as @Bane and @stephelton mention, you appear to have some holes in your knowledge of game development, and possibly development generally.

I would recommend you take a look at How do I make games? A Path to Game Development and even some other questions here or on related SE's like:

share|improve this answer
add comment

Of course it is possible. You can use urllib and open a http connection from the python, get data from PHP and visualize in Blender. You can even do this online using Burster Burster website.

The second possibility, depending on what you realy want to do. If you want in example to do some modification of camera using the web, and you want to get a rendered image from Blender over the Web you can implement very simple WWW server in Python in Blender (example here: making a simple web server in python).

So, if you can describe your task in more details, i would be able to answer with examples of how to do this .

share|improve this answer
add comment

If you know PHP you also know that PHP is a server-side scripting language which in turn needs another language (html, html5 for instance) to display something.

So if we consider your question as: "Is it possible to combine Blender with html/html5?", then the answer is yes you somehow can do it..

For example, you can load a model exported from Blender using WebGL which is a JavaScript API for rendering interactive 3D graphics within any compatible web browser without the use of plug-ins. It is based on OpenGL ES 2.0 and provides an API for 3D graphics. It uses the HTML5 canvas element and is accessed using Document Object Model interfaces. You can even use shaders...

Another solution to "combine" Blender with you browser content, is to simply export images from Blender and use then with html...

Next, you can use 3D plug-ins such as UNITY but it's already far from your "PHP" question ;)

share|improve this answer
add comment

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