Server Help

ASSS Custom Projects - <C> Fake Player Platform: Alpha Release

Cheese - Wed Jul 20, 2011 1:00 am
Post subject: <C> Fake Player Platform: Alpha Release
MGB Edit: Source code can be found at:

This is the second biggest project of mine to date.
It currently is about 4500 lines of code, second only to Distension, which is about 6500 that I reduced from about 15000 lines of java.
However, I am going to keep it closed source for the time being due to its magnitude, size, and incompleteness.
I also want to release this because it has so many features that I can't test them all by myself.
I have been sitting on this thing for a very long time, and people have been asking me to release this for an equally long amount of time.
I honestly could have done this release sometime last year, and probably should have, and the last time I got to sit down and work on this was around May this year.
This thing does everything you could want a fake player to do, and I am beginning to add AI to it as well.
Also, I have written this in such a way as that other modules can access any of the fake players' information just like a real player.
I call this a platform because it doesn't actively do anything, it only enables you to do whatever you want, and requires you to use the commands or interfaces to actually get anything accomplished. However, it is powerful enough to base an entire zone around, and I have had the idea in my head to eventually create a PvP turret defense zone.

Additionally, I have incorporated Smong's/Jowie's damage module into this platform.
I gave it a complete overhaul, but it functions exactly the same.
The original version was 1800 lines and mine is only about 1300, but I have added features such as double barrels, multifire, prox mines, and bursts, as well as a testing system.
I plan to add shrapnel, wormholes, and repels soon.
Also, it is no longer required to add regions to your maps to watch damage to specific tiles. All damage in an arena is reported now. You can now choose to do if(regioncontains(x,y)).

The way that this system works is that you create a fake player, and then optionally make it move, have energy, take damage, have weapons, and have AI separately. For instance, a bot could energy and take damage, but couldn't move or fire. Also, a weapon type must first be created, and then assigned to a bot, which means you only have to create one weapon type once, and then simply have any number of bots use that weapon type. Any weapon that currently exists in subspace can be used, including thors with shrapnel. This also means that you don't even need to load all the modules for it to work.

I have also written in a few interfaces so that other modules have even more control over the workings of this platform than users using the provided commands. For any assistance with the commands, use ?fakehelp and ?man. For example, to create the zombies that have been occupying distension lately, I have been using the following commands:

Code: Show/Hide

?makefake Zombie
?|fcw f=10|fcw f=200 r=100 w=1
/?|ft fr=2 sh=3|faw id=1|faw id=2|fe nrg=2000 chg=500 spx=512 spy=512 spr=50|fm spd=500 thr=50 -w -s -n
/?fai -c -s -n

To duplicate the HyperSpace PointDefense, you would use the following commands:

Code: Show/Hide

?makefake <pointdefense>
?|fcw f=10|fcw f=30 r=20 w=1 l=3 -a
/?|ft fr=1 sh=8|faw id=1|faw id=2|fm p=Cheese
?attach Cheese [optional]

This platform is in no way complete. If you have any ideas or feature requests, please post them here. The commented lines in the interface are features that I plan to incorporate into the platform.

Known bugs:
No bomb gravity or repels - coming soon
Respawn time - bots come back way too soon, it worked and then somehow I broke this...
AI pathfinding - works well enough for distances of 10 tiles or less, any more eats CPU (USE AT YOUR OWN RISK)
Bots might be able to stalk players in other arenas - may not be a bad thing

If you find any other bugs, please post here and be very specific, including how you found the bug, when it happens, and any other pertinent information.
Try to break it, and if it does, let me know exactly how you did it.

I still have managed to test this fairly rigorously and get it fairly stable, and I have gotten 200 bots into one arena before, and have gotten weeklong uptimes multiple times while having 100+ running.
Many screenshots are on a different computer, but here are a few screenshots of it in operation on this computer:

Lines for modules.conf:
Code: Show/Hide


Commands for groupdef:
Code: Show/Hide


32bit Windows .DLL binaries included.
64bit Linux .SO binaries included.
Compiled on ASSS version 1.5.0
Any comments/suggestions/ideas would be appreciated.

Cheese - Fri Jul 22, 2011 9:40 pm
Post subject:
i believe i may have fixed the respawn delay bug
i believe the problem was that i had put the kill:enterdelay value, which i presume is in centiseconds, directly into the timer, which accepts milliseconds, making the bot respawn too soon by a factor of 10.
this should be fixed in the next version

when i get to work on this next, i plan to fix bot+wall collisions.
the bot treats itself as a point particle when colliding with walls, leading to strange optical illusions when in close proximity to walls, and apparent wallhacking through single tile holes.
Dr Brain - Sat Jul 23, 2011 10:28 pm
Post subject: Re: <C> Fake Player Platform: Alpha Release
Cheese wrote:
Any comments/suggestions/ideas would be appreciated

Without source don't expect anyone to use it. Especially when asss binary compatibility is as bad as it is. An upgrade potentially rendering a library module worthless is a good reason not to use that library.
Cheese - Sun Jul 24, 2011 12:04 am
Post subject:
ive already encountered someone using a custom game.h with CB_KILL as "kill-3" instead of "kill-2"
not sure what to do in these situations...

also, I will probably release the source code later, but for now people don't deserve to be forced to make hybrids out of an incomplete project when they can wait a bit and receive a completed project...
Cheese - Mon Jul 30, 2012 10:58 pm
Post subject:
I have released the source code.
Mine GO BOOM - Thu Aug 02, 2012 4:55 pm
Post subject:
Nice. For ease of others, you can see the code on Bitbucket at asss-fake-player-platform.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group