Skip to main content
GameDev.net gamedev.net
🔒 Locked

Nice engine :-)

Started by richardve Dec 21, 2000 at 10:57 AM 52 replies 4.3k views
Original Post
richardve
richardve
Hi tim, I''ve downloaded your new engine and it looks very cool! Wish I could swim in that water! (only a little bit slow, 30 FPS while looking at the sky (calculating to much?)) my system: PIII 500 128 MB GeForce2 MX (Hercules) 15/30 FPS (640-480) Just wanted to say this.. btw. Why don''t you make a little (or big ) game with this engine? I think you''ve got more than enough talent to do this.
tcs
tcs
I never stop recalculating the water normals, because I don''t have any LOD visibility scheme vor the water. It only isn''t rendered when you can''t see it. So when you can''t see the water you probably don''t need to see anything else, so FPS doesn''t matter. I''ll take this seriously and try to improve the situation in the next update !

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
tcs
tcs
Many people ask me about that game thing. I just don''t want to set myself to high goals. Doing a game requires a hell lot more time than just doing a tech demo or similar. While I think that I have all the theoretical knowledge, putting all this together and staying focussed is another thing ;-) And maybe I just have more fun doing small procjects

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Blade Runner
Blade Runner
Is the flickering normal or did i do something wrong with my video card settings?

Almost my system:
550Mhz AMD Atholon
128MB SyncDRAM
3dfx Voodoo3 1000 2x AGP 3D Graphic card with the latest whql drivers.
I guess that's all.




Edited by - Blade Runner on December 21, 2000 5:37:31 PM
--------------------------I shall thrash his bloody head in, cut it from upon his shoulders, and as his blood flows effortlessly down my blade, I shall taste it's sweetness. Blade Runner’s Entertainment Nothing much right now...
tcs
tcs
You have a 3Dfx card, I guess that no demo on my site runs good with Voodoo cards. They have really crappy OpenGL ICDs and even the V5 5500 can''t compete with three year old TNT1 in terms of features. This demo is especially problematic since it was intented to run on GeForce cards, and intented to run well only on GeForce2 cards...

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Blade Runner
Blade Runner
Ok i see. I''ve been trying to get my mom to upgrade to a newer video card but she''s so slow about it, but hay maybe she already has it but as a Chrismas present hasn''t told me. I was going for a Voodoo5 5500 but I have been thinking aobut looking at the specs on the GeForce cards so maybe I''ll do that now. Your wrong about one thing the Velocity one runs on my computer and so does the one that''s in the cube running around in the cube with a gun, and a few others. I also have Dx8 drivers. Although the demo flickers I''ll still play with it and take a look at the source.;->
--------------------------I shall thrash his bloody head in, cut it from upon his shoulders, and as his blood flows effortlessly down my blade, I shall taste it's sweetness. Blade Runner’s Entertainment Nothing much right now...
zedzeek
zedzeek
u r aware that 3dfx r out of business i take it. which means no more driver updates.

BTW nice program TCS it ran a little slow on my computer but im sure with a little tweaking u can increase the fps by a factor of 3 at least.
( one complaint though i hate programs that start up in fullscreen my monitor when its forced to run at 60hz emits a high pitched scream like its gonna explode )

http://members.xoom.com/myBollux
tcs
tcs
Yeah, their drivers need MUCH work and now you don''t even get any updates for them...

Oh, and 3 times the FPS !?!?!?! I''m already using compiled vertex arrays and idexed primitves, how would you try to archive such a speed up ? I''m can''t believe it, but I''m iterested ;-)

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
tcs
tcs
If somebody realla wants to help, tell me how I can speed up this code, a big bottleneck for some reason:

  
void CWater::Wave(DWORD dwTimeElapsed)
{
//////////////////////////////////////////////////////////////////////

// Animate the mesh

//////////////////////////////////////////////////////////////////////


unsigned short int i, j;
float fD;
float fScaledSpeed;

// Calculate the scaled speed

fScaledSpeed = (m_fWaterSpeed / 1000.0f) * dwTimeElapsed;

// Reset the force

for (i=0; i<m_iTesselation; i++)
for (j=0; j<m_iTesselation; j++)
m_pWaterMesh<i>[j].fForce = 0.0f;

// Animate

for (i=1; i<m_iTesselation-1; i++)
{
for (j=1; j<m_iTesselation-1; j++)
{
// if (m_pWaterMesh[i][j].bVisible == false)

// continue;


fD = m_pWaterMesh[i][j].fVertex[1] - m_pWaterMesh[i][j - 1].fVertex[1];
m_pWaterMesh[i][j].fForce -= fD;
m_pWaterMesh[i][j - 1].fForce += fD;

fD = m_pWaterMesh[i - 1][j].fVertex[1] - m_pWaterMesh[i - 1][j].fVertex[1];
m_pWaterMesh[i][j].fForce -= fD;
m_pWaterMesh[i - 1][j].fForce += fD;

fD = m_pWaterMesh[i][j].fVertex[1] - m_pWaterMesh[i][j + 1].fVertex[1];
m_pWaterMesh[i][j].fForce -= fD;
m_pWaterMesh[i][j + 1].fForce += fD;

fD = m_pWaterMesh[i][j].fVertex[1] - m_pWaterMesh[i + 1][j].fVertex[1];
m_pWaterMesh[i][j].fForce -= fD;
m_pWaterMesh[i + 1][j].fForce += fD;

fD = (m_pWaterMesh[i][j].fVertex[1] - m_pWaterMesh[i + 1][j + 1].fVertex[1]) * SQRT_OF_TWO_INV;
m_pWaterMesh[i][j].fForce -= fD;
m_pWaterMesh[i + 1][j + 1].fForce += fD;

fD = (m_pWaterMesh[i][j].fVertex[1] - m_pWaterMesh[i - 1][j - 1].fVertex[1]) * SQRT_OF_TWO_INV;
m_pWaterMesh[i][j].fForce -= fD;
m_pWaterMesh[i - 1][j - 1].fForce += fD;

fD = (m_pWaterMesh[i][j].fVertex[1] - m_pWaterMesh[i + 1][j - 1].fVertex[1]) * SQRT_OF_TWO_INV;
m_pWaterMesh[i][j].fForce -= fD;
m_pWaterMesh[i + 1][j - 1].fForce += fD;

m_pWaterMesh[i][j].fForce -= fD;
m_pWaterMesh[i + 1][j - 1].fForce += fD;
}
}

for (i=0; i<m_iTesselation; i++)
{
for (j=0; j<m_iTesselation; j++)
{
m_pWaterMesh[i][j].fVelocity += m_pWaterMesh[i][j].fForce * fScaledSpeed;
m_pWaterMesh[i][j].fVertex[1] += m_pWaterMesh[i][j].fVelocity;
m_pWaterMesh[i][j].fVertex[1] -= m_pWaterMesh[i][j].fVertex[1] / m_iTesselation;
}
}
}


Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Blade Runner
Blade Runner
Hay zedzeek I thought 3dfx was bought out by Nivida which meant in my mind was that although they were bought out they would still make driver updates for one of their newer video cards? Now what card shall I buy if thats true that they will not make any driver updates?
--------------------------I shall thrash his bloody head in, cut it from upon his shoulders, and as his blood flows effortlessly down my blade, I shall taste it's sweetness. Blade Runner’s Entertainment Nothing much right now...
richardve
richardve
quote:
Original post by tcs

If somebody realla wants to help, tell me how I can speed up this code, a big bottleneck for some reason:

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity



Wow, I got 80 FPS when I removed that code..
I can''t promise you that I can get it any faster but I''ll try..
zedzeek
zedzeek
nvidia doesnt have to support 3dfx cards in anyway. which really sux if youve just brought a voodoo5.



http://members.xoom.com/myBollux
tcs
tcs
Yeah, I tested all my functions and this one really sucks ;-)

I guess you can say your Voodoo card goodbye when Whistler is released...

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
mrfujiak
mrfujiak
Whistler? this an Nvidia card?
-mrfujiak
revolver
revolver
Whistler is next-gen stuff coming out of Microsoft new OS, .NET, dev tools, etc. etc.
Creativity is a bloody nuisance and an evil curse that will see to it that you die from stress and alcohol abuse at a very early age, that you piss off all your friends, break appointments, show up late, and have this strange bohemian urge (you know that decadent laid-back pimp-style way of life). The truly creative people I know all live lousy lives, never have time to see you, don't take care of themselves properly, have weird tastes in women and behave badly. They don't wash and they eat
Redeema
Redeema
hi Tim!

Nice work, but it seems that this Engine is not running under
Windows 2000, or is GeForce a requirement?
tcs
tcs
My two dev. systems are Win2k/GeForce systems... The demo is intended for GeForce cards. I got reports that it works fine on TNT2/Radeon cards, but you have to disable the cubic environent mapping of the water. Strange, since the Radeon supports Cubic Environment Mapping...

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
tcs
tcs
Yes, maybe the adds/subs take some performance. The usual size of the water mesh (tesselation) is 100x100. I have an option to skip the points that are hidden by the terrain, but I can''t to frustum culling or HSR... I got a big speed boost by optimizing the data storage, but I''m still sure it could be a lot faster

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
XBTC
XBTC
Hi!
Sorry no answer....
I know the original water code from lonerunner but as yours it comes without description....I completely understand your and lonerunner´s code but I don´t really understand why and how it works....Can you give me a little rough description what exactly the algo does?Especially the stuff in the two nested for loops after // Animate.

Thanx in advance, XBTC!

Edited by - XBTC on December 28, 2000 5:41:05 PM
ImmaGNUman
ImmaGNUman
Im no expert, but it looks like

------------------------------
for (i=0; i for (j=0; j[j].fForce = 0.0f;
-------------------------------

can be combined with

-------------------------------
for (i=0; i{
for (j=0; j {
m_pWaterMesh[j].fVelocity += m_pWaterMesh[i][j].fForce * fScaledSpeed;
m_pWaterMesh[i][j].fVertex[1] += m_pWaterMesh[i][j].fVelocity;
m_pWaterMesh[i][j].fVertex[1] -= m_pWaterMesh[i][j].fVertex[1] / m_iTesselation;
}
}
---------------------------------

so, instead of looping that twice, just loop it once with all that code.


-----------------------------

A wise man once said "A person with half a clue is more dangerous than a person with or without one."

The Micro$haft BSOD T-Shirt
-----------------------------A wise man once said "A person with half a clue is more dangerous than a person with or without one."The Micro$haft BSOD T-Shirt

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.