Server Help

ASSS Questions - AS3 Bot Module

phong - Tue Feb 09, 2010 1:22 pm
Post subject: AS3 Bot Module
Fist off let me state that I am not a programmer, but I still like dabble.

Could someone please direct me to information regarding basic module development for AS3 (preferably in python but C may be a better learning route) so that I can attempt to replicate bot like functions in a arena.

If anyone has any related guides that would be of great help. Basically I want to try and make a pub arena that combines both 4v4 svs and chaos zone functionality. Players can queue to be put in random 4v4 matches, and while they wait can play Chaos Pub (or not queue and just play pub).



PS: Thank you for continuing as3 development brain
phong - Tue Feb 09, 2010 2:01 pm
Post subject:
nm, I found smongs article in the wiki, that should be of good help.
Arnk Kilo Dylie - Tue Feb 09, 2010 2:12 pm
Post subject:
Where have I seen this idea before...?


What you're trying to do is not as trivial as you make it sound. In any case, it shouldn't be tough to just look at how existing modules do things. There are plenty of examples. Take a look at the first five links on http://bitbucket.org/grelminar/asss/wiki/Development_Reference if you're looking for some explanation of the constructs. There's some other references out there, but I can't speak to their accuracy or their quality (though they're probably more complete.) Really I can only recommend looking at real examples.

If you already have a subgame bot that does this kind of thing, then mapping its functions to asss constructs should be trivial. Heck, making the bot work on asss should be mostly trivial, too.

Python is more trouble than it's worth to make a heavy-duty module, it just can't interface with everything else yet. Stick with C.
tcsoccerman - Tue Feb 09, 2010 3:41 pm
Post subject:
One way you could do this is to create a fake player (very easily done) to pose as your bot, and listen for any chat (also easy) between that fake player and other players.
Hakaku - Tue Feb 09, 2010 5:05 pm
Post subject:
Wait, why would you need fake players? Just have players queue up using a ?command. When a new round starts, check to see which players are still around, and send some to the respective arena. (or however you want to handle this)
Samapico - Tue Feb 09, 2010 5:52 pm
Post subject:
tcsoccerman wrote:
One way you could do this is to create a fake player (very easily done) to pose as your bot, and listen for any chat (also easy) between that fake player and other players.
emmm... Are you sure you posted this in the right topic? Cause I don't see the point of this, at all icon_surprised.gif

arnk wrote:
Where have I seen this idea before...?
Probably me or MTN

phong, I might be interested in something similar for 17th Parallel, if we ever move it to ASSS.
It can get pretty complex, but you could even have events around the pub which use different ship settings than the pub.
Either way, you'll want to change the spawn settings for players depending on the event they get in to avoid them spawning in pub and just being warped in the event boxes. Much more efficient and cleaner.

I'm no asss coder myself yet, but I know all that is doable. I'd say you might want to start with an ASSS module that simply hosts the 4v4 game for now, and then try to integrate events in the pub. I'd be interested in something that can be pretty flexible about which events are integrated around pub. Maybe one module that just handles the players, their freqs, their settings, etc. It 'suscribes' players to some other module that handles the event hosting itself. Something like that...

Can C++ be used, or just C? If it's like Discretion, C needs to be used for the module loading stuff, but once you're inside callbacks or whatever, you can use C++
Cause instead of several modules, I'm thinking it could be nicely done with some classes and inheritance...
tcsoccerman - Tue Feb 09, 2010 7:07 pm
Post subject:
I thought that he specifically wanted there to be a bot. Just ignore what I said...
phong - Tue Feb 09, 2010 7:51 pm
Post subject:
Not a bot essence really, just a module to handle bot like commands and functions. As you said it really needs to be able to port people to necessary boxes (this will all be going on in the same arena), handle scores and state of the 4v4 matches being played and a list, which I see how the list can be done in the asss developer doc examples. If the ship settings could change when they join a 4v4 game that would be ideal as chaos uses different settings than premier, especially when it comes to specials and greens.
Samapico - Tue Feb 09, 2010 8:06 pm
Post subject:
One thing you can't do is spawn greens somewhere else than center

Unless you spawn fake greens with LVZ, and randomly prize a player when he goes near it.... hmmmmm that could be interesting.
phong - Tue Feb 09, 2010 9:00 pm
Post subject:
Well the chaos box could just be positioned in the center of the map. Can you limit the area of green spawns from center or will they extend the entire map?
Arnk Kilo Dylie - Tue Feb 09, 2010 11:34 pm
Post subject:
Samapico wrote:

Probably me or MTN

whoooooosh!
Samapico - Wed Feb 10, 2010 9:43 am
Post subject:
Only thing you can change with greens are their number (PrizeFactor) and their spawn "radius" (it's actually a square area)

Prize:PrizeFactor:::Number of prizes hidden is based on number of players in game. This number adjusts the formula, higher numbers mean more prizes. (*Note: 10000 is max, 10 greens per person)
Prize:MinimumVirtual:::Distance from center of arena that prizes/flags/soccer-balls will generate
Prize:UpgradeVirtual:::Amount of additional distance added to MinimumVirtual for each player that is in the game.

If I remember right, the description for minimumvirtual is slightly wrong... if you set it to 100, the size of the square area where greens will spawn will be 100x100, which means 50 tiles from center, not 100.


These are subgame settings, but greens are completely handled client-side, so the only thing ASSS can do is send these values to the client and hope for the best.

........ Wellllllllll.... there could be a solution...................... in events where you want greens, you could send a settings packet to the players in there with a huge Prize:MinimumVirtual (i.e. the entire map), and a high prizefactor to compensate the greens spawning everywhere.
But for the players in the pub section, or events that don't require greens, you can reset the green spawn area to the center only. That would take some time for the greens to regenerate correctly after a switch... but it could be something to try out.

You could also adjust the prize weights for each event.
Arnk Kilo Dylie - Wed Feb 10, 2010 1:14 pm
Post subject:
Spawn two fakes that kill each other and create death greens all over the map, if you're okay with using death greens, and massive ?kill spam. There's a solution to most problems--the solution isn't always pretty, though.
Hakaku - Wed Feb 10, 2010 4:15 pm
Post subject:
Well why not simply separate the arenas? Is there a particular reason why they absolutely have to be on the same map?
Samapico - Wed Feb 10, 2010 5:01 pm
Post subject:
Allows you to play instead of speccing... You know when there's a bunch of specs in each subarena... well that would presumably make it so you only get one bunch of specs, more people playing, and you can still chat with everyone from the event.

17th's reason to try to go that way was to keep the low population kind of... concentrated
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group