Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
AS3 Bot Module

 
Post new topic   Reply to topic Printable version
 View previous topic  Usability (e.g. Core Modules) Post :: Post ASSS 1.5.0rc2 - Does not start out of ...  View next topic  
Author Message
phong
Seasoned Helper


Gender:Gender:Male
Joined: Jul 19 2005
Posts: 154
Offline

PostPosted: Tue Feb 09, 2010 1:22 pm    Post subject: AS3 Bot Module Reply to topic Reply with quote

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
Back to top
View users profile Send private message Add User to Ignore List Send email
phong
Seasoned Helper


Gender:Gender:Male
Joined: Jul 19 2005
Posts: 154
Offline

PostPosted: Tue Feb 09, 2010 2:01 pm    Post subject: Reply to topic Reply with quote

nm, I found smongs article in the wiki, that should be of good help.
Back to top
View users profile Send private message Add User to Ignore List Send email
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Tue Feb 09, 2010 2:12 pm    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
tcsoccerman
Server Help Squatter


Age:31
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Tue Feb 09, 2010 3:41 pm    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Tue Feb 09, 2010 5:05 pm    Post subject: Reply to topic Reply with quote

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)
Back to top
View users profile Send private message Add User to Ignore List Send email
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Tue Feb 09, 2010 5:52 pm    Post subject: Reply to topic Reply with quote

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...
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
tcsoccerman
Server Help Squatter


Age:31
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Tue Feb 09, 2010 7:07 pm    Post subject: Reply to topic Reply with quote

I thought that he specifically wanted there to be a bot. Just ignore what I said...
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
phong
Seasoned Helper


Gender:Gender:Male
Joined: Jul 19 2005
Posts: 154
Offline

PostPosted: Tue Feb 09, 2010 7:51 pm    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List Send email
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Tue Feb 09, 2010 8:06 pm    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List
phong
Seasoned Helper


Gender:Gender:Male
Joined: Jul 19 2005
Posts: 154
Offline

PostPosted: Tue Feb 09, 2010 9:00 pm    Post subject: Reply to topic Reply with quote

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?
Back to top
View users profile Send private message Add User to Ignore List Send email
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Tue Feb 09, 2010 11:34 pm    Post subject: Reply to topic Reply with quote

Samapico wrote:

Probably me or MTN

whoooooosh!
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Feb 10, 2010 9:43 am    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List
Arnk Kilo Dylie
Seasoned Helper


Age:36
Gender:Gender:Male
Joined: Jul 14 2006
Posts: 108
Offline

PostPosted: Wed Feb 10, 2010 1:14 pm    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Wed Feb 10, 2010 4:15 pm    Post subject: Reply to topic Reply with quote

Well why not simply separate the arenas? Is there a particular reason why they absolutely have to be on the same map?
Back to top
View users profile Send private message Add User to Ignore List Send email
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Wed Feb 10, 2010 5:01 pm    Post subject: Reply to topic Reply with quote

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
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 694 page(s) served in previous 5 minutes.

phpBB Created this page in 0.522132 seconds : 40 queries executed (81.6%): GZIP compression disabled