Tuesday, July 13, 2010

Using a CMS

So I thought of what I should use when the time comes to set up the website for Death Zone Zero.

I can roll my own hardcoded PHP web pages like I always used to, but this time I thought of trying out a CMS.

Firstly I needed a CMS that can provide a community forum plus a community wiki, besides having the ability to let users create accounts for the game itself, and be able to display static content, news, and perhaps blogs.

I also need the CMS to be fully themeable, as I want a custom look for the game's website.

I saw Tiki Wiki CMS Groupware and thought it provided just what I needed. So I started trying it out on my local computer.

Unfortunately I encountered a bug during the installation detailed here.

The workaround was to downgrade my PHP installation from 5.3 to 5.2 but it makes PhpMyAdmin crash the Apache HTTP Server. I ignored that and tried to continue the Tiki Wiki installation. I almost got it completed when it spewed out an error:
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() [datetime.--construct]
So I had enough and decided on trying a different CMS.

I saw Drupal, which a couple of guys on /g/ recommended, so I'm currently looking into that. It has modules (plug-ins) to enable a forum and wiki, and even the ability to use Facebook Connect and OpenID, so its a good thing for me.

Unfortunately it also has a problem with PHP 5.3, giving out errors:
Deprecated: Function ereg() is deprecated in Drupal\includes\file.inc on line 926

Warning: Cannot modify header information - headers already sent by (output started at Drupal\includes\file.inc:926) in Drupal\includes\install.inc on line 618

I guess I'll just wait for a fix.

Death Zone Zero: Update: Zone Lobby

Photobucket

Players can now log-in to the zone lobby. This acts as a lobby area where players can meet up, chat, and challenge each other. So far you can only chat and move your avatar though.

Friday, July 2, 2010

Death Zone Zero: Update: Client Server Network



Here's a more complete test PVP match showcasing the abilities of all the units made so far.

Monday, June 21, 2010

Death Zone Zero: Update: Client Server Network



So here the client/server network is being shown, you can select units, move them, and attack them, and it all happens on the network.

Thursday, June 17, 2010

The Anomalous Underdog "Offices"

Ever wondered what the place where I work looks like? No? I'll show it anyway.

Photobucket
Taking a lunch break here.

Photobucket
Working on Death Zone Zero.

Photobucket
Its a bedroom office.

IGDA Manila June Meetup

I've been trying to be active in the IGDA Manila community to alleviate my lack of a social life, and in this opportunity, I'm happy to announce that I'll be making a talk during their June monthly meetup on how to use Blender to create videogame 3d models. Part two of the talk (probably in July) will be using Unity to create simple programs to get you started on making games.

I'll be also recording my talk to a video so people who can't attend the event can watch it later in Youtube.

Date:
Saturday, June 26, 2010
Time:
3:00pm - 6:00pm
Location:
Exist Tech Bar
Street:
Unit 502 5/F Orient Square Bldg., F. Ortigas Jr. formerly Emerald Ave.

You can view more of the event details here.

Monday, June 14, 2010

Death Zone Zero: Minor Update: Client Server Network

The Battle Server is slowly starting to take shape. Players can log-in, get their unit data from the database, and load units on the battlefield. Can't control them yet though. But with the work I've done in the single player demo, the template is there. I just need to add the multiplayer network part to it.

Photobucket

One thing I don't like about Unity is the lack of better serialized data transmissions across the network. I made a formal request about it here: http://feedback.unity3d.com/forums/15792-unity/suggestions/824649-better-network-serialize-commands
Oftentimes I need to send a bulk of data to the client to initialize his data. I have 2 options for doing this: RPC (Remote Procedural Call) or a OnSerializeNetworkView function.
The problem with using an RPC is you pass the data using arguments. My data includes arrays of classes so using an RPC is problematic.
I can use instead a OnSerializeNetworkView function and serialize the data into a stream. The problem with the current OnSerializeNetworkView function is you can't control when exactly it gets called. OnSerializeNetworkView is meant to be called continuously, and has to be attached to a certain Network View.
I need a Serialize function that would get called only when I tell it to, much like an RPC.
Having worked with the Torque Game Engine, Torque has what they call a NetEvent, basically a one-shot serialized data transmission from/to Server and Client.
This is perfect for initializing the Client with data, or when the Client needs to submit a list of information to the Server (like when buying/selling multiple items from/to a shop).
And please, if this gets implemented, please make it available to the Unity free version.
My guess is allowing a BitStream to be a valid argument to pass in an RPC is the most straightforward way to do this.
Right now I'm faking serialization by turning my data into one long string and sending that to the client. This, I guess, takes up a lot of bandwidth since strings in Mono are 16-bit each character because of Unicode support.

That's ok, I tell myself. Just imagine the client is loading a web page. Heck, maybe even the average web page is larger than what I'm transmitting. And I'm not sending it every loop or something; its for initializing client data, so a one-time, large bulk of data transmission is quite allowable.

It makes me miss my days when coding in Torque Game Engine. You can squeeze all the bits of data you want as small as possible there. They have their own version of the BitStream: Like a normal stream you serialize your data, but the special thing is the compactness of the serialization. Transmitting a boolean requires only one bit, strings can be compressed to save space, and you can specify by how much bits an integer or float is going to take when serialized into the stream.

For example, say you have an integer variable health, which in your game goes only in the range 0 to 100. You can then specify the health variable to be serialized to only 7 bits (essentially creating a 7 bit integer, which goes in the range 0-127), since its value goes only up to 100. You saved 25 bits, assuming it was a 32-bit integer, a whopping 78% of the original size.

They even have what they call a StringTableEntry. Basically used for strings that get sent over the network frequently, like usernames or preset error messages. What happens is the first time its sent, it gets sent as a normal string, but the next time, it gets sent only by a reference ID number to save bandwidth.