Posts tagged Unity
Forklift Hazard for iPhone is out!
Dec 2nd
New and improved version of Forklift Hazard hit the App Store today. The iPhone version has many new features and improvements
- New and improved forklift!
- Awesome tilt controls for the camera
- Remade scores system (instead of competing against each other with milliseconds, you know how well you compare against other players world wide).
- New levels
And of course all the goodies of the earlier version (realtime physics, great gameplay and the Mole). Here is some pictures of the new version:
Wordpress Profiles to Unity3D?
May 25th
You read correctly. If you want to have a good community around your game (blogs, forums, etc), you need to find the best tools for that. And for blogging, the best tool is by far WordPress. One of WordPress’ main strengths is the plugin system, which allows you to write your own “hacks” or use plugins made by others without having to edit the core files directly. This ensures a safe and upgradeable framework around which one can build their community.
But enough of that rambling. Here is how I managed to fetch wordpress user profiles into unity.
Unity JS
function Awake() {
GetCookie (display_name);
//This is what you are fetching.
//See http://codex.wordpress.org/Database_Description#Table:_wp_users
}
function GetCookie (query:String){
//Path to your PHP file
var url = "http://domain.com/cookiecheck.php?q=";
var getCookie = WWW(url+query);
yield getCookie; // Wait until the download is done
if(getCookie.error) {
Debug.Log("There was an error getting cookies: "
+ getCookie.error);
} else {
result = getCookie.data;
}
}
function OnGui () {
if (result != null) {
GUI.Label (Rect (10,50,280,20), result);
}
else
GUI.Label (Rect (10,50,280,20), "Waiting for yummy cookies!");
}
Server side PHP cookiecheck.php
$query=$_GET["q"];
require_once('/path/to/your/wp-config.php');
global $current_user;
get_currentuserinfo();
if ('' == $user_ID) {
print("invalid User");
}
else {
print($current_user->$query);
}
It is nothing major, but I spent a good amount of trial and error to get it right. Hopefully this article will save someone else from that trouble. Oh, and big thanks once again to the guys (and gals) at #unity3d@irc.freenode.irc.freenode.net
Forklift Hazard is live! At last!
Apr 15th
I got bored of waiting the portals to contact me so I decided to go ahead and post my game on some more friendlier portals.
Here is some screenshots:
Oh and rate it there as well! Grrr…











Recent Comments