Browse Search Popular Register Upload Rules User list Login:
Search:
Tracker+spider (Priority shoot test) 1/4 collab project

Image:
screenshot of the scene

Author: The Linkage

Group: Default

Filesize: 99.7 kB

Date added: 2015-01-07

Rating: 6.8

Downloads: 1524

Views: 492

Comments: 5

Ratings: 5

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

This thing has been awful to code (for me) as it has lots of local variables and if clauses (That's called the Argentinian way: doesn't work? add more if clauses!) but it works! The code is totally hideous and I would prefer if you could run the scene first, and THEN see the code.
Tell me how awesome it works, then how "awesome" the code is, in the comments :lol: That is all I could do 'bout it.

It has:
-Spider with 12 legs total
-Priority shoot system
-Detector lasers
-Focus lasers (to reduce ammunition usage)
-Lag


This is for a colab between lololoer, homieeee and me. I wouldn't have accomplised this without their help, although I must say that this was mostly on my own (yeah guys, your codes were 2 hard 4 me xd) but some ideas and 1/2 of the bullet spawn code were from them

If someone knows how to detect the state of a geometry (i.e. if it's alive (false) or it was erased (true)) ONLY wit GeomID (no onDie) PLEASE tell me (/us)! The onDie thing is a workaround for now, I guess

Start sim, and zoom out to see the entire thing. then leave it work!

EXPLANATION
The red lasers search for a geometry, and try to save the geom's geomID in the closest slot of the buffer in the circle. Then the circle reads the assigned priority of the geometry, and stores it in other slots. The circle averages the priorities, selects an object with priority higher than the average, aims at the object, waits for the focus lasers to position, and then does that again until it gets to the lowest priority object. When there aren't buffered objects left, the circle scans for new objects, and repeats. While the circle scans, the spider moves slowly unless no object is detected in 1 second; if that happens, it starts moving fast, after the red lasers detect another geometry, and the whole process repeats




Please RATE and COMMENT! Don't just say "Oh awesome 10/10" but rate (the real thing!)


Sorry guys, i had to do this
Please log in to rate this scene
edit
Similar scenes
Title: Tracker+spider (Priority shoot test) 1_4 collab project
Rating: 5.8889
Filesize: 76.91 kB
Downloads: 1226
Comments: 14
Ratings: 3
Date added: 2015/01/07 12:01:43
Made with: Algodoo v2.1.0
Rating: rated 5.9
download
Title: Spider
Rating: 5
Filesize: 27.38 kB
Downloads: 968
Comments: 3
Ratings: 1
Date added: 2010/04/25 19:51:43
Made with: Phun
Rating: rated 5
download
Title: Mad_scientists SPIDER
Rating: 7.0834
Filesize: 52.44 kB
Downloads: 4212
Comments: 13
Ratings: 6
Date added: 2010/10/10 12:46:49
Made with: Algodoo before v1.8.5
Rating: rated 7.1
download
Title: Artillery V2
Rating: 6
Filesize: 29.91 kB
Downloads: 826
Comments: 0
Ratings: 3
Date added: 2010/01/08 09:31:24
Made with: Algodoo before v1.8.5
Rating: rated 6
download
Title: The TRACKER
Rating: 5.7778
Filesize: 0.68 MB
Downloads: 1505
Comments: 4
Ratings: 3
Date added: 2010/11/11 16:34:36
Made with: Phun
Rating: rated 5.8
download
Title: Hover Tracker
Rating: 5
Filesize: 14.07 kB
Downloads: 437
Comments: 0
Ratings: 2
Date added: 2012/02/12 15:53:00
Made with: Algodoo v2.0.2 Edu
Rating: rated 5
download
Responses to this scene
show list
Title: Tracker+spider (Priority shoot test) 1_4 collab project
Rating: 5.8889
Filesize: 76.91 kB
Downloads: 1226
Comments: 14
Ratings: 3
Date added: 2015/01/07 12:01:43
Made with: Algodoo v2.1.0
Rating: rated 5.9
download
1.*runs scene* Looks good,works properly and smoothly!
2.*looks at the code*
3.*faints* Oh,God...

By the way,It works FANTASTICALLY!!:tup:
10/10
Link, there's a problem on update; when is shooting and you stop sim, it doesn't stop shooting, so put this:

_shooting && sim.running ? {
addBox({
pos := pos + [cos(angle), sin(angle)];
size := [0.125, 0.015625];
vel := [cos(angle), sin(angle)] * (140 + rand.normal * 10);
collideSet := 511;
angle := (angle + rand.normal / 8);
materialName = "";
colorHSVA := [60.0, 0.7, 0.6, 1.0];
timetolive := 1
});
addPen({
pos := pos + [cos(angle), sin(angle)];
colorHSVA := [60.0, 0.7, 1.0, 0.5];
size := 0.125 / 4;
fadeTime := 0.01
})
} : {};
okey spokeys;)
Yeah I tried, but it worked weirdly
Im absolutely can't understand that code. Becouse i just dont know code language.
By the way, it works great! 10\10