i.u.h.i.x

mumble mumble mumble

Mobile and Games

I have been wanting to build a mobile game for quite a while now.

I guess I should just go ahead and do it! Since I’m not really a fan of the fruit phone, Android it is! Yea.

After googling for the past hour or so, I think it will probably be better that it is build from scratch, I would learn more and have better control over it. I will try to document what I have learn in here.

Let’s do it.

My First Server

Hokay, I have just signed up for 1 year of VPS with linode. YAY!

I only had some experience with linux server at my previous job, and I DID take a module on server administration. Hopefully that is enough background for now. If not, I will have to consult my geek guru.

Objectives, to bring both sites (www.nobstudio.com & http://www.monstergamebox.com) under 1 server. Increase the max limits for apache so that we wont encounter error messages anymore. Probably someday, I may set up a multiplayer server for our flash game *dream*.

Checklist

  • Up Ubuntu server
  • Apache 2
  • PHP 5
  • MySQL
  • Set up Virtual Host
  • Set up phpMyAdmin
  • FTP server
  • Migrate http://www.monstergamebox
  • Migrate http://www.nobstudio.com
  • Server Firewall
  • Change DNS records !! 1. MGB 2. NB
  • Set Up SFS Pro (try out the 20 user limit version)
  • Set Up Chat
  • Redo NobStudio (CodeIgniter)
  • Code R.O.B.O.R.B.
  • Re-skin witch hunt 2 for Halloween
  • A few work for hire projects
  • Earn my 1st million

OMFG, that too much. Ok 1 at a time.

I think its almost done

Started building a portal for flash games a few months ago. Thought it was easy at first, downloaded a php script and started modifying. But I wanted more, and it couldn’t provide, and so I begin coding all from scratch.

MonsterGameBox - Play Free Online Games

MonsterGameBox - Play Free Online Games

MonsterGameBox is built using php + smarty template engine. If only I had heard of cakephp earlier. Anyway, it is almost done. I have more plans for it, e.g. a highscore API to be build into this site’s Database, games running on points that they need to earn e.t.c.

Learned quite a bit, especially on mod_rewrite for apache server, rewriting the site’s URL from something like “?page=play&gameid=102″ to “http://www.monstergamebox.com/game/1509/Witch-Hunt:-Nooboo-Mary.html” hehe, shameless self promotion. Anyway, I will try to post an article about that later, when I have more time.

Meanwhile enjoy the games.

Something that Im going to delete later

Just registered another technorati account. This post is just its verification

Technorati Profile

Actionscript: Copying Objects & Arrays

Came across this problem while creating a save function for our latest game.

We have this object _root.allVars which contains several other objects and arrays which we need to save locally using SharedObjects. So this was what I did.

sObj = SharedObject.getLocal('gamesave');
sObj.data.allVars = new Object();
sObj.data.allVars = _root.allVars;
sObj.flush();

This works fine, but when you update 1 of the variables in _root.allVars, the values that are store locally with sObj.data.allVars gets updated. To rectify this,

instead of
sObj.data.allVars = _root.allVars;
do this

for(var i:String in _root.allVars)
{
  sObj.data.allVars[i] = _root.allVars[i];
}

Once again, this works fine if _root.allVars has only 1 level of variables, i.e. all its variable are either Strings / Numbers / Booleans. After searching around, asking, I finally found the best solution for this, a recursive function.


function copy(to, from)
{
  for(var i in from)
  {
    if(typeof from[i] == "object" || typeof from[i] == "array")
    {
      if(typeof from[i] == "object")
        to[i] = new Object();
      if(typeof from[i] == "array")
        to[i] = new Array();
      copy(to[i], from[i]);
    }
    else
      to[i] = from[i];
  }
}

to use this function

copy(sObj.data.allVars, _root.allVars);

You can even use this to copy/duplicate Objects/Arrays.

The original Objects Duplication codes are from here.

Our Joomla! got hacked

Our website, www.nobstudio.com was hack last night

0wned By BeyazKurt , cHs | Albanian C0der Kosova HackerS Group [KHG]

I did some googling, seems like Joomla! has a severe security issue a few weeks back, where even its own site, http://www.joomla.org was hacked.

Just a word of advice, update your Joomla! NOW!

http://developer.joomla.org/security/news/241-20080801-core-password-remind-functionality.html

allow an unauthenticated, unauthorized user to reset the password of the first enabled user (lowest id). Typically, this is an administrator user.

Hello world!

I thought since I have already decide I want to code, or maybe I should put it as, develop games as a career. I should be geek enough to have my own tech. blog. So here it is.

I shall document what I have learn, experience on work and school projects here. It is also good to document them down so that I can refer to them later.

Cheers !!

Follow

Get every new post delivered to your Inbox.