DooM: Quentin {Preview}

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

DooM: Quentin {Preview}

Post by dawasw »

Image
Image

The DooM Quentin by Vinedalf Software will be a little non commercial, fps game , including the whole monsters & weapons from original DooM.

''''ALPHA VERSION WILL BE RELEASED IN THE END OF JULY''''

It is not made by professionals, also please don't flame that Vinedalf Software is such an amateur team :D

First as you can see the Zombie Commando TM from Doom 3 model, let me explain how i will deal with copyrights here (if some1 has anything to say, that it is illegal etc)

Yes, i am using models from DooM 3 but not exacly. Only mesh fence was copied, and exported to another format, then to again another format and finally (after some "upgrades") packed into Milkshape 3d. As Milkshape is a great modelling/animation tool for such amateur & fun projects, I am animating the models myself , so i didnt took any of doom's animations. Also the skin you can see on the image of zombie commando is just a TEST one. ALL skins will be remade due to copyright "idea" stealing. Also i can say that i am exporting all models to MD2 by Milkshape of course :D

What game features?

1) Player with multiple weapons system, weapon changing system, reloading option. There are 3 weapons avaible right now, every weapon has shoot animation.

2) Enemies as you can see Zombie Commando :wink: , except him they are 4 more enemies in testing phase (<- read almost ready for the alpha version) but they are lacking a lot of animations etc. (every model have got a few right now). So in alpha version you can expect up to 5 types of enemies, in beta version which will ship in august (i hope) will have a lot more, including really "hellish" animals ...


3) simple AI based on movement and spotting reaction; it is based on Omaremads source, updated to my needs but still a bit hard to get it working in extravagant conditions, but it works very well :D Also i can add that AI of course have some monster health specifications, for example Zombie Maintenance will have only 50 health while Zombie Commando will have it about 120...



4) Audiere for Sound (including Omaremad's 3d sound update); weapons have diffrent sound of firing and reloading, enemies have diffrent sound for 4 statements: attack, lookafter, pain, die. Hedasw (my bro) is responsible for in game musics... as i heard few sound and music themes so far that would be very creepy (for example, some cool computer beeps, or some pipes are breaking in the background when you are in walkthrough of some level, right now these musics will not be implemented. I must say that there are a little problems with 3d music, if it will be solved it will be solved.

5) Level with physics & world physics based on irrlicht physics - that means nothing special, i know i know physics are so slow... Well actually right now physics arent slow etc, monster have got implemented physics, sometimes they don't work to properly when they are alive i mean the mesh collision...

6) Menu with options avaible.

7) I almost forgot to say about the shooting system, right now it works very good , but rarely it can swap, i mean sometimes if you are playing with enemy for veeeeery long time shooting may not working properly, enemy will receive a hit but his health won't drop, to resolve that you have to find any other monster and attack it then return to the last monster, and if that doesnt make it :lol: you only have to chase around whole level to every monster chase you :D and it will work in 100% :D So as you can see this shooting system is very paranormal (i am working on that).

So this is it for now. I just wanted to show off this project because i was planning that for a looooong time, if you are not satisfied with this screenshot i will post another one with another monster within few days.

Also i wanted to thank Omaremad who wrote a great open source framework for any project. I definately was in need of AI because i dont have "head" for programming, so i definately wouldnt make any AI with my very noob and basic skills. Please dont flame me about that ...

I hope you enjoyed this little preview or how to call it : developers diary :)

PS please remember that i am not any kind of super programming , animating, modelling designer ann in one, this is gonna be really amateur but i promise i will do my best with help of my few friends.

Thanks for you great reader who made it to the end of this message, Dawasw
Last edited by dawasw on Tue Jul 12, 2005 9:45 pm, edited 1 time in total.
omaremad

Post by omaremad »

wow cool project

i remember us saying on the other thread
"i will never give up on this fps"
and u didnt

("poor guy having to look through 500 lines of ugly code)

btw

thanx for ur thanx

and sry for the poor collision system i made

btw can u give me the source 4 the timers iam really desprate to make enemies attacks limited by time so the have 2 reload etc..


i have made a clean source version of the ai for my project (say if u want it)

thanx again and good luck


can u send the demo quick :D

bye
omaremad

Post by omaremad »

u know the bug in the collision system u can say that enemies become immortal after a while

shooting problem solved :wink:
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

THX! Omaremad u are too kind ! :D

First, i don't have implemented timers on my monsters, i mean i have got classes for every type of monster, and as i can see right now All of my monsters are demons from hell, which don't have anything associated to reload because they don't use human weapons :wink: they are using or claws, or plasma balls, or fire balls, and i will have some nice attacks for few hard monsters, i want to make the action in very fast "dynamics" you will kill monsters fast (some ones in very long time ;) ).
Actually i think there may be one monster who will shot player with reloads, but for that i think i use a simple -> " if monster fired -> 5 times -> play reload animation " etc, i have very basic information about timing either so as i said i am just starting with c++.

I will prepare a special demo for you (i have a lot things to make so u dont have to get too excited :D) but i will try to send it in Friday, until that time a lot will change and i will finish few motives which are now unfinished, like skins of most monsters i am working at right now. Everything i am doing with the source is very simple. Oh also i think you will get a big LOL when seeing this funny "test" animations... :D (they look like s***) :D

You mean you solved that problem ;) ?
omaremad

Post by omaremad »

clean tidy,shiny,nice version of the ai


header

Code: Select all


#ifndef _cENEMY_H_
#define _cENEMY_H_

#include "Irrlicht.h"
#include "audiere.h"

using namespace irr;
using namespace audiere; 

class cEnemy
{
      private:

              IrrlichtDevice*                  device;
              scene::ISceneManager*            smgr;
              video::IVideoDriver*             driver;
              scene::ICameraSceneNode*         camera;
              scene::IMetaTriangleSelector*    metaSelector;
              scene::ISceneNode* q3node;
              scene::IAnimatedMesh*            mesh;
              scene::IAnimatedMeshSceneNode*   enemynode;
              scene::ITriangleSelector*        selector;
              scene::ISceneNodeAnimator*       anim;
              core::vector3df                  position;
              core::vector3df                  rotation;
              
			  int                              health;

			  //fur animation
              bool alreadywalking;
              bool alreadystanding;
              bool alreadyshoot;
              bool died;
              bool shooting;
              bool seenplayer; 
              
              //for sound  
              AudioDevicePtr audiereDevice; 
              OutputStreamPtr ahh; 
              OutputStreamPtr gethim; 
              OutputStreamPtr attack; 
              OutputStreamPtr gun; 
              float vol;
              int   bal;
              f32   rotaddy;

              //important dont remove for sound and enemy rotation

core::vector3df getTargetAngle(core::vector3df v, core::vector3df r) 
{ 
        #define PI		3.14159265358979323846
       //v -position 
       //r -target 

       core::vector3df angle; 
       float x,y,z; 
       x = r.X - v.X; 
       y = r.Y - v.Y; 
       z = r.Z - v.Z; 

       //angle in X-Z plane 
       angle.Y = atan2 (x, z); 
       angle.Y *= (180 / PI); //converting from rad to degrees 
       
       //angle.Y-=90;
       //just making sure angle is somewhere between 0-360 degrees 
       if(angle.Y < 0) angle.Y += 360; 
       if(angle.Y >= 360) angle.Y -= 360; 

       //angle in Y-Z plane while Z and X axes are already rotated around Y 
       float z1 = sqrt(x*x + z*z); 

       angle.X = atan2 (z1, y); 
       angle.X *= (180 / PI); //converting from rad to degrees 
       
       //angle.X -= 90; 
       //just making sure angle is somewhere between 0-360 degrees 
       if(angle.X < 0) angle.X += 360; 
       if(angle.X >= 360) angle.X -= 360; 
       
       
       return angle; 

} 

      public:

             cEnemy();
             cEnemy(IrrlichtDevice* _device,scene::ISceneManager* _smgr,scene::ICameraSceneNode*_camera,scene::IMetaTriangleSelector* _metaSelector,scene::ISceneNode* _q3node,core::vector3df _position,core::vector3df _rotation);
             ~cEnemy();
             
             void      update();      
};

#endif


main file

Code: Select all

#include "cEnemy.h"

using namespace core;

cEnemy::cEnemy(IrrlichtDevice* _device,scene::ISceneManager* _smgr,scene::ICameraSceneNode*_camera,scene::IMetaTriangleSelector* _metaSelector,scene::ISceneNode* _q3node,core::vector3df _position,core::vector3df _rotation)
{
      device = _device;
      smgr = _smgr;
      driver = device->getVideoDriver();
      camera=_camera;
      metaSelector=_metaSelector;
      q3node=_q3node;
      position=_position;
      rotation=_rotation;

    //creates the enemy
    mesh= smgr->getMesh("gijoe.md2");

    video::ITexture* colorMap = driver->getTexture("gijoe.jpg");
    video::ITexture* normalMap = driver->getTexture("gijoe_b.jpg");	
    driver->makeNormalMapTexture(normalMap, 5.0f);

    enemynode = smgr->addAnimatedMeshSceneNode(mesh,0,1);
    enemynode->setMaterialTexture(0,	colorMap);	
    enemynode->setMaterialTexture(1,	normalMap);	
    enemynode->getMaterial(0).EmissiveColor.set(0,0,0,0);	
    enemynode->setMaterialFlag(video::EMF_FOG_ENABLE, true);	
    enemynode->setMaterialType(video::EMT_NORMAL_MAP_SOLID);

    //postion the emnemy
    enemynode->setPosition(position);
    enemynode->setScale(core::vector3df(2.5,2.5,2.5));

    enemynode->setAnimationSpeed(30);
    enemynode->setMD2Animation(scene::EMAT_STAND);

    //create collision
    selector = smgr->createTriangleSelectorFromBoundingBox (enemynode);
    enemynode->setTriangleSelector ( selector ); 
    metaSelector->addTriangleSelector ( enemynode->getTriangleSelector ( ) ); 

    //core::vector3df radius = targetNodeint->getBoundingBox().MaxEdge - targetNodeint->getBoundingBox().getCenter(); 
    anim = smgr->createCollisionResponseAnimator( 
          metaSelector, enemynode,core::vector3df(5,10,5) , 
          core::vector3df(0,-3,0),core::vector3df(0,20,0) ); 

      enemynode->addAnimator(anim);  
      anim->drop();                          
      health=100;  
      alreadyshoot=false;  
      alreadywalking=false; 
       
      audiereDevice = OpenDevice();  
}



cEnemy::~cEnemy()
{                                     
}



void cEnemy::update()
{
   if(health > 0)
   {
               core::vector3df start = enemynode->getAbsolutePosition();
               core::vector3df end = camera->getAbsolutePosition();

               core::line3d<f32> line(start, end);	 

               float dist=line.getLength();

               //3d sound    
               
               died = false;
               core::triangle3df triangle;    

               // the forward direction during gameplay 
               core::vector3df pos=enemynode->getAbsolutePosition();
               core::vector3df selfrot=enemynode->getRotation();
               core::vector3df targetpos=camera->getAbsolutePosition();
               core::vector3df targetrot;
               targetrot=getTargetAngle(pos,targetpos);
               f32 rotadd=targetrot.Y-selfrot.Y;

   	           // get line of sightcamera
	           if (smgr->getSceneCollisionManager()->getCollisionPoint(
               line, q3node->getTriangleSelector ( ), end, triangle))
		       {
                     if(alreadystanding == false)
                     {
                           enemynode->setMD2Animation(scene::EMAT_STAND);
                           alreadystanding = true;

                           alreadywalking = false;

                           alreadyshoot = false;

                           died = false;
                     } ;
               }else{

/*

if (playerfired==true ){


core::vector3df aimrot=getTargetAngle(targetpos,pos);

rotaddy=aimrot.Y-camera->getRotation().Y;

f32 rotaddx=aimrot.X-camera->getRotation().X;

f32 rotaddz=aimrot.Z-camera->getRotation().Z;

//midscreen =smgr->getSceneCollisionManager()-> getScreenCoordinatesFrom3DPosition( enemynode->getAbsolutePosition(),camera);



//if(selectednode==enemy1)midscreen.Y>200 & midscreen.Y<290& midscreen.X>280& midscreen.X<320{

if ((rotaddy<30& rotaddy>0,rotaddy<360 & rotaddy>330)&(rotaddx>90& rotaddx<100)){

    printf("ouch");

    health-=5;};

    playerfired=false;

   

};			

*/

  

    core::vector3df start = enemynode->getAbsolutePosition();
core::vector3df end = camera->getAbsolutePosition();
core::line3d<f32> line(start, end);	





//3d sound

vol=(1/(dist/150));

if (rotaddy>0&rotaddy<180)

{bal=1;}

else

{

bal=-1;

};

    //////

//makes sure player is infront of enemy b4 attack begins



if(dist>500){

    //idle stuuf



if(alreadystanding==false){

    enemynode->setMD2Animation(scene::EMAT_STAND);
    alreadystanding=true;
    alreadywalking=false;
    alreadyshoot=false;

     died=false;

} ;  

};



if(shooting==true){enemynode->setRotation(core::vector3df(selfrot.X,targetrot.Y-90,selfrot.Z)); shooting=false;};

	if(dist<200 & rotadd>60 & rotadd<300 ){

	alreadystanding=false;
	alreadywalking=false;  

      //attack stuff

      if(alreadyshoot==false){

             enemynode->setMD2Animation(scene::EMAT_ATTACK);

		    alreadyshoot=true;

		        //attack

		        attack= OpenSound(audiereDevice.get(), "attack.wav", true); 



    attack->setRepeat(false); 
    attack->setPan(bal);
	attack->setVolume(vol); 

    

		     attack->play();

       died=false;

    

		};    

		

	shooting=true;

    

    printf("fire");

    

    	// create bullet

scene::ISceneNode* bnode;

	bnode = smgr->addBillboardSceneNode(0,

		core::dimension2d<f32>(25,25), enemynode->getAbsolutePosition());
//gun
    gun= OpenSound(audiereDevice.get(), "gun.wav", false); 
    gun->setRepeat(false);
    gun->setVolume(vol); 
    gun->setPan(bal);
    gun->play();

	bnode->setMaterialFlag(video::EMF_LIGHTING, false);
	bnode->setMaterialTexture(0, device->getVideoDriver()->getTexture("fireball.bmp"));
	bnode->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
	scene::ILightSceneNode* light1 = 	smgr->addLightSceneNode(bnode, core::vector3df(0,0,0), 	video::SColorf(1.0f, 0.5f, 0.3f, 0.0f), 200.0f);



	f32 length = (f32)(camera->getAbsolutePosition() - enemynode->getAbsolutePosition()).getLength();
	const f32 speed = 0.25;
	u32 time = (u32)(length / speed);

	 died=false;



	// set flight line



	anim = smgr->createFlyStraightAnimator(enemynode->getAbsolutePosition(), camera->getAbsolutePosition(), time);
	bnode->addAnimator(anim);	
	anim->drop();



	anim = smgr->createDeleteAnimator(time);
	bnode->addAnimator(anim);
	anim->drop();

	/*

	if (imp.when)

	{

		// create impact note

		imp.when = device->getTimer()->getTime() + (time - 100);

		Impacts.push_back(imp);

		

	};

    

    

    */

    

    

    };



    if(dist<500&dist>200){

	if(rotadd>60 & rotadd<300)

{

    

		alreadystanding=false;
        alreadyshoot=false;    

		   

     died=false;

                

     



  // the initial forward direction 

   core::vector3df start = enemynode->getAbsolutePosition();
core::vector3df end = camera->getAbsolutePosition();
core::line3d<f32> line(start, end);	



//prevents enmy from looking at floor


enemynode->setRotation(core::vector3df(selfrot.X,targetrot.Y-90,selfrot.Z));

////////////////////////////

if(alreadywalking==false){

    enemynode->setMD2Animation(scene::EMAT_RUN);
    alreadywalking=true;

    

       //gethim

        gethim= OpenSound(audiereDevice.get(), "wake.wav", true); 

    gethim->setRepeat(false); 
    gethim->setVolume(vol);
    gethim->setPan(bal);
		    gethim->play();

		   

       died=false;

    

} ;   





core::vector3df vel=core::vector3df(0,0,1.5);

core::matrix4 m; 
m.setRotationDegrees(core::vector3df(selfrot.X,targetrot.Y,selfrot.Z)); 
m.transformVect(vel); 
enemynode->setPosition(enemynode->getAbsolutePosition() + vel); 	
         printf("ahh");

         died=false;

}



else  {if(alreadystanding==false){

    enemynode->setMD2Animation(scene::EMAT_STAND);
    alreadystanding=true;
    alreadywalking=false;
    alreadyshoot=false;
     died=false;

} ;} ;

};



};    

}



else



{

    

   if(died==false){ 

         //ahhh

         ahh= OpenSound(audiereDevice.get(), "ahh.wav", true); 

    



    ahh->setRepeat(false); 

    ahh->setVolume(vol); 

    ahh->setPan(bal);

    ahh->play();

    

   

    enemynode->setLoopMode(false);

    enemynode->setMD2Animation(scene::EMAT_DEATH_FALLFORWARD);

    died=true;

 

    };

  

    };

    









  

  



} 

omaremad

Post by omaremad »

i got it :idea:

use get sceneode from pointer(it is always in the middle of the screen when using fps camera)

so it will return the enemy on pressing the fire button

btw it is not included in the previous code
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

Could you past that what u have implemented ? bacause i dont know if i understood u right :(

PS ATM i am making some animations of DoomQ models ... i think that i should finish most of them for tomorrow morning, and i will try to send whole application with everything what is done so far specially to you! =)

PPS There are large weather storms in south of poland since yesterday, at the moment also there is lightning outside, so i unfortunately have to swich my computer off for some time... ;(
omaremad

Post by omaremad »

ok ive done some better collision detect

Code: Select all

core::position2d<s32> midscreen;
midscreen =smgr->getSceneCollisionManager()-> getScreenCoordinatesFrom3DPosition( targetNodeint->getPosition(),camera);

	if (playerfired==true){
if ((midscreen.Y>0 & midscreen.Y<600& midscreen.X>0 & midscreen.X<600),(midscreen.Y<0 & midscreen.Y>-600& midscreen.X<0 & midscreen.X>-600))
{//hurt enemy
}
}
the 600 hundred value should be half the width of ur screen resolution[/code]
omaremad

Post by omaremad »

oops thats wrong use thsi

Code: Select all

core::position2d<s32> midscreen; 
midscreen =smgr->getSceneCollisionManager()-> getScreenCoordinatesFrom3DPosition( targetNodeint->getAbsolutePosition(),camera);
if (playerfired==true &(midscreen.Y>0 & midscreen.Y<600& midscreen.X>0 & midscreen.X<600)) 
{printf("ouch");
    health-=5;};
    playerfired=false;}
the 600 thing still applies
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

You are right, this is great! It works much better that the rots one :D

Thank You!
omaremad

Post by omaremad »

if u were angry that i didnt do the diagram it is because i had this in the works :wink:
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

Omaremad could u give me ur e-mail , maybe types of communicators u use ? It would be great if you could :D Because i think i would handle to host test version tomorrow somewhere , and i will have to give you a link to it, but i dont want other people see that cr** at this moment of development :D
omaremad

Post by omaremad »

i would be honoured thanx :D :D :D

omaremad@nospamntlworld.com

remove the no spam part
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

Mail with link sent, i hope u will receive it :D
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

now that is what i call doom :twisted:
it shows that you are a patient artist haveing to covert animate and skin 10
models or so :D

yeah and about the animations you dont like i think they are great
im not joking
you dont get any deformations or jerky movements

did you change some of my 3d sound stuff it doesnt work as well

the graphics would be as good as doom 3 if you didnt take out the bumpmap code in my orginal file :wink: (on enemies)

dont be shy release now :D :D
Post Reply