Monday, February 9, 2009

Of file formats and black triangles

So here I present to you another screenshot of the game in progress!

Free Image Hosting at www.ImageShack.us

It doesn't look it, but there's a lot of things going on behind this simple 'level with weird red/yellow crap over it'.

The Red/yellow tiles are indicative of where the battle zone ends. I figured that you should be limited to a small 12x12 'arena' while doing combat instead of being able to run around the entire room, and possible the entire level. While the idea sounds interesting, it would cause the program to become too complicated and it would be too much work for the potential benefits you'd gain from it. So I left it out.

Now, as I mentioned already, the monsters get created properly and everything and what you see here is actually the 'in combat' rendering at work. I can pretty much start doing the actual combat system now. Woohoo! I hope it comes along in the next few weeks!

--

Now I said I'd talk a bit about my file format, and I decided to keep things short, because it really isn't all that.

I wanted a file format to store basically anything in. Something that would be fit for savegames, but also monster prototypes and attacks, levels and even the configuration file for the game itself (with video settings and whatnot). Also, it had to be readable in a normal text editor and it should be easy to write a parser for.

The direct result is the RCF file format. RCF stands for 'Readable Comma-seperated Filetype' and it's just that. I can yap on about it, but I think I'd better show a snippet to clarify.


** SDLRogue Monster and AI Attack database **
,1
,0,20,0,2,2,2,2,5,1,2,1,-1,30,1,15,2,1,3,-1,35,4,-1,Wolf
,0,25,0,2,1,1,4,5,1,2,1,-1,30,1,15,2,1,3,-1,35,4,-1,Undead Wolf
,-1
,0,0,1,4,3,0,95,0,1,2,1,0,0,0,Slash
,0,0,2,5,6,0,90,0,1,1,1,0,0,0,Maul
,-1
,


Looks easy no? With the game comes a readme that explains each variation in great detail so if this looks confusing, don't worry. Also if the game turns out to be played by anyone but me and my closest friends/relatives I'll probably create an editor for it as well. But we'll see how turn out.

So the next few weeks will be the combat system and the GUI for that. Should be interesting/aggrivating.

See you next week!

No comments: