Veli.ws
Veli’s Portfolio and Personal Blog
Veli’s Portfolio and Personal Blog
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
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…
Apr 11th
Been quite busy lately, but I was finally able to get some time to train with Zbrush (thanks to eastern holidays). Here is the result for now:
I have been looking at so many pictures of abs that my girlfriend prolly thinks I have become gay : )
The Zbrush interface is at first really like climbing a tree without hand or legs. But once you get used to it, it works out quite well. I will be posting updates when I make more progress.
Oh, and that character I am making will be hero for my upcoming Zombie Mayhem game. His working name is Zack ; )
UPTADE 14.4.2009
I did some more work on the arms and proportions. Check em out and feel free to give C&C .
Mar 17th
Well… I bought Aiptek 14000u graphics tablet mainly to speed up my work with textures. The tablet is quite fine actually, sleek design and good pen. Pretty good bang for your buck!
Bur the thing i had problems with was that the damn tablet lacks support for two monitor setup… It was pretty frustrating. I tried everything to get it to work, from re-installing windows (tried out Windows 7, which is nice by the way) to manually editing the driver files. No luck with that.
After about a week I decided to do some extra research on the subject. It turned out that the damn media tablet was actually a Taiwanese Waltop tablet. Luckily, the Waltop site had more recent drivers to download than the Aiptek site. I installed the Waltop drivers and a new menu popped up in the tablet setting. This new menu was about working area! I could set the tablet to work on the screen I wanted it to work on : )
So the morale of the story is don’t spent days trying to get your Aiptek tablet to work with your two monitors! Just get the drivers for the real product you bought, meaning Waltop media tablet.
Oh, and do not bother with mailing Aiptek support…
Recent Comments