Page 1 of 3

Source for Alpha Foundation

Posted: Sun Mar 11, 2007 8:21 am
by x4861
Due to popular demand, I'm releasing the source code for my game Alpha Foundation.

Unfortunately I no longer have time to work on this project... although, from the functional point of view, most of the game mechanics are finished. The development of story line does take A LOT of time :)

Anyway, look under "src" directory. It is Visual Studio 6.0 project. I am confident that you'll figure out how it works :) As for all 'cool' code - there are no comments... hehe 8)
Everything under "MDL" is for managing NeverWinder Nights MDL model format.

http://renars.m6.net/games/

Cheers!

Posted: Sun Mar 11, 2007 1:29 pm
by andrei25ni
Cool :wink:

I'm sure the code will be useful for those who want to learn more stuff, including me :D .


Cheers.

Posted: Wed Mar 14, 2007 8:11 am
by veegun
Thanks, x4861!

Wow, it reminds me of the Final Fantasy series (menu, random monster encounter, combat system, etc.).

It has a lot of systems in place for people to study like intro, battle, animation, scripting, dialog, shop, buy/sell, leveling, stats, etc. This is great for people who likes RPG.

It would be cool if everyone chip in and finish this project. :)

Posted: Wed Mar 14, 2007 8:34 am
by veegun
heh, just tried building this with VS2005 ... 199 errors and 489 warnings! I guess it's going to take some work. :)

Nevermind, i got it to build now. I get this message in the dos console:

Could not open file of texture mesh1156

but the game seems to run fine without it. :?

Posted: Wed Mar 14, 2007 11:36 am
by sio2
The game is great. Could do with some lighting. :wink:

Posted: Wed Mar 14, 2007 12:32 pm
by rogerborg
Thanks for making this available; it's very well featured.

What's are the license terms? Read only? Non commercial? Public domain?

Posted: Wed Mar 14, 2007 6:29 pm
by veegun
Anyone know what the .dat format uses (data.dat and data2.dat)? I can't seem to open it. Is it a NWN format? From what I've read, that's not one of the format/extension NWN uses.

I found where it reads it in the code:

Code: Select all


		if(tmp.BIFID == -2) //this is my dat file
		{
			io::IFileSystem* FileSystem = device->getFileSystem();
			io::IReadFile* file = FileSystem->createAndOpenFile("data.dat");
			if(file)
			{
				file->seek(tmp.Start);
				((io::CReadFile*)file)->Filename = Name.GetBuffer();
			}
			return file;
		}

So, looks like it's a custom type made by the author. :(

I'm new to NWN format. I did download the official NWN mdl viewer. Which is cool, because you can download and view a page full of characters/models made by bioware:

http://nwn.bioware.com/downloads/viewer.html

I guess the "regular" build of irrlicht doesn't support NWN mdl format? So, we have to use the custom one that comes with this demo?

I'm reading through the modeling tutorial ATM:

http://nwvault.ign.com/?dir=resources/m ... orTutorial

Be sure to get the other NWN viewer to extract stuff. The site is currently down so I don't have a direct link to it. The file name is "NWNViewer.V1.0.1" not to be confused with bioware's NWN MDL viewer "NWNMdlViewer1.0."

Fasinating stuff.

Posted: Thu Mar 15, 2007 12:23 am
by x4861
You can ignore the "Could not open file of texture mesh1156" message... one of the models has reference to such texture, but it is never shown on the screen; most probably one of the parent-models.

This is how NWN .mdl format works: there is a parent model for all human models, which is used to define all movements. The real models inherit some animation stuff but redefine some mesh stuff, and you get yourself different looking people who can walk/run/do things.

About license - don't say you made it! otherwise you're welcome to use it as you please :) change it, complete it, play with it as much as you want.

Abou the .dat files; they are actually like zip and contain many sub-files. You can use my code to extract them to individual files. Just add some hook where the index file is read (the smaller of the two is index file). Otherwise they contain standart .mdl, .mod (neverwinter model file), .mid, .txt and such.

The game has built-in support to read individual files instead of the compressed files too... somewhere.... it has been a while, don't recall from the top of my head exactly how/where to turn it on.

Posted: Thu Mar 15, 2007 10:26 am
by BlindSide
Wow this game is amazingly well done, good work! I was wondering where that fairy was going at the start haha then it turned around. I love the old school RPG look and feel, its great! (And the space-ness of it)

Posted: Thu Mar 15, 2007 4:28 pm
by TheRLG

Posted: Thu Mar 15, 2007 5:42 pm
by veegun
Thanks for the reply, x4861. You've answered all my questions. :)

I plan to start by fixing some annoyances like the camera. Which doesn't feel right for some reason.

Also, it would be nice to be able to adjust the speed of the dialog (scale of 1-10; 1 = instantly show conversion text all at once).

During combat, maybe add several camera angles as the default doesn't show the enemies too well.

A creature database like the ones in FF series on the GBA would be cool too.

Making the dialog/menu color customizable would be another addition.

I didn't see an overworld map. So, that would be neat too.

The transition from moving between town/building could be smoother.

I would also add an option menu inside the game to adjust the video setting, sound, graphic, etc.

Anyway, that's what I plan to look into to start off with. :)

Posted: Thu Mar 15, 2007 10:03 pm
by BlindSide
If I worked on this I would make the running/turning a little slower because it is too fast. Also the doors take too long to turn the handle, they should open instantly.

Posted: Fri Mar 16, 2007 3:43 pm
by veegun
@BlindSide -- yeah, I agree with you on both the turning speed and doors. I think either make the speed of these things adjustable in the options screen within the game or place them inside a configurable .ini file.

Because I think it may vary with the computer speed of the user/player. So, if you have a slower machine, it might be okay as is. Maybe x4861 has a slow computer (compared to a 2.4 Ghz - 3.0 Ghz setup) -- I have a duo core 2.2 Ghz setup.

Anyway, I'm downloading the CEP v2 pack (400 MB!) community pack from users of NWN game. I can't believe the amount of user-created content from this community.

Simply amazing...

You know, is there anyone thinking of porting x4861's MDL code into the official irrlicht line? That would be cool especially with the large amount of pre-made models to play with.

Posted: Fri Mar 16, 2007 3:54 pm
by BlindSide
veegun wrote:@BlindSide -- yeah, I agree with you on both the turning speed and doors. I think either make the speed of these things adjustable in the options screen within the game or place them inside a configurable .ini file.
Thats silly why not just make it framerate independant, using a timer or something. I doubt any serious game would allow the user to select how fast they want to run :P

Posted: Fri Mar 16, 2007 4:52 pm
by veegun
Well, there you go. Another must-have feature -- frame independent implementation. 8)

Off-topic: Lately, whenever I do a preview before I submit my post, I get this message:

No post mode specified

Anyone know what that means?