I have been trying to get a score system set up on a small game I am trying to make. The tutorials tell me to get a type of file and set the UV map to txt and a few other things, what type of file do I really need? One tells me to use a bitmap and another tells me to use something else. Is there a way to program a score keeper in to Blender so that it can just be placed in the HUD and they hooked up in the logic editor?
My game is available in browser, so i need to get the user name from standard html from and pass it to the Blender. Then after the game ends i needed to put the score into the database and display it at the web page.
The result can be tested here: http://geta3d.com/geta3d/games/free/invaders/
How it is done.
1. Configure the database (MySQL) and the web server with PHP. You need to write a script that will get the results from the Blender file.
2. Write a script in Python that will connect to the web server and will send the scores.
While the Blender file is embedded at the website, and you can pass data to the file using Burster parameters, you can provide a php script that will fill all parameters with data you need. Here you can find details:
The example is about sending the user texture to the Blender file, but sending any data to the embedded file works in the same manner.
And what is most important. Using httplib you can set up the communication between servers even in the "runtime" version of your blend file, that will be used on PC, Linux, Mac... the only limit is the Internet connection requirement.
Visit geta3d.com to get the Burster and publish your Blender files.