30 likes | 163 Views
3D Game Programming Homework Assignment # 4 Combat System The scene data (in the HW04 folder) : battle_field.cwn The terrain data (in the HW04 folder) : terrain.cw3 The character data (in the Characters folder) : brain.cwc & the associated files vamfly.cwc & the associated files
E N D
3D Game Programming Homework Assignment # 4 Combat System The scene data (in the HW04 folder) : battle_field.cwn The terrain data (in the HW04 folder) : terrain.cw3 The character data (in the Characters folder) : brain.cwc & the associated files vamfly.cwc & the associated files robot.cwc & the associated files In P.2 of this PPT, a recommended pose definition is attached. Requirements : Write your own combat system. You can put your own design as you need. Deadline : after 0116/2006
Hints : • A recommended pose table : • Brain : Pose 1 – waiting • Pose 2 – run • Pose 3 – attack • Pose 4 – get hit • Pose 5 – get hit (seriously) • Pose 6 – Jump & attack • Pose 7 – Jump & attack 2 • Robot : Pose 1 – waiting • Pose 2 - run • Pose 3 – attack • Pose 4 – get hit • Pose 5 – dead • Pose 6 – jump • Vamfly : Pose 1 - waiting • Pose 2 – run • Pose 3 – attack
Use billboard to play the FX for combating • int FnObject::Billboard(float *pos, // position offset of billboard center • float *size, // billboard size in (w, h) • char *tex, // texture name header • int nTex, // number of textures • float *color, // base color of the billboard • BOOL beKey, // is colorkeying ? • BYTE r, BYTE g, BYTE b, // color key value • int type) // INDEPENDENT or DEPENDENT type • // of the billboard • Example : • FnObject model; • model.Object(fxObjID); • float pos[3], size[2], color[3]; • pos[0] = 0.0f; pos[1] = 0.0f; pos[2] = 0.5f*h; • size[0] = w; size[1] = h; • color[0] = color[1] = color[2] = 1.0f; • int iOne = model.Billboard(pos, size, “fans”, 4, color, • TRUE, 30, 255, 120, INDEPENDENT); • FnBillboard bb; • bb.Object(fxObjID, iOne); • BOOL beOK = bb.NextTexture(skip, ONCE);