2D & 3D combination project

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
DexterYozity

2D & 3D combination project

Post by DexterYozity »

:D

Im studying the engine for a couple of days ayt now,
it's seems that it will fit for my project, my previous
options are CDX, A6, 6DX and TORQUE. but i want a
full control on the programming side.

My project are MMORPG, a combination of 2D & 3D graphics
ala diablo in 3D environment, 3D world, but I wanted to
use a superb 2D quality sprite animation for the all the
character with combination of 3DFx for magics & alike.

Im a cdx user before, i hope i could come up with a useful 2d
"sprite manipulation" functions/classes for the irrlich engine.

\:D/ \:D/ \:D/ Hiya....... wish me luck. :wink:
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Crud, how do I do this again?
Guest

Post by Guest »

-------------------------------------
Saigumi,

THATZ COOL - that is exactly what im planning to implement
on my project "3D tile billboards and fakes 2d using 3d functions"
enkz :))

-------------------------------------
But planning to create a sprite & spritelist container with entities
that i can call under the irrlich to manipulates sprite behavior.
-------------------------------------
I wanted to created two classes :

SpriteCreate(,,,params) - sprite creation with entities
SpriteList(,,,,params) - spritelist of all sprite object which i can manipulate
-------------------------------------

E.g. : SUEDO only
------------------------------------
class SpriteCreate
{

public:

//--> CREATION
//
.
.
... creation / destruction code in here ...
.
.
probably i'll use irrlich classes here
for sprite creation
.
.

//--> SPRITES NAME & DRAW STATE
//
void SaveType( int Type) { m_Type = Type ; }
void SaveState(int State) { m_State = State ; }
//
//--> CURRENT xyz,LAST xy,POSITION / Hight & Width
//
void SavePos(int pX, int pY, int pZ) { m_PosX = pX ; m_PosY = pY ; mPosZ= pz}
//
void SaveFeetOffY(int pY) { m_FeetOffY = pY; }
void SaveLPosX(int pX) { m_LPosX = pX; }
void SaveLPosY(int pY) { m_LPosY = pY; }
void SaveObjH(int pH) { m_ObjH = pH; }
void SetObjW(int pW) { m_ObjW = pW; }
//
//-> POINT & PATHS FOR TRAIL
//
void SavePoint(int PointX,int PointY) { m_PointX = PointX; m_PointY = PointY; }
void SavePath(int PathX,int PathY) { m_PathX = PathX ; m_PathY = PathY ; }
void SavePathXCtr(int pX) { m_PathXCtr = pX ;}
void SavePathYCtr(int pY) { m_PathYCtr = pY ;}
void SavePathXStep(double pX) { m_PathXStep = pX ;}
void SavePathYStep(double pY) { m_PathYStep = pY ;}
void SavePathMoveX(double pX) { m_PathMoveX = pX ;}
void SavePathMoveY(double pY) { m_PathMoveY = pY ;}
void SavePathObj(BOOL pB) { m_PathObj = pB ;}
void SaveRevPath(BOOL pB) { m_RevPath = pB ;}
void SavePathReach(BOOL pB) { m_PathReach = pB ;}
//
//--> VELOCITY,FRAMES,SPEED,DELAY & DIRECTION
//
void SaveVel(int vX, int vY) { m_VelX = vX; m_VelY = vY; }
void SaveSpeed(int pS) { m_Speed = pS; }
void SaveFrame(int Frame) { m_Frame = Frame ; }
void SaveMaxFrame(int MaxFrame) { m_MaxFrame = MaxFrame; }
void SaveDirect(int pD) { m_Direct = pD ; }
void SaveDelay(int Delay) { m_Delay = Delay; }
void SaveMaxDelay(int MaxDelay) { m_MaxDelay = MaxDelay; }
void SaveAngle(int Angle) { m_Angle = Angle; }

//--> IMAGE SOURCE,DESTINATION & DESTINATION OFFSET
//
void SetSource(int pt,int pl,int pr,int pb) {m_SSrc.top =pt; m_SSrc.left =pl; m_SSrc.right =pr; m_SSrc.bottom =pb; }
void SetDest( int pt,int pl,int pr,int pb) {m_SDest.top=pt; m_SDest.left=pl; m_SDest.right=pr; m_SDest.bottom=pb; }
void SetDestOff(int dx,int dy) {m_DestOffX =dx; m_DestOffY =dy;}

//-> SWITCHES & COUNTERS
//
void SetDraw(BOOL sD) { m_Draw= sD; }
void SetFlipped(BOOL sF) { m_Draw= sF; }
void SetTileCreated(BOOL sT) { m_TileCreated=sT; }
//
void SetSWa(BOOL sA) { m_SWa = sA; }
void SetSWb(BOOL sB) { m_SWb = sB; }
void SetSWc(BOOL sC) { m_SWc = sC; }
//
void SetCtrA(int pA1) { m_CtrA = pA1; }
void SetMaxCtrA(int pA2) { m_MaxCtrA = pA2; }
void SetCtrB(int pB1) { m_CtrB = pB1; }
void SetMaxCtrB(int pB2) { m_MaxCtrB = pB2; }
void SetCtrC(int pC1) { m_CtrC = pC1; }
void SetMaxCtrC(int pC2) { m_MaxCtrC = pC2; }
//
void SetMaxDuration(int pD1) { m_MaxCtrD = pD1; }
void SetCtrDuration(int pD2) { m_CtrD = pD2; }
//
//--> COLORKEY SHADOW & ALPHA VALUE
//;
void SetColorKey(DWORD Col) { m_Colorkey = mck1; }
void SetColorKey(void) { m_Colorkey = mck2; }
void SetShadowValue(WORD Shade) { m_ShadowValue = Shade; }
void SetAlphaValue(WORD Shade) { m_AlphaValue = Shade; }
void SetShadowOffset(long dx,long dy) { m_ShadowOffsetX=dx; m_ShadowOffsetY=dy;}
//
//--> COLLISION DETECTION
//
BOOL SpriteHit( ..some params.. );
//
void DrawType( ..some params.. );
//

public:

... public all variables list above...

//-> SPRITES NODES SKIPPER
//
ObjTile *m_TileSprite ;
ObjSprite *m_NextSpite ;
ObjSprite *m_PrevSprite ;

};

-------------------------------------
class SpriteList
{
..prolly same as sprite create
as pointer to created sprite
}

-------------------------------------
I will try to create and finish this classes and hopefully i can put in a 3d billboard that can be loaded in the engine.

I want to do this for me to manipute each sprite entities:

Suedo code:
-----------------------------------
While not end of SpriteList
.
case SpriteList.NameTYpe = PLAYER
< update player entities >
case SpriteList.NameTYpe = ENEMY1
< update enemy1 entities >
case SpriteList.NameTYpe = ENEMY2
< update enemy2 entities >
.
.
.

SpriteList next
.
loop
------------------------------------------
DexterYozity

Post by DexterYozity »

Image

Im trying yo port this to irrlicht
Post Reply