|
Category:
Programming

Lots of progress was made over the past few weeks. The first week went fast, as I already had a number of things in place; mesh format, loader, animation format and loader along with complete skeleton based skinned mesh animation system. Along with the mesh loader I had already built in zip7 support for compression. The final step in adding in mesh support was to make them VBOs. I have to say I really enjoy programming on the iPhone. I've always loved embedded devices and the challenges they bring.
Week two I didn't get as much done, as I was away for 3 days, but still managed to get some things done and keep on track. During the second week it was time for base camera controls and frustum culling. I was able to use most of the camera code from previous projects so it helped to speed things along. I then implemented a 6DOF camera. Next was calculating the frustum and storing it for culling and adding support in for bounding box, spherical and simple box culling. I chose to use spherical culling for scene objects keeping the checks light and fast. Now with frustum culling in place, next was a need for scene management, in which I chose to use an Octree system. Scene objects are loaded into an Octree and just a simple box culling method can be used on the Octree to see if it's visible or not. If not visible then any objects inside assigned to it do not need to be checked for culling, again saving some CPU time. With this in place a scene of 60,000 polys was easy to handle. This is one of the levels for iKrabbit that has been seen in previous screen shots, it's a 2.5D view with enemy AI, animated main character and mounted weapons. On generation 1 device iPod I was getting 45 FPS and on generation 3 60FPS.
Next came sound. Instead of re-inventing the wheel, I was really enjoying using CocosDenshion previously, so I brought that over from Cocos2D which was written by Steve Oldmeadow. Great lightweight objective-c wrapper around openAL. As well João Caxaria supplied a SimpleAudioEngine to use with it. Next was a memory manager written by Paul Nettle. Great tool and excellent for watching memory and keeping those nasty leaks away. It's only enabled during debug builds.
Week 3. First I brought over our SQLite3 tools, used for saved games, player stats and a prefab system currently in the works. These routines have been used over the years in various projects I've worked on and are at the heart of our Database File System. I haven't decided whether to bring the DBFS into iCauldron3D yet, but it's still early.
Now it was time to go 3D. First I needed an environment in which I could drop a character in, attach a 3rd person camera to and run about. So I figured let's use that Octree to create a terrain system. So for the past two days I've been playing with the terrain system, enabling collision, character control and so forth. I tested using TRIANGLE_STRIP terrain and just TRIANGLES based terrain. Reading a heightmap is straight forward and even creating a VBO terrain. As you can imagine a straight TRIANGLES based terrain renders quite slow - around 20 FPS for a 512x512 heightmap. TRIANGLE_STRIP renders quite fast and I can just brute force render the entire terrain stored as a VBO. A 512x512 heightmap only took up 1M of RAM and rendered fast at 50 FPS on a generation 1 device, using a step of 16. This means the terrain is generated every 16th pixel of the heightmap. At a step of 8 the FPS was down to 40 and at 4 the FPS dropped to about 20 - 30. This seemed like a bit of waste though, as you can only see sections of the terrain at any one time. So the next step was to put the terrain into an Octree system. Since TRIANGLE_STRIP is a little more tricky when dealing with slicing it up into an Octree system, I went with TRIANGLES first.

This is a 512x512 heightmap with a single 1024x1024 PVR texture. The yellow lines are debugging lines to see the Octree in action. The octree can be set to a maximum poly limit per oct node, as well the maximum allowable splits. This shows 200 poly limit with a maximum split of 4. Now a straight TRIANGLES based terrain was just as fast as a TRIANGLE_STRIP based terrain. This is using a step of 8 and yields 42FPS.

This shows a maximum poly of 1200, with a maximum split of 4. Using a step 8 again, yielding an FPS of 30 - 32.
So now the next step was to put the TRIANGLE_STRIP into an octree system. First tests using a step of 8 I saw FPS around 45FPS and with a step of 4 the FPS remained at 45. So I'm quite pleased with this result. :)
Now finally what I set out to do.

This shows 3rd person camera with a character running along the terrain with weapon in hand. Terrain collision is in place as well as gravity and acceleration. I may add in some basic billboard grass with wind movement, not a lot though. As well I may place some objects within the scene and try out some combat!!! :D
|
|
Category:
Programming
This is a good question. Why create another iPhone / iPod touch game engine when there seems to be a number of good ones out there. Well I looked at iTorque3D the price is right, you get the source and it comes with an editor. It also comes with a lot of source code that you will need to familiarize yourself with. This is not a problem for one such as I... I read code better then English. To be honest I was tempted, but then I saw it was a pre-order price. Later, when talking to a colleague whose studio currently uses this for iPhone games, he assured me that you do get it right away. It's just your part of their beta. That's fair enough and I'd still be tempted if I had not started to travel down another path already.
So next I looked at SCIO2.. Great little engine. 3D has some good games out in it.. and looks nice. However it's so reliant on Blender3D for everything and being so closely tied to Blender3D, this was a turn off as we use Lightwave currently. This would mean writing a Lightwave layer and stripping out all the Blenderness.
So next on the list was Oolong. Nice engine again. Pretty bare bones. The demos are good they show up to 60,000 polys rendering at speeds of over 50 FPS. The engine is all in C++ with some Objective-C++, of course (.mm files instead of .m). It's pretty bare bones and is good to look at to learn different specifics about iPhone OpenGLES development. Documentation is lacking which isn't really a problem. Examples are good but there seems to be some core simple things missing. For example; device orientation. Most of the examples run from a left rotated device orientation, and yet this is not set in the application. You just need to tilt your device. It left me wondering why and what sort of other stuff was like this. One of the examples that attempts to use VBOs in an expensive way (uploading every draw cycle) left me wondering what else was like this. Honestly I can't complain about this engine, but I really didn't want to review all the code.
The engine which will remain nameless.. Price is insane for what it is, you must by a pro license for the main desktop engine and THEN buy a pro license for the iPhone. In Canadian dollars this will run you about 4K. The two license requirement is ridiculous, if all you want to do is iPhone development. Also you get no support and no source code. Well after my experience with our desktop game that uses this engine, I will NEVER get into an engine again where we don't have access to the source code. Memory leaks, performance problems in which I have no control over and no support to get fixed, things that if I did have access to the source I could fix easily. As well it's based on a bloated library in which they blame ALL their problems on. Well in my day as a developer, we just didn't have the excuse of blaming a library or SDK for our problems. Business side would just say "You chose it, no one held a gun to your head, so take responsibility for it and fix it". Beyond the fact this library is opensource, they can't be bothered to take responsibility for it and just shrug their shoulders and focus on PR propaganda to say how great they are. Personally if they spent that time, effort and money just improving their product it'd be much better and benefit their current customers that they ignore. Enough said...
Next I looked into Cocos2D an excellent 2D engine, all in Objective-C, great clean coding, easy to follow, good documentation and great community. However the name says it all - Cocos"2D" and we wanted to be able to do 3D or at least 2.5D. So we thought maybe 2D would be better. So off we went. Creating sprite sheets was easy, I could use our current 3D models and export key frames to a single image and generate a sprite sheet. Though looking at all the angles we wanted, quality and so forth, we saw that it would take up less space and less memory to simply use the 3D models directly. As well creating the sprite sheets would leave some fringies which Teri had to clean up. To do all our characters in all their positions, including monsters would be time consuming and texture-wise take of up a lot of space. So down this path with Cocos2D we went. I brought in our 3D skeleton based skin meshed animation system. Next I had to bring in zip 7 compression to keep the mesh files and animation files small. So initially we were at a 30M install and with zip7 down to a 6.7M install. However this is a 2D engine, which doesn't have support for 3D transparent meshes. Sure I could hack something in and own the source code that way. But why? There are many features within Cocos2D that we just wouldn't use and re-architect Cocos2D to support 3D just started to make less sense. One of the pains I started to run into, is I had to maintain two sets of world coordinates; one for Cocos2D features and one for the 3D world. Cocos2D sets the the 2D images very far away from the camera view, which is ok if your not using lighting. But once you start introducing lighting and shaders for 3D objects it may look great on the emulator but on the device itself it looked terrible.
Now we come to iCauldron3D. None of the above engines really fit our needs and requirements to the exact specifications for the game we wish to make. As well we wanted to offer modding to our customers to extend gameplay. I've always wanted a game engine in C, no C++ no C# just the straight pure speed and power you can get from well written C code. I've been programming in C for 29 years and not just as a job but as a hobby as well. A lot of great things are made in C today, and when dealing with embedded devices you really want to get as much out of that little processor as possible. Secondly I though about other developers who do iPhone / iPod touch games more as a hobby. What if they could edit their game and levels right on the device? So while commuting to work or school or standing in a shopping mall, you could work on your game. Sure it would be lovely to have XCode right on the device, but now we're just getting a little crazy. Over the past 5 years I've developed and built on a solid custom mesh format, custom animation file format and skeleton based skinned mesh animation system. It was written all in C with the intention for cross platform development. Most of our games have focused around the features within this system; up to 32 mount points per character and 200 bones on average with up to 400 bones for high poly characters with little impact on speed performance. As an animator and programmer it as given me a unique perspective on this process and pipeline. As well I've had to write and maintain exporter plugins, converts and so on. 
iCauldron3D was born. When I described the types of features we were looking at, the image of a melting pot or Cauldron came to Teri's mind and since it's aimed at iPhone / iPod and eventually iPad devices it only seemed logical to call it iCauldron3D. It's a mixing pot for game developers, to put in their ingredients for their game, light the fires of imagination, boil it up and presto like magic have a game. We decided to opensource the engine under zlib license since we have benefited from opensource projects over the years ourselves.
Being a maintainer of Irrlicht for OSX some have asked why not Irrlicht? Well to start with the person who did the initial port to iphone, sat on the code for over a year promising to contribute it back. When they finally did the code is broken. Sure I could dig though the code and fix it and deal with any other issues that may come up. But why? Sure irrlicht offers many features loads many file formats, but those are not features we want for our iPhone game. Also it's all in C++ which is fine, but does have some overhead costs. Certain performance issues would have to be dealt with (needless tight loops and too many of them). Irrlicht is great for desktop and anything that has power to run it. But it lacks in an Editor, irrEdit which seems to be dead, just doesn't cut it. And it's also Windows only, kinda pointless with iPhone developed on OSX. So to use Irrlicht would mean stripping it down and rebuilding parts specifically for iPhone in mind. But as I said before I always wanted a C based engine. 
Once we launch iKrabbit we'll be uploading the source for iCauldron to SourceForge, the page is already setup, domain is already registered http://www.icauldron3d.org. Be expecting to see this launch within the next month.
|
|
Category:
Game Review Blog
My favorite types of games are things like Soulcalibur, American Mcgee's Alice, Devil May Cry, Bio Shock, Tomb Raider, Blood Rayne, Kain Blood Omen / Soul Reaver and various games alike. So if you like these kind of games you will probably like KrabbitWorld Origins.
Along with the mentioned games, I do enjoy a good RPG like the Shadow Hearts series, especially the engaging combat system. What I don't like are games that have the click and pick your nose combat. This is where you choose what to do and then it's completely up to the system whether you hit or miss. Well I'm a skilled fighter and hate being at the mercy of a random roll of dice to hit or miss.
Though I do play some of those games and they're easy to take advantage of, all you need to do is lopside your character. Just specialize in one thing to the max. Developers don't usually test for this and this allows you to make a fairly powerful character. In the click'n pick combat I find myself getting up during combat, walking away to get a drink or whatever and let the game play itself. You can't do that with all click 'n combat games though. Ones like Sacrfice or Spell Force series, beyond the attacks you can use, you also command large forces and your quite occupied / engaged at all times. :D Now thats were click 'n pick makes sense to me. Action Video here This is KrabbitWorld Origins, a true hybrid game. It takes Action, RPG and Fighter all rolled into one. Along with a minor, very minor, RTS element you can control your henchman with. You can choose up to 6 characters to play and up to 5 different henchman to accompany you. Action: Well it's certainly very action; this is it's primary focus. It has 4 action game modes to choose from, Arcade, Versus, Team and Survival.
Movement is fun, you can jump and have full air control. Hold down the space bar to slow your descent and you can glide. The dash attacks for melee fighters are just fun. it almost makes you a range fighter (though you're up close and personal). Instead of having to run up to your target and then attack, all you need to do is get in range and hit an attack key and dash!! you're up there mashing your target. Hold down shift to block and any movement key to perform a dodge.
Melee attacks and the combo system; it isn't nessessary to use to play, but is certainly fun. You have 4 melee attacks. First is weak, but fast, 2nd strong, the 3rd is a double hit attack and the forth is the strongest attack and knockback. The stronger the attack the more damage you do and the more stamina it uses. If you hit your next melee attack before the combo timer runs out you can increase your combo count, which increases your damage and uses less stamina. If you hit the key when each area is lit up you can get, fair, good, excellent and critical hits. For defeating bosses this is good to master and will be most fun in PVP. If you get a critical combo, your attack count increases by two. 
Along with melee attacks you can perform air attacks. Jump into the air towards your target and hit a melee attack key. You will perform a dash attack mid air, then just keep striking to stop yourself from falling. You can air jump at any time to get out of the situation rather then just falling.
Magic users have two types of magic. Combat magic and Aura magic. Combat magic is very 3rd person shooter base and you can perform multishot. To do multishot jump into the air and as your krabbit starts to summersault, start pounding that combat magic key; you can get anywhere from 2 to 5 shots off. This is handy for flying targets as well as big bosses.
Aura magic is your most powerful magic. These are big attacks, but you need to stand still to cast and the cast can be interrupted. Two types of Aura magic, Friend or Foe. Friendly aura magic; you can cast shield, heal and various stuff like that. With Foe aura magic, you can cast your ultimate spells like Heavenly strike, wall of fire, YORG!!, Valkeryie's Wrath, Rain Lightening and Sonic Boom. All of these spells are AOE. Other types of aura are hold, vampiric heal, (damage your foe and gain their health), posion, dazzle, etc.
Whether you want to specialize in melee or magic, you can enhance your attacks using scribes and potions. As well you can use food to heal / replenish your stats and also watch out you don't starve to death! :P RPG: First off there is character building and customization. Beyond the action controls and your own combat skills, you can build up your Krabbit's stats to enhance your own type of play. Build strength and constitution for melee characters, but don't forget about wisdom. Wisdom helps to prevent your attacks from getting interrupted. So for those who may not have the twitch factor down yet, you can balance your play with building your krabbit.
In story game mode, you have 35 quests to complete. This is RPG lite. Not a lot of blah blah blah, which I personally like. You get your quest, head out to do it and kick some butt. As a spell caster you need to complete some of these quests in order to fill up your spell forge. This is the source of your power as you get to higher levels. It's also a nice and easy way to slip into the combat and get used to it, as the action game play modes can get quite insane as your character level gets higher. 
There is NO grind here. You level fast, you gain a level each time you complete and gain a quest. Tomes placed throughout the land in story mode, give you massive XP. The level cap is 99, which doesn't take long to reach. If you play through the entore story mode, you can end up with a level 70 - 80 character fairly easy. And once you reach 99, it doesn't end there. You can "level lap" each time you gain 99 again, you gain 3 build points to continue enhancing your krabbit.
To build your krabbit, you can gain levels. You get XP per hit based on the damage you do. The higher the damage the more XP you gain. Along side this you can get weapons, armour, ear cuffs and bracers to enhance your krabbit. 
Fighter: This is not a fighter game in the traditional sense of games like Soul Calibur. It doesn't have throws or grabs. What it does have is complete 6 degrees of freedom movement. It does share the heart pounding fast paced rush of fighter games in the action game modes. Arcade game mode is very fighter based. And each enemy you really get to trash / beat em up! The music in the fights really enhances the play and gets the heart pounding. The standard monsters in the game are fairly easy to beat once you've mastered the combat system and even if you haven't. The bosses are a little more challenging, but it's the other characters that are the most challenging. 
The main characters are Kria, Krei, Teella (dead), Ogre, Cleria and Teella (Live). Each has their own unique powers and abilities to use their utlimate strikes on you. Kria has heavenly strike, where she rains down a guardian upon you. Teella dead uses her pumpkin bombs and wall of fire. Ogre is tough and strong, he has Yorgers, little tazmanian type devils of himself spinning around with his dual axes. Krei is a bard and a true guitar hero :P he has Sonic BOOM, with one great strum of his guitar he'll blow you away with his loud speakers. Cleria uses Vaikerie's Wraith to hold and spear you, she also thorws holy spears which explode on impact. And lastly Teella live, uses death dragons and rain lightening. Rain lightening is probably one of the most deadly spells that really get me, but wall of fire is up there too. These are both DOT attacks (Damage over time) as well AOE. Watch out when fighting the AI they're really good at sneaking these attacks in on you. You do have a chance to block any of these attacks, but the RPG element always gets factored in, so even if you block it, it may still break through your defenses. This is were high wisdom stats can really help you. 
Henchmen: You can choose from 5 different henchmen. Some specialize in melee and others in magic. Blazie is by far though the most powerful, being a fire medium. Her weapon is her sunglasses! :P Mehli is a ninja, with a great katana. Drake an adventurer with a big war hammer. Ivy a beast realm amazonian warrior with a spear and Talehma a scorceress from the realm of dreams. Not only can your henchman help you, you can toggle them in and out of combat mode, click to plant a flag to tell them where to go or just hit Z to drop one were you are. You can also control them directly, by clicking on the crown by their hud or pressing backspace key. While controlling them directly your main krabbit will be ignored and shielded. If your main Krabbit is defeated you can switch to your henchman to finish the job! :D 
Overall I quite enjoy the wide range of gameplay. Sometimes I feel like questing and other times I just wanna kick butt and chew bubblegum. I always enjoy customizing my character's look and powers. There is a demo avaible for both Mac and Windows, which gives you a taste of the story mode play and arcade mode game play. The play is unlimited so you can play it and learn alot of the tips and tricks mentioned here.
You can download them off the Krabbit Online main site link here, just scroll down to the free demo heading.
You can also download a PDF of the manual which is also included with the demo download.
|
|
|