[Help Wanted] "The First King" - FPS game. PRE-ALP

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

[Help Wanted] "The First King" - FPS game. PRE-ALP

Post by christianclavet »

Hi.

The First-King is a single player open source game, that will be using IRRlicht and IRRKlang for the engine.

IRRai will be used for the AI engine. We'll try to develop our code in classes and that those can be re-used in other project.

The objective of the project is to create this game using a team approach. A documentation as been written to give the guidelines of the project.

The project is in now in phase 0 - Pre-production

Completed task - and pending

- Compiled IRRLicht 1.4 with DirectX.
- Converted the IRRscene loading code
- Defined a basic event receiver (ESC key for exit)
- Started on the camera rigs functions
- Basic waternode with swimming,dive and float capabilities
- Using the Metro Demo level for now, testing only the engine in 1.4

Level design will start in Alpha stage. Phase 1

I've put the project on Sourceforge.
This will be a team project. Developpement will be using "subversion" SVN mecanism.

---- Project info
The project will be hosted on sourcforge
http://first-king.sourceforge.net

---- Project documentation
EDIT January 2008 -
I've created a documentation for the project, it was inspired by Halifax on his project planning.

The link to the project thread containing the document planning:
http://irrlicht.sourceforge.net/phpBB2/ ... 528#132528
The direct link to the document:
http://first-king.sourceforge.net/docs.html

Download binary and source from Sourceforge
http://sourceforge.net/projects/first-king/
Direct link to download page:
http://sourceforge.net/project/platform ... _id=207865

Here is the last video made on YouTube:
http://www.youtube.com/watch?v=8IY2B_qeFm0
---- SVN informations
Here is the link for the SVN:

This project's SourceForge.net Subversion repository can be checked out through SVN with the following instruction set:
svn co https://first-king.svn.sourceforge.net/ ... first-king first-king

Camera FPS rig is almost complete now:
Here is the key mapping:
W-S-A-D (Moving/Strafing)
C - Crouch (basic need to be set with better smoothing)
CAP LOCK - Walk (will change for a toggle)
SPACE - jump
Q-E lean the head for corners
SHIFT (Not implemented -> SPRINT function
MOUSE WHEEL -> (Not implemented -> REAL Zoom function (may be tricky))
--------------------------------------------------------------------------------
[EDIT] Added an example to use the camera rig class

File is here (Binary and source) :http://downloads.sourceforge.net/first- ... ze=3474217

[EDIT] Changes (Feb. 7Th, 2008):

- Now Animators applied to the camera are taken into account, this could have caused some strange behaviors. I had a timing problem that caused this to not work. Now fixed.

- The include is almost completely indepedant from the user source now.
When you create your FPSCameraRig, you enter the device pointer as parameter.

- CuteAlien, gave me the solution for Event Handling (sharing events with multiple event handlers). The source is included in the example (eventreceiver.h)
With this you can add multiple event receiver classes and this "master class" will maintain all of them. This was required on lots of my projects (gui handling, different keyboard mapping for rigs etc) Very simple to use and setup. Would be nice if this would be put in the next version of the Irrlicht SDK.

- Added more functions and command to tweak more the current rig. But the rig can be started with only 1 command for Init and 1 command for refresh. It's pretty simple.
See the example for the documentation for the functions. I've put also the documentation in the last thread.

Also this is the file structure if you want to recompile the project inside your Compiler:
Image

UPDATE (March 15, 2008)
I am back to school now(Ubisoft Campus) I am in a modeling project (Teacher asked that we model a custom chess set, I deciced to build mine based on the '300' Spartan warriors (My second week in class). So it's very ambitious, and I'm at school 12 hours a day praticing a lot on modeling in 3DS. This project will be completed soon, and I will be back on the code (Less than before since I'm at school).

On the good side, one of the students in my class is checking the IRRlicht SDK and is willing to participate in my project as a coder (Been coding using the DARK SDK for some times and done some games projects). So we'll be 2 coding soon on that project. This project interested a lot of them in my class (Including the teacher). I could perhaps have others joining this year.. (We're 15 talented guys learning to be professionnal level designers)

Also, when I will have completed my training on 3DS (Should be in a month or so). I will start ALPHA phase 1 and start the modeling on the environnement.

I will have to learn how to use properly a "coding method" as the IRRlicht one. I had a good comment that the code is hard to read. I'm still learning myself how to code in C++ and OOP concept. Meanwhile, I apologize on those who had a hard time reading the code. (Some volunteer to clean it up to show me the proper way? )

David almost completed the warrior (Done a great job! ). He will rig the character, and will have some animation done. He's checked the movie '300' as I recommended him, because I want them to behave like spartan's warriors. (Buckle and spears). (some of them will have swords)

JP, is advancing on the IRRai engine and it support now pursuit and flee, I will try to incorporate the AI engine with some characters to check in end june, start of july...

[EDIT] UPDATE: April 15th 2008
Updated the game design documentation, so you'll have much more info about everything I would like to do in this project. This is not totally "fixed" since, it will surely change in each developping state change. This is a "guideline" documentation.

http://first-king.sourceforge.net/docs.html

If you want to know more about the project, please check the documentation. Contact us if you'd like to join the team.
Last edited by christianclavet on Tue Apr 15, 2008 11:46 am, edited 21 times in total.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

Got it from SVN. Seems to work OK but I don't like the collision system - getting stuck, hopping down flat ramps, un-smooth stair traversal, etc. I'll look at switching to Newton or Bullet. I'm in the middle of converting my old NewtonPhysics demo to latest Irrlicht so I may as well look at this at the same time. A system of building either Newton or Bullet physics from a scene in an IrrEdit file would seem be useful anyway.

Trilinear or Aniso would help as well - in some places you can see the mipmap levels (textures with high frequencies).
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Thanks Sio.

I'm planning to include a way to replace the collision, but would like to implement it generic. (Would have to write in some way that we could wrap Newton, Bullet or any other and not change all of the code)

For now. It's only the first sketch at it (not even a level modeled now). For the most part, it work about the same as in my level demo. Using standard Irrlicht collision spheres.

For the texture, I would like also to put some kind of flag to select the type of texture filtering. (So I could place it and the user could choose he's preferred type in the DISPLAY SETUP panel)

I'd would love to have the motion blur that you created for your demo! :D
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Yes Pre-Alpha stage!

I have been wanting to write a Bullet wrapper for Irrlicht, but haven't had time. Imho Bullet is the best available free physics engine! I need more programmers before writing the wrapper though, but they are few and far between.
TheQuestion = 2B || !2B
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

I don't wanna get this project off-topic, but a bullet library would be great.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

christianclavet wrote:Thanks Sio.
You keep forgetting the "2"! :wink: CPU's are made from Silicon Dioxide not Silicon Monoxide! :lol:
[Yes, I know it should actually be SiO² not SiO2]
christianclavet wrote:I'm planning to include a way to replace the collision, but would like to implement it generic. (Would have to write in some way that we could wrap Newton, Bullet or any other and not change all of the code)
That's absolutely what I have in mind. A generic physics class called IrrPhysics. IrrPhysics::init(PHYSICS_NEWTON) or IrrPhysics::init(PHYSICS_BULLET). Then IrrPhysics::createFromScene(ISceneManager *smgr) with the loaded IrrEdit scene. I may require things like a CameraSceneNode in the IrrEdit scene so the physics engine can automatically create a character controller whilst recursing the loaded scene. I just want something simple to begin with anyway.
christianclavet wrote:For the texture, I would like also to put some kind of flag to select the type of texture filtering. (So I could place it and the user could choose he's preferred type in the DISPLAY SETUP panel)
My last two demos have drop-down boxes so the user can choose bilinear/trilinear/anisotropic. Makes a very noticeable difference in some scenes (such as the City Driving demo).
christianclavet wrote:I'd would love to have the motion blur that you created for your demo! :D
Belfegor's motion blur code should work with Irrlicht 1.4. If you look at the thread where he posted his code you'll see that I tested it last week and it seemed to work OK.
My motion blur is for IrrSpintz and uses a full HDR floating-point pipeline, which vanilla Irrlicht does not yet have. Belfegor's version should be OK with vanilla Irrlicht, though.

Everyone: there's already a Bullet wrapper!
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

Post by buhatkj »

[quote="sio2"] A system of building either Newton or Bullet physics from a scene in an IrrEdit file would seem be useful anyway.quote]

In fact i have just such a thing. A while ago somebody posted some sort-of incomplete code for a bullet physics animator, which I combined with some code I had posted a while ago for walking the scene graph and I made a system which could set up physics for each scene node which was labeled with one of several possible ID's. So in Irredit you make your scene, and label each node you want to be simulated with physics with an ID which tell the code what type of rigid body it is.

I will warn you though, the physics code is a bit buggy, and I have not yet had time to debug it. I also have a version which uses irrnewt 0.4, but the terrain code for irrnewt never worked for me.

here is the 2 key functions which accomplish this:

Code: Select all

bool GameApp::FindPhysicsNodes(scene::ISceneNode* start){
	if (start == 0)
		start = Irr_SceneMgr->getRootSceneNode();

	//this should be a big switch that makes the different kinds of bodies for different ID's
	//does this even need a return value??
	int ID = start->getID();
	//switch(ID){
		//case 1:
	if(ID == 1){//a simple closed body based on the mesh
			cout<<"found a one"<<endl;
			cout<<"got mesh name:"<<GetMeshNameFromNode(start).c_str()<<endl;
			//make a body
			irr::newton::SBodyFromNode meshData;
			meshData.Node = start;
			meshData.Type = newton::EBT_CONVEX_HULL;
			meshData.Mesh = Irr_SceneMgr->getMesh(GetMeshNameFromNode(start).c_str())->getMesh(0);
			irr::newton::IBody* mesh_body = IrrNewt_World->createBody(meshData);
			mesh_body->addForceContinuous(core::vector3df(0,-9.8,0));//gravity?
			
			//break;
		//case 2:
	}else if(ID == 2){
			cout<<"found a two"<<endl;
			cout<<"got mesh name:"<<GetMeshNameFromNode(start).c_str()<<endl;
			//make a different body
			irr::newton::SBodyFromNode mapData;
			mapData.Node = start;
			mapData.Mesh = Irr_SceneMgr->getMesh(GetMeshNameFromNode(start).c_str())->getMesh(0);
			mapData.Type = newton::EBT_TREE;
			IrrNewt_World->createBody(mapData);
			
			//break;
		//default:
	}else if(ID == 3){//a bounding box body, i think....
		//so far untested
			cout<<"found a three"<<endl;
			//cout<<"got mesh name:"<<GetMeshNameFromNode(start).c_str()<<endl;
			//make a body
			irr::newton::SBodyFromNode boxData;
			boxData.Node = start;
			boxData.Type = newton::EBT_PRIMITIVE_BOX;
			//boxData.Mesh = Irr_SceneMgr->getMesh(GetMeshNameFromNode(start).c_str())->getMesh(0);
			irr::newton::IBody* box_body = IrrNewt_World->createBody(boxData);
			box_body->addForceContinuous(core::vector3df(0,-9.8,0));//gravity?
			
	}else if(ID == 4){//also not tested
			cout<<"found a four"<<endl;
			//cout<<"got mesh name:"<<GetMeshNameFromNode(start).c_str()<<endl;
			//make a body
			irr::newton::SBodyFromNode sphereData;
			sphereData.Node = start;
			sphereData.Type = newton::EBT_PRIMITIVE_ELLIPSOID;
			irr::newton::IBody* sphere_body = IrrNewt_World->createBody(sphereData);
			sphere_body->addForceContinuous(core::vector3df(0,-9.8,0));//gravity?
			
	}else if(ID == 5){//a cylinder body, i think....
		//so far untested
			cout<<"found a five"<<endl;
			//make a body
			irr::newton::SBodyFromNode cylData;
			cylData.Node = start;
			cylData.Type = newton::EBT_PRIMITIVE_CYLINDER;
			//cylData.Mesh = Irr_SceneMgr->getMesh(GetMeshNameFromNode(start).c_str())->getMesh(0);
			irr::newton::IBody* cyl_body = IrrNewt_World->createBody(cylData);
			cyl_body->addForceContinuous(core::vector3df(0,-9.8,0));//gravity?
			
	}else if(ID == 6){

		//doesn't crash, but doesn't collide either....*SIGH*
			cout<<"found a six"<<endl;
			ITerrainSceneNode* tnode = (ITerrainSceneNode*)start;
			//make a different body
			irr::newton::SBodyFromNode mapData;
			mapData.Node = tnode;
			mapData.Mesh = tnode->getMesh();
			//mapData.TerrainLOD = 2;
			mapData.Type = newton::EBT_TREE_TERRAIN;
			IrrNewt_World->createBody(mapData);
			cout<<"created terrain body OK"<<endl;
			
	}else{
			cout<<"found an unknown type!!"<<endl;
	}

	scene::ISceneNode* node = 0;

	const core::list<scene::ISceneNode*>& list = start->getChildren();
	core::list<scene::ISceneNode*>::Iterator it = list.begin();
	for (; it!=list.end(); ++it)
	{
		FindPhysicsNodes(*it);		
	}
	return false;
}

core::stringc GameApp::GetMeshNameFromNode(scene::ISceneNode* node){
	io::IFileSystem * FS = Irr_Device->getFileSystem();
    io::IAttributes* attribs = FS->createEmptyAttributes();  
	if (attribs){
	    node->serializeAttributes(attribs); 
	    // get the mesh name out 
	    core::stringc mesh_name = attribs->getAttributeAsString("Mesh"); 
	    attribs->drop(); 
		return mesh_name;
	}else{
		return "NULL";
	}
}
I hope that is helpful to you. BTW this is the version that would work with irrnewt.
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Wow! Thanks guys! :D

That will be very helpful when I will be ready to start theses.

Need to do theses:
- I need to start the controls and movement of the camera
(Crouch, Run, Walk, Tilt, Strafe tilt)

- Basic shaders (Diffuse Maps + Normal Maps + Specular Map)
- Lighting (Not sure where I'll proceed (dynamic / precalculated lighting)
or both.

Once they are basicaly working, i'll have to clean em up and put them in includes. Right now, it's a little messy because it's all in main.cpp
Last edited by christianclavet on Thu Nov 01, 2007 3:33 pm, edited 1 time in total.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

buhatkj wrote:So in Irredit you make your scene, and label each node you want to be simulated with physics with an ID which tell the code what type of rigid body it is.
Seems like a good idea; I can't see anywhere else better to put it. And if anyone's using the ID for anything else then it's tough luck. :lol:
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

node name

Post by buhatkj »

well I suppose you could use the node name too. until there is the ability for userdata in irredit i figured this worked heh
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Re: node name

Post by sio2 »

buhatkj wrote:well I suppose you could use the node name too.
Yes, but that's a real ugly solution in my personal opinion. Using the ID seems a lot cleaner. Plus, I always use the name in IrrEdit. :D
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

<offtopic>
Really, there is a bullet wrapper? The search function doesn't turn up anything about it.
</offtopic>

I would recommend dynamic light, and pre-calculated. If you want to go more in-depth with lighting I could provide you some links that shows how lighting is done in Resistance: Fall of Man on the developer end.
TheQuestion = 2B || !2B
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

interesting.. someone doing something that might actually happen.. thats different. :roll:
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi!

Halifax: I will use Lightmaps produced in Gile[s] first (lightmaps + vertex ligting). But I would really like to use some kind of flashlight or torchlight in there. (The player will be inside temples and pyramids)

In my first demo, there was an IRRLicht bug with Vertex lightmapping. (Object that had vertex mapping where distorded when converted in OCCTREE's) I don't know if that is fixed in 1.4 beta.

I'm intererested to check on that link.

Sio2 and buhatkj, this is very interesting. Keep me informed if you plan to bring that up for IRRLicht 1.4 and IRREdit. All my level design will be done inside IRRedit and that could help a lot. (And not just my project)
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

Do you need trees? I have some Tree scenenodes for IrrEdit based on Klaster's TreeSceneNode (for procedural trees).

Image
Post Reply