Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Grass/Statics Engine!

Author
Message
coolgames
18
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 28th Aug 2007 01:28 Edited at: 19th Sep 2007 03:15
Here is a statics/grass engine that I wrote recently. You use advanced terrain and a static map image to tell where to place the static objects. I've attached the source and media to this post.

Can you post your computer specs and the frames per second that you get? The fps is shown in the top left corner of the window.

Here is a screenshot:


If you have any questions, please post them.
Hope this helps people.

Attachments

Login to view attachments
Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 29th Aug 2007 05:27 Edited at: 29th Aug 2007 05:38
This is very cool.
To get it to work i needed to put

#include "static engine.dba"
#include "rectangle memblocks.dba"

at the start of main.dba.

I get about 80fps, but as high as 150 if i point the camera at the sky. I'm impressed enough to want to shoehorn this stuff into my game.
Dxdia tells me that my computer specs are ~1.7GHz, 512MB RAM. I have a Raedon 9200 which has approx total memory 256MB. Monitor is 85Hz apparently.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 29th Aug 2007 12:32
Uh, that looks nice. I get around 170-180 FPS, with... wait, I'll ask MS Word.

OK, here we go:
-1024 mb RAM
-2.4 GHz
-Radeon X1650 XT

coolgames
18
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 29th Aug 2007 19:20
Thanks guys! Those fps numbers sound very promising. I get 30-40 fps on my geforce fx 5200. So I guess I should shoot for 30-40 fps on my games to get a good frame rate.
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 31st Aug 2007 22:18
Hi constant 80fps

2024 mb RAM
-2.4 GHz Dual Core
-Nvidia 7800 GT

Could you post your editor to make the statics too?

coolgames
18
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 1st Sep 2007 18:50
Do you mean an editor to make the static map or the 3d models? If you mean the statics map, then I might make an editor sometime, I just used paint for the one included here.
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 3rd Sep 2007 00:20
This is cool Didn't think about using an image as a grassmap...

~45fps

DirectX 9.0c (4.09.0000.0904)
AMD Athlon 64 3500+, MMX, 3DNow, ~2.2GHz
547MB RAM

no video card

Aralox
17
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 4th Sep 2007 12:11
how do you find out your comp's stats on ms word?

Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 4th Sep 2007 20:16
Quote: " how do you find out your comp's stats on ms word?"


In my version over "?" in the menu-bar, then "Info". Then a window opens, with a button "Systeminfo". There are many information about the hardware listed..

Aralox
17
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 5th Sep 2007 08:18
oh thanks

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 12th Sep 2007 00:48
I just go Start>Run>"dxdiag" and it gives me my PC specs.

coolgames
18
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 19th Sep 2007 03:13
I've released an update that adds LoD ability, an improved function to see if objects are in the fov, and a wind shader that waves things back and forth.

The lod commands allow you to add as many levels of detail as you want. You just tell one static type to act as the LoD of another. You can chain a whole bunch of types like this.

The improved fov function will allow you to use larger objects without worrying that they'll be culled prematurely.

The wind shader is a cool effect that uses a sine wave and only requires ps 1.1. You can choose which static types you want to apply it to and what limb to apply the shader to.

Just download the demo from the first post.
Mr Kohlenstoff
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 19th Sep 2007 11:34 Edited at: 19th Sep 2007 11:34
Runs with ~50 FPS here, and looks very cool. It just looks a bit weird how the grass appears and disappears very near to the camera. A bigger distance and fading would be good (so the grass isn't hidden/shown directly but changes it's transparency/alpha-value over time).
The whole scene reminds me of Guild Wars and Chrome... both very cool games imho.

JJJ0han
16
Years of Service
User Offline
Joined: 4th Oct 2007
Location: Brisbane, Australia
Posted: 6th Oct 2007 03:58
I'd like to try it with my 8800GTS 640MB, but unfortunately I'm getting an error message that says:

Could not determine parameter type of 'terrain 1' at line 11.
calcyman
16
Years of Service
User Offline
Joined: 31st Aug 2007
Location: The Uncertainty Principle
Posted: 27th Oct 2007 23:01
19 - 31 FPS on my:

AMD x86 (1.35 GHz)
512MB RAM (which shouldn't alter FPS rate)
ATI Radeon X1550 Sapphire 512MB
DirectX 9.1c (I don't know how I got that)

Returns higher FPS when looking at the sky, rather than at statics.

Your signature has been erased by a hyper-intelligent pan-dimensional being (a mod)

Login to post a reply

Server time is: 2024-04-24 08:44:22
Your offset time is: 2024-04-24 08:44:22