Author Topic: A.I.  (Read 309 times)

0 Members and 1 Guest are viewing this topic.

Offline RebelFreedom

  • SA-MP Donator
  • *
  • Posts: 129
  • IM NOT RACIST, I HATE EVERYONE EQUALLY
  • SA-MP username: RebelFreedom
A.I.
« on: August 01, 2017, 09:28:07 am »
was thinking we need some fake players, about 20-30 to boost LW population.
i know everytime i go to join, i see 0-3 and i think "eh, boring" and i dont join.
they shouldnt just be fake names, without the A.I. players.
can the server host A.I. players? that can drive around, do activitys, shoot at players?


i know the answer is "NO".

i still refuse to believe that A.I. is as difficult as everyone thinks it is. what about adding pedestrians?
GTA 4 and 5 pull it off with more complexity. if its just "lag" we are worrying about, the game is laggy as it is and i feel we should just try it and see how bad it can be for awhile.. im sure the 3 regular players on this server wont mind too much, while they explore the new feature.
we can always go back!
let LW's be the one to lead GTASA into the FUTURE and bring SAMP back to life!
"People who get 'offended' offend me." - RebelFreedom

Offline blewert

  • The big cheese
  • Management
  • *
  • Posts: 802
  • SA-MP username: trewelb
Re: A.I.
« Reply #1 on: August 01, 2017, 09:31:17 am »


"Perpetual love and light shine through the branches, opening a new chapter."

Offline playa™

  • SA-MP Server Mod
  • *
  • Posts: 1449
Re: A.I.
« Reply #2 on: August 01, 2017, 09:37:52 am »
"Waterfalls of marble melt upon the urge of a greater power. Seeking confirmation from a platinum sky. A river of love overwriting its previous color. Fills the void in which a new plant is meant to grow. A glass volcano of passion erupts, dissolving its former darknesss, once, finally, eternally. True happiness is discovered through the finding of a legitimate passage. To fill the transparent abyss with new life. A growing new passion, perpetual love and light shine through the branches, opening a new chapter."

Offline EnzoMortelli

Re: A.I.
« Reply #3 on: August 01, 2017, 01:29:08 pm »
There are several issues to this suggestion and it should be split.

Faking player count is one matter,
adding interactive NPCs to the game is a completely different matter.

#1: Faking playercount is not only pretty useless, since as soon as you came online and saw that there are no actual players you'd be pissed enough to leave again; but also, faking playercounts is broadly frowned upon within the SA-MP community and is furthermore forbidden within the SA-MP Server usage agreement and doing it can get a server being taken off the SA-MP server master list, thus being unreachable through the server browser without knowing the IP address.

#2: The answer is actually yes. It is possible to create interactive NPC characters that can not only roam the map but also can be made react and interact with actual players (as can be seen here in this zombie NPC tech demo from one year ago). Creating such is truly not as hard as you'd believe, the simple tech demo NPCs required only about 300 to 400 lines of code and where done within one month. Making them actual pedestrians with a higher variety of interaction possibilities will though cost a bit more work, but it is still quite doable.
The problems start if there are many of them for a long time. First of all, a basic server computer can only take about up to 150 to 200 NPCs spawned at once, and the longer the NPC is online, the higher the ammount of memory he uses, eventually the machine will start decreasing in performance. The results are that NPCs will stop reacting or animating, and possibly slow the server connection down for the clients if there are many of them near the client. This can be solved by implementing a streamer code for NPCs, which will most likely be double the work that creating the actual pedestrians is, although still doable.
But to be clear: When you have the heavily populated cities of GTA IV and V in your mind, i can only say, forget it. A larger number of NPCs that will suffice to make a city look vivid will have a deep enough performance impact to ruin the game - especially given the game mode already lags even without such NPCs as you claim. After all since we're still running on a single thread, any of the ped actions will take up additional milliseconds in server communication. NPC peds = everyone is a high pinger. Next gen games such as IV and V run the AI modules in different threads, thus the main server thread does not have to wait for the ped reactions to finish.

So probably #1 no. and #2 you can try if you want

Oh, yea and
« Last Edit: August 01, 2017, 01:46:27 pm by EnzoMortelli »
Quote of the month:
none of the other servers have such a homogenous community where there is no place for childishness!

Offline [JOKER]Zaibatsu

Re: A.I.
« Reply #4 on: August 01, 2017, 01:43:13 pm »
This topic


Offline Habdel

  • SA-MP Server Admin
  • SA-MP Developer
  • *
  • Posts: 280
Re: A.I.
« Reply #5 on: August 01, 2017, 05:17:45 pm »
The best thing we can do is use Actors instead of NPC's, actors don't use as much ressources as NPC's since they don't move. The only thing they can do is  perform animations which is already good. I did that on the new island gamemode, when you're robbing a property the actor does the "handsup" animation and then returns back to normal after 11 mins. We can pretty much make actors as pedestrians who give you missions or shop tenders from which you can buy or sell stuff through dialogs. Kinda like these NPC's from warcraft.

Offline EnzoMortelli

Re: A.I.
« Reply #6 on: August 02, 2017, 06:04:07 am »
FCNPC Habdel.
Quote of the month:
none of the other servers have such a homogenous community where there is no place for childishness!

Offline RebelFreedom

  • SA-MP Donator
  • *
  • Posts: 129
  • IM NOT RACIST, I HATE EVERYONE EQUALLY
  • SA-MP username: RebelFreedom
Re: A.I.
« Reply #7 on: August 02, 2017, 07:26:51 am »
on fake players:
is it really against the rules to list them as players? perhaps if their tag was (A.I.) or something?
i want it clear that i do NOT want to try this if it puts LW's at risk in anyway.

on the more important issue:
if we had 20 people driving around as normal gtaSA peds, id see it has a massive improvement for start!
all peds can be localized in the Las Venturas area, were we all spawn.
maybe 10 prostitutes that do normal gtaSA behavior in Las Venturas as well. after all, whats GTA without killing prostitutes?
its a core symbol of the freedom of this game!

if they take up alot of memory to survive longer, give them lifespans were they die after 5 mins or however long. hell, that
would actually be pretty funny. but its just a start. id love to see something that just works, real well too.. LW's NEEDS peds.

i think this could be handled like this:
how many peds can we handle, and keep it fun and stable.
then find out how dense this population needs to be to be enjoyable.
then isolate them to an area of that size.

i am not suggesting a density or population anywere NEAR stock gtaSA levels.. but lets find something that works for LW's.
"People who get 'offended' offend me." - RebelFreedom

Offline liinor

  • SA-MP Donator
  • *
  • Posts: 89
  • Grand Theft Auto San Andreas troubleshooter
  • SA-MP username: [RedZone]liinor
Re: A.I.
« Reply #8 on: August 02, 2017, 09:45:24 am »
FCNPC Habdel.
NPC can't climb on objects, there are too much collision problems, npc can't fall from roofs sameway as players fall. It is not going to look even nearly as good as on singleplayer with FCNPC plugin because there will be much work with pathfinder system. I know it's not gonna be easy because I have tried to script them, there is already some npc citizien scripts on sa-mp forums that you can try to use on your private server to see how lame it is to play with them. You can use ColAndreas plugin to try to detect collisions. If you disagree you can show some video and prove why should people enjoy it. Then I may have to prove too.
« Last Edit: August 02, 2017, 10:40:05 am by liinor »
[NB]Zaibatsu - https://youtu.be/qq0vQK7qITs
KIFFLOM shoots my car on race: https://youtu.be/VBC9Nx8jINQ
Myle - http://imgur.com/a/xixxG (meme)

I got banned for ignorance , by hypocritical, unpardonable  and slur on casting group with their mad posts. I used wrong translation, but I still wont forgive about this. LOL

Offline EnzoMortelli

Re: A.I.
« Reply #9 on: August 04, 2017, 09:24:10 am »
on fake players:
Quote from: SA-MP Service Agreement
(g) You may not artificially increase your player count or provide false info to the
SA-MP query mechanism.
http://www.sa-mp.com/service_agreement.txt

@Iiinor Pedestrians don't have to climb on roofs or fall off of them. An idea would be to assign the NPCs routes where they don't have to cross obstacles present in the collision map. You don't need a heavy pathfinding algorithm if the NPCs get scripted routes to follow, and you could also do a little bit of work to edit the collision map towards flattening the NPC levels so they don't walk on billboards and stuff. After all, pedestrians just have to react on the player, they don't have to actually live otherwise.
Quote of the month:
none of the other servers have such a homogenous community where there is no place for childishness!

Offline RebelFreedom

  • SA-MP Donator
  • *
  • Posts: 129
  • IM NOT RACIST, I HATE EVERYONE EQUALLY
  • SA-MP username: RebelFreedom
Re: A.I.
« Reply #10 on: August 06, 2017, 07:02:46 am »
so, anyone working on anything yet or?
id be doing it already, but im not very good at scripting.. and im not allowed to touch LW's stuff.
"People who get 'offended' offend me." - RebelFreedom

Offline EnzoMortelli

Re: A.I.
« Reply #11 on: August 07, 2017, 12:21:37 pm »
Very good opportunity for you to get better at scripting. Good luck.
Quote of the month:
none of the other servers have such a homogenous community where there is no place for childishness!

Offline RebelFreedom

  • SA-MP Donator
  • *
  • Posts: 129
  • IM NOT RACIST, I HATE EVERYONE EQUALLY
  • SA-MP username: RebelFreedom
Re: A.I.
« Reply #12 on: August 08, 2017, 06:32:45 pm »
ok, let me just get access to the server and all scripts that are currently running, and an accurate running copy of the server to test on.

ill need to record and go over analytics and test the strain that various configurations of pedestrians puts on the server at any given time.
i will also need to test this under load with real players, on the real server.
"People who get 'offended' offend me." - RebelFreedom

Offline EnzoMortelli

Re: A.I.
« Reply #13 on: August 08, 2017, 09:17:38 pm »
You will not need any of these to start scripting the pedestrians as a filterscript. You don't need to access anything internal-related, though stats measuring for pedestrian interactions can be added by devs or managers later.

I can probably provide you with parts of the FCNPC zombie demo script if i still have it, though since it's not designed as a streamer it will not be of great use.
« Last Edit: August 08, 2017, 09:24:22 pm by EnzoMortelli »
Quote of the month:
none of the other servers have such a homogenous community where there is no place for childishness!