Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1] 2
  Print  
Author Topic: my flocking demo, tell me what you think!  (Read 9185 times)
trileletri
Community Member
*
Posts: 34


« on: March 08, 2010, 12:47:11 AM »

i have implemented flocking algorithms into my game. tell me what you think!!!!
working beautifully! Smiley


http://img191.imageshack.us/img191/9571/67459188.mp4

http://img13.imageshack.us/img13/426/14125003.mp4

all flocking behavior: separation, cohesion, avoidance, alignment....
Logged

Toaster
Community Member
*
Posts: 378


WWW
« Reply #1 on: March 08, 2010, 02:30:00 AM »

hmm imageshack videos aren't working Tongue Try youtube or something?
Logged

Visit my site at: Unknown Abstraction
trileletri
Community Member
*
Posts: 34


« Reply #2 on: March 08, 2010, 10:00:37 AM »

http://www.youtube.com/watch?v=Ukvsx8kAY_c

http://www.youtube.com/watch?v=7Wl7ewsmPqU

these work Smiley
Logged

Mithrandir
Community Member
*
Posts: 325


« Reply #3 on: March 08, 2010, 03:02:56 PM »

Looks like textbook example. I would give it 9.732 out of 10.

How does it play with concave obstacles?
Logged
Raul
Customers
Community Member
*****
Posts: 550

I like games.


WWW
« Reply #4 on: March 08, 2010, 03:07:40 PM »

whoa. its very nice. good work.
Logged

trileletri
Community Member
*
Posts: 34


« Reply #5 on: March 08, 2010, 06:47:21 PM »

in combination with A* it can handle concave objects, notice you do need to override formation movement at certain points to allow units to pass trough narrow sections.

http://www.youtube.com/watch?v=J3VP_IAsUzo

handles quite nicely, I'm satisfied with it. It needs a bit of optimization but important thing it works! I'll gain FPS even more after I complete the whole code and start optimizing.


Logged

Toaster
Community Member
*
Posts: 378


WWW
« Reply #6 on: March 08, 2010, 08:47:21 PM »

looking good! Can't wait to see what else you come up with! Smiley

-Toaster
Logged

Visit my site at: Unknown Abstraction
trileletri
Community Member
*
Posts: 34


« Reply #7 on: March 24, 2010, 04:09:20 AM »

Here are two screen shots of my game's current development state.
I added fog of war and ocean shaders.

What it has so far:
-pathfinding
-simple AI player
-fog of war
-water shader
-simple mission objectives
-particles effects (fire / explosion)
-working unit class, moving, shooting etc...
-simple terrain splatting
-minimap

if you have any questions, comments please feel free to write!


Shot at 2010-03-24


Shot at 2010-03-24
Logged

Shadowsong
Customers
Community Member
*****
Posts: 328


« Reply #8 on: March 24, 2010, 05:33:25 AM »

Wow your development is VERY fast!!

I would like to hear some detail about how you do the fog of war Smiley

Very impressive!
Logged
trileletri
Community Member
*
Posts: 34


« Reply #9 on: March 24, 2010, 06:11:17 AM »

fog of war:

i create a rendersurface 256x256, draw white circles based on units and location on it.
i use blur shader on rendersurface to make it smooth and withouth "teeth" because of low resoulution of rendersurface.

i made another landscape (fow landscape) above actual ground landscape, about 50 unit above it. it has lowered details to improve rendering speed, on parts where it intersects with water plane i readjust it's height. when i need real terrain below for collission testing and mouse picking, i simply move way down fog of war landscape and bring it back after needed calculations...

use rendersurface as a alpha map.

(i had some glitches because of alpha bleding settings and modes, but it works now.)

Visited fog of war can be done too, using another rendersurface - just not clear it before starting to draw new circles on it, and make it less dark than black.

anyway, i'm really happy with water shader.
for alpha map for water surface, because it can be somehow tricky to get, i suggest:

1: load given land heightmap in a photo editing software, do a contur based effect to get closed circles of lake areas, fill everything else white, closed areas black, do a diffuse glow (needs a bit of adjusting of effects values), invert colors and make an alpha channel from it. save as dds.

or, 2: make a function to generate that kind of texture during run-time, i haven't got time for that yet...

Logged

Celledor
Customers
Community Member
*****
Posts: 242


WWW
« Reply #10 on: March 25, 2010, 03:24:47 AM »

This looks really cool (happy that more rts style game as in development), any chance you will release some source... or at least sell the code when its done Wink for a not so high price?
Logged

trileletri
Community Member
*
Posts: 34


« Reply #11 on: March 25, 2010, 02:13:31 PM »

Thanks! I add stuff into it every day. And surprisingly it works  Grin


Well complete source... i guess no, it's currently in a messy state, I'm gonna optimize it and clean it after I'm satisfied with game's look-and-feel.

If you are interested in any part of game i can answer you, maybe with a part of code...

Anyway, I'm gonna be looking for a publisher when game is ready... so who knows...
Logged

Celledor
Customers
Community Member
*****
Posts: 242


WWW
« Reply #12 on: March 26, 2010, 10:22:47 AM »

Well I would like to ask about everything but...

My problem is that I don't have enough time to develop the "basics" of the "rts game" I would like to make. And with the basics I mean things like fog of war, path finding I got but ai for the units to avoid when passing eachother, shadows, explosions etc. Things that most rts games have, I would like to put the time I have in develope the thing that will make the game stand out from the rest.... the rts style battle is actually only a part of the game as it would also include turnbased squad missions, it would be very story focused and have complex base/colony building.

This is why I'm asking if it will be open source or the posibility to be bought...
Logged

trileletri
Community Member
*
Posts: 34


« Reply #13 on: March 28, 2010, 09:46:54 AM »

Right now, everything is possible... I know nothing about what will be when(if) it's done...
Logged

trileletri
Community Member
*
Posts: 34


« Reply #14 on: March 28, 2010, 03:43:14 PM »

Added:
- rocket launcher, no particles from rocket yet
- improved water shader
- trees, ambient foilage... (no textures, yet)



Logged

asia
Customers
Community Member
*****
Posts: 182


« Reply #15 on: April 01, 2010, 03:52:06 AM »

Do you share your improved water shader?
Logged

Fabio Musmeci
ENEA
CR Casaccia
Via Anguillarese 301
00060 Rome
Italy
musmeci@enea.it
+39 3333934898
Learning to live better on a smaller footprint..
trileletri
Community Member
*
Posts: 34


« Reply #16 on: April 01, 2010, 04:03:32 AM »

It's Zaknafain's water shader with added alpha. Search forums about it. It was improved by Lenn i think to blend alpha layer...

There is non reflective water shader in instructionlimit, too. If you need something rendering very fast....
Logged

naruto
Community Member
*
Posts: 40


« Reply #17 on: July 06, 2010, 06:34:40 AM »

it's really great
need to know more about flocking and findpath ??
Logged
asnane
Community Member
*
Posts: 26


WWW
« Reply #18 on: July 09, 2010, 05:09:19 AM »

how do you solve pathfinding? i am planning to make a adventure game.if there is any objects on the walk path, actor goes wrong way. if you dont mind, i want to you share the pathfinding code.

thanks
Logged

: [ LailaheillallaH ] :
trileletri
Community Member
*
Posts: 34


« Reply #19 on: July 13, 2010, 08:13:24 AM »

it's really TV3D's path finding. I just lay out nodes in correct positions ( not in water, not at trees, not in high mountains... etc..), then update-disable/enable walkable nodes (if a building is built, units can not go trough there anymore). The rest is easy, tv3d does it for you. Just don't trigger AI.FindPath() too much it will eat up your resources. There are many solutions for this. The easiest one is to find a leader of a group, find a path, and assign that path with "distance to leader" vector for all other units in a group.

You can add formations too, once you add flocking into the game formations are fairly easy to implement (flocking is, too  Grin ) you just need to keep a vector called "place in formation" for each unit and each unit should steer towards it's place in group/formation, along with progressing forward as a group...

Hope that helps.
Logged

Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks