Saturday, November 6, 2010

I'm not dead yet

Sorry for the lack of posts lately. Long story short, I decided to get a full-time job in game development so my personal projects are shelved for the time being.

The company I work in, Dreamlords Digital, decided to use my test game, Zombie Fields, as an actual commercial game. So now I'm working on porting it to the iPhone and adding lots of polish.

A few, old, work-in-progress screenshots:



I'm actually grateful that the company I now work for allows me a lot of creative freedom.

Sunday, August 8, 2010

Death Zone Zero: Sign 3d Model

Here's some artwork to help fill the lack of posts lately.


Its an old 3d model I plan on using for Death Zone Zero, perhaps I'll animate the sign swaying back and forth a little.

Made in Blender and textured in GIMP.

Tuesday, July 20, 2010

Death Zone Zero: Minor Update: Zone Lobby Gui

One thing I really hate about Unity is the lack of better GUI functions, something that would make use of the Model-View-Controller pattern, because right now, almost everything is done in code.

It took me quite a while to code a popup menu (aka context menu/right-click menu).

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.

Friday, June 11, 2010

Death Zone Zero: Minor Update: Client Server Network

I got a rudimentary Client/Server network up and running with a chat system. Code based from the network tutorial given by M2H (http://www.M2H.nl).

Photobucket

Saturday, June 5, 2010

Death Zone Zero: Minor Update: Syntax Errors Galore

I'm currently transitioning my code from Unityscript (Javascript) to C#. C# has its own quirks but nothing unmanageable. I figured I need C# because C++ plugins only work in C# via Dllimport. It'll be a very long time before I can use C++ plugins though (needs Unity Pro), but its better to do the conversion to C# sooner than later.

C# certainly has a stricter syntax compared to Unityscript and allowed me to catch some bugs that otherwise slipped by me in Unityscript.

C# also has preprocessor directives (something Unityscript doesn't have), which I need to use. Unityscript also has preprocessor directives.

I find C#'s typecasting more readable than Unityscript's.

Photobucket

Saturday, May 29, 2010

Death Zone Zero: Minor Update: Creating High-poly Version of the Rifleman

So I decided to give up trying to use Sculptris. I guess I'm not good with 3d sculpting programs. I'm modeling the high poly version of the Rifleman in plain old Blender instead.

Photobucket

Photobucket

Thursday, May 27, 2010

Death Zone Zero: Minor Update: Creating High-poly Version of the Rifleman

Curses! What monstrosity is this? I can't work this thing! This will take me a long time before I get used to it.

Photobucket

Death Zone Zero: Minor Update: Rifleman 3d Model Test

I'm working on the graphics right now, after having coding in 5 different units for the game.

Photobucket

Photobucket

Thursday, May 20, 2010

Death Zone Zero: Minor Update: Doc's Support Ability "Steroids"

The Doc now has his support ability, Steroids, which, I've said before, raises the attack damage of a friendly organic unit, but damages that unit as a side-effect. The effect lasts for 2 turns and you can stack it.

Photobucket

As usual, the work-in-progress, playable demo is available at http://anomalousunderdog.herobo.com/Unity/DZZPrototype.html

Weird thing is he can raise damage of a unit even though the guy uses a gun to attack. Then again, the Marine of Starcraft also uses a similar idea with their Stimpack ability, and they use guns too.

Wednesday, May 19, 2010

Victis: Female Character 1 Concept Sketches

Here I show an old piece of work I did for a different planned game, "Victis", a dark fantasy-themed RPG where guns and gunpowder technology are the norm for warfare instead of swords. My influences for the theme is from fantasy games with a somber mood like Quest For Glory 4, Castlevania, Disciples 2, and the like.

This character has no name yet, but she's some sort of gypsy traveler who wields dual pistols. Her unique ability is that she can see the potential future for a brief period of time.

Since she's of gypsy descent I searched the Internet for various Romanian names. I saw "Liliana" but that's similar to the name of a character in Dragon Age: Origins, then I saw "Tatiana", which the Internet tells me is "Feminine form of the Roman name Tatianus, a derivative of the Roman name TATIUS". What do you guys think?

Photobucket

Tuesday, May 18, 2010

Death Zone Zero: Update: New Unit "Doc"

The Doc is your post-apocalyptic healing unit. He can heal a large amount of health to one organic ally unit. The problem is he has no combat training so he can't attack.

Still to come: The Doc's support ability, Steroids, which enhances an organic ally unit's attack damage but damages that unit itself as a side-effect.

Photobucket

Thursday, May 13, 2010

Death Zone Zero: Update: New Unit "Gunslinger"

The Gunslinger is like your standard ranged-attack unit, except that he really shines in indoor maps where there are lots of walls, because his shots ricochet off them. This also means you can attack units hiding behind cover, while being behind cover, provided you can find an angle that allows you to do so.

Again, I'm still using the placeholder 3d model, so they all look alike right now.

Photobucket

As usual, the work-in-progress, playable demo is available at http://anomalousunderdog.herobo.com/Unity/DZZPrototype.html

I made some dummy walls in order to demonstrate the Gunslinger's ricochet ability.

Monday, May 10, 2010

Death Zone Zero: Minor Update: Bullet Ricochet Test

In this post I show a work-in-progress of the Gunslinger unit's special ability to make his shots ricochet off walls. Its kinda like in billiards games where you see the potential trajectory your ball will make before you make a shot.



I got my inspiration for this from Metal Gear Solid 1 where you fight Revolver Ocelot and his bullet shots would ricochet off the walls.

Saturday, May 8, 2010

Retrieving player's ranking in MySQL

Here's a neat little trick I figured out for myself when I was coding in MySQL. How to retrieve a player's current rank in a Leaderboards sort-of table.

-- this will calculate our current rank
SELECT count(DISTINCT exp) AS rank FROM player WHERE (exp > $exp);

-- this will retrieve 3 players that are of greater rank than us
SELECT * FROM player WHERE (exp > $exp) ORDER BY exp, username ASC LIMIT 3

-- this will retrieve 3 players that are of lower rank than us (or equal rank)
SELECT * FROM player WHERE (exp <= $exp) && (username != '$username') ORDER BY exp DESC LIMIT 3

-- top ten players
SELECT * FROM player ORDER BY exp DESC LIMIT 10

My example code comes from a PHP environment so $exp is a variable storing the selected player's current experience points, which in this example determines his rank. The greater one's experience points, the greater his rank. $username is a variable storing the selected player's unique username.

Thursday, May 6, 2010

Death Zone Zero: More Concept Art

Here's an update on the Rifleman concept art, together with the female version.

Photobucket

I'm not sure if I made the female version look "post-apocalyptic" enough. Maybe I'll redo it sometime.

Wednesday, May 5, 2010

Death Zone Zero: Update: New Unit "Cannoneer"

New in this update is the Cannoneer, a mobile artillery unit with a devastating, far-reaching attack. The only problem is the projectile takes a long time to get there; when the Cannoneer attacks, his shot only arrives at the target at the next turn, giving enemies a chance to run and take cover from his attack.

Photobucket
http://anomalousunderdog.herobo.com/Unity/DZZPrototype.html

Note that I don't have a 3d model for the Cannoneer yet— heck, I still don't have concept art for him yet, so I'm still using the placeholder 3d model of the Rifleman.

Monday, May 3, 2010

Death Zone Zero: Rifleman Concept Art

So I decided to take a break from programming and do some concept art.

The Rifleman 3d model I'm using right now is in fact just placeholder art. Its not the real Rifleman that I'll be using in the final version of the game. So me and my buddies made some concept art for the new Rifleman.

Photobucket
This one is made by Ryan Sumo. Here's his blog and portfolio.



Photobucket
This one I made myself. I'm heavily influenced by art from STALKER.

Friday, April 30, 2010

Death Zone Zero: Update: Preliminary AI now working

The enemies will now retreat when their HP becomes 50% or lower. That's about it.

Photobucket
http://anomalousunderdog.herobo.com/Unity/DZZPrototype.html

Language Discrimination

Photobucket

I had a funny thing happen to me just now. I couldn't get any help in Unity's IRC chat channel because I use Unityscript, Unity's version of Javascript, instead of the more sophisticated C# language.
[11:41] <_underdog> hi all
[11:41] <_underdog> I got a question
[11:42] <_underdog> when I put a yield WaitForSeconds in my function, Unity gives me the error "The return type of a generator must be either 'System.Collections.IEnumerable' or 'object'."
[11:42] <_underdog> any idea why?
[11:43] <blitzwing> language?
[11:43] <tigeba> http://unity3d.com/support/documentation/ScriptReference/index.Writing_Scripts_in_Csharp.html
[11:43] <_underdog> unityscript
[11:43] <blitzwing> learn C#.
[11:43] <_underdog> why whats wrong?
[11:44] <blitzwing> its js... you're stunting you're abilities
[11:44] <_underdog> what's wrong with js?
[11:44] <_underdog> what does it have to do with the problem at hand?
[11:45] <blitzwing> the only people answering you are C# coders :)
[11:45] <_underdog> discrimination :(
[11:45] <dr_link> Shame how C# is Microsoft made. :(
[11:45] <blitzwing> not really
[11:45] <_underdog> yes it is
[11:45] <blitzwing> MS put a lot of time into it
[11:45] <dr_link> Not necessarily this version of C#
[11:46] <blitzwing> Anders Hilgberg was Mr Delphi.
[11:46] <dr_link> lol @ his name
[11:46] <dr_link> anyway
[11:46] <_underdog> I hate Microsoft btw
[11:47] <blitzwing> good for you.
I was given some help later on.
[11:49] <tigeba> _underdog: FWIW when people ask about that error its usually because they are using C# but trying to use the unityscript syntax
[11:50] <tigeba> for the coroutine
[11:50] <_underdog> hmmm I see, its weird tho, I'm using unityscript all the way
[11:51] <tigeba> try the coroutine example
[11:51] <blitzwing> well its not wierd, thats just a common mistake people new to C# make
[11:51] <tigeba> in the docs, it should work
[11:51] <blitzwing> seeing you're not using C#, it doesn't appy to you

Tuesday, April 27, 2010

"Strategy RPG Test" Is Now Called "Death Zone Zero"

I've finally decided on an official name for Strategy RPG Test: Death Zone Zero.

Photobucket
Test title art for the game. Font "Interplanetary Crap™" © 1998 Ray Larabie

The story is that the world is now a post-nuclear wasteland, and there are areas marked as "Death Zones", places considered hazardous for human life because of nuclear radiation, lawlessness, and infestation of mutated animals.

Still, there are people who see opportunity in these lands: from criminals, to freelancers, to governments, they all have their own agenda for embarking on these Death Zones.

Roam the Death Zones and lead your band of mercenaries to victory against AI controlled opponents or other human players.

Death Zone Designation Number Zero was the very first, and the most established.

Sunday, April 25, 2010

Strategy RPG Test AI Planning

I've finally thought of a way to add AI in the Strategy RPG Test. Taking inspiration from the tactics feature in Dragon Age: Origins, each unit's AI would have a list of conditions and corresponding actions, for example, I would set the condition as "if the unit has less than 50% HP" and the corresponding action as "flee from enemies".



The list would be prioritized, in that higher conditions get activated first before lower ones. Lower conditions would be "if enemy in sight", "attack enemy", and then a final fallback action that gets executed without any condition needed like "search for enemies".

That list of conditions and actions would be defined in an XML file and then loaded into the game.

I guess this is why it pays off to play games, you get to study and understand how they work.

I had fun playing Dragon Age: Origins by the way. I played as a Human Male Arcane Warrior.

Photobucket

Friday, April 23, 2010

Some history on the Strategy RPG Test

It all started way back in 2004, when I was contacted by my English teacher who also, back then, worked in a now defunct graphic design company called Red Pumpkin Design Studios. They were looking for someone to model 3d units for a Flash game. They saw my old portfolio, pointed at my old render of a silly looking 3d model doing a sword hacking animation (missing picture), and said it's something like what they're looking for.

Tactics Arena Online, our inspiration back then for what was to become Nth Legion.

There I was introduced to my good friend James Lo, who was planning on making a multiplayer online strategy game similar to Tactics Arena Online. Excited about the idea of developing games, I joined in. We had a lot of brainstorming and more or less decided on a post-apocalyptic theme. It was to be called Nth Legion. James later founded SkyRocket Interactive to house the development for Nth Legion and other possible future projects. In the meantime, (since I was still in college back then) I did on-the-job training for them in their graphic design jobs at Red Pumpkin.

Photobucket
The very first 3d model test I ever made for Nth Legion.

James would model the 3d units (I even convinced him to use Blender for the 3d modeling), and I would animate them, often getting forced to berate him (jokingly) for doing the 3d models inadequately fit for 3d animation.

PhotobucketPhotobucket
Test renders for the various units in Nth Legion. We called this 3d model "Blocky, the Cube Guy".

Meanwhile, still being a student back then, I was also looking for work opportunities elsewhere and landed on a local game development company called ViTAS. There came a time I couldn't keep on being freelance and had to choose between ViTAS and SkyRocket Interactive.


Rejected concept art I made for Nth Legion.

I wanted to be a part of making an MMO back then, and considered Nth Legion's platform of Adobe Flash to be too simplistic. SkyRocket already had one programmer working for them, while ViTAS had none, so I chose to be sympathetic and decided to leave SkyRocket and work for ViTAS. My work there would go on for 4 years.

I then learned the development on Nth Legion was halted, because their programmer left the country for other work opportunities.

Fast-forward to 2009, I left ViTAS because of stress, burnout, and other personal reasons. I contacted my old friend James Lo, looking for work, and found out SkyRocket Interactive was no more and that he had established a new game development company called Indigo Entertainment (not to be confused with the production and distribution house of adult movies of the same name), whose main service is developing Flash games for other companies.

I tried working there but found Adobe Flash to be too hard to work on, and gave up. I was then introduced to Unity 3d as a different, viable platform for developing games, and instantly became comfortable with it. Unfortunately, Indigo's clients were not very interested in Unity games as they were for Flash games, as Unity is not very widespread, while Flash games are very popular these days, so I still couldn't get work.

We then talked about the idea of reviving Nth Legion, this time developed as a 3d game made in Unity. James tried to find investors to get funding for the project, but unfortunately because of the economic recession, we couldn't find people willing to invest.

I couldn't get the idea of a new Nth Legion game off my mind and then started gathering ideas for game mechanics, features, units, factions, and various unit abilities for the game. Right now I have a total of 15 factions, 52 units, and 64 unit abilities designed on paper. I've thought of ideas ranging from hero units, to Dopewars-style trading, to quests, to automated tournaments.

Photobucket
I keep a Tiddlywiki of all my ideas for my version of Nth Legion.

These ideas I translated into a prototype in Unity, which is how the Strategy RPG Test came to be. I still develop the Strategy RPG Test every now and then in my freetime.

Photobucket

You can still find remnants of old articles regarding Nth Legion here and there.

Other files:
A flash presentation of a mock turn sequence of what combat would be in Nth Legion
A flash presentation of the old rifleman 3d model

Grenade Skill Update

Photobucket
http://anomalousunderdog.herobo.com/Unity/DZZPrototype.html

The grenade deals damage (in a spherical area) and it has its own icon now. Some bug fixes here and there. Still missing are some explosion particle effects, sound effects, and a "throw grenade" animation.

Thursday, April 22, 2010

Grenade skill work-in-progress

I just found out that I have a wisdom tooth growing. I've never heard of wisdom teeth until now. It hurts; the pain is tolerable but irritating. Apparently it needs to be taken out using surgery. Why do teeth have to be so difficult to manage...

Anyway, in this update, here's a work-in-progress of the Throw Grenade skill, which is supposed to be used by the Army Private unit, of which I don't have a 3d model yet. So, I just added it as another skill for the Rifleman for now.

Photobucket
http://anomalousunderdog.herobo.com/Unity/DZZPrototype.html

Its still a work in progress, there's no icon for it yet, using the skill doesn't do anything besides launching the grenade (which is only a sphere for now); it doesn't do damage yet.

Well, its 3 AM, I'm hungry and I need to sleep. I better go.

Wednesday, April 21, 2010

Strategy RPG Test Update

In the end, I ended up using plain old object-oriented programming, subclassing skills to more specific skills. I thought using the component-based approach would give little benefit, seeing as in my design, each skill is quite unique from one another. Having a mix-and-match component implementation would be of little benefit since I would then have made components that, in practice, would only be used once or maybe twice.


Photobucket
http://anomalousunderdog.herobo.com/Unity/DZZPrototype.html


New in this update is the Rifleman's unique skill, the Bullet Barrage, a ranged attack that, while powerful, leaves the Rifleman unable to attack for 1 turn afterward because he needs to reload his expended ammo.

Under the hood, a lot of refactoring was done, a few bug fixes, and now the game loads unit information from XML files. The Rifleman's XML file is found here. It should be noted that the values used are simply test values.

Monday, April 19, 2010

Component-based or object-oriented?

Since I'm using Unity, whose scripting uses the component paradigm, my implementations use components too. However I get into this situation where a particular collection of components are similar with each other, their source code literally the same with each other save for a few key areas, those key areas giving them distinction from each other.

For example I have a base attack skill, and then I have another, similar attack skill except that it has a cooldown effect. The two are virtually the same except the latter has added code for handling cooldown effect.

In object-oriented programming, I would create a subclass of the attack skill as something like AttackSkillWithCooldown and override the member functions needed to add the cooldown effect.

In component-based programming, I would create cooldown as a separate component to be attached to the attack skill component.

So on one hand I have object-oriented programming which I'm used to and know how to implement, and on one hand I have component-based programming, which looks like more work upfront. I'm still not sure how to implement things in component-based programming but I can't help but think it may be worth it in the long run.

Monday, April 5, 2010

More Unity 3d Projects

I've been more busy with Unity 3d lately. Working on features that I'll be including in the Strategy Game Test that I made.

FogOfWarTest
Here I made an implementation of fog-of-war for strategy games. It uses a mesh blanketing the terrain, whose vertex colors I set depending on if units are in range or not. Enemies appear and disappear depending on whether they're on fog or not.
Photobucket
http://anomalousunderdog.herobo.com/Unity/FogOfWarTest.html


ProjectileTest
Here I made code for launching projectiles like grenades.
Photobucket
http://anomalousunderdog.herobo.com/Unity/ProjectileTest.html


Unit Insignia
I'm planning on letting players upload whatever picture they want and use them as unit insignias; logos visible on the unit 3d models themselves when battling.
Photobucket


XmlTest
I made a simple XML parser which I will use to load unit properties from XML files. I did this so unit properties can be edited without requiring Unity being run.
Photobucket
http://www.unifycommunity.com/wiki/index.php?title=TinyXmlReader