Newest particle effect creation: Pentagram

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Newest particle effect creation: Pentagram

Post by Crush » Sun Feb 17, 2008 2:20 am

A pentagram on the ground created with 5 linear emitters:
Image

Code: http://rafb.net/p/PxXzuw40.html
(requires latest SVN version)

To create this I had to use a little trick to create linear emitters with a desired angle and length. The trick was to create an emitter that spawns invisible particles in the desired angle with powers between 0 and the desired length and a lifetime of 1. Then you can give these particles child emitters which spawn the visible particles you are seeing.

Now I just had to create 5 emitters like that and calculate their positions and angles with a bit applied trigonometry and a pocket calculator.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Re: Newest particle effect creation: Pentagram

Post by Crush » Sun Feb 17, 2008 2:32 am

With a circle around it:
Image

Code: http://rafb.net/p/ppwktx74.html

A circle-shaped emitter can be created with the same technique. The only difference is that instead of a fixed angle with a variable power you use a variable angle (between 0 and 360) and a fixed power (the radius).

The circle emitter is the first emitter in the file.


When you make both the angle and the power variable you will get a filled circle with a notable concentration in the center (this one is without the pentagram):
Image
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
GonzoDark
Novice
Novice
Posts: 325
Joined: Sat Apr 21, 2007 10:27 am
Location: Denmark

Re: Newest particle effect creation: Pentagram

Post by GonzoDark » Sun Feb 17, 2008 9:06 am

wow, that looks great ;-)

// GonzoDark
IchigoBlack (86) a.k.a GonzoDark (80) || HolyManaClan

Image
User avatar
Platyna
Knight
Knight
Posts: 2213
Joined: Sat Nov 19, 2005 2:19 pm
Location: Poland
Contact:

Re: Newest particle effect creation: Pentagram

Post by Platyna » Sun Feb 17, 2008 9:38 am

In nomine dei nostri Satanas luciferi excelsi I like it. :twisted:

Regards.
Zuzanna K. Filutowska
[The rest of this signature was censored by TMWC's "Freedom" and "Free speech".]
User avatar
Len
Knight
Knight
Posts: 1479
Joined: Mon Feb 05, 2007 7:17 am
Location: Lurking in the shadows

Re: Newest particle effect creation: Pentagram

Post by Len » Sun Feb 17, 2008 12:00 pm

Platyna wrote:In nomine dei nostri Satanas luciferi excelsi I like it. :twisted:

Regards.
Ave Satanas :twisted: I also like it
Image
Pixel Battalion
User avatar
i
TMW Adviser
TMW Adviser
Posts: 1113
Joined: Mon Mar 07, 2005 6:29 pm
Location: Poland
Contact:

Re: Newest particle effect creation: Pentagram

Post by i » Sun Feb 17, 2008 12:41 pm

Ave Crush :) I do like it :P

Now try something harder... The Sierpinski Triangle Fractal.
Image
Retired chainsaw seller. CEO @ Advertising Agency N2P
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Re: Newest particle effect creation: Pentagram

Post by Crush » Sun Feb 17, 2008 2:06 pm

I am afraid filled triangular shapes are not possible with the particle engine. The closest thing I could imagine are filled circle segments ("pizza slices"). These can be created by creating a filled circle and limit the range of the angle.

But I think that it should be possible to create a filled parallelogram by chaining two linear emitters.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: Thu Nov 01, 2007 6:35 pm
Location: Internet

Re: Newest particle effect creation: Pentagram

Post by Jaxad0127 » Sun Feb 17, 2008 5:06 pm

Technically, as you take the fractal further, the filled parts get smaller and more separated. All we'd need is the outline of the triangles.
Image
User avatar
5t3v3
Novice
Novice
Posts: 451
Joined: Wed Oct 31, 2007 4:08 pm
Location: Belgium
Contact:

Re: Newest particle effect creation: Pentagram

Post by 5t3v3 » Mon Feb 18, 2008 4:02 am

the circle of the pentagram lacks perspective
I found this on the web, it's not the right angle, but just to give an idea ....
Image
Notice that the middle of the perspective (line cc) is higher then the middle of the flat image (line ee) so it's not a perfect ellips, the bottom half is bigger then the top half. Of course the problem is that the tiles used in the game don't respect the perspective either, but since they are squared it doesn't stand out that much.
In game characters: "5t3v3" and "L "
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Re: Newest particle effect creation: Pentagram

Post by Crush » Mon Feb 18, 2008 3:16 pm

The perspective is correct. We are using orhogonal perspective in TMW, not vanishing point perspective. Introducing objects in vanishing point perspective would look wrong.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Modanung
Knight
Knight
Posts: 1719
Joined: Fri May 20, 2005 4:51 pm
Location: Groningen, The Netherlands
Contact:

Re: Newest particle effect creation: Pentagram

Post by Modanung » Mon Feb 18, 2008 8:10 pm

Nice. The circle will come in handy no doubt.
If you're looking for 3D FOSS games be sure to check out LucKey Productions on itch.io
Post Reply