#### Archived

This topic is now archived and is closed to further replies.

# Particles Systems

This topic is 6228 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

How do do particle systems look in an ISO metric view? Ive written them before for basic top-down 2D games. Im wondering if the perspective would make a "normal" particle system look bad... anyone have any experience with that? --------------- Ratfest.org

##### Share on other sites

You''d need to base your particle system off 3D particles, then render them ISOfied. Something like this:

  struct Particle{ int pos_x; // east/west axis int pos_y; // north/south axis int pos_z; // up/down axis int color;} particle[1000];// rendering pseudocode// assuming -z is up, and on screen ratio// of y to x is like 3:4void render_all_particles(void){ int screen_x; int screen_y; for(all particles) { screen_x = particle[i].pos_x; screen_y = 3*(particle[i].pos_y+particle[i].pos_z)/4 ; draw_particle(&particle[i], screen_x, screen_y) } }

You''d have to play around with the particle-position-to-screen-position transformation, but I think you get the general idea here.

I think it''d look pretty neat. In fact, I think I will code up something tonight ...

##### Share on other sites

Probably want to do more like

  // these would be precalculatedfloat x_fac = 1.000;float y_fac = cos(view_angle);float z_fac = sin(view_angle);screen_x = x_fac*particle[i].pos_x;screen_y = y_fac*particle[i].pos_y + z_fac*particle[i].pos_z;

Advantage: you can easily change the ?_fac values to anything you want.

I''d recommend doing a full floating point represenation (or fixed point for those who like that stuff) to prevent float to int conversions.

##### Share on other sites
Thats great thanks. If you can give me any more code/ideas I''d appreciate it, or even an example of what they look like

---------------
Ratfest.org

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 22
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631766
• Total Posts
3002221
×