Autonomous Tank 0.3(BETA)

Demon666 - Custom level - from Android
Play33 players liked this.Log in to like this level.

This tank is armed to the teeth with weapons xD

update 0.3(BETA)
- prevented no targets left error
- prevented incorrect target destroyed error
- redesigned tank itself
- more guns
- 36 missiles
- decrease jitter
- always choose closest target(buggy)
- robots shoot at you/follow you
- better treads
- attacks multiple enemies at once now
- radar(detects nearby targets and enemy attacks)

Weapon Logic:
main gun uses:(not working yet)
- far away targets
- structures in front

missiles launcher uses:
- target enemies above tank
- fast moving targets on ground
- if no clear path for guns

3 front guns uses: (targetting is buggy)
- nearby enemies in front of tank

3 back guns uses: (targetting is buggy)
- nearby enemies in back of tank

run over enmies beneeth 6 guns

future updates
- prevent bullets from being registered as abstructions
- fix missile stuck bug
- logic to handle all missiles used
- missiles explode when impact with ground
- prevent tank from blowing itself up
- prevent midair missile colisions
- missile launch delay
- better radar sensor
- animated explosion sprite/sound for missile

- visual lockon
- fix AI logic
- fix main cannon
- increase accuracy(main cannon)
- enhanced explosions(main gun)
- slow tank down while climbing hills
- fix virual terjectory offset
- enemy helicopter(you)

Views: 1984 Downloads: 665 Unique objects: 1 Total objects: 419

Discuss this level

Log in to comment on this level.
  • Demon666: @BloodStorm: all levels are kinda abandoned lol
  • BloodStorm: Is this still going to be updated, or is this a abandoned level?
  • Demon666: @BloodStorm: yes.... it is possible... ids generally come one after another so if you have 8 missiles and missile #1 has an ID of 20 then missile #8 will be ID 27. you can just do a for loop when a limit of 8.
  • BloodStorm: is a universal possible with all the variables and Ids needed?
  • Demon666: @BloodStorm: i do need to make a universal launcher code tho. something that will work in any vehicles launcher.... i did manage to import the launcher code into several different vehicles but doing so is tedious even for me since there are alot of variables to change....
  • BloodStorm: that explains reloading WHILE having receivers on still
  • Demon666: @BloodStorm: lol the lua actually does most of those things. the missiles are forced into a fixed position when they are in the launcher. they are then launched and lua rotates them around until they reach their actual target(or explode into something else). after they explode then they are teleported to a "void" somewhere outside the level until they are all reloaded then they are all teleported back onscreen into the launcher when the tank reloads.
  • BloodStorm: and i thought making a plank invisible, float and fly right and left on command was hard ._.
  • Demon666: @BloodStorm: the shark doesn't actually have missiles(i did plan to add them but it kept blowing itself up because it moves to fast). the shark does have better "vision" tho.
  • BloodStorm: i havent look at that level. ill check it out now
  • Demon666: @BloodStorm: even just the targeting code is long... i actually have a better targeting system in my hungry shark level has the best targeting system.... sometimes the tank fails to see things that are near it if they are behind other objects... but the shark never misses
  • BloodStorm: can you make a level showing the multi target radar lua for this?
  • BloodStorm: it was firing at a aerial target when it fell beside it....and the missile came back.....
  • Banget: It a function tank()
  • Banget: Fps 10 message Fps 7
  • Banget: Targeting for robot!
  • hosj: @Golden: LOL
  • Golden: @Demon666: lmfao even Obama?
  • Demon666: @that guy: lmao.... ima being back the assassination in future updates when i improve the main cannon... you'll be able to snipe niggas from more than half the field away
  • that guy2: This has gone from assassination... To genocide...
  • Demon666: @TechZ: @Golden: lol thanks I'm still wondering why it doesn't crash on pc.
  • TechZ2124: Wow that was so brutal that Principia crashed aha. Awesome tank ^^
  • Golden: Woah nice goddamn tank
  • Golden: But I liked this tank xD
  • Golden: @Sasha from Russia: he had difficulty with coding problem, so he actually gave up :\
  • Sasha from Russia: Wow, great phisics! It's cool! Wait the next versions! LIKE
  • Golden: But I'm getting a idea on my new lua project when I heard entity:get_friction()
  • Golden: @Demon666: interesting, I was gonna leave screen thing and keyboard to you
  • Demon666: @Golden: you dont really need that many complex functions either as long as you can create a circle/square/triangle/lines, rgba colors, and set the x/y positioning then you can make a interactive GUI
  • Demon666: @Golden: i thought that the best way to start building this thing was from the top -> down. so i started working on a custom programming language. this way you can literally load programs from the hhd to ram and have them be displayed on a lua sprite that represents a vga (640x480) monitor.
  • Golden: @Demon666: genius, hmm I finished making memory, but working on processor but I stopped because I decided I let anyone help me because no one done helped me but no one did its may be project or may be my 100th subscriber special
  • Demon666: @Golden: its ok xD.... but about this computer how far along are yall? cuz i came up with my own design from scratch. its still in the planning stages but im trying to create a system that converts binary into luascript commands(sprites/letters/numbers etc)

    it would be something like
    0,0,0,0 == letter a
    0,0,0,1 == number 1
    0,0,1,0 == if
    0,0,1,1 ==then
    0,1,0,0 ==else
    0,1,0,1 ==end
  • Golden: Sorry man I tried my best to do it, the results are same to worse
  • Golden: No luck I could make calculations fast, I replicated and its weird but according to wiki lua codes, there's actually a measurements to your require, entity:get_Mass() entity:get_friction() e.t.c
  • Golden: All right I'm back
  • wokstation22: @Demon666: uploaded a demo of the gravity problem (and a fix) for you!
  • Demon666: @wokstation: yes i know but i was never able to get it to be accurate w/ the regular gravity/damping xD
  • wokstation22: @Demon666: well gravity is-20m/s/s.... Hang on.
  • Demon666: @wokstation: i was just guessing/checking drag/vel/gravity untill i got accurare results xD
  • wokstation22: @Demon666: I've not had a chance to glimpse your code, but when doing velocity functions, are you basing a cycle on 0.008 seconds? In one of my orbit levels one of the devs mentioned a 0.003s difference in velocity functions, meaning that instead of assuming (0.008×velocity) per step, it's (0.011×velocity) per step. Check the aforementioned comments for more...
  • Demon666: @Golden: k. jw how far along are yall with that pc?(i need something non-mathematical to occupy my brain)
  • Golden: I'm starving, imma grab some snack brb
  • Golden: @Demon666: ah anyway is it around this function; function trjectory(x,y,z,a,v,ground)
  • Demon666: @Golden: i actually allowed the jitter to be there because it actually increased the change that the target will be hit(it sometimes missed the robot thats ontop of the platform thats standing still but with jitter each shot takes a slightly different path so sometimes it makes contact)...
  • Golden: Then it be smooth
  • Golden: @Demon666: also solution for jitter on cannon, just fix torque
  • Demon666: @Golden: i originally intended for it to be regular seconds but its w/e works xD.
  • Golden: So exact what you saying you need code that calculate under millisecond?
  • Demon666: @Golden: currently the code used some logic and addition/subtraction so get the angle but that results in either slowness or jitter. i need a code that can calculate the angle quickly. and i also needed a secondary trajectory that would calculate where the target is supposed be at a given time. that way i can use the time it will take for the projectile and factor that into its trajectory to predict the future more accurately(currently i just multiplied the targets x velocity by something to make a guess where it will be in the future)
  • Golden: Or make math to get correct shot to point without miss, you probably need homing mine
  • Golden: Ok before I go, its like shooting from A then measure highest height and velocity and hits, then sends back and recalculate to make more accurate?
  • Demon666: @Golden: ?
  • Golden: Hm I get it
  • Demon666: @Golden: once i got the equation and constants(drag/gravity/vel) then i would be able to reverse the equation to find the angle necessary to fire an object to a certain location. i should even be able to tell how long an object should take to fly from one end to the other end.
  • Golden: @Demon666: like when is shot, it starts until it explodes
  • Demon666: @Golden:
    it should be something like:



    thats as far as i got but that equation doesnt properly factor the drag of the object
  • Demon666: @Golden: im trying to convert the while/do loop inside the trajectory function into a one shot equation that can be used to return the location of the object at a given time.
  • Golden: Got it
  • Demon666: @Golden: alright i allowed derivatives
  • Golden: @Demon666: nice!
  • Demon666: @Golden: yes lol the tank is fairly accurate as it is... but its all guesswork if i change any one of the constants it throws off the entire system. the tank uses several different codes to predict the trajectory at different occasions but each code it about 95% accurate.. that might seem like alot but remember im using several of them so that 95% can end up being 70% on certain conditions.
  • Demon666: @Fatmeatball: it tower its a wall with a gun turret.... eventuallly it will have its own trajectory prediction system and it will be controlled by you to target the drone... it will be kinda boss battle where you have to outmaneuver the drone. ill have it so that you have to provide cover for an adventure bot to get to an extraction point or something.
  • Golden: Nvm I didn't even notice
  • Golden: @Demon666: still failing at trajectory?
  • Fatmeatball: OK. Also what's the tower on the right for?
  • Demon666: @Fatmeatball: i know that theirs problems with is. and ill allow derivatives once its finalized. hell i might even make this into some kinda boss battle.
  • Fatmeatball: You need to allow dereatives. Also the tank destroyed its wiring and started rapid firing at nothing.
  • Demon666: @Rubicon: thanks that gave me all sorts of headaches lmao.
  • Demon666: @Chad64: I don't want to make it rapid fire... I wanted it to be one shot at a time.
  • Rubicon2: This is way cool, I love the position prediction, works very well, great job
  • Chad64: will i be able to make it rapid fire?
  • Demon666: @that guy: BETA in many senses of the word xD
  • that guy2: You spelled chasing wrong. Also, the tower gets stuck inside the gun and it freaks out.

LEVEL ID: 20643