![]() |
[Released] They Do Not Die v0.5 - ThatOtherDev
ThatOtherDev, known for many entertaining homebrew games has just updated his popular game They Do ... [Read More]
|
moved to front page!
|
Hmm well in psuedo code i would do the fade away thing like this.
Struct Blood { vector4 bloodColorTrans = 0.0f,0.0f,0.0f,0.0f Int DespawnCounter = 5 //And any other information you might need ect, like coordinates, size, ect //and a sturct constructor. } Blood bloodSprite = new Blood("path/to/sprite") //plus other consturct args List<Blood> bloodList = new list<Blood>() GameTime counter = GameTime.getSecond() If(Bullet.Collision) bloodList.Add(bloodSprite) Foreach(blood in bloodList) { Draw(blood) } If (counter % 2.0f == 0) // { If (!bloodList == null) Foreach(blood in bloodList) { If(blood.Counter > 0) { blood.BloodColorTrans = BloodColorTrans - vector4(0f,0f,0f,.2f); blood.DespawnCounter - 1; } Else blood.delete(); } } This is just a roughdraft of how i would start. (in C# hehe. :p) ************* [ - Post Merged - ] ************* Perhaps people should add on to what i put? |
I have no problem with deciding when and where to place blood or their alpha value. I already have that implemented and it is working pretty well in a build that I have running on Windows using OpenGL for rendering (before anyone asks yeah I'll be releasing Windows versions eventually).
http://img716.imageshack.us/img716/2...enshot11xo.png My problem comes when I get to that "Draw(blood)" part you mentioned. This is what I've got now. It is imperfect when fewer then the maximum number of decals are in existence but whatever I'm content with it, it doesn't take long for 500 blood or corpse sprites to be spawned and I can improve upon it later. Code:
#ifdef WINCode:
void draw2dquad(float posx,float posy,float sizex,float sizey,float *texturecoords,bool centerandrotate,float angle){ |
void realityDrawVertexBuffer(gcmContextData *context, uint32_t type, uint32_t start, uint32_t count);
************* [ - Post Merged - ] ************* Let me see if i can find what your looking for regarding the glcolor4. |
I love this game :)
thanks for the update. |
Gonna try this one out as soon as I get home from work tomorrow. Seems like an awesome game. Thanks and keep up the good work!!
|
this would be a cool game.
some one showed make like a postal game. but a lot cooler. and more blood-yer:evil:.
|
Quote:
************* [ - Post Merged - ] ************* I just wish it had some music/sound effects |
| All times are GMT -5. The time now is 05:49 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.