The Gang Garrison 2 Forum
May 24, 2013, 10:12:01 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Chat with us on IRC: http://ganggarrison.com/irc.html
Server: irc.esper.net, Channel: #gg2
 
   Home   Help Search Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 »
  Print  
Author Topic: Tempest Bot [v5_3]  (Read 35580 times)
Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5835


Developer


« Reply #225 on: July 09, 2011, 08:45:31 am »

Also, if you guys want to know what I'm working on, I want to make a more dynamic system where bots spawn or get destroyed according to the number of players on the map. That way you get fair matches all the way, as now it's a bit boring to lose against 10 bots if you're 3 humans because of lack of shear fire-power. It's hard though, because apparently my creation code kicks all players out except the server in its current form.

Done that.
How to use it:
...
The fight mode has 3 options: "Off", where bots will be scattered around the two teams as usual; "Fix", where a set number of bots goes to a team, leaving the other one free for humans; and "Dynamic", where the team with the bots always has one more player than there are humans, including Spectators. If more people join or if people leave, it'll ajust the number of bots accordingly.

Now there are reliable "CreateBot()" and "DestroyBot()" scripts. Thank god.
In-case someone wants to know, I hadn't sent a class- and teamchange when creating a bot. That made clients go haywire if bots were created while someone was playing.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
MTK5012
2011 Haxxy Finalist
*
Offline Offline

Posts: 738


I was Gangsterman


« Reply #226 on: July 09, 2011, 09:20:27 am »

what's the different between botplayer and player?
and btw,the pyro jumping when near enemy still create flamewheel effect,which because the random jump between them too short(or maybe there arent any)which cause them to jump at the same times
Logged
Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #227 on: July 09, 2011, 09:20:48 am »

do engies build sentrys on objectives now
Logged

Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5835


Developer


« Reply #228 on: July 09, 2011, 09:56:12 am »

what's the different between botplayer and player?
and btw,the pyro jumping when near enemy still create flamewheel effect,which because the random jump between them too short(or maybe there arent any)which cause them to jump at the same times
Player = A human
BotPlayer = A copy of Player, only used for bots.

The big difference is that BotPlayer has no socket, so I have to exempt it everywhere where something is sent.

About the Pyro: Damn. Will look into that.


do engies build sentrys on objectives now
No, not necessarily. Their system is much simpler and much more effective  hehe.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5835


Developer


« Reply #229 on: July 09, 2011, 10:41:54 am »

make a mode where they simply walk out of spawn, and as soon as they see the player they freeze.

weapons testing, gameplay altering mods and other mods involving killing people to test it would get a lot more fun efficient
Anyone with GMK can do that.

Make a variable in BotInit "seen = 0". In BotShoot, in the lines that check whether you have a line_of_sight (that's the name of the variable) put seen=1.
Then, in BotInputConverter, instead of "BotMain()" put "if !seen {BotMain()}".

The AI will simply stop as soon as they see another player.

Also, for weapon testing you have to be careful, because anything that involves the Player object and not directly the Character has to be changed. The snipers could not hurt the bots  before, that was the reason.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Bender Rodriguez
Sr. Member
****
Offline Offline

Posts: 271



« Reply #230 on: July 09, 2011, 10:48:44 am »

I just tested this today and like it a lot.  My only complaint is that my usual kamikaze techniques fail miserably against the bots because they essentially have perfect aim at PB range.  Then again though that's my problem.  

Other than that you did a very nice job creating the AI for them thus far.  Keep it up man!
Logged

Cheers,

Bender Rodriguez
Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #231 on: July 09, 2011, 11:16:00 am »

some people are bad at impersonating bots

« Last Edit: July 09, 2011, 11:16:15 am by Derp(new) [RA] » Logged

Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5835


Developer


« Reply #232 on: July 09, 2011, 11:27:04 am »

some people are bad at impersonating bots



Oh lol. At school, we used to all take the name of "Tempest Bot"+ a number and try to guess who the others were and hide ourselves.

If you want I can make a mod that changes the name of anyone with the name of "Tempest Bot" that isn't a bot, and replace it with, say, " Wanna-be Tempest Bot" or something.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #233 on: July 09, 2011, 11:28:06 am »

finshed a gen map and got this
Code:
ERROR in
action number 1
of Other Event: User Defined 14
for object BotPlayer:

In script BotInputConverter:
In script BotMain:
Error in code at line 105:
       if target.x > object.x and bot_decide_first_time = 1 //direction is referring to the direction I want to go. Red wants to go right.
                 ^
at position 16: Unknown variable x
Logged

Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #234 on: July 09, 2011, 12:29:41 pm »

im hosting such a beautiful server now
Logged

Lorgan
Retired Randomizer Mod Developer
2011 Haxxy Award Winner
*
Offline Offline

Posts: 2975


check my new game in new projects k thx bye


WWW
« Reply #235 on: July 09, 2011, 12:44:46 pm »

Are you using a lot of loops orpheon? This gets really laggy  =/ Deps server just sucked

Also i get this at random and once it happens it gives the error every frame.

And on every mapchange it gives an error about player's team/ class not baing valid and you crash too...
« Last Edit: July 09, 2011, 12:58:02 pm by Lorgan » Logged

Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking
Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5835


Developer


« Reply #236 on: July 09, 2011, 12:58:10 pm »

Are you using a lot of loops orpheon? This gets really laggy  =/
Well, look at my code :/.

The laggiest part is probably the aimbot, the bot goes through every shoot-able character twice, and then the aiming also has a loop inside.

The second loop, inside the aiming that takes care of vertical movement, I could replace with a single-step calculation. But then the bot would have problems with people falling, it would assume they keep falling at that rate and wouldn'tforesee them landing, which they do now.

You're right though that that doesn't need anyone but the rocketman.

If you're hosting a map with nodes (in other words; 2dfort), a few more loops will get done. But apart from that....

Oh, what there is:
Code:
if attack_later == 0
{
    if(collision_line(object.x,object.y,Target_x,Target_y,Obstacle,true,true)<0
        && collision_line(object.x,object.y,Target_x,Target_y,TeamGate,true,true)<0
        && collision_line(object.x,object.y,Target_x,Target_y,ControlPointSetupGate,true,true)<0
        && collision_line(object.x,object.y,Target_x,Target_y,IntelGate,true,true)<0
        && collision_line(object.x,object.y,Target_x,Target_y,BulletWall,true,true)<0)

    {
        LMB = 1
    }
    else if(collision_line(object.x,object.y-40,Target_x,Target_y,Obstacle,true,true)<0
        && collision_line(object.x,object.y-40,Target_x,Target_y,TeamGate,true,true)<0
        && collision_line(object.x,object.y-40,Target_x,Target_y,ControlPointSetupGate,true,true)<0
        && collision_line(object.x,object.y-40,Target_x,Target_y,IntelGate,true,true)<0
        && collision_line(object.x,object.y-40,Target_x,Target_y,BulletWall,true,true)<0)
    {
        jump = 1
        attack_later = 1
    }
}

And I think collision_line() is a loop. I'll look at it.

Is it laggy if you have no bots? Or is the problem only inside the AI?


You know Lorgan, the source is avaidable for download and it has everything inside it. And you have GMK pro and you know how to use it. Go download it and improve it. You're one of the few who can do that.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Lorgan
Retired Randomizer Mod Developer
2011 Haxxy Award Winner
*
Offline Offline

Posts: 2975


check my new game in new projects k thx bye


WWW
« Reply #237 on: July 09, 2011, 01:02:29 pm »

I'm working on alt weapons mod also there is a glitch with them spawning (for me atleast)

Also it was a lot better when derp restarted his server.
Logged

Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking
Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #238 on: July 09, 2011, 01:03:42 pm »

I change some stuff to do with the amout of bots but then more people joined
Logged

Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #239 on: July 09, 2011, 01:04:38 pm »

oh god my server is lagging i cant open scorboard

much better
« Last Edit: July 09, 2011, 01:05:08 pm by Derp(new) [RA] » Logged

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.392 seconds with 19 queries.