Client Update for 0.4.6 Released (2019-05-27)

Started by Stormeus, May 27, 2019, 03:46 AM

Previous topic - Next topic

EightyVice

Quote from: Xmair on Jun 02, 2019, 12:54 PMYou guys are literally going to do nothing with the NPCs, the maximum you'll be able to achieve is making them stand in an ammunition shop as a statue, let alone writing an AI for them. Do you guys have any idea what kind of task is it to write a proper AI?

Sonmez

Quote from: Xmair on Jun 02, 2019, 04:22 PM
Quote from: KrooB on Jun 02, 2019, 01:42 PM
Quote from: Piterus on Jun 02, 2019, 01:38 PMTo be honest NPCs wouldn't be as much a "revolution" as many people think because ye, it sounds nice, but has a lot of problems in the assumption.
You're right but I think we can fix them ???
That's exactly where you're wrong. NPCs won't be what you think.

At least we can try
if (!perfect) createAgain();

NicusorN5

You can define the city nodes, and give them as input data to the AI. You can next use some mort of algoritm like the A* , Pathfinder, calculating the node shortest way with some backtracking, etc.

I said that many times but not here: Programming is not about writing code, it is about solving problems.

The problem with the newbie scripters is that they don't think 'like a programmer'. Knowing syntax isn't enough for programming (but you need to know how to write proper code), critical and abstract thinking is.

EightyVice

Quote from: Athanatos on Jun 04, 2019, 03:45 PMYou can define the city nodes, and give them as input data to the AI. You can next use some mort of algoritm like the A* , Pathfinder, calculating the node shortest way with some backtracking, etc.

I said that many times but not here: Programming is not about writing code, it is about solving problems.

The problem with the newbie scripters is that they don't think 'like a programmer'. Knowing syntax isn't enough for programming (but you need to know how to write proper code), critical and abstract thinking is.
Exactly, Stormeus also have to do some cover for Vice City classes that manage Path nodes with Squrriel. Basically: CPathFind::FindNodeClosestToCoors 0x437150 (1.0) to return a node and it's structure is:
struct CPathNode {
    short m_wPathData1;
    short m_wPathData2;
    short m_wPosX;
    short m_wPosY;
    short m_wPosZ;
    char field_1[2];
    short field_2;
    char field_3[6];
};
btw here is my implementation for sandbox for VC comes with population implementation: https://github.com/ZeyadAhmed/VCSandBox/blob/master/VCSandBox/CPopulationManager.cpp#L211

NicusorN5

With the current tools we can just make an big array with the game node's extracted from the game data files, and then we* can try implementing some sort of algorithm that functions like an AI.

The kind of AI in games is 'weak AI' . A set of conditions and events, That's it. 'Weak' AI is absolute garbage to the 'Powerfull' nowadays AI used in high-tech robots.

NicusorN5

If VCMP uses SCM functions then there opcodes are enough for an NPC:
009A: $723 = create_actor_pedtype 4 model 95 at 10@ 11@ 12@
0187: 5@ = create_marker_above_actor $2099
04F4: put_actor $2684 into_turret_on_object $714 at_object_offset -2.5 -1.996 4.179 position 0 shooting_angle 360.0 with_weapon 27  //Please add this for players too :)
0465: remove_actor $2493 from_turret_mode  //for players too pls xd
01C9: actor $2324 kill_actor $2291
01CA: actor $853 kill_player $PLAYER_CHAR
0321: kill_actor $2295
0211: actor $actor walk_to 204.3 -1288.7
0239: actor $1036 run_to 65.8 -1444.0
009B: destroy_actor_instantly $853
034F: destroy_actor_with_fade $1037 // The actor fades away like a ghost
00A1: put_actor $PLAYER_ACTOR at 482.2 -69.9 9.9
0362: put_actor $PLAYER_ACTOR at 136.457 -817.37 9.44 and_remove_from_car
01D4: actor $PLAYER_ACTOR go_to_car 0@ and_enter_it_as_a_passenger
01D5: actor 13@ go_to_and_drive_car 14@
00A7: car 0@ drive_to 103.1 -832.3 9.317

NicusorN5

Also let's don't forget the streaming. An easy way should be letting the server generate and calculate the AI behiavour (but since the server executable has no somewhat access to game's source, this is going to be a hard task that requires general changes to the VC:MP's code).

Stormeus

Quote from: Athanatos on Jun 04, 2019, 06:14 PMIf VCMP uses SCM functions

It doesn't, and either way you still need to synchronize the actor's state so running SCM on the client won't cut it.

Quote from: Athanatos on Jun 04, 2019, 06:16 PMAn easy way should be letting the server generate and calculate the AI behiavour (but since the server executable has no somewhat access to game's source, this is going to be a hard task that requires general changes to the VC:MP's code).

Couldn't have said it better myself.

NicusorN5

#68
Quote from: Stormeus on Jun 04, 2019, 07:39 PM
Quote from: Athanatos on Jun 04, 2019, 06:14 PMIf VCMP uses SCM functions

It doesn't, and either way you still need to synchronize the actor's state so running SCM on the client won't cut it.

Thanks for breaking my dreams to make missions for vc:mp :c . And ofc you should synchronize the actor's stuff, I have a somewhat experience in game developing, I didn't say that by using SCM , you would not need to sync the peds (that's pretty dumb to say that using scm opcodes will solve this problem).

.

If you don't have anything meaningful to contribute. Just shut the f* up and play the game.

.

NicusorN5

Ay, it was just an idea for the implementation of npcs :c .

EightyVice

Quote from: . on Jun 05, 2019, 05:58 PMIf you don't have anything meaningful to contribute. Just shut the f* up and play the game.

For fu*s sake can't you write something without being aggressive?

KrOoB_

We're talking about update and suggests. U can shut up or u can leave this topic. :o

ℛḝξ☂

I believe for most of people liking this topic the important thing isn't just the update but the news that vcmp is still being developed. ;)
I may be a slow walker but I am always walking.

Sonmez

Quote from: . on Jun 05, 2019, 05:58 PMIf you don't have anything meaningful to contribute. Just shut the f* up and play the game.


If you do not have a laborious update. Just shut the f* up and play with your codes.
if (!perfect) createAgain();