Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Particle Engine for 2D

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
EACam Posted - Apr 28 2004 : 4:38:10 PM
Well...once again Mr. "I have problems with 2D" is "having problems with 2D"...namely, converting Jack Hoxley's wonderful but STUPID 3D! tutorials into 2D.

Since I'm using 2D I DO NOT HAVE:

A projection matrix
A view matrix
Or any other matrix!

That's just about the only difference (besides the fact that my geometry is all the same).

So, I've solved my lighting problem by simply doing it without Direct3D. But here's an effect that is slightly harder to "just do it myself." Not really, actually. But I'm trying to use point sprites, and not a whole slew of polygons (if I have to, I will, but I want to try my best with this first).

Ok...here's my problem. I am initializing 1000 particles (I made it that big just to make sure its working) and all I get is a black square precisely where the start of the effect is supposed to occur. I haven't programmed any physics yet, but that shouldn't matter, those particles should still render. I've discovered that no matter how many particles I have, all i get it the same sized box in the middle of th screen. At some point (after I've faded a few things) the box dissappears and is as gone as a goose in the desert.

I'll go into a TON more detail even giving my code if anyone needs it. But I just want to make sure there's nothing basic I could be forgetting.

I've initialized an array of particles (two arrays actually, one vertex array for rendering (with it's appropriate FVF) and another for keeping the info I need for the physics). In the init, I put them all in generally random places (for testing purposes) and given them all a color. Then, when rendering, I set the vertex shader, I turn off rendering to the Z buffer, I set a texture (It, though, does not have any transparency, I loaded it with the D3DX.LoadTextureFromFile, not the LoadTextureFromFileEx), I turn on transparency, and then I render using the DrawPrimitiveUP giving the POINTLIST tag, the first element of the array, and then the size of each element (in bytes)...

Am I missing something crucial?

Thanks for this one too...
4   L A T E S T    R E P L I E S    (Newest First)
EACam Posted - Apr 30 2004 : 12:48:40 PM
Almar's tutorial is precisly what I need...and for 2D! Thanks!
cjb0087 Posted - Apr 30 2004 : 06:11:53 AM
try making your own particle engine, you would be surprised how easily an alright one can be made
Eric Coleman Posted - Apr 29 2004 : 1:01:30 PM
You'll need to create a world, projection, and view matrix to positition your particles correctly.
Spodi Posted - Apr 28 2004 : 5:23:18 PM
check out Almar's or RobyDX's particle engines.

VBGamer © Go To Top Of Page
This page was generated in 0.08 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.