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.


Language Discrimination


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>
[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.

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.


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.

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.

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.

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.


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


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.


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.


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.

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.

Here I made code for launching projectiles like grenades.

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.

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.