Warp Speed...

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
yodathegreat
Posts: 9
Joined: Tue Dec 26, 2006 12:16 am

Warp Speed...

Post by yodathegreat »

Hi all,


I will like to simulate a WARP Speed, you see ?

The same effect that in Startrek when the ships is in Warp Speed.

I want the Star trace..

I have try why Particle, but I don't have trace "remanance"...

Best regards
Yodathegreat
kohaar
Posts: 61
Joined: Tue Oct 17, 2006 12:15 am
Contact:

Post by kohaar »

http://harme.dk/demo/demo_20_08_2006.rar

The last effect is done with gl_line. I don't see draw3dline having support for two colours, but maybe you can do a direct call to opengl functions? Does anyone know if this is possible?

Edit:
I thought I posted the code, but anyway, here it is:

Code: Select all

typedef struct {
	float x;
	float y;
	float z;
	float speed;
} WarpStar;
---

		glRotatef(rotates,0.0f,0.0f,1.0f);
		glTranslatef(-50.0f,-50.0f,-100.0f);
		glBegin(GL_LINES);
		    for(int i = 0; i < 600; i++)
			{
				glColor3f(0.3f,0.3f,1.0f); glVertex3f(wstar[i].x,wstar[i].y,wstar[i].z);
				glColor3f(1.0f,1.0f,1.0f); glVertex3f(wstar[i].x+0.1f,wstar[i].y,wstar[i].z+4.0f);
			}
		glEnd();

		for(int i = 0; i < 1000; i++)
		{
			wstar[i].z += wstar[i].speed*demo.speed;
			if(wstar[i].z >= 100.0f) wstar[i].z = -1.0f;
		}

Athlon_Jedi
Posts: 156
Joined: Wed Jul 21, 2004 4:29 am
Location: Mishawaka, In

another way

Post by Athlon_Jedi »

one way you could do it would be to make a 3-4 second animation of it in a program like 3dsmax or lightwave , cache it , then call it almost like a cut scene with the exception being to set the animation "invisible " and have it looping in the background , then when you want to display it make it visible again with setVisible()
yodathegreat
Posts: 9
Joined: Tue Dec 26, 2006 12:16 am

Warp Speed...

Post by yodathegreat »

Hi,

Thank you for you code
But I don't have the fonctions "glRotatef" "glColor3f" "glBegin" etc

I use only DirectX, OpenGl is slow.

best regards
Yodathegreat
kohaar wrote:http://harme.dk/demo/demo_20_08_2006.rar

The last effect is done with gl_line. I don't see draw3dline having support for two colours, but maybe you can do a direct call to opengl functions? Does anyone know if this is possible?

[/code]
kohaar
Posts: 61
Joined: Tue Oct 17, 2006 12:15 am
Contact:

Post by kohaar »

Yes. OpenGL is slow in irrlicht, but I'm sure that there are similar functions in DX to the ones shown in the code, so it should be rather easy to create a DX version.
Post Reply