Sign in to follow this  
mictian

elements in an outdoor fps

Recommended Posts

I am pretty much done with hte backend to a little game I am writing for an AI project. A screenshot of the current state is at here I plan to throw a few more elements on the terrain, namely: health boxes ammo boxes trees / cover etc teleporter (?) then build navigation meshes, with vertices positioned at useful terrain cells, such as where ammo crates are. then im planning to use a* style pathfinding to let bots find the optimal paths to health, ammo, cover etc as needed. also the edge costs (weights)in the navigation graph will be modiefied, so as to lower the cost of a path that is mainly in cover, and raise the cost of a path that is out in the open completely. does this sound like an ok plan? should i add more things to the terrain ? is there a nasty little hoverbike model or some small vehicle anyware for free .

Share this post


Link to post
Share on other sites
Quote:
Original post by mictianshould i add more things to the terrain ?


A volcanic area replete with particle lava geysers!

Quote:
Original post by mictian
is there a nasty little hoverbike model or some small vehicle anyware for free .


Go for a simple flying carpet ;)

Share this post


Link to post
Share on other sites
Awesome grass effect. What did you use to make the grass (Ie: Tree Magic & Plantlife or something like that)? Did you make it yourself or using something pulled from a game?

Some ideas depending on how pretty you would like to make it: Add a Lens Flare effect and a sun if the environment takes place during the day. Simulate moving clouds in the atmosphere. Make some type of particle system to simulate bugs such as butterfly's, etc (Thinking of the effect in Fable if you have played it). Put a small stream flowing through the environemnt with reflection.

Bill

Share this post


Link to post
Share on other sites
Mictian i can see for someone who hasnt even thought of adding the elements yet you have done alot of work on the engine.

Now teleporters and ammo and health and tree and all of that can simple be md2 models loaded and placed at the correct place.

How ever if u could consider adding buildings the REALISM effect will quadruppel, i would compare your terrain renderer to wow and say if you could render fantasy buildings (or scifi depending on ur game) it would really improve things.

then im planning to use a* style pathfinding to let bots find the optimal paths to health, ammo, cover etc as needed.

a* is not the optimal solution for this engine from what i can see from the pictures. The reason is:

A : Mostly open
B : Mostly static routes (some preprogramming will save alot of cpu)
C : Fast Paced

A node effect will actually have better results but you could however look into djakaras pathfinding which is a variant of A* but is built for outdoor environments as opposed to A*'s puzzle solving approach!

Share this post


Link to post
Share on other sites
thanks for all the responses. the grass rendering is very simple, it is described in a gpu gems 1 chapter. basically boils down to having 3 intersecting quads for a little tuft of grass (i think one partly-bollboarded quad might be able to save a lot of vram). the thing is just rendered brute force right now with alpha to coverage. I dont want to do a fade-in-out type ffect at a range because that is "visually distracting."

will post more later, i have to finish debugging a memory allocater

Share this post


Link to post
Share on other sites
Quote:
Original post by mictian
thanks for all the responses. the grass rendering is very simple, it is described in a gpu gems 1 chapter. basically boils down to having 3 intersecting quads for a little tuft of grass (i think one partly-bollboarded quad might be able to save a lot of vram). the thing is just rendered brute force right now with alpha to coverage. I dont want to do a fade-in-out type ffect at a range because that is "visually distracting."

will post more later, i have to finish debugging a memory allocater


I disagree with you on the fade-in-fade-out effect. I found it to be alot less visually distracting than simply popping in a tuft of grass at a constant alpha. I use alpha blend on my grass and so have to sort it and draw it back to front. This allows me to give tufts that are a certain distance away a larger transparency, so they appear to blend in, at the grass cutoff distance.

I was initially just using alpha test and had considered alpha to coverage, but if I am sorting anyway, in an attempt to save on fill rate, I figured I may as well using blend and get an effect much more similar to far cry.

As far as drawing tufts is concerned, I used the nvidia paper on pseudo-instancing so I can pass a scale, rotation and translation to the vertex program using immediate mode calls such as glmultitexcoord and let it take care of moving the single grass mesh vbo into the right place. I would be eager to see how this compares to the method in gpu gems so I may add that book to my Christmas list [grin]

Share this post


Link to post
Share on other sites
Nice looking screens! Is the grass a set of billboards, or something else maybe?
In addition to the health/ammo/teleporters others suggested, you might also need player spawn points, weapons, flag locations, and/or other locations for different gametypes.

Share this post


Link to post
Share on other sites
i am debating whether to use preset spawn points, or spawn in random locations etc.


@bill, my lower level of clouds animate in realtime (based on the GPG5 article, which is clearly although unadmittedly ripped off from Yann's strategy from 2001).

@dawidj, once ii have made navigation meshes i will try dijkstra's algo if A* isnt fast enough, but iirc dijkstra uses a relaxation step which operated on every edge in the graph, whereas with a good heuristic a* will only have to consider relevant edges in finding the optimal path.

you are right that i could pre-compute static routes, but this is mainly an AI project, so I would rather have more flexibility.

@vilo: alpha blend requires a sorting pass, which i wanted to avoid. alpha to coverage with suitable textures can give the same type of feathering that alpha blend will do, however you will notice quantization artifacts at very close ranges.

edit: said dag when i meant graph...

Share this post


Link to post
Share on other sites
In addition to preset and random, you could also do a hybrid-like a preset spawn point, with the player spawned in a random spot near that point.
IMO random points might spawn the player in unusal or bad places. I remember last year at a LAN party I lost the match because I kept spawning in the corner across the map from all the action.

Share this post


Link to post
Share on other sites
players deciding where to spanw is a great idea, mainly because that adds to the intelligence that my agents can display,

cheers

Share this post


Link to post
Share on other sites
Quote:
Original post by mictian
players deciding where to spanw is a great idea, mainly because that adds to the intelligence that my agents can display,

cheers

I guess for example the bots sticking to areas where players choose to spawn (but not necessarily camping :-) ). I think some game (might have been the latest UT)had the bots travel where the popular guns were.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this