Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

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

Tuesday, December 1, 2009

Back Again

Thought I'd get back to blogging after all this time. Long story short, I've been using Unity 3d now.



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

A side-scrolling action game. There was supposed to be more features but I never got to finish it. The white thing in the back is supposed to be a caravan that the player is guarding while it travels. Shown here is a test level with a few enemies.





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

A zombie game, but similar to Crimsonlands. There were supposed to be several modes of play but only "Survival Mode" and a prototype "Assault Mode" was implemented. There was supposed to be leaderboards too, but it would've required a MySQL database server hosting which I don't have.





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

A work-in-progress of a strategy game I made. Its actually a prototype I hope we could show to investors to get some funding to make it a full-fledged game. Though its doubtful because of the economic recession.