200 Spiders...

Posted By: Puppeteer

200 Spiders... - 03/13/08 22:42

I just played a little around with collision avoiding without using trace.
They are still using ignore_models because those are quiete much in such a small room...
Here is the result:
Click
And here without ignore_models and just 10 spiders and an even smaller room:
Click
Posted By: cartoon_baboon

Re: 200 Spiders... - 03/13/08 22:48

links don't work (for me)
Posted By: Puppeteer

Re: 200 Spiders... - 03/13/08 22:51

I already fixed them
Posted By: cartoon_baboon

Re: 200 Spiders... - 03/13/08 23:02

I like the one with ignore_models. In the one without ignore_models the spiders just stop when they hit each other.
Posted By: Puppeteer

Re: 200 Spiders... - 03/13/08 23:05

Yes, thats because they get stuck in each other
I think with a little improvement it will work fine..
Posted By: DavidLancaster

Re: 200 Spiders... - 03/14/08 01:00

Nice work! I feel a little freaked out now, seeing all those spiders...eeee
Posted By: Creepinbox

Re: 200 Spiders... - 03/14/08 02:08

Without tracing? but how ? ^^
Posted By: Nems

Re: 200 Spiders... - 03/14/08 03:09

Good work, great obstacle avoidance here, really got a buzz out of watching the spiders and loved the mass spilling out from null center, freaky
Posted By: DavidLancaster

Re: 200 Spiders... - 03/14/08 03:36

Quote:

Without tracing? but how ? ^^



Probably through collision events I'm guessing.
Posted By: William

Re: 200 Spiders... - 03/14/08 03:36

Yeah, that was pretty neat and creepy feeling.
Posted By: JibbSmart

Re: 200 Spiders... - 03/14/08 06:13

Quote:


Quote:

Without tracing? but how ? ^^




Probably through collision events I'm guessing.



collision events and ignore_model? that doesn't sound right. i would guess they're just avoiding each other it's the fastest way if done properly, especially if you want imprecise collision.

julz

EDIT: btw, it's pretty cool. i think it could be faster with some octree (or in this case quadtree since it's on a plane) management and a custom, less-precise entity detection.
Posted By: Joozey

Re: 200 Spiders... - 03/14/08 09:15

More spiders! Looks freaky.
Maybe let spawn some more on pressing spacebar?
And try to let them crawl over eachother when it's getting too crowded hehe (e.g. they can't move anymore).
Posted By: Puppeteer

Re: 200 Spiders... - 03/14/08 10:20

No i dont use any event functions
The spider just check all the spiders in a definded range and get via -vec_to_angle an angle force away of the spider in their way and simply add the forces to a final force if there is more than one spider.
Additionally they are speeding per spider in range a specific amount down so they won't get to the same position.
One other important thing is that the spiders dont check only if there is a spider in range they check too if the spider is walking towards the other spider AND the other spider towards the spider then the angle will be calculated.
If the spider only walks towards the other, but the other doesnt walk towards the spider the speed will be decreased.

(wow, what weird sentences xD )

hmm i dont know if using a quadtree would improve the collision avoinding but i have an idea how i can add some pathfinding to those creatures or a way how they could walk randomly through a maze without running against walls and without tracing i think i will do that today

EDIT: @ Joozey: Okay i will do that xD
Posted By: aztec

Re: 200 Spiders... - 03/14/08 11:37

this looks really cool and well done
maybe you could also do a code like if there is an obstacle they fear that they make place for the obstacle if you know what I mean.
looks cool anyway(and scary^^)
Regards
Aztec
Posted By: JibbSmart

Re: 200 Spiders... - 03/14/08 12:20

quadtree's not to improve quality, but quantity see, each of the 200 spiders are checking their distance from every other spider every frame, right? that's 199 * 200 = 39800 distance checks each frame. with quadtree you could significantly reduce the amount of spiders checked to the few that are in the same grid-square as the spider (or include adjacent squares).

even splitting space into a consistent and regular grid should improve the speed.

julz
Posted By: Puppeteer

Re: 200 Spiders... - 03/14/08 12:20

thx
I done some pathfinding still without trace:
(Now they are really (in) A-MAZE-(th)-ing )
Click
I added too the joozey key (space) and you can see in the upper right corner the current amount of spiders ^^
I will add soon some spider traps just 4 fun with some splatter effects so you will spend some more time watching them walking on the ground.
But wait only on the ground? Spiders can walk at walls too so i will do that to
While i am working on it have fun with the spiders on the ground
Posted By: mpdeveloper_B

Re: 200 Spiders... - 03/14/08 14:10

Quote:

Nice work! I feel a little freaked out now, seeing all those spiders...eeee




i'm with david, although the first one is really cool. for your ai......just don't make it spiders next time....
Posted By: Germanunkol

Re: 200 Spiders... - 03/14/08 14:35

very cool!

I really miss them crawling up the walls though!!

I like spiders ... well done!

Make them crawl up the walls and along the ceiling and let them sit still every now and then (more realistic spider-movement... spiders don't move around all the time, in fact, most of the time they sit still). once you're done with that, let them come down from the ceiling using a thread they create every now and then
Posted By: Puppeteer

Re: 200 Spiders... - 03/14/08 14:42

@ Manslayer:
I decided to make something with spiders because humans are boring and everything else too xD

@ Germanunkol:
That is exacly what i wanted to do
Posted By: flits

Re: 200 Spiders... - 03/14/08 16:12


Posted By: PHeMoX

Re: 200 Spiders... - 03/14/08 16:51

Quite cool! Do you plan on releasing your code?

Cheers
Posted By: frazzle

Re: 200 Spiders... - 03/14/08 19:55

Nice demo
Great to see effective collision detection without the use of a trace thus I'm curious to see the initial code
Btw for the wall climbing feature, I posted a working example in the user's request section some time ago but it's not yet perfect ^^ Nevertheless, I think it will fit your needs.

Cheers

Frazzle
Posted By: Puppeteer

Re: 200 Spiders... - 03/18/08 14:33

I don't think i will release the code but maybe...
Walking up walls needs some redesigning of the movement and i was too lazy to do it until now but i will do it soon.
More importantly i concentratet on a way of simulating >1000 spiders without performace problems i think i will post a new demo within an hour
Posted By: frazzle

Re: 200 Spiders... - 03/18/08 19:35

Will look forward to see it

Cheers

Frazzle
Posted By: Puppeteer

Re: 200 Spiders... - 03/20/08 13:52

Sorry for taking so long but i had some problems with time and script xD
The script allows now to simulate 800 spiders with ca 20fps
EDIT: (still improving it )
Posted By: mpdeveloper_B

Re: 200 Spiders... - 03/20/08 14:27

Quote:

@ Manslayer:
I decided to make something with spiders because humans are boring and everything else too xD




ooooooh kay..... either way, it's cool, but it pains me, it feels like system shock 2 spiders.....if they had sound my skin would crawl
Posted By: Puppeteer

1000 Spiders... - 03/20/08 14:29

/\
||
Title
Whahaha got it
Click
EDIT:
better version
/EDIT
Now i will implement walking up walls...
Posted By: frazzle

Re: 1000 Spiders... - 03/20/08 16:57

Seems to work smooth but I sometimes noticed that the spiders are not fully avoiding eachother but I guess that's due to the big amount for spiders ^^
Nice work, can't wait to see the wall walking aspect which I assume you'll will do for yourself

Cheers

Frazzle
Posted By: Puppeteer

Re: 1000 Spiders... - 03/20/08 17:06

You will never find out the biggest clue and i won't tell
But you are right the code allows only 200 spiders do collision avoiding so some you are seeing wont do it but those are rather far away so you cant tell exacly what they are doing.
Maybe someone can guess what the main trick is until i finshed the wall walking stuff and then i post a demo which shows the trick which is i think a very good way to reduce cpu usage xD (BTW: do you have a link where the walk-walk-con. is?)
Posted By: frazzle

Re: 1000 Spiders... - 03/20/08 17:47

I've uploaded it to a private server
Here ya go.
The code is not optimized at this moment be it should give you a proper methode for using wall/ceiling walking.
Know bugs are that you can walk up walls and ceilings but only in one way thus walking back will cause for weird angles. Rotation on walls and ceilings is possible.

Cheers and good luck

Frazzle
Posted By: aztec

Re: 1000 Spiders... - 03/20/08 18:27

got the 1000 spiders but had horrible FPS
still really cool
Posted By: Puppeteer

Re: 1000 Spiders... - 03/20/08 18:32

which version did you use?
There is a low sys version at the upper link
Posted By: Joozey

Re: 1000 Spiders... - 03/20/08 18:36

Low or high do not make a difference for me, they both have horrible FPS but it's still fun ^^.
Posted By: Puppeteer

Re: 1000 Spiders... - 03/20/08 18:39

hmm then i should make an even lower version.. or maybe it is because of ur graca which cant handle the polys of 1000 spiders...
I think i make a 500 version too ^^
Or maybe just add the Joozey key
Posted By: ello

Re: 1000 Spiders... - 03/20/08 18:40

cool! it runs nearly smooth here. if there wouldnt be shadows it would run pretty fast i guess.

and it really rocks. i can imagine a game where all of a sudden that many spiders appear? wow, cruel!
Posted By: Puppeteer

Re: 1000 Spiders... - 03/20/08 19:23

This would have been the next step what i was thinking about..
Making a little game out of it where you can beat'em up or something...
But until that there is still some stuff to do.
I am currently working on options so you can select ingame 5 different performace options, so i wont release so much different versions
Posted By: Puppeteer

Re: 1000 Spiders... - 03/20/08 20:35

- with options
- on space you can add 100 spiders
- upper number is the spider count
- second number is the current cpu usage
- enjoy (now i really have to get wall climbing ready)
- Link
EDIT: Forgot to add the dll if you already downloaded do it again xD
EDIT2: 404 because i was uploading again
Posted By: Quad

Re: 1000 Spiders... - 03/20/08 20:37

4o4 ?

edit: nvm its just me.
Posted By: Wicht

Re: 1000 Spiders... - 03/20/08 20:43

1. Limit the FPS with fps_max.

2. CPU Usage is always 50. Because GS uses only one core...multiply cpu-usage with the number of installed cpu's.
Posted By: Puppeteer

Re: 1000 Spiders... - 03/20/08 20:49

Okay, i will do it but fps_max is 40
Posted By: Blink

Re: 1000 Spiders... - 03/20/08 22:33

i was up to 600 spiders, with 100 usage then when i zoomed into the spiders i had a slight lag, but they were still moving very fast! what a great code, you are amazing Puppeteer! are you going to release this code? and do the spiders bite?
Posted By: Puppeteer

Re: 1000 Spiders... - 03/20/08 22:44

Lol Oo Thank you, the spiders will be able to bite soon but first i wanna get the wall climbing ready which is a lot harder than i thought since i cant use frazzle's method.
I got now the right angles but still some problems with calculating the wanted angle but i think i will fix (since i have a great idea how to solve it while writing this text)
Hm i don't know if i will releasethe code but i will think about it, i will defenitly show how i made my script about 5 times quicker which will work on any script.
Posted By: frazzle

Re: 1000 Spiders... - 03/20/08 23:04

Wall climbing is indeed much harder then most people think
Btw, why can you use my methode ^^ ??

Cheers

Frazzle
Posted By: Puppeteer

Re: 1000 Spiders... - 03/20/08 23:27

Yes and no.
But more no since it is a bit tricky because your method requires an input of rotating left or right but my spiders have problems telling if they should rotate left or right in some angles and i can't use your functions as they are because it is not compatible with my script design.
But i am nearly finished there is just one final thing to fix.
EDIT: Now it works Still improving it...
Posted By: Puppeteer

Re: 1000 Wall-Spiders... - 03/21/08 00:19

Here they are, still some bugs but i am tired and will smooth it tomorrow:
Click
Posted By: Pappenheimer

Re: 1000 Wall-Spiders... - 03/21/08 00:32

testlvl.wmb is missing, at least that!
Posted By: JibbSmart

Re: 1000 Wall-Spiders... - 03/21/08 01:40

if you're optimizing you really should use a quadtree or octree. each collision-avoidance spider would only need to do a couple of distance checks each frame, and those in really cluttered areas (and hence really small quads/ocs) wouldn't even need to perform any distance checks.

shouldn't be hard to implement in lite-C.

julz
Posted By: Puppeteer

Re: 1000 Wall-Spiders... - 03/21/08 09:36

Now the exe should work.
@ JulzMighty:
I think i will do that but i use cscript ^^
Posted By: JibbSmart

Re: 1000 Wall-Spiders... - 03/21/08 11:51

ah sorry. if it is possible in C-script, it's way harder.

somewhere along the line i got the impression you were using lite-C, but i can't think why.

julz
Posted By: Germanunkol

Re: 1000 Wall-Spiders... - 03/21/08 12:16

am i doing something wrong? they don't climb walls here...?
Posted By: Puppeteer

Re: 1000 Wall-Spiders... - 03/21/08 12:54

They ar doing it but i was too lazy to set more pathpoints xD Will set some more soon ^^
BTW: here is one little secert:
http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/824440/an/0/page/0#Post824440
Posted By: frazzle

Re: 1000 Wall-Spiders... - 03/21/08 15:44

Ah k, I understand your situation about the wall climbing but I needed to handle my methode like this as I had some troubles due to GB-lock Anyway, the wall climbing works but sometimes the angles are not optimized/correct and I've also noticed that they do not walk up the ceiling but I assume you didn't implanted that yet ^^
Btw, nice secret

Cheers

Frazzle
Posted By: Puppeteer

Re: 1000 Wall-Spiders... - 03/21/08 15:58

Thx ^^
Walking up the ceuling works fine but as i said before i was too lazy to set points, i will come up with a complete new level soon.
[Offtopic](Ich hasse es meinen Eltern beim Streichen zu helfen obwohl ich lieber scripten will [Auch wenns mein neues Zimmer ist ])[/Offtopic]
© 2024 lite-C Forums