gametechmods

Robot Arena => General Support => Topic started by: Vertigo on February 20, 2011, 05:42:04 AM

Title: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 05:42:04 AM
(https://gametechmods.com/uploads/images/48521Arena Help.png)
Just found this on the downloads section, yes, this is the first version of the onslaught arena. This arena doesn't appear to be complete though...

Firstly it needs AI coding
It would be preferable to have start points 3 and 4
And when a robot is eliminated, the game crashes

No (or not much) GMF work here (I think), so I'm hoping this shouldn't be too hard

But I don't have a clue where to get started, so help would be appreciated

Thanks :D
Title: Re: Fixing This Arena A Bit...
Post by: Squirrel_Monkey on February 20, 2011, 05:44:41 AM
It's clearly only designed for 2 bots though... 3 and 4 would start by the gaps.
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 05:52:42 AM
It's clearly only designed for 2 bots though... 3 and 4 would start by the gaps.
It wouldn't be too much of a problem, as the bots would drive away from them straight away

Otherwise, start points could be moved to where the small indents are on the skin...
Title: Re: Fixing This Arena A Bit...
Post by: JoeBlo on February 20, 2011, 05:55:37 AM
Startpoints will need to be added in the GMF

AI coding will need to be added in the python

Elimination will need to be fixed in the python

Thats your starting points.. the other Onslaught Arena in DSL 2.1 would be MUCH easier to work with.. particularly in the AI coding department.. Circles are 100x more annoying then a square

on another subject.. I never knew this arena existed.. I actually spent countless time trying to turn the AU Challenge Arena into exactly that (minus the gaps in the wall)
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 06:03:57 AM
Why so difficult?

OK, so how do I add AI coding and start points to the 2.1 Onslaught arena?
Title: Re: Fixing This Arena A Bit...
Post by: JoeBlo on February 20, 2011, 06:36:20 AM
Why so difficult?

An AI coding works by making a virtual wall between 4 coordinates..

So a Square has 16 coordinates for wall collisions..

and the above arena will need an estimated 72 coordinates and the angles can be annoying too

Not impossible but much more of a headache to work with.. escially for your first attempt at editing..

starting small is recommended..

OK, so how do I add AI coding and start points to the 2.1 Onslaught arena?

jump into the BBEANS v2 Arena's python and familiarize yourself with how things  are laid out.. then find the inner wall collision and copy it to the onslaught arena python in the same place you found the BBEANS one..

Then adjust to suit the coordinates of the Onslaught Arena..

Common Co-Ordinate knowledge is really all you need for this task.. ;)

Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 07:48:46 AM
Does it matter where I put it into the .py file?

This is the right bit, isn't it:
#fence
        self.AddCollisionLine((-10, 12), (10, 12))
        self.AddCollisionLine((10, 12), (12, 10))
        self.AddCollisionLine((12, 10), (12, -10))
        self.AddCollisionLine((12, -10), (10, -12))
        self.AddCollisionLine((10, -12), (-10, -12))
        self.AddCollisionLine((-10, -12), (-12, -10))
        self.AddCollisionLine((-12, -10), (-12, 10))
        self.AddCollisionLine((-12, 10), (-10, 12))

:P
Title: Re: Fixing This Arena A Bit...
Post by: JoeBlo on February 20, 2011, 07:51:52 AM
yes, very much so.. look at the indenting of the lines.. a python file is split up into different sections,

you need to put it in the same section you found it..

[warning]Always remember to make backups of files prior to editing![/warning]

Edit: Yes it is..
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 08:07:02 AM
I don't see the need of making a backup, I can just recopy the file over from DSL :P

Now I'm confused, this is the .py (which just happens to be about 20 times smaller than the BBEANS .py):

I can't see any different sections like the one I took it from in the BBEANS.py, which included all hazard colisions and stuff, but there aren't any ATM.
So yeah, where do it put it? :P
Title: Re: Fixing This Arena A Bit...
Post by: G.K. on February 20, 2011, 08:10:35 AM
See if it comes under def.activate, or def.tick or whatever.
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 08:16:20 AM
See if it comes under def.activate, or def.tick or whatever.
Well the bot still drives in the pit
Title: Re: Fixing This Arena A Bit...
Post by: G.K. on February 20, 2011, 08:16:53 AM
What?
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 08:19:15 AM
What?
Well I added that into the python, where you said, and the AI bot still drives into the pit :P
Title: Re: Fixing This Arena A Bit...
Post by: JoeBlo on February 20, 2011, 08:26:10 AM
Hmm is been a while but try putting it...




def Activate(self, on):
        if on: self.players = plus.getPlayers()
       
        < HERE >

        Arenas.SuperArena.Activate(self, on)




You will also need the self.AddPOV so the AI knows to Navigate the pit..

Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 08:34:27 AM
Thats where I put it

You will also need the self.AddPOV so the AI knows to Navigate the pit..
What? :P
Title: Re: Fixing This Arena A Bit...
Post by: JoeBlo on February 20, 2011, 08:44:58 AM
You can try a little you know :P

Right below where you got the  self.AddCollisionLine's from the BBEANS Python there is 8 lines starting with self.AddPOV

You will need those so the AI Navigates around the hole..
Title: Re: Fixing This Arena A Bit...
Post by: GoldenFox93 on February 20, 2011, 08:58:44 AM
Judging by the look of the arena, I'm looking forward to seeing what it's like once it's finished  :P
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 09:00:16 AM
There are only 4 lines  :confused:

But yeah, I added it underneath and it still doesn't work

I don't need the #fence bit do I?

Judging by the look of the arena, I'm looking forward to seeing what it's like once it's finished  :P
Its just a corrected DSL Onslaught arena now :P
Title: Re: Fixing This Arena A Bit...
Post by: GoldenFox93 on February 20, 2011, 09:06:20 AM
Judging by the look of the arena, I'm looking forward to seeing what it's like once it's finished  :P
Its just a corrected DSL Onslaught arena now :P
Technically, I hadn't known that arena existed until now, and even then, some things were wrong with it. But like I say, once it's finished, I look forward to downloading it for my DSL   :cool:
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 20, 2011, 09:08:45 AM
It won't be finished

It will be a normal DSL onslaught arena with AI coding and 4 start points
Title: Re: Fixing This Arena A Bit...
Post by: Badnik96 on February 20, 2011, 09:09:42 AM
Yeah, this would be a nice addition to the arena compilation (That I dunno if GK even remembers)
Title: Re: Fixing This Arena A Bit...
Post by: G.K. on February 20, 2011, 09:12:08 AM
Despite people talkiing to me in the thread recently and RR even PM'ing me about it. I might have to give up on uploading anything due to bandwidth issues. Nionetheless, I'll still do everything I can.
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 21, 2011, 06:09:31 AM
There are only 4 lines  :confused:

But yeah, I added it underneath and it still doesn't work

I don't need the #fence bit do I?

Anyone?
Title: Re: Fixing This Arena A Bit...
Post by: JoeBlo on February 21, 2011, 06:15:02 AM
There is 8 POV's IIRC

I don't need the #fence bit do I?

With python as soon as the python reaches a # symbol it will ignore everything on that line after it..

its only for your own personal notes and can be put anywhere you feel like..

not necessary
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 21, 2011, 07:17:43 AM
I can only find this:

        #box off spinner
        self.AddCollisionLine((2, 2), (2, -2))
        self.AddCollisionLine((2, -2), (-2, -2))
        self.AddCollisionLine((-2, -2), (-2, 2))
        self.AddCollisionLine((-2, 2), (2, 2))
        #fence
        self.AddCollisionLine((-10, 12), (10, 12))
        self.AddCollisionLine((10, 12), (12, 10))
        self.AddCollisionLine((12, 10), (12, -10))
        self.AddCollisionLine((12, -10), (10, -12))
        self.AddCollisionLine((10, -12), (-10, -12))
        self.AddCollisionLine((-10, -12), (-12, -10))
        self.AddCollisionLine((-12, -10), (-12, 10))
        self.AddCollisionLine((-12, 10), (-10, 12))
        #spinner ai guide
        self.AddPOV(0, (5, 5), (0, 1))
        self.AddPOV(1, (5, -5), (1, 2))
        self.AddPOV(2, (-5, -5), (2, 3))
        self.AddPOV(3, (-5, 5), (3, 0))
Title: Re: Fixing This Arena A Bit...
Post by: JoeBlo on February 21, 2011, 07:38:03 AM
Have you messed about with the python before? mine looks like this..

Code: [Select]
#box off spinner
        self.AddCollisionLine((2, 2), (2, -2))
        self.AddCollisionLine((2, -2), (-2, -2))
        self.AddCollisionLine((-2, -2), (-2, 2))
        self.AddCollisionLine((-2, 2), (2, 2))
        #fence
        self.AddCollisionLine((-10, 12), (10, 12))
        self.AddCollisionLine((10, 12), (12, 10))
        self.AddCollisionLine((12, 10), (12, -10))
        self.AddCollisionLine((12, -10), (10, -12))
        self.AddCollisionLine((10, -12), (-10, -12))
        self.AddCollisionLine((-10, -12), (-12, -10))
        self.AddCollisionLine((-12, -10), (-12, 10))
        self.AddCollisionLine((-12, 10), (-10, 12))
        #spinner ai guide
        self.AddPOV(0, (5, 5), (0, 1))
        self.AddPOV(1, (5, -5), (1, 2))
        self.AddPOV(2, (-5, -5), (2, 3))
        self.AddPOV(3, (-5, 5), (3, 0))

        self.AddPOV(0, (5, 5), (0, 3))
        self.AddPOV(1, (5, -5), (1, 0))
        self.AddPOV(2, (-5, -5), (2, 1))
        self.AddPOV(3, (-5, 5), (3, 2))
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 21, 2011, 07:43:20 AM
Nope, I'll try that instead
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 21, 2011, 07:51:19 AM
Just tried it, still doesn't work
Title: Re: Fixing This Arena A Bit...
Post by: G.K. on February 21, 2011, 07:52:40 AM
Did you adapt the co-ordinates for the map?
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 21, 2011, 08:51:18 AM
No, but I imagine the co-ordinates would be about the same, as the arena is a similar size
Title: Re: Fixing This Arena A Bit...
Post by: Trovaner on February 21, 2011, 11:58:09 AM
A while back, I fixed that arena so that it didn't cause any errors (IIRC there were two problems). As for the AI issues, I've been meaning to fix them but never got around to it. You may need to include both POVs (to prevent the AI from following their opponent over the edge) and collision lines (to get the AI to stay away from the edge). They formatting looks like this:
Code: [Select]
#self.AddCollisionLine(XZ-StartingLocations,XZ-EndingLocation) - the line between the two points acts as an "obstacle" to the AI that they will try not to cross.
#self.AddPOV(POV_ID,X-Coordinate,Z-Coordinate,POV_ID) - the first value represents the ID of this POV, the second and third values determine the location of this POV, and the fourth value is the ID number of the POV that this POV connects to.  Basically you string them together with that second ID to make a path that the AI will follow to get around obstacles.
Title: Re: Fixing This Arena A Bit...
Post by: Vertigo on February 21, 2011, 12:02:47 PM
A while back, I fixed that arena so that it didn't cause any errors (IIRC there were two problems). As for the AI issues, I've been meaning to fix them but never got around to it. You may need to include both POVs (to prevent the AI from following their opponent over the edge) and collision lines (to get the AI to stay away from the edge). They formatting looks like this:
Code: [Select]
#self.AddCollisionLine(XZ-StartingLocations,XZ-EndingLocation) - the line between the two points acts as an "obstacle" to the AI that they will try not to cross.
#self.AddPOV(POV_ID,X-Coordinate,Z-Coordinate,POV_ID) - the first value represents the ID of this POV, the second and third values determine the location of this POV, and the fourth value is the ID number of the POV that this POV connects to.  Basically you string them together with that second ID to make a path that the AI will follow to get around obstacles.
I'm just using the DSL 2.1 Onslaught Arena now, due to difficulty of AI coding for circular arenas (according to JoeBlo)

I've put this into the py file:
Have you messed about with the python before? mine looks like this..

Code: [Select]
#box off spinner
        self.AddCollisionLine((2, 2), (2, -2))
        self.AddCollisionLine((2, -2), (-2, -2))
        self.AddCollisionLine((-2, -2), (-2, 2))
        self.AddCollisionLine((-2, 2), (2, 2))
        #fence
        self.AddCollisionLine((-10, 12), (10, 12))
        self.AddCollisionLine((10, 12), (12, 10))
        self.AddCollisionLine((12, 10), (12, -10))
        self.AddCollisionLine((12, -10), (10, -12))
        self.AddCollisionLine((10, -12), (-10, -12))
        self.AddCollisionLine((-10, -12), (-12, -10))
        self.AddCollisionLine((-12, -10), (-12, 10))
        self.AddCollisionLine((-12, 10), (-10, 12))
        #spinner ai guide
        self.AddPOV(0, (5, 5), (0, 1))
        self.AddPOV(1, (5, -5), (1, 2))
        self.AddPOV(2, (-5, -5), (2, 3))
        self.AddPOV(3, (-5, 5), (3, 0))

        self.AddPOV(0, (5, 5), (0, 3))
        self.AddPOV(1, (5, -5), (1, 0))
        self.AddPOV(2, (-5, -5), (2, 1))
        self.AddPOV(3, (-5, 5), (3, 2))
Isn't this all that I need?